Sha256: 8db21d53d5d5217b8259c2f15edb13bc20fbcd5a57655d562ab3b44b8b551342

Contents?: true

Size: 745 Bytes

Versions: 23

Compression:

Stored size: 745 Bytes

Contents

require_relative "loads_yaml_config"
require_relative "merges_settings"
require_relative "creates_config_store"

module Standard
  Config = Struct.new(:runner, :paths, :rubocop_options, :rubocop_config_store)

  class BuildsConfig
    def initialize
      @loads_yaml_config = LoadsYamlConfig.new
      @merges_settings = MergesSettings.new
      @creates_config_store = CreatesConfigStore.new
    end

    def call(argv, search_path = Dir.pwd)
      standard_config = @loads_yaml_config.call(argv, search_path)
      settings = @merges_settings.call(argv, standard_config)
      Config.new(
        settings.runner,
        settings.paths,
        settings.options,
        @creates_config_store.call(standard_config)
      )
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
standard-0.3.0 lib/standard/builds_config.rb
standard-0.2.5 lib/standard/builds_config.rb
standard-0.2.4 lib/standard/builds_config.rb
standard-0.2.3 lib/standard/builds_config.rb
standard-0.2.2 lib/standard/builds_config.rb
standard-0.2.1 lib/standard/builds_config.rb
standard-0.2.0 lib/standard/builds_config.rb
standard-0.1.10 lib/standard/builds_config.rb
standard-0.1.9 lib/standard/builds_config.rb
standard-0.1.8 lib/standard/builds_config.rb
standard-0.1.7 lib/standard/builds_config.rb
standard-0.1.6 lib/standard/builds_config.rb
standard-0.1.5 lib/standard/builds_config.rb
standard-0.1.4 lib/standard/builds_config.rb
standard-0.1.3 lib/standard/builds_config.rb
standard-0.1.2 lib/standard/builds_config.rb
standard-0.1.1 lib/standard/builds_config.rb
standard-0.1.0 lib/standard/builds_config.rb
standard-0.0.41 lib/standard/builds_config.rb
standard-0.0.40 lib/standard/builds_config.rb