honeybadger 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Appraisals +25 -1
- data/CHANGELOG.md +47 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +7 -8
- data/MIT-LICENSE +1 -1
- data/README.md +117 -6
- data/Rakefile +15 -0
- data/features/rack.feature +2 -2
- data/features/rails.feature +79 -15
- data/features/step_definitions/metal_steps.rb +4 -4
- data/features/step_definitions/rack_steps.rb +0 -4
- data/features/step_definitions/rails_steps.rb +49 -32
- data/features/support/honeybadger_failure_shim.rb.template +5 -0
- data/features/support/rails.rb +17 -5
- data/gemfiles/rack.gemfile +8 -0
- data/gemfiles/rack.gemfile.lock +92 -0
- data/gemfiles/rails2.3.gemfile +1 -1
- data/gemfiles/rails2.3.gemfile.lock +6 -2
- data/gemfiles/rails3.0.gemfile +2 -1
- data/gemfiles/rails3.0.gemfile.lock +12 -3
- data/gemfiles/rails3.1.gemfile +2 -1
- data/gemfiles/rails3.1.gemfile.lock +12 -3
- data/gemfiles/rails3.2.gemfile +3 -2
- data/gemfiles/rails3.2.gemfile.lock +45 -36
- data/gemfiles/rails4.gemfile +9 -0
- data/gemfiles/rails4.gemfile.lock +174 -0
- data/gemfiles/rake.gemfile +8 -0
- data/gemfiles/rake.gemfile.lock +91 -0
- data/gemfiles/sinatra.gemfile +8 -0
- data/gemfiles/sinatra.gemfile.lock +91 -0
- data/generators/honeybadger/honeybadger_generator.rb +5 -5
- data/honeybadger.gemspec +12 -3
- data/lib/honeybadger.rb +7 -14
- data/lib/honeybadger/configuration.rb +10 -1
- data/lib/honeybadger/notice.rb +38 -20
- data/lib/honeybadger/rack.rb +0 -1
- data/lib/honeybadger/rails/controller_methods.rb +5 -4
- data/lib/honeybadger/rails3_tasks.rb +16 -4
- data/lib/honeybadger/sender.rb +10 -19
- data/lib/honeybadger/shared_tasks.rb +2 -3
- data/lib/honeybadger/tasks.rb +16 -9
- data/lib/honeybadger_tasks.rb +2 -3
- data/lib/rails/generators/honeybadger/honeybadger_generator.rb +5 -5
- data/test/test_helper.rb +2 -7
- data/test/unit/backtrace_test.rb +19 -19
- data/test/unit/configuration_test.rb +11 -5
- data/test/unit/notice_test.rb +21 -3
- data/test/unit/rails/action_controller_catcher_test.rb +250 -241
- data/test/unit/sender_test.rb +22 -2
- metadata +13 -19
data/test/unit/sender_test.rb
CHANGED
@@ -18,7 +18,8 @@ class SenderTest < Test::Unit::TestCase
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def stub_http(options = {})
|
21
|
-
response =
|
21
|
+
response = options[:response] || Net::HTTPSuccess.new('1.2', '200', 'OK')
|
22
|
+
response.stubs(:body => options[:body] || '{"id":"1234"}')
|
22
23
|
http = stub(:post => response,
|
23
24
|
:read_timeout= => nil,
|
24
25
|
:open_timeout= => nil,
|
@@ -65,6 +66,25 @@ class SenderTest < Test::Unit::TestCase
|
|
65
66
|
assert_equal "3799307", send_exception(:secure => false)
|
66
67
|
end
|
67
68
|
|
69
|
+
should "return nil on failed posting" do
|
70
|
+
http = stub_http(:response => Net::HTTPServerError.new('1.2', '500', 'Internal Error'))
|
71
|
+
assert_equal nil, send_exception(:secure => false)
|
72
|
+
end
|
73
|
+
|
74
|
+
should "should log success" do
|
75
|
+
http = stub_http
|
76
|
+
sender = build_sender
|
77
|
+
sender.expects(:log).with(:debug, includes('Success'), kind_of(Net::HTTPSuccess), kind_of(String))
|
78
|
+
send_exception(:sender => sender, :secure => false)
|
79
|
+
end
|
80
|
+
|
81
|
+
should "should log failure" do
|
82
|
+
http = stub_http(:response => Net::HTTPServerError.new('1.2', '500', 'Internal Error'))
|
83
|
+
sender = build_sender
|
84
|
+
sender.expects(:log).with(:error, includes('Failure'), kind_of(Net::HTTPServerError), kind_of(String))
|
85
|
+
send_exception(:sender => sender, :secure => false)
|
86
|
+
end
|
87
|
+
|
68
88
|
context "when encountering exceptions: " do
|
69
89
|
context "HTTP connection setup problems" do
|
70
90
|
should "not be rescued" do
|
@@ -97,7 +117,7 @@ class SenderTest < Test::Unit::TestCase
|
|
97
117
|
sender = build_sender
|
98
118
|
sender.stubs(:setup_http_connection).raises(RuntimeError.new)
|
99
119
|
|
100
|
-
sender.expects(:log).with(:error, includes('
|
120
|
+
sender.expects(:log).with(:error, includes('Error'))
|
101
121
|
sender.send_to_honeybadger("stuff")
|
102
122
|
end
|
103
123
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honeybadger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-03-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -27,22 +27,6 @@ dependencies:
|
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0'
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: activesupport
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ! '>='
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '0'
|
38
|
-
type: :runtime
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ! '>='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0'
|
46
30
|
- !ruby/object:Gem::Dependency
|
47
31
|
name: cucumber
|
48
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -228,6 +212,7 @@ extra_rdoc_files:
|
|
228
212
|
- MIT-LICENSE
|
229
213
|
files:
|
230
214
|
- Appraisals
|
215
|
+
- CHANGELOG.md
|
231
216
|
- Gemfile
|
232
217
|
- Gemfile.lock
|
233
218
|
- Guardfile
|
@@ -244,9 +229,12 @@ files:
|
|
244
229
|
- features/step_definitions/rails_steps.rb
|
245
230
|
- features/step_definitions/rake_steps.rb
|
246
231
|
- features/support/env.rb
|
232
|
+
- features/support/honeybadger_failure_shim.rb.template
|
247
233
|
- features/support/honeybadger_shim.rb.template
|
248
234
|
- features/support/rails.rb
|
249
235
|
- features/support/rake/Rakefile
|
236
|
+
- gemfiles/rack.gemfile
|
237
|
+
- gemfiles/rack.gemfile.lock
|
250
238
|
- gemfiles/rails2.3.gemfile
|
251
239
|
- gemfiles/rails2.3.gemfile.lock
|
252
240
|
- gemfiles/rails3.0.gemfile
|
@@ -255,6 +243,12 @@ files:
|
|
255
243
|
- gemfiles/rails3.1.gemfile.lock
|
256
244
|
- gemfiles/rails3.2.gemfile
|
257
245
|
- gemfiles/rails3.2.gemfile.lock
|
246
|
+
- gemfiles/rails4.gemfile
|
247
|
+
- gemfiles/rails4.gemfile.lock
|
248
|
+
- gemfiles/rake.gemfile
|
249
|
+
- gemfiles/rake.gemfile.lock
|
250
|
+
- gemfiles/sinatra.gemfile
|
251
|
+
- gemfiles/sinatra.gemfile.lock
|
258
252
|
- generators/honeybadger/honeybadger_generator.rb
|
259
253
|
- generators/honeybadger/lib/insert_commands.rb
|
260
254
|
- generators/honeybadger/lib/rake_commands.rb
|
@@ -312,7 +306,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
312
306
|
version: '0'
|
313
307
|
segments:
|
314
308
|
- 0
|
315
|
-
hash: -
|
309
|
+
hash: -3371863153631234141
|
316
310
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
317
311
|
none: false
|
318
312
|
requirements:
|