honeybadger 1.16.2 → 1.16.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +17 -0
- data/Gemfile.lock +1 -1
- data/features/step_definitions/rails_steps.rb +1 -1
- data/honeybadger.gemspec +4 -4
- data/lib/honeybadger.rb +2 -2
- data/lib/honeybadger/configuration.rb +6 -1
- data/lib/honeybadger/integrations.rb +1 -0
- data/lib/honeybadger/integrations/local_variables.rb +36 -0
- data/lib/honeybadger/monitor/sender.rb +2 -2
- data/lib/honeybadger/notice.rb +1 -0
- data/lib/honeybadger/rails/controller_methods.rb +1 -0
- data/lib/honeybadger/sender.rb +3 -2
- data/spec/honeybadger/configuration_spec.rb +2 -1
- data/spec/honeybadger/integrations/local_variables_spec.rb +60 -0
- data/spec/honeybadger/notifier_spec.rb +10 -1
- data/spec/honeybadger/rails/action_controller_spec.rb +10 -1
- data/spec/spec_helper.rb +6 -0
- metadata +67 -36
- checksums.yaml +0 -7
- data/lib/honeybadger/exception_extensions.rb +0 -35
- data/spec/honeybadger/exception_extensions_spec.rb +0 -40
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
## Honeybadger 1.16.3 ##
|
2
|
+
|
3
|
+
* Handle `nil` session in Rails controllers (i.e., when the `session_off` gem is
|
4
|
+
enabled).
|
5
|
+
|
6
|
+
*Joshua Wood*
|
7
|
+
|
8
|
+
* Add `unwrap_exceptions` configuration option; when `false`, exceptions will
|
9
|
+
not be unwrapped (default: `true`).
|
10
|
+
|
11
|
+
*Joshua Wood*
|
12
|
+
|
13
|
+
* Prevent `binding_of_caller` from being loaded automatically (requires
|
14
|
+
`send_local_variables == true`).
|
15
|
+
|
16
|
+
*Joshua Wood*
|
17
|
+
|
1
18
|
## Honeybadger 1.16.2 ##
|
2
19
|
|
3
20
|
* Fix a bug where #match was called on nil when instrumenting Net::HTTP
|
data/Gemfile.lock
CHANGED
@@ -86,7 +86,7 @@ Then /^I should receive (.+) Honeybadger notifications?$/ do |number|
|
|
86
86
|
when 'two' then 2
|
87
87
|
else number end
|
88
88
|
|
89
|
-
all_output.scan(/\[Honeybadger\]
|
89
|
+
all_output.scan(/\[Honeybadger\] Success: Net::HTTPOK/).size.should == number
|
90
90
|
step %(the output should contain "123456789")
|
91
91
|
end
|
92
92
|
|
data/honeybadger.gemspec
CHANGED
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
|
|
4
4
|
s.rubygems_version = '1.3.5'
|
5
5
|
|
6
6
|
s.name = 'honeybadger'
|
7
|
-
s.version = '1.16.
|
8
|
-
s.date = '2014-07-
|
7
|
+
s.version = '1.16.3'
|
8
|
+
s.date = '2014-07-21'
|
9
9
|
|
10
10
|
s.summary = 'Error reports you can be happy about.'
|
11
11
|
s.description = 'Make managing application errors a more pleasant experience.'
|
@@ -96,10 +96,10 @@ Gem::Specification.new do |s|
|
|
96
96
|
lib/honeybadger/capistrano/tasks.rake
|
97
97
|
lib/honeybadger/configuration.rb
|
98
98
|
lib/honeybadger/dependency.rb
|
99
|
-
lib/honeybadger/exception_extensions.rb
|
100
99
|
lib/honeybadger/integrations.rb
|
101
100
|
lib/honeybadger/integrations/delayed_job.rb
|
102
101
|
lib/honeybadger/integrations/delayed_job/plugin.rb
|
102
|
+
lib/honeybadger/integrations/local_variables.rb
|
103
103
|
lib/honeybadger/integrations/net_http.rb
|
104
104
|
lib/honeybadger/integrations/passenger.rb
|
105
105
|
lib/honeybadger/integrations/sidekiq.rb
|
@@ -140,8 +140,8 @@ Gem::Specification.new do |s|
|
|
140
140
|
spec/honeybadger/capistrano_spec.rb
|
141
141
|
spec/honeybadger/configuration_spec.rb
|
142
142
|
spec/honeybadger/dependency_spec.rb
|
143
|
-
spec/honeybadger/exception_extensions_spec.rb
|
144
143
|
spec/honeybadger/integrations/delayed_job_spec.rb
|
144
|
+
spec/honeybadger/integrations/local_variables_spec.rb
|
145
145
|
spec/honeybadger/integrations/net_http_spec.rb
|
146
146
|
spec/honeybadger/integrations/passenger_spec.rb
|
147
147
|
spec/honeybadger/integrations/sidekiq_spec.rb
|
data/lib/honeybadger.rb
CHANGED
@@ -14,13 +14,12 @@ require 'honeybadger/stats'
|
|
14
14
|
require 'honeybadger/user_informer'
|
15
15
|
require 'honeybadger/user_feedback'
|
16
16
|
require 'honeybadger/integrations'
|
17
|
-
require 'honeybadger/exception_extensions'
|
18
17
|
|
19
18
|
require 'honeybadger/railtie' if defined?(Rails::Railtie)
|
20
19
|
require 'honeybadger/monitor'
|
21
20
|
|
22
21
|
module Honeybadger
|
23
|
-
VERSION = '1.16.
|
22
|
+
VERSION = '1.16.3'.freeze
|
24
23
|
LOG_PREFIX = "** [Honeybadger] ".freeze
|
25
24
|
|
26
25
|
HEADERS = {
|
@@ -191,6 +190,7 @@ module Honeybadger
|
|
191
190
|
end
|
192
191
|
|
193
192
|
def unwrap_exception(exception)
|
193
|
+
return exception unless configuration.unwrap_exceptions
|
194
194
|
exception.respond_to?(:original_exception) && exception.original_exception ||
|
195
195
|
exception.respond_to?(:continued_exception) && exception.continued_exception ||
|
196
196
|
exception.respond_to?(:cause) && exception.cause ||
|
@@ -9,7 +9,8 @@ module Honeybadger
|
|
9
9
|
:proxy_port, :proxy_user, :secure, :use_system_ssl_cert_chain, :framework,
|
10
10
|
:user_information, :feedback, :rescue_rake_exceptions, :source_extract_radius,
|
11
11
|
:send_request_session, :debug, :fingerprint, :hostname, :features, :metrics,
|
12
|
-
:log_exception_on_send_failure, :send_local_variables, :traces,
|
12
|
+
:log_exception_on_send_failure, :send_local_variables, :traces,
|
13
|
+
:trace_threshold, :unwrap_exceptions].freeze
|
13
14
|
|
14
15
|
# The API key for your project, found on the project edit form.
|
15
16
|
attr_accessor :api_key
|
@@ -107,6 +108,9 @@ module Honeybadger
|
|
107
108
|
# +true+ to send local variables, +false+ to exclude
|
108
109
|
attr_accessor :send_local_variables
|
109
110
|
|
111
|
+
# +true+ to unwrap exceptions
|
112
|
+
attr_accessor :unwrap_exceptions
|
113
|
+
|
110
114
|
# +true+ to log extra debug info, +false+ to suppress
|
111
115
|
attr_accessor :debug
|
112
116
|
|
@@ -195,6 +199,7 @@ module Honeybadger
|
|
195
199
|
@limit = nil
|
196
200
|
@feedback = true
|
197
201
|
@trace_threshold = 2000
|
202
|
+
@unwrap_exceptions = true
|
198
203
|
end
|
199
204
|
|
200
205
|
# Public: Takes a block and adds it to the list of backtrace filters. When
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Honeybadger
|
2
|
+
module Integrations
|
3
|
+
module LocalVariables
|
4
|
+
module ExceptionExtension
|
5
|
+
def self.included(base)
|
6
|
+
base.send(:alias_method, :set_backtrace_without_honeybadger, :set_backtrace)
|
7
|
+
base.send(:alias_method, :set_backtrace, :set_backtrace_with_honeybadger)
|
8
|
+
end
|
9
|
+
|
10
|
+
def set_backtrace_with_honeybadger(*args, &block)
|
11
|
+
if caller.none? { |loc| loc.match(::Honeybadger::Backtrace::Line::INPUT_FORMAT) && Regexp.last_match(1) == __FILE__ }
|
12
|
+
@__honeybadger_bindings_stack = binding.callers.drop(1)
|
13
|
+
end
|
14
|
+
|
15
|
+
set_backtrace_without_honeybadger(*args, &block)
|
16
|
+
end
|
17
|
+
|
18
|
+
def __honeybadger_bindings_stack
|
19
|
+
@__honeybadger_bindings_stack || []
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
Dependency.register do
|
24
|
+
requirement { ::Honeybadger.configuration.send_local_variables }
|
25
|
+
requirement { defined?(::BindingOfCaller) }
|
26
|
+
requirement { !::Exception.included_modules.include?(ExceptionExtension) }
|
27
|
+
|
28
|
+
injection { Honeybadger.write_verbose_log('Installing local variables integration') }
|
29
|
+
|
30
|
+
injection do
|
31
|
+
::Exception.send(:include, ExceptionExtension)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -8,7 +8,7 @@ module Honeybadger
|
|
8
8
|
response = send_request('/v1/metrics', data.to_json)
|
9
9
|
|
10
10
|
if Net::HTTPSuccess === response
|
11
|
-
log(:info, "Metrics Success: #{response.class}", response
|
11
|
+
log(:info, "Metrics Success: #{response.class}", response) if Honeybadger.configuration.debug
|
12
12
|
true
|
13
13
|
else
|
14
14
|
Honeybadger.configuration.features['metrics'] = false if Net::HTTPForbidden === response
|
@@ -27,7 +27,7 @@ module Honeybadger
|
|
27
27
|
response = send_request('/v1/traces', data.to_json)
|
28
28
|
|
29
29
|
if Net::HTTPSuccess === response
|
30
|
-
log(:info, "Traces Success: #{response.class}", response
|
30
|
+
log(:info, "Traces Success: #{response.class}", response) if Honeybadger.configuration.debug
|
31
31
|
true
|
32
32
|
else
|
33
33
|
Honeybadger.configuration.features['traces'] = false if Net::HTTPForbidden === response
|
data/lib/honeybadger/notice.rb
CHANGED
@@ -402,6 +402,7 @@ module Honeybadger
|
|
402
402
|
# Returns a Hash of local variables
|
403
403
|
def local_variables_from_exception(exception)
|
404
404
|
return {} unless Exception === exception
|
405
|
+
return {} unless exception.respond_to?(:__honeybadger_bindings_stack)
|
405
406
|
return {} if exception.__honeybadger_bindings_stack.empty?
|
406
407
|
|
407
408
|
if project_root
|
data/lib/honeybadger/sender.rb
CHANGED
@@ -68,10 +68,11 @@ module Honeybadger
|
|
68
68
|
def ping(data = {})
|
69
69
|
return nil unless api_key_ok?
|
70
70
|
|
71
|
-
|
71
|
+
data = data.to_json
|
72
|
+
response = send_request('/v1/ping/', data)
|
72
73
|
|
73
74
|
if Net::HTTPSuccess === response
|
74
|
-
log(Honeybadger.configuration.debug ? :info : :debug, "Ping Success: #{response.class}", response
|
75
|
+
log(Honeybadger.configuration.debug ? :info : :debug, "Ping Success: #{response.class}", response)
|
75
76
|
JSON.parse(response.body)
|
76
77
|
else
|
77
78
|
log(:error, "Ping Failure: #{response.class}", response, data)
|
@@ -31,6 +31,7 @@ describe Honeybadger::Configuration do
|
|
31
31
|
assert_config_default :async, nil
|
32
32
|
assert_config_default :send_request_session, true
|
33
33
|
assert_config_default :send_local_variables, false
|
34
|
+
assert_config_default :unwrap_exceptions, true
|
34
35
|
assert_config_default :debug, false
|
35
36
|
assert_config_default :log_exception_on_send_failure, false
|
36
37
|
assert_config_default :fingerprint, nil
|
@@ -138,7 +139,7 @@ describe Honeybadger::Configuration do
|
|
138
139
|
:proxy_host, :proxy_pass, :proxy_port, :proxy_user, :secure,
|
139
140
|
:source_extract_radius, :async, :send_request_session, :debug,
|
140
141
|
:fingerprint, :hostname, :features, :metrics, :feedback,
|
141
|
-
:log_exception_on_send_failure].each do |option|
|
142
|
+
:log_exception_on_send_failure, :unwrap_exceptions].each do |option|
|
142
143
|
expect(hash[option]).to eq config[option]
|
143
144
|
end
|
144
145
|
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Local variables integration" do
|
4
|
+
before do
|
5
|
+
Honeybadger.configuration.send_local_variables = config_enabled
|
6
|
+
Honeybadger::Dependency.inject!
|
7
|
+
end
|
8
|
+
|
9
|
+
subject { Exception.new }
|
10
|
+
|
11
|
+
context "when binding_of_caller isn't installed", :unless => defined?(::BindingOfCaller) do
|
12
|
+
let(:config_enabled) { true }
|
13
|
+
it { should_not respond_to :__honeybadger_bindings_stack }
|
14
|
+
end
|
15
|
+
|
16
|
+
context "when binding_of_caller is installed", :if => defined?(::BindingOfCaller) do
|
17
|
+
context "and disabled by configuration" do
|
18
|
+
let(:config_enabled) { false }
|
19
|
+
it { should_not respond_to :__honeybadger_bindings_stack }
|
20
|
+
end
|
21
|
+
|
22
|
+
context "and enabled by configuration" do
|
23
|
+
let(:config_enabled) { true }
|
24
|
+
|
25
|
+
it { should respond_to :__honeybadger_bindings_stack }
|
26
|
+
|
27
|
+
describe "#set_backtrace" do
|
28
|
+
context "call stack does not match current file" do
|
29
|
+
it "changes the bindings stack" do
|
30
|
+
expect { subject.set_backtrace(['foo.rb:1']) }.to change(subject, :__honeybadger_bindings_stack).from([])
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
context "call stack includes current file" do
|
35
|
+
before do
|
36
|
+
subject.stub(:caller).and_return(["#{File.expand_path('../../../../lib/honeybadger/integrations/local_variables.rb', __FILE__)}:1"])
|
37
|
+
end
|
38
|
+
|
39
|
+
it "does not change the bindings stack" do
|
40
|
+
expect { subject.set_backtrace(['foo.rb:1']) }.not_to change(subject, :__honeybadger_bindings_stack).from([])
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
context "call stack includes a non-matching line" do
|
45
|
+
before do
|
46
|
+
subject.stub(:caller).and_return(['(foo)'])
|
47
|
+
end
|
48
|
+
|
49
|
+
it "skips the non-matching line" do
|
50
|
+
expect { subject.set_backtrace(['foo.rb:1']) }.not_to raise_error
|
51
|
+
end
|
52
|
+
|
53
|
+
it "changes the bindings stack" do
|
54
|
+
expect { subject.set_backtrace(['foo.rb:1']) }.to change(subject, :__honeybadger_bindings_stack).from([])
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -233,7 +233,7 @@ describe 'Honeybadger' do
|
|
233
233
|
config_opts = { 'one' => 'two', 'three' => 'four' }
|
234
234
|
stub_notice!
|
235
235
|
stub_sender!
|
236
|
-
Honeybadger.configuration = double('config', :merge => config_opts, :public? => true, :async? => false)
|
236
|
+
Honeybadger.configuration = double('config', :merge => config_opts, :public? => true, :async? => false, :unwrap_exceptions => false)
|
237
237
|
|
238
238
|
Honeybadger::Notice.should_receive(:new).with(hash_including(config_opts))
|
239
239
|
Honeybadger.notify(exception)
|
@@ -299,6 +299,15 @@ describe 'Honeybadger' do
|
|
299
299
|
@hash = Honeybadger.build_lookup_hash_for(@exception)
|
300
300
|
expect(@hash[:error_class]).to eq "OriginalException"
|
301
301
|
end
|
302
|
+
|
303
|
+
context "but unwrapping exceptions is disabled" do
|
304
|
+
before { Honeybadger.configuration.unwrap_exceptions = false }
|
305
|
+
|
306
|
+
it "doesn't unwrap the exception" do
|
307
|
+
@hash = Honeybadger.build_lookup_hash_for(@exception)
|
308
|
+
expect(@hash[:error_class]).not_to eq "OriginalException"
|
309
|
+
end
|
310
|
+
end
|
302
311
|
end
|
303
312
|
|
304
313
|
context "when an exception that provides #continued_exception is raised" do
|
@@ -131,7 +131,11 @@ begin
|
|
131
131
|
end
|
132
132
|
|
133
133
|
opts[:request].query_parameters = opts[:request].query_parameters.merge(opts[:params] || {})
|
134
|
-
opts[:request].session =
|
134
|
+
opts[:request].session = if opts.include?(:session) && opts[:session].nil?
|
135
|
+
nil
|
136
|
+
else
|
137
|
+
ActionController::TestSession.new(opts[:session] || {})
|
138
|
+
end
|
135
139
|
# Prevents request.fullpath from crashing Rails in tests
|
136
140
|
opts[:request].env['REQUEST_URI'] = opts[:request].request_uri
|
137
141
|
|
@@ -240,6 +244,11 @@ begin
|
|
240
244
|
assert_sent_hash(data) { |h| h['request']['session'] }
|
241
245
|
end
|
242
246
|
|
247
|
+
it "fails gracefully when session isn nil" do
|
248
|
+
process_action_with_automatic_notification(:session => nil)
|
249
|
+
assert_sent_hash({}) { |h| h['request']['session'] }
|
250
|
+
end
|
251
|
+
|
243
252
|
it "send request data for manual notification" do
|
244
253
|
params = { 'controller' => "honeybadger_test", 'action' => "index" }
|
245
254
|
controller = process_action_with_manual_notification(:params => params)
|
data/spec/spec_helper.rb
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
require 'rspec'
|
2
2
|
require 'honeybadger'
|
3
3
|
|
4
|
+
begin
|
5
|
+
require 'binding_of_caller'
|
6
|
+
rescue LoadError
|
7
|
+
nil
|
8
|
+
end
|
9
|
+
|
4
10
|
# Require files in spec/support/ and its subdirectories.
|
5
11
|
Dir[File.expand_path('../../spec/support/**/*.rb', __FILE__)].each {|f| require f}
|
6
12
|
|
metadata
CHANGED
@@ -1,195 +1,222 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honeybadger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.16.
|
4
|
+
version: 1.16.3
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Joshua Wood
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
12
|
+
date: 2014-07-21 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: json
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
|
-
- -
|
19
|
+
- - ! '>='
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: '0'
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
|
-
- -
|
27
|
+
- - ! '>='
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '0'
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: cucumber
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
|
-
- -
|
35
|
+
- - ~>
|
32
36
|
- !ruby/object:Gem::Version
|
33
37
|
version: 1.3.10
|
34
38
|
type: :development
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
|
-
- -
|
43
|
+
- - ~>
|
39
44
|
- !ruby/object:Gem::Version
|
40
45
|
version: 1.3.10
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: rspec
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
|
-
- -
|
51
|
+
- - ~>
|
46
52
|
- !ruby/object:Gem::Version
|
47
53
|
version: 2.14.0
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
|
-
- -
|
59
|
+
- - ~>
|
53
60
|
- !ruby/object:Gem::Version
|
54
61
|
version: 2.14.0
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: sham_rack
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
|
-
- -
|
67
|
+
- - ~>
|
60
68
|
- !ruby/object:Gem::Version
|
61
69
|
version: 1.3.0
|
62
70
|
type: :development
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
|
-
- -
|
75
|
+
- - ~>
|
67
76
|
- !ruby/object:Gem::Version
|
68
77
|
version: 1.3.0
|
69
78
|
- !ruby/object:Gem::Dependency
|
70
79
|
name: capistrano
|
71
80
|
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
72
82
|
requirements:
|
73
|
-
- -
|
83
|
+
- - ~>
|
74
84
|
- !ruby/object:Gem::Version
|
75
85
|
version: '2.0'
|
76
86
|
type: :development
|
77
87
|
prerelease: false
|
78
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
79
90
|
requirements:
|
80
|
-
- -
|
91
|
+
- - ~>
|
81
92
|
- !ruby/object:Gem::Version
|
82
93
|
version: '2.0'
|
83
94
|
- !ruby/object:Gem::Dependency
|
84
95
|
name: guard
|
85
96
|
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
86
98
|
requirements:
|
87
|
-
- -
|
99
|
+
- - ~>
|
88
100
|
- !ruby/object:Gem::Version
|
89
101
|
version: 1.8.3
|
90
102
|
type: :development
|
91
103
|
prerelease: false
|
92
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
93
106
|
requirements:
|
94
|
-
- -
|
107
|
+
- - ~>
|
95
108
|
- !ruby/object:Gem::Version
|
96
109
|
version: 1.8.3
|
97
110
|
- !ruby/object:Gem::Dependency
|
98
111
|
name: guard-rspec
|
99
112
|
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
100
114
|
requirements:
|
101
|
-
- -
|
115
|
+
- - ! '>='
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: '0'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
107
122
|
requirements:
|
108
|
-
- -
|
123
|
+
- - ! '>='
|
109
124
|
- !ruby/object:Gem::Version
|
110
125
|
version: '0'
|
111
126
|
- !ruby/object:Gem::Dependency
|
112
127
|
name: rake
|
113
128
|
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
114
130
|
requirements:
|
115
|
-
- -
|
131
|
+
- - ! '>='
|
116
132
|
- !ruby/object:Gem::Version
|
117
133
|
version: '0'
|
118
134
|
type: :development
|
119
135
|
prerelease: false
|
120
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
121
138
|
requirements:
|
122
|
-
- -
|
139
|
+
- - ! '>='
|
123
140
|
- !ruby/object:Gem::Version
|
124
141
|
version: '0'
|
125
142
|
- !ruby/object:Gem::Dependency
|
126
143
|
name: sinatra
|
127
144
|
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
128
146
|
requirements:
|
129
|
-
- -
|
147
|
+
- - ! '>='
|
130
148
|
- !ruby/object:Gem::Version
|
131
149
|
version: '0'
|
132
150
|
type: :development
|
133
151
|
prerelease: false
|
134
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
135
154
|
requirements:
|
136
|
-
- -
|
155
|
+
- - ! '>='
|
137
156
|
- !ruby/object:Gem::Version
|
138
157
|
version: '0'
|
139
158
|
- !ruby/object:Gem::Dependency
|
140
159
|
name: aruba
|
141
160
|
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
142
162
|
requirements:
|
143
|
-
- -
|
163
|
+
- - ! '>='
|
144
164
|
- !ruby/object:Gem::Version
|
145
165
|
version: '0'
|
146
166
|
type: :development
|
147
167
|
prerelease: false
|
148
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
149
170
|
requirements:
|
150
|
-
- -
|
171
|
+
- - ! '>='
|
151
172
|
- !ruby/object:Gem::Version
|
152
173
|
version: '0'
|
153
174
|
- !ruby/object:Gem::Dependency
|
154
175
|
name: appraisal
|
155
176
|
requirement: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
156
178
|
requirements:
|
157
|
-
- -
|
179
|
+
- - ! '>='
|
158
180
|
- !ruby/object:Gem::Version
|
159
181
|
version: '0'
|
160
182
|
type: :development
|
161
183
|
prerelease: false
|
162
184
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
163
186
|
requirements:
|
164
|
-
- -
|
187
|
+
- - ! '>='
|
165
188
|
- !ruby/object:Gem::Version
|
166
189
|
version: '0'
|
167
190
|
- !ruby/object:Gem::Dependency
|
168
191
|
name: fuubar
|
169
192
|
requirement: !ruby/object:Gem::Requirement
|
193
|
+
none: false
|
170
194
|
requirements:
|
171
|
-
- -
|
195
|
+
- - ! '>='
|
172
196
|
- !ruby/object:Gem::Version
|
173
197
|
version: '0'
|
174
198
|
type: :development
|
175
199
|
prerelease: false
|
176
200
|
version_requirements: !ruby/object:Gem::Requirement
|
201
|
+
none: false
|
177
202
|
requirements:
|
178
|
-
- -
|
203
|
+
- - ! '>='
|
179
204
|
- !ruby/object:Gem::Version
|
180
205
|
version: '0'
|
181
206
|
- !ruby/object:Gem::Dependency
|
182
207
|
name: growl
|
183
208
|
requirement: !ruby/object:Gem::Requirement
|
209
|
+
none: false
|
184
210
|
requirements:
|
185
|
-
- -
|
211
|
+
- - ! '>='
|
186
212
|
- !ruby/object:Gem::Version
|
187
213
|
version: '0'
|
188
214
|
type: :development
|
189
215
|
prerelease: false
|
190
216
|
version_requirements: !ruby/object:Gem::Requirement
|
217
|
+
none: false
|
191
218
|
requirements:
|
192
|
-
- -
|
219
|
+
- - ! '>='
|
193
220
|
- !ruby/object:Gem::Version
|
194
221
|
version: '0'
|
195
222
|
description: Make managing application errors a more pleasant experience.
|
@@ -257,10 +284,10 @@ files:
|
|
257
284
|
- lib/honeybadger/capistrano/tasks.rake
|
258
285
|
- lib/honeybadger/configuration.rb
|
259
286
|
- lib/honeybadger/dependency.rb
|
260
|
-
- lib/honeybadger/exception_extensions.rb
|
261
287
|
- lib/honeybadger/integrations.rb
|
262
288
|
- lib/honeybadger/integrations/delayed_job.rb
|
263
289
|
- lib/honeybadger/integrations/delayed_job/plugin.rb
|
290
|
+
- lib/honeybadger/integrations/local_variables.rb
|
264
291
|
- lib/honeybadger/integrations/net_http.rb
|
265
292
|
- lib/honeybadger/integrations/passenger.rb
|
266
293
|
- lib/honeybadger/integrations/sidekiq.rb
|
@@ -301,8 +328,8 @@ files:
|
|
301
328
|
- spec/honeybadger/capistrano_spec.rb
|
302
329
|
- spec/honeybadger/configuration_spec.rb
|
303
330
|
- spec/honeybadger/dependency_spec.rb
|
304
|
-
- spec/honeybadger/exception_extensions_spec.rb
|
305
331
|
- spec/honeybadger/integrations/delayed_job_spec.rb
|
332
|
+
- spec/honeybadger/integrations/local_variables_spec.rb
|
306
333
|
- spec/honeybadger/integrations/net_http_spec.rb
|
307
334
|
- spec/honeybadger/integrations/passenger_spec.rb
|
308
335
|
- spec/honeybadger/integrations/sidekiq_spec.rb
|
@@ -330,26 +357,30 @@ files:
|
|
330
357
|
- spec/support/helpers.rb
|
331
358
|
homepage: http://www.honeybadger.io
|
332
359
|
licenses: []
|
333
|
-
metadata: {}
|
334
360
|
post_install_message:
|
335
361
|
rdoc_options:
|
336
|
-
-
|
337
|
-
-
|
362
|
+
- --charset=UTF-8
|
363
|
+
- --markup tomdoc
|
338
364
|
require_paths:
|
339
365
|
- lib
|
340
366
|
required_ruby_version: !ruby/object:Gem::Requirement
|
367
|
+
none: false
|
341
368
|
requirements:
|
342
|
-
- -
|
369
|
+
- - ! '>='
|
343
370
|
- !ruby/object:Gem::Version
|
344
371
|
version: '0'
|
372
|
+
segments:
|
373
|
+
- 0
|
374
|
+
hash: 3175357828774041606
|
345
375
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
376
|
+
none: false
|
346
377
|
requirements:
|
347
|
-
- -
|
378
|
+
- - ! '>='
|
348
379
|
- !ruby/object:Gem::Version
|
349
380
|
version: '0'
|
350
381
|
requirements: []
|
351
382
|
rubyforge_project:
|
352
|
-
rubygems_version:
|
383
|
+
rubygems_version: 1.8.23
|
353
384
|
signing_key:
|
354
385
|
specification_version: 2
|
355
386
|
summary: Error reports you can be happy about.
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 86f0d9ed43c1f392c2eed8701f7dcc311df00c2e
|
4
|
-
data.tar.gz: 2154070bb26a86dd27e17d7893748ebbd7838d37
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: eb0c4089da555f08d4f753abb25809fa1c6def54a276768d1b6e4a14c326da46a2069108caa8a115efb328250670137929e9229b8d190f24db69845f740d151b
|
7
|
-
data.tar.gz: 9d298e5339abc7a3ebd7a7c53e8d35b606b007d30c092817b6d3a4c38145a8d26df74701344c21a0821ab3e40617dd5d2244e7b25fbd3dce75423ee687384f92
|
@@ -1,35 +0,0 @@
|
|
1
|
-
module Honeybadger
|
2
|
-
module ExceptionExtensions
|
3
|
-
module Bindings
|
4
|
-
def self.included(base)
|
5
|
-
base.send(:alias_method, :set_backtrace_without_honeybadger, :set_backtrace)
|
6
|
-
base.send(:alias_method, :set_backtrace, :set_backtrace_with_honeybadger)
|
7
|
-
end
|
8
|
-
|
9
|
-
def set_backtrace_with_honeybadger(*args, &block)
|
10
|
-
if caller.none? { |loc| loc.match(Honeybadger::Backtrace::Line::INPUT_FORMAT) && Regexp.last_match(1) == __FILE__ }
|
11
|
-
@__honeybadger_bindings_stack = binding.callers.drop(1)
|
12
|
-
end
|
13
|
-
|
14
|
-
set_backtrace_without_honeybadger(*args, &block)
|
15
|
-
end
|
16
|
-
|
17
|
-
def __honeybadger_bindings_stack
|
18
|
-
@__honeybadger_bindings_stack || []
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
module NullBindings
|
23
|
-
def __honeybadger_bindings_stack
|
24
|
-
[]
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
begin
|
31
|
-
require 'binding_of_caller'
|
32
|
-
Exception.send(:include, Honeybadger::ExceptionExtensions::Bindings)
|
33
|
-
rescue LoadError
|
34
|
-
Exception.send(:include, Honeybadger::ExceptionExtensions::NullBindings)
|
35
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Exception, :unless => defined?(BindingOfCaller) do
|
4
|
-
should { respond_to :__honeybadger_bindings_stack }
|
5
|
-
its(:__honeybadger_bindings_stack) { should eq([]) }
|
6
|
-
end
|
7
|
-
|
8
|
-
describe Exception, :if => defined?(BindingOfCaller) do
|
9
|
-
describe "#set_backtrace" do
|
10
|
-
context "call stack does not match current file" do
|
11
|
-
it "changes the bindings stack" do
|
12
|
-
expect { subject.set_backtrace(['foo.rb:1']) }.to change(subject, :__honeybadger_bindings_stack).from([])
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
context "call stack includes current file" do
|
17
|
-
before do
|
18
|
-
subject.stub(:caller).and_return(["#{File.expand_path('../../../lib/honeybadger/exception_extensions.rb', __FILE__)}:1"])
|
19
|
-
end
|
20
|
-
|
21
|
-
it "does not change the bindings stack" do
|
22
|
-
expect { subject.set_backtrace(['foo.rb:1']) }.not_to change(subject, :__honeybadger_bindings_stack).from([])
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
context "call stack includes a non-matching line" do
|
27
|
-
before do
|
28
|
-
subject.stub(:caller).and_return(['(foo)'])
|
29
|
-
end
|
30
|
-
|
31
|
-
it "skips the non-matching line" do
|
32
|
-
expect { subject.set_backtrace(['foo.rb:1']) }.not_to raise_error
|
33
|
-
end
|
34
|
-
|
35
|
-
it "changes the bindings stack" do
|
36
|
-
expect { subject.set_backtrace(['foo.rb:1']) }.to change(subject, :__honeybadger_bindings_stack).from([])
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|