err 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/err/services/opbeat.rb +2 -4
- data/lib/err/version.rb +1 -1
- data/test/services/opbeat_test.rb +15 -3
- 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: 241d4018331027122302c309c271b8472abd8b82
|
4
|
+
data.tar.gz: 3254241b5f12e6454c185e145047bb9401e1aa10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cfe8e1e4222af16560f22daffb8d0337879aba484a9210efac36556753e3d01dc32d92f356b554666489530a036304e14aebeae31b559a53d302021c187bfde
|
7
|
+
data.tar.gz: d357dedce1072a751803f045e02b605a7b21aa23c009b0a6fd630fcbdd56f2b4d125a21bbcf4bfe5080f87bf9ead9f2dd348ce1bb7c8bd5c9d8ea92085e25bd0
|
data/lib/err/services/opbeat.rb
CHANGED
@@ -19,13 +19,11 @@ module Err
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def notify(exception, params = {})
|
22
|
-
opbeat.captureException(exception)
|
22
|
+
opbeat.captureException(exception, extra: params)
|
23
23
|
end
|
24
24
|
|
25
25
|
def message(msg, params = {})
|
26
|
-
msg
|
27
|
-
msg << " (#{params_string(params)})" if params.any?
|
28
|
-
opbeat.captureMessage(msg)
|
26
|
+
opbeat.captureMessage(msg, extra: params)
|
29
27
|
end
|
30
28
|
|
31
29
|
private
|
data/lib/err/version.rb
CHANGED
@@ -45,12 +45,24 @@ class OpbeatTest < Minitest::Test
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def test_notify
|
48
|
-
|
49
|
-
|
48
|
+
exception = RuntimeError.new
|
49
|
+
Opbeat.expects(:captureException).with(exception, extra: {}).once
|
50
|
+
Err::Opbeat.notify exception
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_notify_with_params
|
54
|
+
exception = RuntimeError.new
|
55
|
+
Opbeat.expects(:captureException).with(exception, extra: { id: 1, b: 2 }).once
|
56
|
+
Err::Opbeat.notify exception, id: 1, b: 2
|
50
57
|
end
|
51
58
|
|
52
59
|
def test_message
|
53
|
-
Opbeat.expects(:captureMessage).once
|
60
|
+
Opbeat.expects(:captureMessage).with("This is a test", extra: {}).once
|
61
|
+
Err::Opbeat.message "This is a test"
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_message_with_params
|
65
|
+
Opbeat.expects(:captureMessage).with("This is a test", extra: { one: "First", two: "Second" }).once
|
54
66
|
Err::Opbeat.message "This is a test", one: "First", two: "Second"
|
55
67
|
end
|
56
68
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: err
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lasse Bunk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|