faulty 0.8.5 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54ef7d6bc1b23815e02563c80e4c17fef2735812a8c424882e8283996506edcc
4
- data.tar.gz: c4c2d074b118f3077a3cddb862fddc5c3ace18c62a206e4523cfb830b7b6e35b
3
+ metadata.gz: ae75506209beb5e9490a5f2a939519060340e22022c0f0d0be07bbd8c32bd34a
4
+ data.tar.gz: d08fbe083462251ac184ed0578dda3dcfdab624e48cef270662ed04bab0b337b
5
5
  SHA512:
6
- metadata.gz: 75fa840ff865e39e381894bdce59ab13f67ac001cbae57696360692c495b8d0ca2f643261a7a4ea083fdb1964d8e14ad0237815f90e9b436d17eff04a0abe0f5
7
- data.tar.gz: dfcaede2d29e34bd466a21ad5037ddaeebfaa947bb44f09ef9c64b34ac0f207dd2a8e4d038067b47ce3ac76ccbba744721dc1fb4337854e7e9af0df739798169
6
+ metadata.gz: 182af6be2df0089e41be78ceed0d3b866f9b6db43f2423fe1c4bd788b196c76fa206055f9ca07b558676afad7a3544c39c0215990a43fe2b8bdec593ea259d95
7
+ data.tar.gz: cf3726daff78ed12b39313aab5188c53a804ac68e9e0810faf1abf4e5d11e96c85168b46b4b814334bad5d922e6188c8a9b6ed5f0b499961c3e33fde434bb5c0
@@ -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
@@ -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
@@ -3,6 +3,6 @@
3
3
  class Faulty
4
4
  # The current Faulty version
5
5
  def self.version
6
- Gem::Version.new('0.8.5')
6
+ Gem::Version.new('0.8.6')
7
7
  end
8
8
  end
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.5
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-17 00:00:00.000000000 Z
11
+ date: 2022-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby