stoplight 2.1.2 → 2.1.3
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e73b740e1d020caa3c2231d358358f7f1405d339
|
4
|
+
data.tar.gz: f228a34259327f769ee5a43630815ee31ec754ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef7a7ec7291ffc27d4b12c2900e52927abe9b9faf93e26f5086959742e57c69c4b8d05a880e66eba7439193686983bd516f429d1c4e6eb61067b86d5870c9f9d
|
7
|
+
data.tar.gz: 68ef1c8e9583434ae5da043aa0c7ef3f5e0a23a9b9bef40ac58bdffac57fa83de4d9d148e3bfbf68bda3caaf8f831cd10a5d28882952a533655a47fb3b7f21f2
|
@@ -16,8 +16,9 @@ module Stoplight
|
|
16
16
|
state_names = @redis.hkeys(states_key)
|
17
17
|
|
18
18
|
pattern = key('failures', '*')
|
19
|
+
prefix_regex = /^#{key('failures', '')}/
|
19
20
|
failure_names = @redis.scan_each(match: pattern).to_a.map do |key|
|
20
|
-
key.
|
21
|
+
key.sub(prefix_regex, '')
|
21
22
|
end
|
22
23
|
|
23
24
|
(state_names + failure_names).uniq
|
data/lib/stoplight/version.rb
CHANGED
@@ -36,6 +36,12 @@ RSpec.describe Stoplight::DataStore::Memory do
|
|
36
36
|
data_store.set_state(light, Stoplight::State::UNLOCKED)
|
37
37
|
expect(data_store.names).to eql([light.name])
|
38
38
|
end
|
39
|
+
|
40
|
+
it 'supports names containing colons' do
|
41
|
+
light = Stoplight::Light.new('http://api.example.com/some/action')
|
42
|
+
data_store.record_failure(light, failure)
|
43
|
+
expect(data_store.names).to eql([light.name])
|
44
|
+
end
|
39
45
|
end
|
40
46
|
|
41
47
|
describe '#get_all' do
|
@@ -40,6 +40,12 @@ RSpec.describe Stoplight::DataStore::Redis do
|
|
40
40
|
data_store.set_state(light, Stoplight::State::UNLOCKED)
|
41
41
|
expect(data_store.names).to eql([light.name])
|
42
42
|
end
|
43
|
+
|
44
|
+
it 'supports names containing colons' do
|
45
|
+
light = Stoplight::Light.new('http://api.example.com/some/action')
|
46
|
+
data_store.record_failure(light, failure)
|
47
|
+
expect(data_store.names).to eql([light.name])
|
48
|
+
end
|
43
49
|
end
|
44
50
|
|
45
51
|
describe '#get_all' do
|