lib/phobos.rb in phobos-1.7.0 vs lib/phobos.rb in phobos-1.7.1

- old
+ new

@@ -29,16 +29,15 @@ class << self attr_reader :config, :logger attr_accessor :silence_log def configure(configuration) - ENV['RAILS_ENV'] = ENV['RACK_ENV'] ||= 'development' @config = DeepStruct.new(fetch_settings(configuration)) @config.class.send(:define_method, :producer_hash) { Phobos.config.producer&.to_hash } @config.class.send(:define_method, :consumer_hash) { Phobos.config.consumer&.to_hash } @config.listeners ||= [] configure_logger - logger.info { Hash(message: 'Phobos configured', env: ENV['RACK_ENV']) } + logger.info { Hash(message: 'Phobos configured', env: ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'N/A') } end def add_listeners(listeners_configuration) listeners_config = DeepStruct.new(fetch_settings(listeners_configuration)) @config.listeners += listeners_config.listeners