failbot 2.2.1 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/failbot.rb +12 -0
- data/lib/failbot/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 556ca34093cb33fc4db100a530b407cd4ed38282d615ecffbea2050a6479121d
|
4
|
+
data.tar.gz: b885163eaefde6ef987f7b4340dcd98f1a2c45c34cfda1352fd9c490eb866a35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 303221221b3f2426e21fcee2bd4398ed0975fe68ba68d82938a495fc1654ec8476fef153fa617b33a8034f42babc4617ea0c5b48ab94d2121ba3e1da4eb29a92
|
7
|
+
data.tar.gz: d38ba8d750531eac9f6ee1359c0ec30aa6165ad9d64f3f7fda3454a18cbe818242d50a4e524827ea1c37b79dc2db66ea3e558294b352d4a2db4fbe2ce00c9315
|
data/lib/failbot.rb
CHANGED
@@ -71,6 +71,8 @@ module Failbot
|
|
71
71
|
context[0] = default_context.to_hash
|
72
72
|
end
|
73
73
|
|
74
|
+
populate_context_from_settings(settings)
|
75
|
+
|
74
76
|
self.backend =
|
75
77
|
case (name = settings["FAILBOT_BACKEND"])
|
76
78
|
when "memory"
|
@@ -410,6 +412,16 @@ module Failbot
|
|
410
412
|
Failbot.instrumenter.instrument(name, payload) if Failbot.instrumenter
|
411
413
|
end
|
412
414
|
|
415
|
+
# Populate default context from settings. Since settings commonly comes from
|
416
|
+
# ENV, this allows setting defaults for the context via the environment.
|
417
|
+
def populate_context_from_settings(settings)
|
418
|
+
settings.each do |key, value|
|
419
|
+
if /\AFAILBOT_CONTEXT_(.+)\z/ =~ key
|
420
|
+
context[0][$1.downcase] = value
|
421
|
+
end
|
422
|
+
end
|
423
|
+
end
|
424
|
+
|
413
425
|
# We'll include this many nested Exception#cause objects in the needle
|
414
426
|
# context. We limit the number of objects to prevent excessive recursion and
|
415
427
|
# large needle contexts.
|
data/lib/failbot/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: failbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "@rtomayko"
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-
|
13
|
+
date: 2019-12-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|
@@ -122,8 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
122
|
- !ruby/object:Gem::Version
|
123
123
|
version: 1.3.6
|
124
124
|
requirements: []
|
125
|
-
|
126
|
-
rubygems_version: 2.5.2.3
|
125
|
+
rubygems_version: 3.0.3
|
127
126
|
signing_key:
|
128
127
|
specification_version: 4
|
129
128
|
summary: Deliver exceptions to Haystack
|