honeybadger 2.0.0.beta.13 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/lib/honeybadger/agent.rb +1 -1
- data/lib/honeybadger/cli/main.rb +11 -0
- data/lib/honeybadger/config/defaults.rb +1 -1
- data/lib/honeybadger/notice.rb +6 -3
- data/lib/honeybadger/version.rb +1 -1
- data/lib/honeybadger.rb +6 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e572631a4f389e80ffaf94ae4f2ac54416c8b48
|
4
|
+
data.tar.gz: 2b24702a280799a095862c85f47092e4c3bc90c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19b93a61469925c7a06262fed934ebefd5fb6c9d977e0203af2aa005b08ca71bdd06d623a277b4bea16a787767697f578358413cb94f60bb7acd96f43a059d4e
|
7
|
+
data.tar.gz: a8781662e0f4cada0af2e89a329d084cf16888007b0649629e34e115e4e1db46725b6218688285d6a1057d6bc41dd2fbf0e1cf7c6b9c4868ba4299f831f7d9d7
|
data/LICENSE
CHANGED
data/lib/honeybadger/agent.rb
CHANGED
@@ -208,7 +208,7 @@ module Honeybadger
|
|
208
208
|
opts.merge!(callbacks: self.class.callbacks)
|
209
209
|
notice = Notice.new(config, opts)
|
210
210
|
|
211
|
-
if notice.ignore?
|
211
|
+
if !opts[:force] && notice.ignore?
|
212
212
|
debug { sprintf('ignore notice feature=notices id=%s', notice.id) }
|
213
213
|
false
|
214
214
|
else
|
data/lib/honeybadger/cli/main.rb
CHANGED
@@ -142,6 +142,17 @@ module Honeybadger
|
|
142
142
|
end
|
143
143
|
end
|
144
144
|
|
145
|
+
if (capfile = Pathname.new(config[:root]).join('Capfile')).exist?
|
146
|
+
if capfile.read.match(/honeybadger/)
|
147
|
+
say("Detected Honeybadger in Capfile; skipping Capistrano installation.", :yellow)
|
148
|
+
else
|
149
|
+
say("Appending Capistrano tasks to: #{capfile}", :yellow)
|
150
|
+
File.open(capfile, 'a') do |f|
|
151
|
+
f.puts("\nrequire 'capistrano/honeybadger'")
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
145
156
|
if !skip_test && (options[:test].nil? || options[:test])
|
146
157
|
Honeybadger.start(config) unless load_rails_env(verbose: true)
|
147
158
|
say('Sending test notice', :yellow)
|
@@ -19,7 +19,7 @@ module Honeybadger
|
|
19
19
|
},
|
20
20
|
env: {
|
21
21
|
description: 'The current application\'s environment name.',
|
22
|
-
default: ENV['HONEYBADGER_ENV']
|
22
|
+
default: ENV['HONEYBADGER_ENV'] || ENV['RACK_ENV']
|
23
23
|
},
|
24
24
|
report_data: {
|
25
25
|
description: 'Enable/disable reporting of data. Defaults to true for non-development environments.',
|
data/lib/honeybadger/notice.rb
CHANGED
@@ -160,7 +160,7 @@ module Honeybadger
|
|
160
160
|
|
161
161
|
@stats = Util::Stats.all
|
162
162
|
|
163
|
-
@local_variables =
|
163
|
+
@local_variables = local_variables_from_exception(exception, config, @sanitizer)
|
164
164
|
|
165
165
|
@api_key = opts[:api_key] || config[:api_key]
|
166
166
|
end
|
@@ -404,7 +404,8 @@ module Honeybadger
|
|
404
404
|
# exception - The Exception containing the bindings stack.
|
405
405
|
#
|
406
406
|
# Returns a Hash of local variables
|
407
|
-
def local_variables_from_exception(exception, config)
|
407
|
+
def local_variables_from_exception(exception, config, sanitizer)
|
408
|
+
return {} unless send_local_variables?(config)
|
408
409
|
return {} unless Exception === exception
|
409
410
|
return {} unless exception.respond_to?(:__honeybadger_bindings_stack)
|
410
411
|
return {} if exception.__honeybadger_bindings_stack.empty?
|
@@ -416,7 +417,9 @@ module Honeybadger
|
|
416
417
|
binding ||= exception.__honeybadger_bindings_stack[0]
|
417
418
|
|
418
419
|
vars = binding.eval('local_variables')
|
419
|
-
Hash[vars.map {|arg| [arg, binding.eval(arg.to_s)]}]
|
420
|
+
h = Hash[vars.map {|arg| [arg, binding.eval(arg.to_s)]}]
|
421
|
+
|
422
|
+
sanitizer.sanitize(h)
|
420
423
|
end
|
421
424
|
|
422
425
|
# Internal: Should local variables be sent?
|
data/lib/honeybadger/version.rb
CHANGED
data/lib/honeybadger.rb
CHANGED
@@ -41,7 +41,8 @@ module Honeybadger
|
|
41
41
|
Agent.stop
|
42
42
|
end
|
43
43
|
|
44
|
-
# Public: Send an exception to Honeybadger.
|
44
|
+
# Public: Send an exception to Honeybadger. Does not report ignored
|
45
|
+
# exceptions by default.
|
45
46
|
#
|
46
47
|
# exception_or_opts - An Exception object, or a Hash of options which is used
|
47
48
|
# to build the notice.
|
@@ -49,6 +50,8 @@ module Honeybadger
|
|
49
50
|
# Exception. (default: {}):
|
50
51
|
# :error_class - The String class name of the error.
|
51
52
|
# :error_message - The String error message.
|
53
|
+
# :force - Always report the exception (even when
|
54
|
+
# ignored).
|
52
55
|
#
|
53
56
|
# Examples:
|
54
57
|
#
|
@@ -68,7 +71,8 @@ module Honeybadger
|
|
68
71
|
# context: {my_data: 'value'}
|
69
72
|
# }) # => '06221c5a-b471-41e5-baeb-de247da45a56'
|
70
73
|
#
|
71
|
-
# Returns a String UUID reference to the notice within Honeybadger
|
74
|
+
# Returns a String UUID reference to the notice within Honeybadger or false
|
75
|
+
# when ignored.
|
72
76
|
def notify(exception_or_opts, opts = {})
|
73
77
|
opts.merge!(exception: exception_or_opts) if exception_or_opts.is_a?(Exception)
|
74
78
|
opts.merge!(exception_or_opts.to_hash) if exception_or_opts.respond_to?(:to_hash)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honeybadger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Honeybadger Industries LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Make managing application errors a more pleasant experience.
|
14
14
|
email:
|
@@ -139,9 +139,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
139
139
|
version: 1.9.3
|
140
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
|
-
- - "
|
142
|
+
- - ">="
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version:
|
144
|
+
version: '0'
|
145
145
|
requirements: []
|
146
146
|
rubyforge_project:
|
147
147
|
rubygems_version: 2.4.5
|