faulty 0.8.5 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +3 -0
- data/CHANGELOG.md +14 -0
- data/lib/faulty/circuit.rb +15 -0
- data/lib/faulty/version.rb +1 -1
- 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: ae75506209beb5e9490a5f2a939519060340e22022c0f0d0be07bbd8c32bd34a
|
4
|
+
data.tar.gz: d08fbe083462251ac184ed0578dda3dcfdab624e48cef270662ed04bab0b337b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 182af6be2df0089e41be78ceed0d3b866f9b6db43f2423fe1c4bd788b196c76fa206055f9ca07b558676afad7a3544c39c0215990a43fe2b8bdec593ea259d95
|
7
|
+
data.tar.gz: cf3726daff78ed12b39313aab5188c53a804ac68e9e0810faf1abf4e5d11e96c85168b46b4b814334bad5d922e6188c8a9b6ed5f0b499961c3e33fde434bb5c0
|
data/.github/workflows/ci.yml
CHANGED
@@ -47,6 +47,9 @@ jobs:
|
|
47
47
|
MYSQL_USER: root
|
48
48
|
MYSQL_PASSWORD: root
|
49
49
|
- name: Run codacy-coverage-reporter
|
50
|
+
env:
|
51
|
+
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
52
|
+
if: matrix.ruby == '2.7' && env.CODACY_PROJECT_TOKEN
|
50
53
|
uses: codacy/codacy-coverage-reporter-action@master
|
51
54
|
with:
|
52
55
|
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## Release v0.8.6
|
2
|
+
|
3
|
+
* Define an inspect method that represent circuit #50 JuanitoFatas
|
4
|
+
|
1
5
|
## Release v0.8.5
|
2
6
|
|
3
7
|
* Fix yard warnings #49 justinhoward
|
@@ -5,6 +9,16 @@
|
|
5
9
|
* Add granular errors for Elasticsearch patch #48 justinhoward
|
6
10
|
* Return status conditionally for Storage::Interface#entry #45 justinhoward
|
7
11
|
|
12
|
+
### Deprecations
|
13
|
+
|
14
|
+
* Storage::Interface#entry should now accept an additional parameter
|
15
|
+
`status`. If given, the method must return the updated status,
|
16
|
+
otherwise if status is `nil` #entry may return nil. Previously #entry
|
17
|
+
always returned a history array.
|
18
|
+
* The error_module option is deprecated. Patches should use the error_mapper
|
19
|
+
option instead. The option will be removed in 0.9
|
20
|
+
|
21
|
+
|
8
22
|
## Release v0.8.4
|
9
23
|
|
10
24
|
* Add Elasticsearch client patch #44 justinhoward
|
data/lib/faulty/circuit.rb
CHANGED
@@ -172,6 +172,21 @@ class Faulty
|
|
172
172
|
end
|
173
173
|
end
|
174
174
|
|
175
|
+
# @return [String] Text representation of the circuit
|
176
|
+
def inspect
|
177
|
+
interested_opts = %i[
|
178
|
+
cache_expires_in
|
179
|
+
cache_refreshes_after
|
180
|
+
cache_refresh_jitter
|
181
|
+
cool_down evaluation_window
|
182
|
+
rate_threshold
|
183
|
+
sample_threshold
|
184
|
+
errors exclude
|
185
|
+
]
|
186
|
+
options_text = options.each_pair.map { |k, v| "#{k}: #{v}" if interested_opts.include?(k) }.compact.join(', ')
|
187
|
+
%(#<#{self.class.name} name: #{name}, state: #{status.state}, options: { #{options_text} }>)
|
188
|
+
end
|
189
|
+
|
175
190
|
# @param name [String] The name of the circuit
|
176
191
|
# @param options [Hash] Attributes for {Options}
|
177
192
|
# @yield [Options] For setting options in a block
|
data/lib/faulty/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faulty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Howard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|