network_resiliency 0.6.6 → 0.6.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/network_resiliency/version.rb +1 -1
- data/lib/network_resiliency.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cb7405c6ce983981b9eccdc8aa9c2b3b51020fc2ad8f525b5908621a7d5ceec
|
4
|
+
data.tar.gz: 6baa6fa692dc479082ffaa1805c7dd96e2815ae5bec9ccb6453452d8410c1db3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8761514b5a55a983381df650817777c54679e13760c2af4e300b37dedb4ed820aa17b194f85a76b423b0ba0bd0ce645c724e1c10ae45ababaed621403d93ad14
|
7
|
+
data.tar.gz: a76fe8fc08364042547ff7a78ec13c598829e28e3140cfd462836c396419e29265aefa357874004c8627ff8310fadcc8f571dd0b9bb796508697a191353ebf50
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/network_resiliency.rb
CHANGED
@@ -28,6 +28,14 @@ module NetworkResiliency
|
|
28
28
|
yield self if block_given?
|
29
29
|
|
30
30
|
Syncer.start(redis) if redis
|
31
|
+
|
32
|
+
unless @patched
|
33
|
+
# patch everything that's available
|
34
|
+
ADAPTERS.each do |adapter|
|
35
|
+
patch(adapter)
|
36
|
+
rescue LoadError, NotImplementedError
|
37
|
+
end
|
38
|
+
end
|
31
39
|
end
|
32
40
|
|
33
41
|
def patch(*adapters)
|
@@ -45,6 +53,8 @@ module NetworkResiliency
|
|
45
53
|
raise NotImplementedError
|
46
54
|
end
|
47
55
|
end
|
56
|
+
|
57
|
+
@patched = true
|
48
58
|
end
|
49
59
|
|
50
60
|
def enabled?(adapter)
|
@@ -344,6 +354,7 @@ module NetworkResiliency
|
|
344
354
|
@enabled = nil
|
345
355
|
@mode = nil
|
346
356
|
@normalize_request = nil
|
357
|
+
@patched = nil
|
347
358
|
Thread.current["network_resiliency"] = nil
|
348
359
|
StatsEngine.reset
|
349
360
|
Syncer.stop
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: network_resiliency
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Pepper
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|