sidekiq-amigo 1.6.2 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/amigo/spec_helpers.rb +11 -4
- data/lib/amigo/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cf72dfd7e1bbcc7217536a2344ce5ecdec41c0ae8769b44ec91b210b9a41d0b
|
4
|
+
data.tar.gz: 19f5fd437e47f5f2dc706877289f05fd7ee0d50426d4de42ac2bbdc304f9d882
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 970fa43283e3361af6b7caa12241ad1848426af476d0023a38148d435dbb07b7eabe31a79c2e0c23bce380097e1c5f9282eb16ef16a6e6372e6185fa1243744b
|
7
|
+
data.tar.gz: 7e421c9750235136306e8ae9010101d2611c4e8cf54a0cf8192407adba26e160ec17247db045d1e6c9c85c89cc67a383379bc625f01c88f81da683ca338ce860
|
data/lib/amigo/spec_helpers.rb
CHANGED
@@ -101,7 +101,8 @@ module Amigo
|
|
101
101
|
def match_expected_events
|
102
102
|
@expected_events.each do |expected_event, expected_payload|
|
103
103
|
match = @recorded_events.find do |recorded|
|
104
|
-
|
104
|
+
self.event_names_match?(expected_event, recorded.name) &&
|
105
|
+
self.payloads_match?(expected_payload, recorded.payload)
|
105
106
|
end
|
106
107
|
|
107
108
|
if match
|
@@ -112,9 +113,15 @@ module Amigo
|
|
112
113
|
end
|
113
114
|
end
|
114
115
|
|
115
|
-
def
|
116
|
-
return expected.matches?(
|
117
|
-
return expected.
|
116
|
+
def event_names_match?(expected, actual)
|
117
|
+
return expected.matches?(actual) if expected.respond_to?(:matches?)
|
118
|
+
return expected.match?(actual) if expected.respond_to?(:match?)
|
119
|
+
return expected == actual
|
120
|
+
end
|
121
|
+
|
122
|
+
def payloads_match?(expected, actual)
|
123
|
+
return expected.matches?(actual) if expected.respond_to?(:matches?)
|
124
|
+
return expected.nil? || expected.empty? || expected == actual
|
118
125
|
end
|
119
126
|
|
120
127
|
def add_matched(event, payload)
|
data/lib/amigo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-amigo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lithic Technology
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|
@@ -200,7 +200,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
200
200
|
requirements:
|
201
201
|
- - ">="
|
202
202
|
- !ruby/object:Gem::Version
|
203
|
-
version:
|
203
|
+
version: 3.0.0
|
204
204
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - ">="
|