lib/larva/configurator.rb in larva-0.7.0 vs lib/larva/configurator.rb in larva-0.7.1
- old
+ new
@@ -19,11 +19,13 @@
Filum.logger.info "Configuring Daemon"
if meducation_sdk_config = parse_config_file('meducation-sdk.yml')
MeducationSDK.config do |config|
config.access_id = meducation_sdk_config[:access_id]
- config.secret_key = @options.fetch(:meducation_sdk_secret_key, meducation_sdk_config[:secret_key])
- config.endpoint = @options.fetch(:meducation_sdk_endpoint, "http://localhost:3000/system") if @env == 'development'
+
+ # Don't use fetch for these as nil values might be deliberately passed it
+ config.secret_key = @options[:meducation_sdk_secret_key] || meducation_sdk_config[:secret_key]
+ config.endpoint = @options[:meducation_sdk_endpoint ] || "http://localhost:3000/system" if @env == 'development'
config.logger = Filum.logger
end
end
if propono_config = parse_config_file('propono.yml')