smoke_detector 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/smoke_detector/providers/rollbar.rb +3 -3
- data/lib/smoke_detector/version.rb +1 -1
- data/spec/dummy/log/test.log +2247 -14984
- data/spec/models/providers/rollbar_spec.rb +6 -6
- data/spec/support/shared_examples_for_providers.rb +4 -4
- metadata +13 -13
@@ -28,7 +28,7 @@ describe SmokeDetector::Providers::Rollbar do
|
|
28
28
|
|
29
29
|
describe '#alert' do
|
30
30
|
it 'reports the exception to Rollbar' do
|
31
|
-
Rollbar.should_receive(:
|
31
|
+
Rollbar.should_receive(:error).with(err)
|
32
32
|
provider.alert(err)
|
33
33
|
end
|
34
34
|
|
@@ -47,7 +47,7 @@ describe SmokeDetector::Providers::Rollbar do
|
|
47
47
|
let(:options) { {} }
|
48
48
|
|
49
49
|
it 'reports the message to Rollbar' do
|
50
|
-
Rollbar.should_receive(:
|
50
|
+
Rollbar.should_receive(:log).with(level, message, options)
|
51
51
|
provider.message(message)
|
52
52
|
end
|
53
53
|
|
@@ -55,7 +55,7 @@ describe SmokeDetector::Providers::Rollbar do
|
|
55
55
|
let(:options) { {custom: :data} }
|
56
56
|
|
57
57
|
it 'passes the options along as the data param' do
|
58
|
-
Rollbar.should_receive(:
|
58
|
+
Rollbar.should_receive(:log).with(level, message, options)
|
59
59
|
provider.message(message, options)
|
60
60
|
end
|
61
61
|
|
@@ -64,12 +64,12 @@ describe SmokeDetector::Providers::Rollbar do
|
|
64
64
|
let(:options) { {custom: :data, level: level} }
|
65
65
|
|
66
66
|
it 'sets the message level' do
|
67
|
-
Rollbar.should_receive(:
|
67
|
+
Rollbar.should_receive(:log).with(level, message, options)
|
68
68
|
provider.message(message, options)
|
69
69
|
end
|
70
70
|
|
71
71
|
it 'does not include the level in the data param' do
|
72
|
-
Rollbar.should_receive(:
|
72
|
+
Rollbar.should_receive(:log).with(level, message, options)
|
73
73
|
provider.message(message, options)
|
74
74
|
end
|
75
75
|
end
|
@@ -85,7 +85,7 @@ describe SmokeDetector::Providers::Rollbar do
|
|
85
85
|
|
86
86
|
describe '#alert_smoke_detector' do
|
87
87
|
it 'notifies Rollbar of the exception' do
|
88
|
-
Rollbar.should_receive(:
|
88
|
+
Rollbar.should_receive(:error)
|
89
89
|
controller.should_receive(:rollbar_request_data)
|
90
90
|
controller.should_receive(:rollbar_person_data)
|
91
91
|
controller.alert_smoke_detector(err)
|
@@ -32,28 +32,28 @@ end
|
|
32
32
|
shared_examples_for 'Rollbar integrated error handler' do
|
33
33
|
context 'uncaught in a controller' do
|
34
34
|
it 'reports the error to Rollbar' do
|
35
|
-
Rollbar.should_receive(:
|
35
|
+
Rollbar.should_receive(:log).with('error', instance_of(RuntimeError)).and_return({})
|
36
36
|
expect { get '/widgets/bubble_up' }.to raise_error(RuntimeError, 'bubble_up')
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
40
|
context 'caught and reported in a controller' do
|
41
41
|
it 'reports the error to Rollbar' do
|
42
|
-
Rollbar.should_receive(:
|
42
|
+
Rollbar.should_receive(:error)
|
43
43
|
expect { get '/widgets/catch' }.not_to raise_error
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
47
|
context 'uncaught in a model' do
|
48
48
|
it 'reports the error to Rollbar' do
|
49
|
-
Rollbar.should_receive(:
|
49
|
+
Rollbar.should_receive(:log).with('error', instance_of(RuntimeError)).and_return({})
|
50
50
|
expect { get '/widgets/deep_bubble_up' }.to raise_error(RuntimeError, 'deep_bubble_up')
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
54
|
context 'caught and reported in a model' do
|
55
55
|
it 'reports the error to Rollbar' do
|
56
|
-
Rollbar.should_receive(:
|
56
|
+
Rollbar.should_receive(:error)
|
57
57
|
expect { get '/widgets/deep_catch' }.not_to raise_error
|
58
58
|
end
|
59
59
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smoke_detector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Friedrich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.2.7
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.2.7
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: jshintrb
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -186,22 +186,20 @@ executables: []
|
|
186
186
|
extensions: []
|
187
187
|
extra_rdoc_files: []
|
188
188
|
files:
|
189
|
-
- MIT-LICENSE
|
190
|
-
- README.md
|
191
|
-
- Rakefile
|
192
|
-
- lib/smoke_detector.rb
|
193
189
|
- lib/smoke_detector/controller_methods.rb
|
194
190
|
- lib/smoke_detector/engine.rb
|
195
191
|
- lib/smoke_detector/exceptions.rb
|
196
192
|
- lib/smoke_detector/middleware/javascript_monitors.rb
|
197
|
-
- lib/smoke_detector/providers.rb
|
198
193
|
- lib/smoke_detector/providers/airbrake.rb
|
199
194
|
- lib/smoke_detector/providers/provider.rb
|
200
195
|
- lib/smoke_detector/providers/rollbar.rb
|
196
|
+
- lib/smoke_detector/providers.rb
|
201
197
|
- lib/smoke_detector/version.rb
|
198
|
+
- lib/smoke_detector.rb
|
202
199
|
- lib/tasks/smoke_detector_tasks.rake
|
203
|
-
-
|
204
|
-
-
|
200
|
+
- MIT-LICENSE
|
201
|
+
- Rakefile
|
202
|
+
- README.md
|
205
203
|
- spec/dummy/app/assets/javascripts/application.js
|
206
204
|
- spec/dummy/app/assets/stylesheets/application.css
|
207
205
|
- spec/dummy/app/controllers/application_controller.rb
|
@@ -210,7 +208,6 @@ files:
|
|
210
208
|
- spec/dummy/app/models/widget.rb
|
211
209
|
- spec/dummy/app/views/layouts/application.html.erb
|
212
210
|
- spec/dummy/app/views/widgets/index.html.erb
|
213
|
-
- spec/dummy/config.ru
|
214
211
|
- spec/dummy/config/application.rb
|
215
212
|
- spec/dummy/config/boot.rb
|
216
213
|
- spec/dummy/config/database.yml
|
@@ -227,6 +224,7 @@ files:
|
|
227
224
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
228
225
|
- spec/dummy/config/locales/en.yml
|
229
226
|
- spec/dummy/config/routes.rb
|
227
|
+
- spec/dummy/config.ru
|
230
228
|
- spec/dummy/db/schema.rb
|
231
229
|
- spec/dummy/db/test.sqlite3
|
232
230
|
- spec/dummy/log/test.log
|
@@ -234,6 +232,8 @@ files:
|
|
234
232
|
- spec/dummy/public/422.html
|
235
233
|
- spec/dummy/public/500.html
|
236
234
|
- spec/dummy/public/favicon.ico
|
235
|
+
- spec/dummy/Rakefile
|
236
|
+
- spec/dummy/README.rdoc
|
237
237
|
- spec/dummy/script/rails
|
238
238
|
- spec/models/providers/airbrake_spec.rb
|
239
239
|
- spec/models/providers/provider_spec.rb
|
@@ -266,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
266
266
|
version: '0'
|
267
267
|
requirements: []
|
268
268
|
rubyforge_project:
|
269
|
-
rubygems_version: 2.
|
269
|
+
rubygems_version: 2.0.14
|
270
270
|
signing_key:
|
271
271
|
specification_version: 4
|
272
272
|
summary: Errors Alerts
|