Sha256: 4c9b38d1d1810c28c11e4a0ee64b40f09caa57385229263d1d83006e4db2b4b1

Contents?: true

Size: 714 Bytes

Versions: 9

Compression:

Stored size: 714 Bytes

Contents

require_relative "chefstyle/version"

# ensure the desired target version of RuboCop is gem activated
gem "rubocop", "= #{Chefstyle::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

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
chefstyle-1.1.3 lib/chefstyle.rb
chefstyle-1.1.2 lib/chefstyle.rb
chefstyle-1.1.1 lib/chefstyle.rb
chefstyle-1.1.0 lib/chefstyle.rb
chefstyle-1.0.5 lib/chefstyle.rb
chefstyle-1.0.2 lib/chefstyle.rb
chefstyle-1.0.1 lib/chefstyle.rb
chefstyle-0.15.1 lib/chefstyle.rb
chefstyle-0.14.1 lib/chefstyle.rb