lib/wat_catcher/railtie.rb in wat_catcher-0.0.2 vs lib/wat_catcher/railtie.rb in wat_catcher-0.0.3
- old
+ new
@@ -1,19 +1,19 @@
module WatCatcher
- class Railtie < Rails::Railtie
+ class Railtie < ::Rails::Railtie
config.before_initialize do
# Configure bugsnag rails defaults
WatCatcher.configure do |config|
- config.logger = Rails.logger
- config.release_stage = Rails.env.to_s
- config.project_root = Rails.root.to_s
+ config.logger = ::Rails.logger
+ config.release_stage = ::Rails.env.to_s
+ config.project_root = ::Rails.root.to_s
end
# Auto-load configuration settings from config/bugsnag.yml if it exists
- config_file = Rails.root.join("config", "wat_catcher.yml")
+ config_file = ::Rails.root.join("config", "wat_catcher.yml")
config = YAML.load_file(config_file) if File.exists?(config_file)
- WatCatcher.configure(config[Rails.env] ? config[Rails.env] : config) if config
+ WatCatcher.configure(config[::Rails.env] ? config[::Rails.env] : config) if config
end
initializer "wat_catcher.use_rack_middleware" do |app|
begin
app.config.middleware.insert_after ActionDispatch::DebugExceptions, "WatCatcher::Middleware"
\ No newline at end of file