Sha256: 1e20be92ca129c1e8ef66353546494c023adf83b8e360b8dffd7172630a56a4e

Contents?: true

Size: 431 Bytes

Versions: 8

Compression:

Stored size: 431 Bytes

Contents

require 'yaml'
require_relative 'config'

module PairingMatrix
  class ConfigReader
    def initialize(config_file)
      @config_file = config_file
    end

    def config
      raw_config = YAML::load_file @config_file
      PairingMatrix::Config.new(
          raw_config['repos'],
          raw_config['authors_regex'],
          raw_config['github_access_token'],
          raw_config['github_repos']
      )
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pairing_matrix-2.2 lib/pairing_matrix/config/config_reader.rb
pairing_matrix-2.1.1 lib/pairing_matrix/config/config_reader.rb
pairing_matrix-2.1 lib/pairing_matrix/config/config_reader.rb
pairing_matrix-2.0 lib/pairing_matrix/config/config_reader.rb
pairing_matrix-1.2 lib/pairing_matrix/config/config_reader.rb
pairing_matrix-1.1.1 lib/pairing_matrix/config/config_reader.rb
pairing_matrix-1.1 lib/pairing_matrix/config/config_reader.rb
pairing_matrix-1.0.1 lib/pairing_matrix/config/config_reader.rb