stoplight 4.1.0 → 4.1.1

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
  SHA256:
3
- metadata.gz: 26a32d4e3aa3c515fb23a75f3055d250eaf10431eeae1316086bfe69ca569277
4
- data.tar.gz: 9cfadd0dc4bbc99687aeffc847ae68b9926b29383530a2d55ae79ac2b22039b6
3
+ metadata.gz: dec6c43881dfde16456ffa319f2f543f2c507dbdd760c5adf7ddb155dfa9292b
4
+ data.tar.gz: b3609d6233f73d9a2c4a5474ef291d76fe9ccd906267cf9d831b22a040c67d1f
5
5
  SHA512:
6
- metadata.gz: 5ee973ed322845425185904de1d681064794d3a39e7d303c36b172b377d080541867e81df5cfc2a1a75da07b1088dcf15de61c807d446ca3d60582c1d645d07f
7
- data.tar.gz: 16420c055193f5c9364d517ecea8d4ffb1ad9fbd184a77f792d1b693ab13b5d9040f56b53027c1cfcc53b971590cb7c4ffb215c2cf3692e6c978bb8f51d592b3
6
+ metadata.gz: 536ab89edb5ce429274c1f54f6718ac1a82968bb10a75a5c8d44b4dfacaf5a1a37a6f9aaac2c2c91f0b0849e149df6696e1d29373f40280ab860c3ada08e357f
7
+ data.tar.gz: b59267822e4ead10f8675e08c6fa16bf76c4b430a0c3c0fa9d69eb42a4df8387e22a36135b6c5d76a5f76b4e002db052937af311ee160b919a0c85a027341564
data/README.md CHANGED
@@ -9,6 +9,10 @@ Stoplight is traffic control for code. It's an implementation of the circuit
9
9
  breaker pattern in Ruby.
10
10
 
11
11
  ---
12
+
13
+ :warning:️ You're currently browsing the documentation for Stoplight 4.x. If you're looking for
14
+ the documentation of the previous version 3.x, you can find it [here](https://github.com/bolshakov/stoplight/tree/release/v3.x).
15
+
12
16
  Does your code use unreliable systems, like a flaky database or a spotty web
13
17
  service? Wrap calls to those up in stoplights to prevent them from affecting
14
18
  the rest of your application.
@@ -357,6 +361,7 @@ Stoplight.default_notifiers += [notifier]
357
361
  #### Community-supported Notifiers
358
362
 
359
363
  * [stoplight-sentry]
364
+ * [stoplight-honeybadger](https://github.com/qoqa/stoplight-honeybadger)
360
365
 
361
366
  You you want to implement your own notifier, the following section contains all the required information.
362
367
 
@@ -42,7 +42,7 @@ module Stoplight
42
42
  end
43
43
 
44
44
  def clear_failures(light)
45
- synchronize { @failures.delete(light.name) }
45
+ synchronize { @failures.delete(light.name) || [] }
46
46
  end
47
47
 
48
48
  def get_state(light)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stoplight
4
- VERSION = Gem::Version.new('4.1.0')
4
+ VERSION = Gem::Version.new('4.1.1')
5
5
  end
@@ -9,6 +9,12 @@ RSpec.shared_examples 'Stoplight::DataStore::Base#clear_failures' do
9
9
  expect(data_store.clear_failures(light)).to contain_exactly(failure)
10
10
  end
11
11
 
12
+ it 'returns an empty array when there are no failures' do
13
+ data_store.clear_failures(light)
14
+
15
+ expect(data_store.clear_failures(light)).to be_empty
16
+ end
17
+
12
18
  it 'clears the failures' do
13
19
  expect do
14
20
  data_store.clear_failures(light)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stoplight
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Desautels
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-08-20 00:00:00.000000000 Z
13
+ date: 2025-02-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: redlock
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  requirements: []
126
- rubygems_version: 3.3.7
126
+ rubygems_version: 3.5.18
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: Traffic control for code.