airbrake 4.0.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +58 -0
- data/README.md +6 -5
- data/airbrake.gemspec +1 -0
- data/lib/airbrake.rb +6 -3
- data/lib/airbrake/capistrano.rb +3 -2
- data/lib/airbrake/capistrano3.rb +2 -63
- data/lib/airbrake/configuration.rb +2 -1
- data/lib/airbrake/rack.rb +2 -0
- data/lib/airbrake/sidekiq.rb +9 -0
- data/lib/airbrake/tasks.rb +1 -3
- data/lib/airbrake/tasks/airbrake.cap +18 -17
- data/lib/airbrake/utils/params_cleaner.rb +5 -0
- data/lib/airbrake/version.rb +1 -1
- data/resources/notice.xml +1 -2
- data/test/capistrano_test.rb +1 -0
- data/test/notifier_test.rb +12 -0
- data/test/params_cleaner_test.rb +19 -12
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92520a721aab5d73da3d97a7014615e3488fad82
|
4
|
+
data.tar.gz: 0b6fa7570aec43283532474d468eeda973d4b45b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d36f715cdaef5b5f3af800ec998df09fcd55ce2304b76879df71dd8a68b42202871b4b4443beda2a7c8071f677a14941915ce91cd92ec3908fa515004589df41
|
7
|
+
data.tar.gz: ae00ca913a519e76a6fa8fb7fe31f8daf4a9d9daf94db4d97953d654ab1b8ece9a8b4bd61f656420609c9a1c9f5b53f857e8dff2d58ec1fb43ff1746e71f7869
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,60 @@
|
|
1
|
+
Version 4.1.0 - 2014-09-04 23:16:08 +0200
|
2
|
+
===============================================================================
|
3
|
+
|
4
|
+
Benjamin Fleischer (1):
|
5
|
+
Add license to gemspec, is MIT
|
6
|
+
|
7
|
+
Chun-wei Kuo (1):
|
8
|
+
Add missing RAILS_ENV to the deploy notification task for Capistrano 3
|
9
|
+
|
10
|
+
David (1):
|
11
|
+
Merge pull request #306 from kiela/master
|
12
|
+
|
13
|
+
Giovanni Cappellotto (1):
|
14
|
+
Add support for Sidekiq > 3
|
15
|
+
|
16
|
+
Kamil Kieliszczyk (2):
|
17
|
+
Add ability to filter arrays
|
18
|
+
Add ability to filter arrays
|
19
|
+
|
20
|
+
Kelley Reynolds (1):
|
21
|
+
Ignore ActionController::UnknownFormat for Rails 4+ which is now handled by middleware
|
22
|
+
|
23
|
+
Marko Šiftar (11):
|
24
|
+
Revert "Add ability to filter arrays"
|
25
|
+
Merge pull request #307 from airbrake/revert-306-master
|
26
|
+
Merge pull request #305 from Domon/fix-capistrano3-task
|
27
|
+
Merge pull request #302 from gregory/remove_unused_controller
|
28
|
+
Merge pull request #310 from kiela/master
|
29
|
+
Merge pull request #271 from rykov/master
|
30
|
+
Merge pull request #275 from kreynolds/rails-4-unknown-format
|
31
|
+
Merge pull request #312 from bf4/add_license_to_gemspe
|
32
|
+
Merge pull request #304 from pitchtarget/sidekiq-support
|
33
|
+
Merge pull request #273 from meetme2meat/master
|
34
|
+
Merge pull request #300 from chute/master
|
35
|
+
|
36
|
+
Michael Rykov (1):
|
37
|
+
Keep passed exception if original_exception is nil
|
38
|
+
|
39
|
+
Petr Bela (1):
|
40
|
+
Add RACK_ENV to rake task for non-Rails apps
|
41
|
+
|
42
|
+
Sami Haahtinen (1):
|
43
|
+
Update capistrano v3 support
|
44
|
+
|
45
|
+
Viren Negi (1):
|
46
|
+
Added a comment to how to add specify environment when use with rack app
|
47
|
+
|
48
|
+
gregory (1):
|
49
|
+
remove unused controller
|
50
|
+
|
51
|
+
shifi (4):
|
52
|
+
update capistrano test to make sure we set RAILS_ENV when using rake task
|
53
|
+
Update ignored exceptions by default in Readme
|
54
|
+
fix conflicts in airbrake.cap
|
55
|
+
Merge branch 'ressu-capistrano3'
|
56
|
+
|
57
|
+
|
1
58
|
Version 4.0.0 - 2014-05-27 16:32:26 -0700
|
2
59
|
===============================================================================
|
3
60
|
|
@@ -1385,5 +1442,6 @@ Nick Quaranto (3):
|
|
1385
1442
|
|
1386
1443
|
|
1387
1444
|
|
1445
|
+
|
1388
1446
|
|
1389
1447
|
|
data/README.md
CHANGED
@@ -62,14 +62,14 @@ The generator creates a file under `config/initializers/airbrake.rb` configuring
|
|
62
62
|
Ignored exceptions
|
63
63
|
------------------------
|
64
64
|
|
65
|
-
Exceptions raised from Rails environments named **development**, **test** or **cucumber** will be ignored by default.
|
65
|
+
Exceptions raised from Rails environments named **development**, **test** or **cucumber** will be ignored by default.
|
66
66
|
|
67
67
|
You can clear the list of ignored environments with this setting:
|
68
68
|
|
69
69
|
config.development_environments = []
|
70
70
|
|
71
71
|
List of ignored exception classes includes:
|
72
|
-
|
72
|
+
|
73
73
|
ActiveRecord::RecordNotFound
|
74
74
|
ActionController::RoutingError
|
75
75
|
ActionController::InvalidAuthenticityToken
|
@@ -78,11 +78,12 @@ List of ignored exception classes includes:
|
|
78
78
|
ActionController::UnknownAction
|
79
79
|
AbstractController::ActionNotFound
|
80
80
|
Mongoid::Errors::DocumentNotFound
|
81
|
+
ActionController::UnknownFormat
|
81
82
|
|
82
83
|
You can alter this list with
|
83
84
|
|
84
85
|
config.ignore_only = []
|
85
|
-
|
86
|
+
|
86
87
|
which will cause none of the exception classes to be ignored.
|
87
88
|
|
88
89
|
Check the [wiki](https://github.com/airbrake/airbrake/wiki/Customizing-your-airbrake.rb) for more customization options.
|
@@ -114,7 +115,7 @@ integrations with cucumber, you should run the following commands
|
|
114
115
|
bundle exec rake appraisal:install
|
115
116
|
bundle exec rake
|
116
117
|
|
117
|
-
We use [Appraisals](https://github.com/thoughtbot/appraisal) to run the integration
|
118
|
+
We use [Appraisals](https://github.com/thoughtbot/appraisal) to run the integration
|
118
119
|
tests.
|
119
120
|
|
120
121
|
Maintainers
|
@@ -144,4 +145,4 @@ The names and logos for Airbrake, thoughtbot are trademarks of their respective
|
|
144
145
|
License
|
145
146
|
-------
|
146
147
|
|
147
|
-
Airbrake is Copyright © 2008-2013 Airbrake.
|
148
|
+
Airbrake is Copyright © 2008-2013 Airbrake.
|
data/airbrake.gemspec
CHANGED
data/lib/airbrake.rb
CHANGED
@@ -26,6 +26,11 @@ require 'airbrake/rack'
|
|
26
26
|
require 'airbrake/sinatra'
|
27
27
|
require 'airbrake/user_informer'
|
28
28
|
|
29
|
+
begin
|
30
|
+
require 'airbrake/sidekiq'
|
31
|
+
rescue LoadError
|
32
|
+
end
|
33
|
+
|
29
34
|
require 'airbrake/railtie' if defined?(Rails::Railtie)
|
30
35
|
|
31
36
|
module Airbrake
|
@@ -177,9 +182,7 @@ module Airbrake
|
|
177
182
|
exception.original_exception
|
178
183
|
elsif exception.respond_to?(:continued_exception)
|
179
184
|
exception.continued_exception
|
180
|
-
|
181
|
-
exception
|
182
|
-
end
|
185
|
+
end || exception
|
183
186
|
end
|
184
187
|
end
|
185
188
|
end
|
data/lib/airbrake/capistrano.rb
CHANGED
@@ -71,12 +71,13 @@ module Airbrake
|
|
71
71
|
- Run remotely so we use remote API keys, environment, etc.
|
72
72
|
DESC
|
73
73
|
task :deploy, :except => { :no_release => true } do
|
74
|
+
rack_env = fetch(:rack_env, "production")
|
74
75
|
rails_env = fetch(:rails_env, "production")
|
75
|
-
airbrake_env = fetch(:airbrake_env,
|
76
|
+
airbrake_env = fetch(:airbrake_env, rack_env || rails_env)
|
76
77
|
local_user = ENV['USER'] || ENV['USERNAME']
|
77
78
|
executable = RUBY_PLATFORM.downcase.include?('mswin') ? fetch(:rake, 'rake.bat') : fetch(:rake, 'bundle exec rake ')
|
78
79
|
directory = configuration.release_path
|
79
|
-
notify_command = "cd #{directory}; #{executable} RAILS_ENV=#{rails_env} airbrake:deploy TO=#{airbrake_env} REVISION=#{current_revision} REPO=#{repository} USER=#{Airbrake::Capistrano::shellescape(local_user)}"
|
80
|
+
notify_command = "cd #{directory}; #{executable} RACK_ENV=#{rack_env} RAILS_ENV=#{rails_env} airbrake:deploy TO=#{airbrake_env} REVISION=#{current_revision} REPO=#{repository} USER=#{Airbrake::Capistrano::shellescape(local_user)}"
|
80
81
|
notify_command << " DRY_RUN=true" if dry_run
|
81
82
|
notify_command << " API_KEY=#{ENV['API_KEY']}" if ENV['API_KEY']
|
82
83
|
logger.info "Notifying Airbrake of Deploy (#{notify_command})"
|
data/lib/airbrake/capistrano3.rb
CHANGED
@@ -1,64 +1,3 @@
|
|
1
|
-
# Defines deploy
|
2
|
-
require 'capistrano'
|
1
|
+
# Defines airbrake:deploy which will send information about the deploy to Airbrake.
|
3
2
|
|
4
|
-
|
5
|
-
module Capistrano
|
6
|
-
# What follows is a copy-paste backport of the shellescape method
|
7
|
-
# included in Ruby 1.9 and greater. The FSF's guidance on a snippet
|
8
|
-
# of this size indicates that such a small function is not subject
|
9
|
-
# to copyright and as such there is no risk of a license conflict:
|
10
|
-
# See www.gnu.org/prep/maintain/maintain.html#Legally-Significant
|
11
|
-
#
|
12
|
-
# Escapes a string so that it can be safely used in a Bourne shell
|
13
|
-
# command line. +str+ can be a non-string object that responds to
|
14
|
-
# +to_s+.
|
15
|
-
#
|
16
|
-
# Note that a resulted string should be used unquoted and is not
|
17
|
-
# intended for use in double quotes nor in single quotes.
|
18
|
-
#
|
19
|
-
# argv = Shellwords.escape("It's better to give than to receive")
|
20
|
-
# argv #=> "It\\'s\\ better\\ to\\ give\\ than\\ to\\ receive"
|
21
|
-
#
|
22
|
-
# String#shellescape is a shorthand for this function.
|
23
|
-
#
|
24
|
-
# argv = "It's better to give than to receive".shellescape
|
25
|
-
# argv #=> "It\\'s\\ better\\ to\\ give\\ than\\ to\\ receive"
|
26
|
-
#
|
27
|
-
# # Search files in lib for method definitions
|
28
|
-
# pattern = "^[ \t]*def "
|
29
|
-
# open("| grep -Ern #{pattern.shellescape} lib") { |grep|
|
30
|
-
# grep.each_line { |line|
|
31
|
-
# file, lineno, matched_line = line.split(':', 3)
|
32
|
-
# # ...
|
33
|
-
# }
|
34
|
-
# }
|
35
|
-
#
|
36
|
-
# It is the caller's responsibility to encode the string in the right
|
37
|
-
# encoding for the shell environment where this string is used.
|
38
|
-
#
|
39
|
-
# Multibyte characters are treated as multibyte characters, not bytes.
|
40
|
-
#
|
41
|
-
# Returns an empty quoted String if +str+ has a length of zero.
|
42
|
-
def self.shellescape(str)
|
43
|
-
str = str.to_s
|
44
|
-
|
45
|
-
# An empty argument will be skipped, so return empty quotes.
|
46
|
-
return "''" if str.empty?
|
47
|
-
|
48
|
-
str = str.dup
|
49
|
-
|
50
|
-
# Treat multibyte characters as is. It is caller's responsibility
|
51
|
-
# to encode the string in the right encoding for the shell
|
52
|
-
# environment.
|
53
|
-
str.gsub!(/([^A-Za-z0-9_\-.,:\/@\n])/, "\\\\\\1")
|
54
|
-
|
55
|
-
# A LF cannot be escaped with a backslash because a backslash + LF
|
56
|
-
# combo is regarded as line continuation and simply ignored.
|
57
|
-
str.gsub!(/\n/, "'\n'")
|
58
|
-
|
59
|
-
return str
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
load File.expand_path('../tasks/airbrake.cap', __FILE__)
|
3
|
+
load File.expand_path("../tasks/airbrake.cap", __FILE__)
|
@@ -146,7 +146,8 @@ module Airbrake
|
|
146
146
|
'ActionController::UnknownHttpMethod',
|
147
147
|
'ActionController::UnknownAction',
|
148
148
|
'AbstractController::ActionNotFound',
|
149
|
-
'Mongoid::Errors::DocumentNotFound'
|
149
|
+
'Mongoid::Errors::DocumentNotFound',
|
150
|
+
'ActionController::UnknownFormat']
|
150
151
|
|
151
152
|
alias_method :secure?, :secure
|
152
153
|
alias_method :use_system_ssl_cert_chain?, :use_system_ssl_cert_chain
|
data/lib/airbrake/rack.rb
CHANGED
data/lib/airbrake/tasks.rb
CHANGED
@@ -6,9 +6,7 @@ namespace :airbrake do
|
|
6
6
|
task :test => ['airbrake:log_stdout', :environment] do
|
7
7
|
RAILS_DEFAULT_LOGGER.level = Logger::DEBUG
|
8
8
|
|
9
|
-
require
|
10
|
-
|
11
|
-
Dir["app/controllers/application*.rb"].each { |file| require(File.expand_path(file)) }
|
9
|
+
Dir["app/controllers/application*.rb"].each { |file| require(File.expand_path(file)) }
|
12
10
|
|
13
11
|
class AirbrakeTestingException < RuntimeError; end
|
14
12
|
|
@@ -4,25 +4,26 @@ namespace :airbrake do
|
|
4
4
|
- Run remotely so we use remote API keys, environment, etc.
|
5
5
|
DESC
|
6
6
|
task :deploy do
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
local_user = ENV['USER'] || ENV['USERNAME']
|
11
|
-
executable = RUBY_PLATFORM.downcase.include?('mswin') ? fetch(:rake, 'rake.bat') : fetch(:rake, 'bundle exec rake ')
|
12
|
-
current_revision = capture("cd #{repo_path} && git rev-parse HEAD")
|
13
|
-
repository = ENV['REPO'] || ENV['REPONAME']
|
14
|
-
|
15
|
-
notify_command = "airbrake:deploy TO=#{airbrake_env} REVISION=#{current_revision} REPO=#{repo_url} USER=#{Airbrake::Capistrano::shellescape(local_user)}"
|
16
|
-
notify_command << " API_KEY=#{ENV['API_KEY']}" if ENV['API_KEY']
|
17
|
-
info "Notifying Airbrake of Deploy (#{notify_command})"
|
18
|
-
result = ""
|
7
|
+
# update scm state to get the repository information
|
8
|
+
invoke "#{scm}:update"
|
9
|
+
on roles(:app) do
|
19
10
|
within release_path do
|
20
|
-
|
21
|
-
|
11
|
+
# XXX: Invoking deploy:set_rails_env would set :rails_env to proper
|
12
|
+
# value, but that would make us depend on capistrano-rails
|
13
|
+
with rails_env: fetch(:rails_env, fetch(:stage)) do
|
14
|
+
# Compose the command notify_command
|
15
|
+
airbrake_env = fetch(:airbrake_env, fetch(:rails_env, fetch(:stage)))
|
16
|
+
notify_command = "airbrake:deploy"
|
17
|
+
notify_command << " TO=#{airbrake_env}"
|
18
|
+
notify_command << " REVISION=#{fetch(:current_revision)} REPO=#{fetch(:repo_url)}"
|
19
|
+
notify_command << " USER=#{local_user.strip.shellescape}"
|
20
|
+
notify_command << " API_KEY=#{ENV['API_KEY']}" if ENV['API_KEY']
|
21
|
+
|
22
|
+
info "Notifying Airbrake of Deploy (#{notify_command})"
|
23
|
+
execute :rake, notify_command
|
24
|
+
info "Airbrake Notification Complete."
|
22
25
|
end
|
23
26
|
end
|
24
|
-
# TODO: Check if SSL is active on account via result content.
|
25
|
-
info "Airbrake Notification Complete."
|
26
27
|
end
|
27
28
|
end
|
28
|
-
end
|
29
|
+
end
|
@@ -80,6 +80,11 @@ module Airbrake
|
|
80
80
|
hash[key] = "[FILTERED]"
|
81
81
|
elsif value.respond_to?(:to_hash)
|
82
82
|
filter(hash[key])
|
83
|
+
elsif value.is_a?(Array)
|
84
|
+
hash[key] = value.inject(Array.new) do |result, item|
|
85
|
+
item = filter(item) if item.is_a?(Enumerable)
|
86
|
+
result.push(item)
|
87
|
+
end
|
83
88
|
end
|
84
89
|
end
|
85
90
|
end
|
data/lib/airbrake/version.rb
CHANGED
data/resources/notice.xml
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?><notice version="2.4"><api-key>myapikey</api-key><notifier><name>Airbrake Notifier</name><version>
|
2
|
-
Testing airbrake via "rake airbrake:test". If you can see this, it works.</message><backtrace><line number="377" file="[GEM_ROOT]/gems/activesupport-4.0.4/lib/active_support/callbacks.rb" method="_run__860778729963979009__process_action__callbacks"/><line number="80" file="[GEM_ROOT]/gems/activesupport-4.0.4/lib/active_support/callbacks.rb" method="run_callbacks"/><line number="17" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/abstract_controller/callbacks.rb" method="process_action"/><line number="29" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_controller/metal/rescue.rb" method="process_action"/><line number="31" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_controller/metal/instrumentation.rb" method="block in process_action"/><line number="159" file="[GEM_ROOT]/gems/activesupport-4.0.4/lib/active_support/notifications.rb" method="block in instrument"/><line number="20" file="[GEM_ROOT]/gems/activesupport-4.0.4/lib/active_support/notifications/instrumenter.rb" method="instrument"/><line number="159" file="[GEM_ROOT]/gems/activesupport-4.0.4/lib/active_support/notifications.rb" method="instrument"/><line number="30" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_controller/metal/instrumentation.rb" method="process_action"/><line number="250" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_controller/metal/params_wrapper.rb" method="process_action"/><line number="136" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/abstract_controller/base.rb" method="process"/><line number="44" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/abstract_controller/rendering.rb" method="process"/><line number="195" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_controller/metal.rb" method="dispatch"/><line number="13" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_controller/metal/rack_delegation.rb" method="dispatch"/><line number="231" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_controller/metal.rb" method="block in action"/><line number="80" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_dispatch/routing/route_set.rb" method="call"/><line number="80" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_dispatch/routing/route_set.rb" method="dispatch"/><line number="48" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_dispatch/routing/route_set.rb" method="call"/><line number="71" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_dispatch/journey/router.rb" method="block in call"/><line number="59" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_dispatch/journey/router.rb" method="each"/><line number="59" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_dispatch/journey/router.rb" method="call"/><line number="674" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_dispatch/routing/route_set.rb" method="call"/><line number="23" file="[GEM_ROOT]/gems/rack-1.5.2/lib/rack/etag.rb" method="call"/><line number="25" file="[GEM_ROOT]/gems/rack-1.5.2/lib/rack/conditionalget.rb" method="call"/><line number="11" file="[GEM_ROOT]/gems/rack-1.5.2/lib/rack/head.rb" method="call"/><line number="27" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_dispatch/middleware/params_parser.rb" method="call"/><line number="241" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_dispatch/middleware/flash.rb" method="call"/><line number="225" file="[GEM_ROOT]/gems/rack-1.5.2/lib/rack/session/abstract/id.rb" method="context"/><line number="220" file="[GEM_ROOT]/gems/rack-1.5.2/lib/rack/session/abstract/id.rb" method="call"/><line number="486" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_dispatch/middleware/cookies.rb" method="call"/><line number="29" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_dispatch/middleware/callbacks.rb" method="block in call"/><line number="373" file="[GEM_ROOT]/gems/activesupport-4.0.4/lib/active_support/callbacks.rb" method="_run__4065767142482523156__call__callbacks"/><line number="80" file="[GEM_ROOT]/gems/activesupport-4.0.4/lib/active_support/callbacks.rb" method="run_callbacks"/><line number="27" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_dispatch/middleware/callbacks.rb" method="call"/><line number="76" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_dispatch/middleware/remote_ip.rb" method="call"/><line number="38" file="[GEM_ROOT]/gems/railties-4.0.4/lib/rails/rack/logger.rb" method="call_app"/><line number="20" file="[GEM_ROOT]/gems/railties-4.0.4/lib/rails/rack/logger.rb" method="block in call"/><line number="68" file="[GEM_ROOT]/gems/activesupport-4.0.4/lib/active_support/tagged_logging.rb" method="block in tagged"/><line number="26" file="[GEM_ROOT]/gems/activesupport-4.0.4/lib/active_support/tagged_logging.rb" method="tagged"/><line number="68" file="[GEM_ROOT]/gems/activesupport-4.0.4/lib/active_support/tagged_logging.rb" method="tagged"/><line number="20" file="[GEM_ROOT]/gems/railties-4.0.4/lib/rails/rack/logger.rb" method="call"/><line number="21" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_dispatch/middleware/request_id.rb" method="call"/><line number="21" file="[GEM_ROOT]/gems/rack-1.5.2/lib/rack/methodoverride.rb" method="call"/><line number="17" file="[GEM_ROOT]/gems/rack-1.5.2/lib/rack/runtime.rb" method="call"/><line number="83" file="[GEM_ROOT]/gems/activesupport-4.0.4/lib/active_support/cache/strategy/local_cache.rb" method="call"/><line number="64" file="[GEM_ROOT]/gems/actionpack-4.0.4/lib/action_dispatch/middleware/static.rb" method="call"/><line number="112" file="[GEM_ROOT]/gems/rack-1.5.2/lib/rack/sendfile.rb" method="call"/><line number="511" file="[GEM_ROOT]/gems/railties-4.0.4/lib/rails/engine.rb" method="call"/><line number="97" file="[GEM_ROOT]/gems/railties-4.0.4/lib/rails/application.rb" method="call"/><line number="240" file="[GEM_ROOT]/gems/rake-10.2.2/lib/rake/task.rb" method="call"/><line number="240" file="[GEM_ROOT]/gems/rake-10.2.2/lib/rake/task.rb" method="block in execute"/><line number="235" file="[GEM_ROOT]/gems/rake-10.2.2/lib/rake/task.rb" method="each"/><line number="235" file="[GEM_ROOT]/gems/rake-10.2.2/lib/rake/task.rb" method="execute"/><line number="179" file="[GEM_ROOT]/gems/rake-10.2.2/lib/rake/task.rb" method="block in invoke_with_call_chain"/><line number="211" file="/Users/alifaiz/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/monitor.rb" method="mon_synchronize"/><line number="172" file="[GEM_ROOT]/gems/rake-10.2.2/lib/rake/task.rb" method="invoke_with_call_chain"/><line number="165" file="[GEM_ROOT]/gems/rake-10.2.2/lib/rake/task.rb" method="invoke"/><line number="150" file="[GEM_ROOT]/gems/rake-10.2.2/lib/rake/application.rb" method="invoke_task"/><line number="106" file="[GEM_ROOT]/gems/rake-10.2.2/lib/rake/application.rb" method="block (2 levels) in top_level"/><line number="106" file="[GEM_ROOT]/gems/rake-10.2.2/lib/rake/application.rb" method="each"/><line number="106" file="[GEM_ROOT]/gems/rake-10.2.2/lib/rake/application.rb" method="block in top_level"/><line number="115" file="[GEM_ROOT]/gems/rake-10.2.2/lib/rake/application.rb" method="run_with_threads"/><line number="100" file="[GEM_ROOT]/gems/rake-10.2.2/lib/rake/application.rb" method="top_level"/><line number="78" file="[GEM_ROOT]/gems/rake-10.2.2/lib/rake/application.rb" method="block in run"/><line number="176" file="[GEM_ROOT]/gems/rake-10.2.2/lib/rake/application.rb" method="standard_exception_handling"/><line number="75" file="[GEM_ROOT]/gems/rake-10.2.2/lib/rake/application.rb" method="run"/><line number="33" file="[GEM_ROOT]/gems/rake-10.2.2/bin/rake" method="<top (required)>"/><line number="23" file="[GEM_ROOT]/bin/rake" method="load"/><line number="23" file="[GEM_ROOT]/bin/rake" method="<main>"/><line number="15" file="[GEM_ROOT]/bin/ruby_executable_hooks" method="eval"/><line number="15" file="[GEM_ROOT]/bin/ruby_executable_hooks" method="<main>"/></backtrace></error><request><url>http://www.example.com/verify</url><component>application</component><action>verify</action><params><var key="action">verify</var><var key="controller">application</var></params><cgi-data><var key="rack.version">["1", "2"]</var><var key="rack.multithread">true</var><var key="rack.multiprocess">true</var><var key="rack.run_once">false</var><var key="REQUEST_METHOD">GET</var><var key="SERVER_NAME">www.example.com</var><var key="SERVER_PORT">80</var><var key="QUERY_STRING"></var><var key="PATH_INFO">/verify</var><var key="rack.url_scheme">http</var><var key="HTTPS">off</var><var key="SCRIPT_NAME"></var><var key="CONTENT_LENGTH">0</var><var key="ORIGINAL_FULLPATH">/verify</var><var key="ORIGINAL_SCRIPT_NAME"></var><var key="action_dispatch.parameter_filter">["password"]</var><var key="action_dispatch.redirect_filter">[]</var><var key="action_dispatch.show_exceptions">false</var><var key="action_dispatch.show_detailed_exceptions">true</var><var key="ROUTES_2160658760_SCRIPT_NAME"></var><var key="action_dispatch.request_id">5d547c87-a383-4a63-9c0c-cfcdd16ff368</var><var key="action_dispatch.remote_ip"></var><var key="action_dispatch.request.path_parameters"><var key="action">verify</var><var key="controller">application</var></var><var key="action_dispatch.request.content_type"></var><var key="action_dispatch.request.request_parameters"></var><var key="rack.request.query_string"></var><var key="rack.request.query_hash"></var><var key="action_dispatch.request.query_parameters"></var><var key="action_dispatch.request.parameters"><var key="action">verify</var><var key="controller">application</var></var><var key="action_dispatch.request.formats">["text/html"]</var></cgi-data></request><server-environment><project-root>/Users/alifaiz/Work/Exceptional/airbrake-gem/tmp/rails_root</project-root><environment-name>test</environment-name><hostname>ali-mb.local</hostname></server-environment><framework>Rails: 4.0.4</framework></notice>
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><notice version="2.4"><api-key>myapikey</api-key><notifier><name>Airbrake Notifier</name><version>4.0.0</version><url>https://github.com/airbrake/airbrake</url></notifier><error><class>RuntimeError</class><message>RuntimeError: some message</message><backtrace><line number="5" file="[PROJECT_ROOT]/app/controllers/test_controller.rb" method="index"/><line number="4" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_controller/metal/implicit_render.rb" method="send_action"/><line number="150" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/abstract_controller/base.rb" method="process_action"/><line number="11" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_controller/metal/rendering.rb" method="process_action"/><line number="18" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/abstract_controller/callbacks.rb" method="block in process_action"/><line number="436" file="[GEM_ROOT]/gems/activesupport-3.0.20/lib/active_support/callbacks.rb" method="_run__3844756527684457203__process_action__1951419777138106973__callbacks"/><line number="410" file="[GEM_ROOT]/gems/activesupport-3.0.20/lib/active_support/callbacks.rb" method="_run_process_action_callbacks"/><line number="94" file="[GEM_ROOT]/gems/activesupport-3.0.20/lib/active_support/callbacks.rb" method="run_callbacks"/><line number="17" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/abstract_controller/callbacks.rb" method="process_action"/><line number="17" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_controller/metal/rescue.rb" method="process_action"/><line number="30" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_controller/metal/instrumentation.rb" method="block in process_action"/><line number="52" file="[GEM_ROOT]/gems/activesupport-3.0.20/lib/active_support/notifications.rb" method="block in instrument"/><line number="21" file="[GEM_ROOT]/gems/activesupport-3.0.20/lib/active_support/notifications/instrumenter.rb" method="instrument"/><line number="52" file="[GEM_ROOT]/gems/activesupport-3.0.20/lib/active_support/notifications.rb" method="instrument"/><line number="29" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_controller/metal/instrumentation.rb" method="process_action"/><line number="119" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/abstract_controller/base.rb" method="process"/><line number="41" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/abstract_controller/rendering.rb" method="process"/><line number="138" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_controller/metal.rb" method="dispatch"/><line number="14" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_controller/metal/rack_delegation.rb" method="dispatch"/><line number="178" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_controller/metal.rb" method="block in action"/><line number="68" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/routing/route_set.rb" method="call"/><line number="68" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/routing/route_set.rb" method="dispatch"/><line number="33" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/routing/route_set.rb" method="call"/><line number="148" file="[GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb" method="block in call"/><line number="93" file="[GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb" method="block in recognize"/><line number="68" file="[GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb" method="optimized_each"/><line number="92" file="[GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb" method="recognize"/><line number="139" file="[GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb" method="call"/><line number="499" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/routing/route_set.rb" method="call"/><line number="17" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/best_standards_support.rb" method="call"/><line number="14" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/head.rb" method="call"/><line number="24" file="[GEM_ROOT]/gems/rack-1.2.8/lib/rack/methodoverride.rb" method="call"/><line number="21" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/params_parser.rb" method="call"/><line number="182" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/flash.rb" method="call"/><line number="149" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/session/abstract_store.rb" method="call"/><line number="302" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/cookies.rb" method="call"/><line number="46" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/callbacks.rb" method="block in call"/><line number="416" file="[GEM_ROOT]/gems/activesupport-3.0.20/lib/active_support/callbacks.rb" method="_run_call_callbacks"/><line number="44" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/callbacks.rb" method="call"/><line number="106" file="[GEM_ROOT]/gems/rack-1.2.8/lib/rack/sendfile.rb" method="call"/><line number="48" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/remote_ip.rb" method="call"/><line number="47" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/show_exceptions.rb" method="call"/><line number="13" file="[GEM_ROOT]/gems/railties-3.0.20/lib/rails/rack/logger.rb" method="call"/><line number="17" file="[GEM_ROOT]/gems/rack-1.2.8/lib/rack/runtime.rb" method="call"/><line number="72" file="[GEM_ROOT]/gems/activesupport-3.0.20/lib/active_support/cache/strategy/local_cache.rb" method="call"/><line number="13" file="[GEM_ROOT]/gems/rack-1.2.8/lib/rack/lock.rb" method="block in call"/><line number="13" file="[GEM_ROOT]/gems/rack-1.2.8/lib/rack/lock.rb" method="synchronize"/><line number="13" file="[GEM_ROOT]/gems/rack-1.2.8/lib/rack/lock.rb" method="call"/><line number="168" file="[GEM_ROOT]/gems/railties-3.0.20/lib/rails/application.rb" method="call"/><line number="77" file="[GEM_ROOT]/gems/railties-3.0.20/lib/rails/application.rb" method="method_missing"/><line number="4" file="request.rb" method="<top (required)>"/><line number="48" file="[GEM_ROOT]/gems/railties-3.0.20/lib/rails/commands/runner.rb" method="eval"/><line number="48" file="[GEM_ROOT]/gems/railties-3.0.20/lib/rails/commands/runner.rb" method="<top (required)>"/><line number="39" file="[GEM_ROOT]/gems/railties-3.0.20/lib/rails/commands.rb" method="require"/><line number="39" file="[GEM_ROOT]/gems/railties-3.0.20/lib/rails/commands.rb" method="<top (required)>"/><line number="6" file="script/rails" method="require"/><line number="6" file="script/rails" method="<main>"/></backtrace></error><request><url>http://example.com:123/test/index?param=value</url><component>test</component><action>index</action><params><var key="param">value</var><var key="controller">test</var><var key="action">index</var></params><cgi-data><var key="rack.version">["1", "1"]</var><var key="rack.multithread">false</var><var key="rack.multiprocess">true</var><var key="rack.run_once">false</var><var key="REQUEST_METHOD">GET</var><var key="SERVER_NAME">example.com</var><var key="SERVER_PORT">123</var><var key="QUERY_STRING">param=value</var><var key="PATH_INFO">/test/index</var><var key="rack.url_scheme">http</var><var key="HTTPS">off</var><var key="SCRIPT_NAME"></var><var key="CONTENT_LENGTH">0</var><var key="action_dispatch.parameter_filter">["password"]</var><var key="action_dispatch.show_exceptions">true</var><var key="action_dispatch.remote_ip"></var><var key="action_dispatch.request.path_parameters"><var key="controller">test</var><var key="action">index</var></var><var key="action_dispatch.request.content_type"></var><var key="action_dispatch.request.request_parameters"></var><var key="rack.request.query_string">param=value</var><var key="rack.request.query_hash"><var key="param">value</var></var><var key="action_dispatch.request.query_parameters"><var key="param">value</var></var><var key="action_dispatch.request.parameters"><var key="param">value</var><var key="controller">test</var><var key="action">index</var></var><var key="action_dispatch.request.formats">["text/html"]</var></cgi-data></request><server-environment><project-root>/Users/shifi/work/rackspace/code/airbrake/tmp/rails_root</project-root><environment-name>production</environment-name><hostname>shifi-mac.lan</hostname></server-environment><framework>Rails: 3.0.20</framework></notice>
|
data/test/capistrano_test.rb
CHANGED
@@ -33,6 +33,7 @@ class CapistranoTest < Test::Unit::TestCase
|
|
33
33
|
@configuration.find_and_execute_task('airbrake:deploy')
|
34
34
|
|
35
35
|
assert io.string.include?('** Notifying Airbrake of Deploy')
|
36
|
+
assert io.string.include?('RAILS_ENV=production')
|
36
37
|
assert io.string.include?('** Airbrake Notification Complete')
|
37
38
|
assert io.string.include?(%q[D\'Angelo\ \"D\"\ Barksdale])
|
38
39
|
end
|
data/test/notifier_test.rb
CHANGED
@@ -256,6 +256,12 @@ class NotifierTest < Test::Unit::TestCase
|
|
256
256
|
@hash = Airbrake.build_lookup_hash_for(@exception)
|
257
257
|
assert_equal "NotifierTest::OriginalException", @hash[:error_class]
|
258
258
|
end
|
259
|
+
|
260
|
+
should "keep exception if #original_exception is nil" do
|
261
|
+
@exception.stubs(:original_exception).returns(nil)
|
262
|
+
@hash = Airbrake.build_lookup_hash_for(@exception)
|
263
|
+
assert_equal "BacktracedException", @hash[:error_class]
|
264
|
+
end
|
259
265
|
end
|
260
266
|
|
261
267
|
context "when an exception that provides #continued_exception is raised" do
|
@@ -271,6 +277,12 @@ class NotifierTest < Test::Unit::TestCase
|
|
271
277
|
@hash = Airbrake.build_lookup_hash_for(@exception)
|
272
278
|
assert_equal "NotifierTest::ContinuedException", @hash[:error_class]
|
273
279
|
end
|
280
|
+
|
281
|
+
should "keep exception if #continued_exception is nil" do
|
282
|
+
@exception.stubs(:continued_exception).returns(nil)
|
283
|
+
@hash = Airbrake.build_lookup_hash_for(@exception)
|
284
|
+
assert_equal "BacktracedException", @hash[:error_class]
|
285
|
+
end
|
274
286
|
end
|
275
287
|
end
|
276
288
|
end
|
data/test/params_cleaner_test.rb
CHANGED
@@ -29,20 +29,27 @@ class ParamsCleanerTest < Test::Unit::TestCase
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def assert_filters_hash(attribute)
|
32
|
-
filters = [
|
33
|
-
original = {
|
34
|
-
'
|
35
|
-
|
36
|
-
'
|
37
|
-
'something_with_abc' =>
|
38
|
-
'ghi'
|
39
|
-
'
|
32
|
+
filters = ['abc', :def]
|
33
|
+
original = {
|
34
|
+
'abc' => '123',
|
35
|
+
'def' => '456',
|
36
|
+
'ghi' => '789',
|
37
|
+
'something_with_abc' => 'match the entire string',
|
38
|
+
'nested_hash' => { 'abc' => '100', 'ghi' => '789' },
|
39
|
+
'nested_array' => [{ 'abc' => '100' }, { 'ghi' => '789' }, 'xyz']
|
40
|
+
}
|
41
|
+
filtered = {
|
42
|
+
'abc' => '[FILTERED]',
|
43
|
+
'def' => '[FILTERED]',
|
44
|
+
'ghi' => '789',
|
45
|
+
'something_with_abc' => 'match the entire string',
|
46
|
+
'nested_hash' => { 'abc' => '[FILTERED]', 'ghi' => '789' },
|
47
|
+
'nested_array' => [{ 'abc' => '[FILTERED]' }, { 'ghi' => '789' }, 'xyz']
|
48
|
+
}
|
40
49
|
|
41
|
-
clean_params = clean(:params_filters => filters,
|
42
|
-
attribute => original)
|
50
|
+
clean_params = clean(:params_filters => filters, attribute => original)
|
43
51
|
|
44
|
-
assert_equal(filtered,
|
45
|
-
clean_params.send(attribute))
|
52
|
+
assert_equal(filtered, clean_params.send(attribute))
|
46
53
|
end
|
47
54
|
|
48
55
|
should "should always remove a Rails application's secret token" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airbrake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airbrake
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|
@@ -357,6 +357,7 @@ files:
|
|
357
357
|
- lib/airbrake/response.rb
|
358
358
|
- lib/airbrake/sender.rb
|
359
359
|
- lib/airbrake/shared_tasks.rb
|
360
|
+
- lib/airbrake/sidekiq.rb
|
360
361
|
- lib/airbrake/sinatra.rb
|
361
362
|
- lib/airbrake/tasks.rb
|
362
363
|
- lib/airbrake/tasks/airbrake.cap
|
@@ -393,7 +394,8 @@ files:
|
|
393
394
|
- test/support/response_shim.xml
|
394
395
|
- test/user_informer_test.rb
|
395
396
|
homepage: http://www.airbrake.io
|
396
|
-
licenses:
|
397
|
+
licenses:
|
398
|
+
- MIT
|
397
399
|
metadata: {}
|
398
400
|
post_install_message:
|
399
401
|
rdoc_options: []
|
@@ -411,7 +413,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
411
413
|
version: '0'
|
412
414
|
requirements: []
|
413
415
|
rubyforge_project:
|
414
|
-
rubygems_version: 2.
|
416
|
+
rubygems_version: 2.4.1
|
415
417
|
signing_key:
|
416
418
|
specification_version: 4
|
417
419
|
summary: Send your application errors to our hosted service and reclaim your inbox.
|