Sha256: 1445d14f2e76a3ee9146b850582699a4d4bff6d298dd0f54eff542e2095303bf

Contents?: true

Size: 705 Bytes

Versions: 3

Compression:

Stored size: 705 Bytes

Contents

require 'cookstyle/version'

# ensure the desired target version of RuboCop is gem activated
gem 'rubocop', "= #{Cookstyle::RUBOCOP_VERSION}"
require 'rubocop'

module RuboCop
  class ConfigLoader
    RUBOCOP_HOME.gsub!(
      /^.*$/,
      File.realpath(File.join(File.dirname(__FILE__), '..'))
    )

    DEFAULT_FILE.gsub!(
      /^.*$/,
      File.join(RUBOCOP_HOME, 'config', 'default.yml')
    )
  end
end

# Cookstyle patches the RuboCop tool to set a new default configuration that
# is vendored in the Cookstyle codebase.
module Cookstyle
  # @return [String] the absolute path to the main RuboCop configuration YAML
  #   file
  def self.config
    RuboCop::ConfigLoader::DEFAULT_FILE
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cookstyle-4.0.0 lib/cookstyle.rb
cookstyle-3.0.2 lib/cookstyle.rb
cookstyle-3.0.1 lib/cookstyle.rb