Module: ReleaseCeremony::Project::Config

Extended by:
Config
Included in:
Config
Defined in:
lib/release_ceremony/project.rb

Overview

Reads and validates the optional .release_ceremony.yml overrides.

Instance Method Summary collapse

Instance Method Details

#read(root) ⇒ Object

Raises:



99
100
101
102
103
104
105
106
107
108
# File 'lib/release_ceremony/project.rb', line 99

def read(root)
  path = File.join(root, CONFIG_FILE)
  return {} unless File.exist?(path)

  config = parse(path)
  unknown = config.keys - CONFIG_KEYS
  raise Error, "#{CONFIG_FILE} has unknown keys: #{unknown.join(', ')}" unless unknown.empty?

  parse_verification_commands(config)
end