Permalink
Browse files

remove hard dependency on girl_friday

  • Loading branch information...
1 parent 26ef8cd commit 3c289f9d104fe659e9f1599af95b186195425839 @shime shime committed Nov 29, 2012
Showing with 13 additions and 6 deletions.
  1. +1 −1 Gemfile.lock
  2. +1 −1 airbrake.gemspec
  3. +1 −1 gemfiles/3.0.gemfile.lock
  4. +1 −1 gemfiles/3.1.gemfile.lock
  5. +1 −1 gemfiles/3.2.gemfile.lock
  6. +5 −1 lib/airbrake.rb
  7. +3 −0 lib/airbrake/configuration.rb
View
@@ -3,7 +3,6 @@ PATH
specs:
airbrake (3.1.6)
builder
- girl_friday
GEM
remote: http://rubygems.org/
@@ -163,6 +162,7 @@ DEPENDENCIES
capistrano
cucumber-rails (~> 1.1.1)
fakeweb (~> 1.3.0)
+ girl_friday
nokogiri (~> 1.5.0)
rspec (~> 2.6.0)
rspec-rails
View
@@ -14,7 +14,6 @@ Gem::Specification.new do |s|
s.test_files = Dir.glob("{test,spec,features}/**/*")
s.add_runtime_dependency("builder")
- s.add_runtime_dependency("girl_friday")
s.add_development_dependency("bourne", ">= 1.0")
s.add_development_dependency("cucumber-rails","~> 1.1.1")
@@ -28,6 +27,7 @@ Gem::Specification.new do |s|
s.add_development_dependency("appraisal")
s.add_development_dependency("rspec-rails")
s.add_development_dependency("sinatra")
+ s.add_development_dependency("girl_friday")
s.authors = ["Airbrake"]
s.email = %q{support@airbrake.io}
@@ -3,7 +3,6 @@ PATH
specs:
airbrake (3.1.6)
builder
- girl_friday
GEM
remote: http://rubygems.org/
@@ -181,6 +180,7 @@ DEPENDENCIES
capistrano
cucumber-rails (~> 1.1.1)
fakeweb (~> 1.3.0)
+ girl_friday
nokogiri (~> 1.5.0)
rails (~> 3.0.17)
rspec (~> 2.6.0)
@@ -3,7 +3,6 @@ PATH
specs:
airbrake (3.1.6)
builder
- girl_friday
GEM
remote: http://rubygems.org/
@@ -193,6 +192,7 @@ DEPENDENCIES
capistrano
cucumber-rails (~> 1.1.1)
fakeweb (~> 1.3.0)
+ girl_friday
nokogiri (~> 1.5.0)
rails (~> 3.1.8)
rspec (~> 2.6.0)
@@ -3,7 +3,6 @@ PATH
specs:
airbrake (3.1.6)
builder
- girl_friday
GEM
remote: http://rubygems.org/
@@ -192,6 +191,7 @@ DEPENDENCIES
capistrano
cucumber-rails (~> 1.1.1)
fakeweb (~> 1.3.0)
+ girl_friday
nokogiri (~> 1.5.0)
rails (~> 3.2.9)
rspec (~> 2.6.0)
View
@@ -1,4 +1,8 @@
-require "girl_friday"
+begin
+ require "girl_friday"
+rescue LoadError
+end
+
require 'net/http'
require 'net/https'
require 'rubygems'
@@ -306,6 +306,9 @@ def default_async_processor
Airbrake.sender.send_to_airbrake(notice)
end
lambda {|notice| queue << notice}
+ rescue NameError
+ warn "[AIRBRAKE] You can't use the default async handler without girl_friday."\
+ " Please make sure you have girl_friday installed."
end
end
end

0 comments on commit 3c289f9

Please sign in to comment.