minitest_rollbar 0.2.7 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/minitest_rollbar/reporters.rb +7 -10
- data/lib/minitest_rollbar/version.rb +1 -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: 1296b363cca31bcff33287bb482f21ea91824032
|
4
|
+
data.tar.gz: 6a95b051939d589f276691a77b954e2b1f17ac9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2b562071716bd38167b7d2c88179c39307fffdd2fefcdd9379c398a36f1dc6a0cfff1c0493b5c3bf5705fca19acf41909afdd1c4048bbe28b5f45ce9de23a99
|
7
|
+
data.tar.gz: e61c735f88281c9ed78c5e846380b332f8d760eb7318c38b49cee1d0fe8d47ac86d9ef84e15dce31625f06f8baf7b11fdba9ec6ab556f65183c627f4fbf80976
|
data/README.md
CHANGED
@@ -26,10 +26,10 @@ Require necessary files on test_helper:
|
|
26
26
|
|
27
27
|
require 'minitest_rollbar'
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
MinitestRollbar.access_token = {YOUR_TOKEN}
|
29
|
+
Get a reporter with access_token and ssl policy using:
|
32
30
|
|
31
|
+
@reporter = MinitestRollbar::RollbarReporter.new(rollbar_config: {verify_ssl_peer: false, access_token: 'whatever'})
|
32
|
+
|
33
33
|
By default we try to group occurrence by string returned by exception.inspect (Concatenate exception class name and message). We generate a fingerprint for that. To use rollbar's [default](https://rollbar.com/docs/grouping-algorithm/) default grouping algorithm, do
|
34
34
|
|
35
35
|
MinitestRollbar.use_default_grouping = true
|
@@ -2,14 +2,14 @@ require 'rollbar'
|
|
2
2
|
require 'minitest/reporters'
|
3
3
|
module MinitestRollbar
|
4
4
|
class << self
|
5
|
-
attr_accessor :access_token
|
6
5
|
attr_accessor :use_default_grouping
|
7
|
-
attr_accessor :enable_verify_ssl_peer
|
8
6
|
end
|
9
7
|
|
10
8
|
class RollbarReporter < Minitest::Reporters::BaseReporter
|
11
9
|
def initialize(options = {})
|
12
|
-
|
10
|
+
rollbar_config = options.delete(:rollbar_config) || {}
|
11
|
+
super(options)
|
12
|
+
|
13
13
|
@sequential_exception_count = 0
|
14
14
|
# Inspect will return ExceptionType + Message.
|
15
15
|
# E.g #<Selenium::WebDriver::Error::NoSuchWindowError: Window not found. The browser window may have been closed.>
|
@@ -17,16 +17,13 @@ module MinitestRollbar
|
|
17
17
|
@previous_exception_inspect_result = nil
|
18
18
|
@previous_exception = nil
|
19
19
|
|
20
|
-
raise 'Must set rollbar access token' if MinitestRollbar.access_token.nil?
|
21
20
|
Rollbar.configure do |config|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
unless MinitestRollbar.enable_verify_ssl_peer.nil?
|
26
|
-
config.verify_ssl_peer = MinitestRollbar.enable_verify_ssl_peer
|
21
|
+
rollbar_config.each do |key, value|
|
22
|
+
config.send "#{key}=", value
|
27
23
|
end
|
28
|
-
|
29
24
|
end
|
25
|
+
|
26
|
+
raise 'Must set rollbar access token' if Rollbar.configuration.access_token.nil?
|
30
27
|
end
|
31
28
|
|
32
29
|
def record(result)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest_rollbar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuesong Wang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|