rollday 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rollday/configuration.rb +3 -1
- data/lib/rollday/rollbar_helper.rb +4 -2
- data/lib/rollday/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 836fb01c93ad7c663511d41a10b61ba4ecb7947f8e7fe06973267178181581d7
|
4
|
+
data.tar.gz: dc92f28700124355c7c505ff73e39556c7c7d18c3517335a8818390d8d02eb36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1feeea482c3827de3f1d2c918aecde8aa9d897c41651b0e0f812edfae52f78cb8b4d2a140b749aca586a7453364b50f40edba73643dd975ea60e86b62fd00926
|
7
|
+
data.tar.gz: f39c7a03087faf86c11e3470be983a1addc265caa62ba29824187ef144a08ff690c9196f2f1dcecffa3190d977b2373702f26ade02007e1eb8a842e7d2b1d163
|
@@ -25,6 +25,8 @@ module Rollday
|
|
25
25
|
value.is_a?(Proc) || ROLLBAR_LEVELS.include?(value)
|
26
26
|
end
|
27
27
|
|
28
|
+
EXCEPTION_CLASS_DEFAULT = -> (status, phrase, body, path, domain) { Rollday::Faraday }
|
29
|
+
|
28
30
|
add_composer :message, allowed: [Proc, String], default: DEFAULT_MESSAGE_PROC
|
29
31
|
add_composer :params_query_sanitizer, allowed: Array, default: []
|
30
32
|
add_composer :params_scope_sanitizer, allowed: Array, default: []
|
@@ -35,7 +37,7 @@ module Rollday
|
|
35
37
|
add_composer :use_params_scope, allowed: [TrueClass, FalseClass], default: true
|
36
38
|
add_composer :use_person_scope, allowed: [TrueClass, FalseClass], default: true
|
37
39
|
add_composer :use_query_scope, allowed: [TrueClass, FalseClass], default: true
|
38
|
-
add_composer :exception_class, allowed:
|
40
|
+
add_composer :exception_class, allowed: Proc, default: EXCEPTION_CLASS_DEFAULT
|
39
41
|
add_composer :allow_client_middleware, allowed: [TrueClass, FalseClass], default: true
|
40
42
|
|
41
43
|
def person_scope
|
@@ -11,10 +11,12 @@ module Rollday
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def rollbar_message(result)
|
14
|
-
|
14
|
+
params = [result.status, result.reason_phrase, result.body, URI(result.env.url).path, URI(result.env.url).host]
|
15
|
+
message = Rollday.config.message.(*params)
|
15
16
|
return message unless Rollday.config.use_message_exception
|
16
17
|
|
17
|
-
Rollday.config.exception_class.
|
18
|
+
error_klass = Rollday.config.exception_class.(*params)
|
19
|
+
error_klass.new(message)
|
18
20
|
end
|
19
21
|
|
20
22
|
def rollbar_scope(result)
|
data/lib/rollday/version.rb
CHANGED