breakers 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/breakers.rb +14 -0
- data/lib/breakers/uptime_middleware.rb +4 -0
- data/lib/breakers/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: 35c7aacf61c91cf32f46b61946acb6f80d0b00fc
|
4
|
+
data.tar.gz: 4d62beb0e55e286b22ae035f2ac3a8f390a271fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cc042397050ea304a6632a7f758e9fe2f3efdabc48843759366f6f953a50762ecd432be06846d211b2e537b7e283730772f021febc866d85447166e32444323
|
7
|
+
data.tar.gz: 9358d0bbf12c1b5b378ecaa2b94584e775887e746958ef0405d176daf5a207ba780a108428ab7f49c6fa92eebe6174e90ad6668004b085de0b473fc4a6f90c77
|
data/lib/breakers.rb
CHANGED
@@ -25,6 +25,20 @@ module Breakers
|
|
25
25
|
@client
|
26
26
|
end
|
27
27
|
|
28
|
+
# Set a flag that can globally disable breakers
|
29
|
+
#
|
30
|
+
# @param value [Boolean] should breakers do its thing globally
|
31
|
+
def self.disabled=(value)
|
32
|
+
@disabled = value
|
33
|
+
end
|
34
|
+
|
35
|
+
# Return the status of global disabling
|
36
|
+
#
|
37
|
+
# @return [Boolean] is breakers disabled globally
|
38
|
+
def self.disabled?
|
39
|
+
defined?(@disabled) && @disabled == true
|
40
|
+
end
|
41
|
+
|
28
42
|
# Breakers uses a number of Redis keys to store its data. You can pass an optional
|
29
43
|
# prefix here to use for the keys so that they will be namespaced properly. Note that
|
30
44
|
# it's also possible to create the Breakers::Client object with a Redis::Namespace
|
data/lib/breakers/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: breakers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aubrey Holland
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|