Permalink
Browse files

WIP: Hoptoad -> Airbrake

  • Loading branch information...
1 parent 02220b1 commit ceb0feb7ad1ec154df836cd7445d78cbd81825b4 @jyurek jyurek committed Aug 11, 2011
Showing with 759 additions and 746 deletions.
  1. +6 −6 Rakefile
  2. +5 −5 hoptoad_notifier.gemspec → airbrake.gemspec
  3. +5 −5 features/metal.feature
  4. +5 −5 features/rack.feature
  5. +81 −81 features/rails.feature
  6. +15 −15 features/rails_with_js_notifier.feature
  7. +11 −11 features/rake.feature
  8. +5 −5 features/sinatra.feature
  9. +2 −2 features/{support/hoptoad_shim.rb.template → step_definitions/airbrake_shim.rb.template}
  10. +1 −1 features/step_definitions/rack_steps.rb
  11. +27 −27 features/step_definitions/rails_application_steps.rb
  12. +5 −5 features/step_definitions/rake_steps.rb
  13. +15 −0 features/support/airbrake_shim.rb.template
  14. +13 −13 features/support/rake/Rakefile
  15. +16 −16 features/user_informer.feature
  16. +21 −21 generators/{hoptoad/hoptoad_generator.rb → airbrake/airbrake_generator.rb}
  17. 0 generators/{hoptoad → airbrake}/lib/insert_commands.rb
  18. 0 generators/{hoptoad → airbrake}/lib/rake_commands.rb
  19. +7 −7 generators/{hoptoad/templates/hoptoad_notifier_tasks.rake → airbrake/templates/airbrake_tasks.rake}
  20. +6 −0 generators/airbrake/templates/capistrano_hook.rb
  21. +2 −2 generators/{hoptoad → airbrake}/templates/initializer.rb
  22. +0 −6 generators/hoptoad/templates/capistrano_hook.rb
  23. +25 −27 lib/{hoptoad_notifier.rb → airbrake.rb}
  24. +1 −1 lib/{hoptoad_notifier → airbrake}/backtrace.rb
  25. +21 −0 lib/airbrake/capistrano.rb
  26. +18 −18 lib/{hoptoad_notifier → airbrake}/configuration.rb
  27. +3 −3 lib/{hoptoad_notifier → airbrake}/notice.rb
  28. +42 −0 lib/airbrake/rack.rb
  29. +14 −14 lib/{hoptoad_notifier → airbrake}/rails.rb
  30. +10 −10 lib/{hoptoad_notifier → airbrake}/rails/action_controller_catcher.rb
  31. +16 −16 lib/{hoptoad_notifier → airbrake}/rails/controller_methods.rb
  32. +9 −9 lib/{hoptoad_notifier → airbrake}/rails/error_lookup.rb
  33. +8 −8 lib/{hoptoad_notifier → airbrake}/rails/javascript_notifier.rb
  34. +14 −14 lib/{hoptoad_notifier → airbrake}/rails3_tasks.rb
  35. +33 −0 lib/airbrake/railtie.rb
  36. +10 −10 lib/{hoptoad_notifier → airbrake}/rake_handler.rb
  37. +8 −8 lib/{hoptoad_notifier → airbrake}/sender.rb
  38. +6 −6 lib/{hoptoad_notifier → airbrake}/shared_tasks.rb
  39. +17 −17 lib/{hoptoad_notifier → airbrake}/tasks.rb
  40. +4 −4 lib/{hoptoad_notifier → airbrake}/user_informer.rb
  41. +1 −1 lib/{hoptoad_notifier → airbrake}/version.rb
  42. +11 −11 lib/{hoptoad_tasks.rb → airbrake_tasks.rb}
  43. +0 −21 lib/hoptoad_notifier/capistrano.rb
  44. +0 −42 lib/hoptoad_notifier/rack.rb
  45. +0 −33 lib/hoptoad_notifier/railtie.rb
  46. +21 −21 lib/rails/generators/{hoptoad/hoptoad_generator.rb → airbrake/airbrake_generator.rb}
  47. +4 −4 lib/templates/javascript_notifier.erb
  48. +6 −6 lib/templates/rescue.erb
  49. +1 −1 rails/init.rb
  50. +6 −6 script/integration_test.rb
  51. 0 test/{hoptoad_2_2.xsd → airbrake_2_2.xsd}
  52. +21 −21 test/{hoptoad_tasks_test.rb → airbrake_tasks_test.rb}
  53. +20 −20 test/backtrace_test.rb
  54. +23 −23 test/catcher_test.rb
  55. +24 −24 test/configuration_test.rb
  56. +18 −18 test/helper.rb
  57. +5 −5 test/javascript_notifier_test.rb
  58. +10 −10 test/logger_test.rb
  59. +10 −10 test/notice_test.rb
  60. +31 −31 test/notifier_test.rb
  61. +7 −7 test/rack_test.rb
  62. +8 −8 test/rails_initializer_test.rb
  63. +1 −1 test/recursion_test.rb
  64. +14 −14 test/sender_test.rb
  65. +10 −10 test/user_informer_test.rb
View
@@ -16,7 +16,7 @@ task :clean do
exec "rm -rf tmp"
end
-desc 'Test the hoptoad_notifier gem.'
+desc 'Test the airbrake gem.'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.pattern = 'test/**/*_test.rb'
@@ -27,7 +27,7 @@ namespace :changeling do
desc "Bumps the version by a minor or patch version, depending on what was passed in."
task :bump, :part do |t, args|
# Thanks, Jeweler!
- if HoptoadNotifier::VERSION =~ /^(\d+)\.(\d+)\.(\d+)(?:\.(.*?))?$/
+ if Airbrake::VERSION =~ /^(\d+)\.(\d+)\.(\d+)(?:\.(.*?))?$/
major = $1.to_i
minor = $2.to_i
patch = $3.to_i
@@ -48,9 +48,9 @@ namespace :changeling do
version = [major, minor, patch, build].compact.join('.')
- File.open(File.join("lib", "hoptoad_notifier", "version.rb"), "w") do |f|
+ File.open(File.join("lib", "airbrake", "notifier", "version.rb"), "w") do |f|
f.write <<EOF
-module HoptoadNotifier
+module Airbrake
VERSION = "#{version}".freeze
end
EOF
@@ -59,10 +59,10 @@ EOF
desc "Writes out the new CHANGELOG and prepares the release"
task :change do
- load 'lib/hoptoad_notifier/version.rb'
+ load 'lib/airbrake/version.rb'
file = "CHANGELOG"
old = File.read(file)
- version = HoptoadNotifier::VERSION
+ version = Airbrake::VERSION
message = "Bumping to version #{version}"
File.open(file, "w") do |f|
@@ -1,10 +1,10 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
-require "hoptoad_notifier/version"
+require "airbrake/version"
Gem::Specification.new do |s|
- s.name = %q{hoptoad_notifier}
- s.version = HoptoadNotifier::VERSION.dup
+ s.name = %q{airbrake}
+ s.version = Airbrake::VERSION.dup
s.summary = %q{Send your application errors to our hosted service and reclaim your inbox.}
s.require_paths = ["lib"]
@@ -26,8 +26,8 @@ Gem::Specification.new do |s|
s.add_development_dependency("shoulda", "~> 2.11.3")
s.authors = ["thoughtbot, inc"]
- s.email = %q{support@hoptoadapp.com}
- s.homepage = "http://www.hoptoadapp.com"
+ s.email = %q{support@airbrakeapp.com}
+ s.homepage = "http://www.airbrakeapp.com"
s.platform = Gem::Platform::RUBY
end
View
@@ -1,11 +1,11 @@
Feature: Rescue errors in Rails middleware
Background:
- Given I have built and installed the "hoptoad_notifier" gem
+ Given I have built and installed the "airbrake" gem
And I generate a new Rails application
- And I configure the Hoptoad shim
- And I configure my application to require the "hoptoad_notifier" gem
- And I run "script/generate hoptoad -k myapikey"
+ And I configure the Airbrake shim
+ And I configure my application to require the "airbrake" gem
+ And I run "script/generate airbrake -k myapikey"
Scenario: Rescue an exception in the dispatcher
When I define a Metal endpoint called "Exploder":
@@ -15,7 +15,7 @@ Feature: Rescue errors in Rails middleware
end
"""
When I perform a request to "http://example.com:123/metal/index?param=value"
- Then I should receive the following Hoptoad notification:
+ Then I should receive the following Airbrake notification:
| error message | RuntimeError: Explode |
| error class | RuntimeError |
| parameters | param: value |
View
@@ -1,25 +1,25 @@
Feature: Use the notifier in a plain Rack app
Background:
- Given I have built and installed the "hoptoad_notifier" gem
+ Given I have built and installed the "airbrake" gem
Scenario: Rescue and exception in a Rack app
Given the following Rack app:
"""
require 'rack'
- require 'hoptoad_notifier'
+ require 'airbrake'
- HoptoadNotifier.configure do |config|
+ Airbrake.configure do |config|
config.api_key = 'my_api_key'
end
app = Rack::Builder.app do
- use HoptoadNotifier::Rack
+ use Airbrake::Rack
run lambda { |env| raise "Rack down" }
end
"""
When I perform a Rack request to "http://example.com:123/test/index?param=value"
- Then I should receive the following Hoptoad notification:
+ Then I should receive the following Airbrake notification:
| error message | RuntimeError: Rack down |
| error class | RuntimeError |
| parameters | param: value |
Oops, something went wrong.

0 comments on commit ceb0feb

Please sign in to comment.