exe/racecar in racecar-0.1.1 vs exe/racecar in racecar-0.1.2

- old
+ new

@@ -22,26 +22,24 @@ consumer_name = ARGV.first or raise "No consumer specified" config_file = "config/racecar.yml" puts "=> Starting Racecar consumer #{consumer_name}..." -if defined?(Rails) - puts "=> Booting Rails application..." +puts "=> Booting Rails application..." - require_relative "../config/environment" +require "./config/environment" - Racecar.config.load_file(config_file, Rails.env) +Racecar.config.load_file(config_file, Rails.env) - if Racecar.config.log_to_stdout - # Write to STDOUT as well as to the log file. - console = ActiveSupport::Logger.new($stdout) - console.formatter = Rails.logger.formatter - console.level = Rails.logger.level - Rails.logger.extend(ActiveSupport::Logger.broadcast(console)) - end - - Racecar.logger = Rails.logger +if Racecar.config.log_to_stdout + # Write to STDOUT as well as to the log file. + console = ActiveSupport::Logger.new($stdout) + console.formatter = Rails.logger.formatter + console.level = Rails.logger.level + Rails.logger.extend(ActiveSupport::Logger.broadcast(console)) end + +Racecar.logger = Rails.logger # Find the consumer class by name. consumer_class = Kernel.const_get(consumer_name) # Load config defined by the consumer class itself.