breakers 0.2.3 → 0.2.4
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/.rubocop.yml +10 -5
- data/breakers.gemspec +1 -0
- data/lib/breakers/uptime_middleware.rb +4 -1
- data/lib/breakers/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81f719205716c3cd9b75337f03c25837f84151e8
|
4
|
+
data.tar.gz: 20c4d9382b4920a6fcc576a113c467eaf89d10cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00e7de607363ce342eff40592aaa2a71baf959ac73a895cb7344c7105bdc5d9b1acfa999591f53bf0b601308f785d41b6610ee205a8944de029f3dabc03e5242
|
7
|
+
data.tar.gz: deca4c5fa76c8ee51dcd490856dd7008ba8ecf57bd53f94ea002665145a5b6d43e28cb066552e171a42450e5df1e4a1459f6f1b7351e0c6b96f289cf97d6cbef
|
data/.rubocop.yml
CHANGED
@@ -2,6 +2,8 @@ AllCops:
|
|
2
2
|
TargetRubyVersion: 2.3
|
3
3
|
Include:
|
4
4
|
- 'Rakefile'
|
5
|
+
Exclude:
|
6
|
+
- Gemfile
|
5
7
|
|
6
8
|
Metrics/LineLength:
|
7
9
|
Max: 140
|
@@ -22,6 +24,9 @@ Metrics/ClassLength:
|
|
22
24
|
Metrics/MethodLength:
|
23
25
|
Max: 50
|
24
26
|
|
27
|
+
Metrics/BlockLength:
|
28
|
+
Max: 500
|
29
|
+
|
25
30
|
Metrics/AbcSize:
|
26
31
|
Max: 75
|
27
32
|
|
@@ -98,7 +103,7 @@ Style/GuardClause:
|
|
98
103
|
Style/Next:
|
99
104
|
Enabled: false
|
100
105
|
|
101
|
-
|
106
|
+
Layout/IndentArray:
|
102
107
|
EnforcedStyle: consistent
|
103
108
|
|
104
109
|
# This forces you to change simple if/unless blocks to the conditional form like: `return 2 if badness`.
|
@@ -149,7 +154,7 @@ Style/WordArray:
|
|
149
154
|
|
150
155
|
# Some people really like to put lines at the beginning and end of class bodies, while other people
|
151
156
|
# really don't. It doesn't really seem to matter.
|
152
|
-
|
157
|
+
Layout/EmptyLinesAroundClassBody:
|
153
158
|
Enabled: false
|
154
159
|
|
155
160
|
# This forces you to put a comment like this at the top of every single file:
|
@@ -164,10 +169,10 @@ Style/Lambda:
|
|
164
169
|
Enabled: false
|
165
170
|
|
166
171
|
# Force indentation for milti-line expressions and method calls
|
167
|
-
|
172
|
+
Layout/MultilineOperationIndentation:
|
168
173
|
EnforcedStyle: indented
|
169
174
|
|
170
|
-
|
175
|
+
Layout/MultilineMethodCallIndentation:
|
171
176
|
EnforcedStyle: indented
|
172
177
|
|
173
178
|
# This disallows the use of $1, $2 from regular expressions, which seems to make no sense whatsoever
|
@@ -198,7 +203,7 @@ Style/ZeroLengthPredicate:
|
|
198
203
|
# ...
|
199
204
|
# end
|
200
205
|
Lint/EndAlignment:
|
201
|
-
|
206
|
+
EnforcedStyleAlignWith: variable
|
202
207
|
|
203
208
|
# This cop will require you to replace or prefix method arguments that go unused with underscores. The problem
|
204
209
|
# is that while seeming to solve no problem this could easily cause issues where someone editing the code to
|
data/breakers.gemspec
CHANGED
@@ -35,6 +35,9 @@ module Breakers
|
|
35
35
|
protected
|
36
36
|
|
37
37
|
def outage_response(outage:, service:)
|
38
|
+
Breakers.client.plugins.each do |plugin|
|
39
|
+
plugin.on_skipped_request(service) if plugin.respond_to?(:on_skipped_request)
|
40
|
+
end
|
38
41
|
if Breakers.outage_response[:type] == :status_code
|
39
42
|
Faraday::Response.new.tap do |response|
|
40
43
|
response.finish(
|
@@ -69,7 +72,7 @@ module Breakers
|
|
69
72
|
end
|
70
73
|
end
|
71
74
|
end
|
72
|
-
rescue Faraday::
|
75
|
+
rescue Faraday::TimeoutError, Faraday::ConnectionFailed => e
|
73
76
|
handle_error(
|
74
77
|
service: service,
|
75
78
|
request_env: request_env,
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aubrey Holland
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -216,9 +216,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
216
|
version: '0'
|
217
217
|
requirements: []
|
218
218
|
rubyforge_project:
|
219
|
-
rubygems_version: 2.
|
219
|
+
rubygems_version: 2.6.13
|
220
220
|
signing_key:
|
221
221
|
specification_version: 4
|
222
222
|
summary: Handle outages to backend systems with a Faraday middleware
|
223
223
|
test_files: []
|
224
|
-
has_rdoc:
|