smoke_detector 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +9 -9
- data/README.md +1 -2
- data/lib/smoke_detector/providers/airbrake.rb +1 -1
- data/lib/smoke_detector/providers/provider.rb +9 -0
- data/lib/smoke_detector/providers/rollbar.rb +8 -5
- data/lib/smoke_detector/version.rb +1 -1
- data/spec/dummy/config/initializers/{watch_tower.rb → smoke_detector.rb} +1 -1
- data/spec/dummy/log/test.log +1373 -0
- data/spec/models/providers/provider_spec.rb +23 -2
- metadata +5 -5
@@ -7,7 +7,7 @@ describe SmokeDetector::Providers::Provider do
|
|
7
7
|
subject { provider.alert(Exception.new) }
|
8
8
|
|
9
9
|
it 'raises an error' do
|
10
|
-
expect { subject }.to raise_error
|
10
|
+
expect { subject }.to raise_error(NotImplementedError)
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
@@ -15,8 +15,29 @@ describe SmokeDetector::Providers::Provider do
|
|
15
15
|
subject { provider.message(Exception.new) }
|
16
16
|
|
17
17
|
it 'raises an error' do
|
18
|
-
expect { subject }.to raise_error
|
18
|
+
expect { subject }.to raise_error(NotImplementedError)
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
+
describe '#apply_configuration_settings' do
|
23
|
+
subject { provider.send(:apply_configuration_settings, config, settings) }
|
24
|
+
|
25
|
+
context 'given a valid configuration setting' do
|
26
|
+
let(:config) { stub(:config, :'setting=' => true) }
|
27
|
+
let(:settings) { {setting: false} }
|
28
|
+
|
29
|
+
it 'does not raise an error' do
|
30
|
+
expect { subject }.to_not raise_error(ArgumentError)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'given an invalid configuration setting' do
|
35
|
+
let(:config) { stub(:config) }
|
36
|
+
let(:settings) { {setting: false} }
|
37
|
+
|
38
|
+
it 'raises an error' do
|
39
|
+
expect { subject }.to raise_error(ArgumentError)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
22
43
|
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: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Friedrich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -205,7 +205,7 @@ files:
|
|
205
205
|
- spec/dummy/config/initializers/mime_types.rb
|
206
206
|
- spec/dummy/config/initializers/secret_token.rb
|
207
207
|
- spec/dummy/config/initializers/session_store.rb
|
208
|
-
- spec/dummy/config/initializers/
|
208
|
+
- spec/dummy/config/initializers/smoke_detector.rb
|
209
209
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
210
210
|
- spec/dummy/config/locales/en.yml
|
211
211
|
- spec/dummy/config/routes.rb
|
@@ -261,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
261
261
|
version: '0'
|
262
262
|
requirements: []
|
263
263
|
rubyforge_project:
|
264
|
-
rubygems_version: 2.
|
264
|
+
rubygems_version: 2.1.4
|
265
265
|
signing_key:
|
266
266
|
specification_version: 4
|
267
267
|
summary: Errors Alerts
|
@@ -286,7 +286,7 @@ test_files:
|
|
286
286
|
- spec/dummy/config/initializers/mime_types.rb
|
287
287
|
- spec/dummy/config/initializers/secret_token.rb
|
288
288
|
- spec/dummy/config/initializers/session_store.rb
|
289
|
-
- spec/dummy/config/initializers/
|
289
|
+
- spec/dummy/config/initializers/smoke_detector.rb
|
290
290
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
291
291
|
- spec/dummy/config/locales/en.yml
|
292
292
|
- spec/dummy/config/routes.rb
|