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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f5942c1ecd3fe9ca40c1f5add1c5c90d7ef79f4
4
- data.tar.gz: fc3d54d89f980967bfce174e5bf82684b7f62fd7
3
+ metadata.gz: 81f719205716c3cd9b75337f03c25837f84151e8
4
+ data.tar.gz: 20c4d9382b4920a6fcc576a113c467eaf89d10cb
5
5
  SHA512:
6
- metadata.gz: 39a7a8e80ba0f3c990a07cbffe80f5b8804deb770384dee39b3d28b3637a798bc3111add4b90c425742d0e2c74fac0b4786fcdfca3773e585d4f534faedf72fe
7
- data.tar.gz: 27c9ded47ee71b42a53b67c60dff4c40256d96fb6923efcd133b09370f43b229f46c05098b664300482a6e2afaf8e7e6dffd9fc869c3ee09d3b386bfad1812ec
6
+ metadata.gz: 00e7de607363ce342eff40592aaa2a71baf959ac73a895cb7344c7105bdc5d9b1acfa999591f53bf0b601308f785d41b6610ee205a8944de029f3dabc03e5242
7
+ data.tar.gz: deca4c5fa76c8ee51dcd490856dd7008ba8ecf57bd53f94ea002665145a5b6d43e28cb066552e171a42450e5df1e4a1459f6f1b7351e0c6b96f289cf97d6cbef
@@ -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
- Style/IndentArray:
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
- Style/EmptyLinesAroundClassBody:
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
- Style/MultilineOperationIndentation:
172
+ Layout/MultilineOperationIndentation:
168
173
  EnforcedStyle: indented
169
174
 
170
- Style/MultilineMethodCallIndentation:
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
- AlignWith: variable
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
@@ -1,4 +1,5 @@
1
1
  # coding: utf-8
2
+
2
3
  lib = File.expand_path('../lib', __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'breakers/version'
@@ -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::Error::TimeoutError => e
75
+ rescue Faraday::TimeoutError, Faraday::ConnectionFailed => e
73
76
  handle_error(
74
77
  service: service,
75
78
  request_env: request_env,
@@ -1,3 +1,3 @@
1
1
  module Breakers
2
- VERSION = '0.2.3'.freeze
2
+ VERSION = '0.2.4'.freeze
3
3
  end
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.3
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: 2016-11-10 00:00:00.000000000 Z
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.5.1
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: