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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 596c5bb3264ebae76aa8d731c3e160c177c19fed
4
- data.tar.gz: f58b30a78e629ba552195d62d2e668fa48b3ea93
3
+ metadata.gz: fe0325ef6ff4feccf5bab44366c9e4aa70d44b6c
4
+ data.tar.gz: c4673a165ed685657eb7aa756e64b0abb6734b1e
5
5
  SHA512:
6
- metadata.gz: 9f392e20cfd56a4ed2f5ea1acd0d793166951be379cb1bc557394165275cf5db42042fb8a37c7f8739d34fa066f172b3da2fb9519e2800749cbdfdc6a7a3de7b
7
- data.tar.gz: aaf350739dfb896366e4e2b1f2027a46363d694e81baf568534bc924d68422d39aa21fb99ffd412647ca2796eeeb8fcdf2eac0499bd0b535c8bb8dd2d85753a7
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')
@@ -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.2
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-03-31 00:00:00.000000000 Z
11
+ date: 2016-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: blabbermouth