lib/sapience/configuration.rb in sapience-0.1.10 vs lib/sapience/configuration.rb in sapience-0.1.11

- old
+ new

@@ -15,10 +15,11 @@ appenders: [{ file: { io: STDOUT, formatter: :color } }], }.freeze # Initial default Level for all new instances of Sapience::Logger def initialize(options = {}) # rubocop:disable AbcSize - @options = DEFAULT.merge(options.deep_symbolize_keys!) + fail ArgumentError, "options need to be a hash" unless options.is_a?(Hash) + @options = DEFAULT.merge(options.deep_symbolize_keys) self.default_level = @options[:log_level].to_sym self.backtrace_level = @options[:log_level].to_sym self.application = @options[:application] self.host = @options[:host] self.ap_options = @options[:ap_options]