Sha256: b64b29bf60434d5f299f8f3d25e3b8bc23eca898db382b21f586005ef7cc3c76

Contents?: true

Size: 610 Bytes

Versions: 6

Compression:

Stored size: 610 Bytes

Contents

# encoding: utf-8

require 'yaml'

module RuboCop
  module RSpec
    # Because RuboCop doesn't yet support plugins, we have to monkey patch in a
    # bit of our configuration.
    module Inject
      DEFAULT_FILE = File.expand_path(
        '../../../../config/default.yml', __FILE__
      )

      def self.defaults!
        hash = YAML.load_file(DEFAULT_FILE)
        puts "configuration from #{DEFAULT_FILE}" if ConfigLoader.debug?
        config = ConfigLoader.merge_with_default(hash, DEFAULT_FILE)

        ConfigLoader.instance_variable_set(:@default_configuration, config)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rubocop-rspec-1.4.0 lib/rubocop/rspec/inject.rb
rubocop-rspec-1.3.1 lib/rubocop/rspec/inject.rb
rubocop-rspec-1.3.0 lib/rubocop/rspec/inject.rb
rubocop-rspec-1.2.2 lib/rubocop/rspec/inject.rb
rubocop-rspec-1.2.1 lib/rubocop/rspec/inject.rb
rubocop-rspec-1.2.0 lib/rubocop/rspec/inject.rb