Permalink
Browse files

update supported rails versions

  • Loading branch information...
shime committed Sep 5, 2012
1 parent cb536b0 commit 57822581b011dbc7ccfd805ebb6f5d27f6c30416
View
@@ -1,3 +1,4 @@
+2.3.14
3.0.0
3.0.1
3.0.2
@@ -109,9 +109,19 @@
end
When /^I configure the Airbrake shim$/ do
- bundle_gem("sham_rack")
-
+ if bundler_manages_gems?
+ bundle_gem("sham_rack")
+ end
shim_file = File.join(PROJECT_ROOT, 'features', 'support', 'airbrake_shim.rb.template')
+ if rails_supports_initializers?
+ target = File.join(rails_root, 'config', 'initializers', 'airbrake_shim.rb')
+ FileUtils.cp(shim_file, target)
+ else
+ File.open(environment_path, 'a') do |file|
+ file.puts
+ file.write IO.read(shim_file)
+ end
+ end
target = File.join(rails_root, 'config', 'initializers', 'airbrake_shim.rb')
FileUtils.cp(shim_file, target)
end
@@ -1,6 +1,6 @@
require 'sham_rack'
-Airbrake.configuration.logger = Logger.new STDOUT
+Airbrake.configuration.logger = Logger.new STDOUT if defined?(Airbrake)
ShamRack.at("api.airbrake.io") do |env|
response = <<-end_xml

0 comments on commit 5782258

Please sign in to comment.