Skip to content

Commit

Permalink
Works outside Rails
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdplm committed Feb 13, 2012
1 parent 291f7ff commit 6beaf4c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/airbrake/rails.rb
Expand Up @@ -28,14 +28,13 @@ def self.initialize
end

Airbrake.configure(true) do |config|
config.logger = rails_logger
config.environment_name = if defined?(Rails.env) ? Rails.env : RAILS_ENV
config.project_root = if defined?(Rails.root) ? Rails.root : RAILS_ROOT
config.framework = if defined?(Rails.version) ? "Rails: #{Rails.version}" : "Rails: #{Rails::VERSION::STRING}"
config.logger = rails_logger
config.environment_name = defined?(Rails.env) && Rails.env || defined?(RAILS_ENV) && RAILS_ENV
config.project_root = defined?(Rails.root) && Rails.root || defined?(RAILS_ROOT) && RAILS_ROOT
config.framework = defined?(Rails.version) && "Rails: #{Rails.version}" || defined?(Rails::VERSION::STRING) && "Rails: #{Rails::VERSION::STRING}"
end
end
end
end

Airbrake::Rails.initialize

Airbrake::Rails.initialize

0 comments on commit 6beaf4c

Please sign in to comment.