protoboard 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +1 -1
- data/lib/protoboard/circuit.rb +3 -5
- data/lib/protoboard/circuit_breaker.rb +1 -1
- data/lib/protoboard/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7b58fd301d115cd79ec04b7fbe18c92587f5e466
|
4
|
+
data.tar.gz: 02ccf30262a80feec46ac7c75abbb6319ee02ddc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c21ea2710b568144b18195e24cd5717fb504f062538805ccd631c932d7fad7496efd654f4baf66de467da06cc7df03321b35d257129742f2fc9a39aa13a8b6c
|
7
|
+
data.tar.gz: 48379e44a5cdddf4abe1419b4a48bf53a46a63acb7eccd5c90c657f0aebfdc8e059847d93ee884b18a746e9dfe1ed1bf264eda27549d5c78c270a61f4702fe9a
|
data/Gemfile.lock
CHANGED
data/lib/protoboard/circuit.rb
CHANGED
@@ -5,16 +5,14 @@ module Protoboard
|
|
5
5
|
# This class represents a circuit.
|
6
6
|
class Circuit
|
7
7
|
attr_reader :name, :service,
|
8
|
-
:method_name, :
|
9
|
-
:
|
10
|
-
:
|
11
|
-
:fallback
|
8
|
+
:method_name, :open_after,
|
9
|
+
:cool_off_after, :on_before,
|
10
|
+
:on_after, :fallback
|
12
11
|
|
13
12
|
def initialize(**options)
|
14
13
|
@name = options.fetch(:name)
|
15
14
|
@service = options.fetch(:service)
|
16
15
|
@method_name = options.fetch(:method_name)
|
17
|
-
@timeout = options.fetch(:timeout)
|
18
16
|
@open_after = options.fetch(:open_after)
|
19
17
|
@cool_off_after = options.fetch(:cool_off_after)
|
20
18
|
@fallback = options[:fallback]
|
@@ -10,7 +10,7 @@ module Protoboard
|
|
10
10
|
#
|
11
11
|
# ==== Attributes
|
12
12
|
#
|
13
|
-
# * +circuit_methods+ - An array of symbols representing the names of the methods to be on a circuit
|
13
|
+
# * +circuit_methods+ - An array of symbols representing the names of the methods to be on a circuit
|
14
14
|
# or a hash containing a key with a symbol representing the name of the method and the value as the name of the circuit.
|
15
15
|
# * +on_before+ - An array of callable objects with code to be executed before each circuit runs
|
16
16
|
# * +on_after+ - An array of callable objects with code to be executed after each circuit runs
|
data/lib/protoboard/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protoboard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Atkinson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-06-
|
12
|
+
date: 2018-06-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dry-configurable
|
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
163
|
version: '0'
|
164
164
|
requirements: []
|
165
165
|
rubyforge_project:
|
166
|
-
rubygems_version: 2.
|
166
|
+
rubygems_version: 2.6.8
|
167
167
|
signing_key:
|
168
168
|
specification_version: 4
|
169
169
|
summary: Protoboard abstracts the way you use Circuit Breaker allowing you to easily
|