Method: Cucumber::Chef::Config.load

Defined in:
lib/cucumber/chef/config.rb

.loadObject



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/cucumber/chef/config.rb', line 68

def self.load
  config_rb = Cucumber::Chef.config_rb
  Cucumber::Chef.logger.debug { "Attempting to load cucumber-chef configuration from '%s'." % config_rb }
  self.from_file(config_rb)
  self.verify
  Cucumber::Chef.logger.debug { "Successfully loaded cucumber-chef configuration from '%s'." % config_rb }

  log_dump = self.duplicate(self.configuration)
  log_dump[:aws].merge!(:aws_access_key_id => "[REDACTED]", :aws_secret_access_key => "[REDACTED]")
  Cucumber::Chef.logger.debug { log_dump.inspect }

  self
rescue Errno::ENOENT, UtilityError
  raise ConfigError, "Could not find your cucumber-chef configuration file; did you run 'cucumber-chef init'?"
end