blabbermouth-rollbar 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/blabbermouth/rollbar/bystander.rb +12 -0
- data/spec/blabbermouth/rollbar/bystander_spec.rb +24 -0
- data/spec/support/rollbar.rb +40 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe0325ef6ff4feccf5bab44366c9e4aa70d44b6c
|
4
|
+
data.tar.gz: c4673a165ed685657eb7aa756e64b0abb6734b1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a2f17a2cd37ca560eecaf5c7c5dfaf7c1fb0a7dc2d67e89b7ea0d51f62776c49d762b1ca6bfd9cb05578f99903bdb8635f963b4c730df04dcc8107cdad76d5e
|
7
|
+
data.tar.gz: bfe1867ede085e92919b9a8494b64e6a270c3b213af545aa06835a0acd4953b8efa8544bc56805ff06cd7456cb01fd69d497c2e661d0808a55fe19d88aae5574
|
@@ -7,6 +7,18 @@ module Blabbermouth
|
|
7
7
|
::Rollbar.error(Blabbermouth::Error.new(key, e), data)
|
8
8
|
end
|
9
9
|
|
10
|
+
def critical(key, e, data: {})
|
11
|
+
::Rollbar.critical(Blabbermouth::Critical.new(key, e), data)
|
12
|
+
end
|
13
|
+
|
14
|
+
def debug(key, e=nil, data: {})
|
15
|
+
::Rollbar.debug(Blabbermouth::Debug.new(key, e), data)
|
16
|
+
end
|
17
|
+
|
18
|
+
def warning(key, e=nil, data: {})
|
19
|
+
::Rollbar.warning(Blabbermouth::Warning.new(key, e), data)
|
20
|
+
end
|
21
|
+
|
10
22
|
def info(key, msg=nil, data: {})
|
11
23
|
::Rollbar.info(Blabbermouth::Info.new(key, msg), data)
|
12
24
|
end
|
@@ -10,6 +10,30 @@ RSpec.describe Blabbermouth::Bystanders::Rollbar do
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
+
describe '#critical' do
|
14
|
+
it 'reports to rollbar' do
|
15
|
+
subject.critical('key', StandardError.new)
|
16
|
+
critical = ::Rollbar.criticals.last
|
17
|
+
expect(critical[0]).to be_an_instance_of(Blabbermouth::Critical)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe '#warning' do
|
22
|
+
it 'reports to rollbar' do
|
23
|
+
subject.warning('key', StandardError.new)
|
24
|
+
warning = ::Rollbar.warnings.last
|
25
|
+
expect(warning[0]).to be_an_instance_of(Blabbermouth::Warning)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe '#debug' do
|
30
|
+
it 'reports to rollbar' do
|
31
|
+
subject.debug('key', StandardError.new)
|
32
|
+
debug = ::Rollbar.debugs.last
|
33
|
+
expect(debug[0]).to be_an_instance_of(Blabbermouth::Debug)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
13
37
|
describe '#info' do
|
14
38
|
it 'reports to rollbar' do
|
15
39
|
subject.info('key', 'test')
|
data/spec/support/rollbar.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class Rollbar
|
2
|
-
attr_reader :infos, :errors
|
2
|
+
attr_reader :infos, :errors, :criticals, :warnings, :debugs
|
3
3
|
|
4
4
|
class << self
|
5
5
|
def rollbar
|
@@ -14,6 +14,18 @@ class Rollbar
|
|
14
14
|
rollbar.errors
|
15
15
|
end
|
16
16
|
|
17
|
+
def criticals
|
18
|
+
rollbar.criticals
|
19
|
+
end
|
20
|
+
|
21
|
+
def warnings
|
22
|
+
rollbar.warnings
|
23
|
+
end
|
24
|
+
|
25
|
+
def debugs
|
26
|
+
rollbar.debugs
|
27
|
+
end
|
28
|
+
|
17
29
|
def info(e, data)
|
18
30
|
rollbar.info(e, data)
|
19
31
|
end
|
@@ -22,6 +34,18 @@ class Rollbar
|
|
22
34
|
rollbar.error(e, data)
|
23
35
|
end
|
24
36
|
|
37
|
+
def critical(e, data)
|
38
|
+
rollbar.critical(e, data)
|
39
|
+
end
|
40
|
+
|
41
|
+
def warning(e, data)
|
42
|
+
rollbar.warning(e, data)
|
43
|
+
end
|
44
|
+
|
45
|
+
def debug(e, data)
|
46
|
+
rollbar.debug(e, data)
|
47
|
+
end
|
48
|
+
|
25
49
|
def clear!
|
26
50
|
rollbar.clear!
|
27
51
|
end
|
@@ -35,9 +59,24 @@ class Rollbar
|
|
35
59
|
@errors << [e, data]
|
36
60
|
end
|
37
61
|
|
62
|
+
def critical(e, data)
|
63
|
+
@criticals << [e, data]
|
64
|
+
end
|
65
|
+
|
66
|
+
def warning(e, data)
|
67
|
+
@warnings << [e, data]
|
68
|
+
end
|
69
|
+
|
70
|
+
def debug(e, data)
|
71
|
+
@debugs << [e, data]
|
72
|
+
end
|
73
|
+
|
38
74
|
def clear!
|
39
75
|
@infos = []
|
40
76
|
@errors = []
|
77
|
+
@criticals = []
|
78
|
+
@warnings = []
|
79
|
+
@debugs = []
|
41
80
|
end
|
42
81
|
|
43
82
|
protected
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blabbermouth-rollbar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Rebec
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: blabbermouth
|