rspec-sidekiq 4.0.0 → 4.0.2
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/CHANGES.md +9 -0
- data/README.md +1 -5
- data/lib/rspec/sidekiq/matchers/base.rb +11 -12
- data/lib/rspec/sidekiq/matchers/have_enqueued_sidekiq_job.rb +2 -2
- data/lib/rspec/sidekiq/version.rb +1 -1
- data/lib/rspec-sidekiq.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb2a5b25d191b39f3f9a8780b01c04c635e1218b9c0079fdc993d5069a43129b
|
4
|
+
data.tar.gz: a5cd5585a407a4d40f9e31643f5ee5ab14839d80bbdf8cf2bcbb9dd30104bfd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 773e7f3b63d3ad5165ccff805c54040905e42e3769bde2e1605d1e4620024dfcd39b8bd1aac5691b91efd0e70ea38f4f72a7af97ebf75f60930dd5b498c0c7ec
|
7
|
+
data.tar.gz: 75072507499d9c8835c039e5175b6672a2f184f080f260dad3fe02a53d995efa8a16f5ad07252fa97d6a7e0eb6ee86e10fdfca3189bbbd89c638d4327188b9ce
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
4.0.2
|
2
|
+
---
|
3
|
+
* Explicitly require forwardable (#204)
|
4
|
+
|
5
|
+
4.0.1
|
6
|
+
---
|
7
|
+
* Restore the old normalizing expected args behavior with symbols (#205)
|
8
|
+
* fixes an unintentional breaking change in 4.0.0
|
9
|
+
|
1
10
|
4.0.0
|
2
11
|
---
|
3
12
|
* [BREAKING] Dropped support for matching jobs on ActiveJob's private API args, (e.g. `_aj_globalid` and `_aj_ruby2_keywords`). `_aj_globalid` can be replaced with the object itself, e.g. `have_enqueued_sidekiq_job(user)`.
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
**Welcome @wspurgin as new maintainer for `rspec-sidekiq`!**
|
2
2
|
|
3
|
-
[](https://badge.fury.io/rb/rspec-sidekiq)
|
4
4
|
[![Github Actions CI][github_actions_badge]][github_actions]
|
5
5
|
|
6
6
|
Simple testing of Sidekiq jobs via a collection of matchers and helpers.
|
@@ -341,11 +341,7 @@ Please do! If there's a feature missing that you'd love to see then get in on th
|
|
341
341
|
|
342
342
|
Issues/Pull Requests/Comments all welcome...
|
343
343
|
|
344
|
-
[gem_version_badge]: https://badge.fury.io/rb/rspec-sidekiq.svg
|
345
344
|
[github]: http://github.com/wspurgin/rspec-sidekiq
|
346
|
-
[ruby_doc]: http://rubydoc.info/gems/rspec-sidekiq/frames
|
347
|
-
[ruby_gems]: http://rubygems.org/gems/rspec-sidekiq
|
348
|
-
[ruby_toolbox]: http://www.ruby-toolbox.com/projects/rspec-sidekiq
|
349
345
|
[github_actions]: https://github.com/wspurgin/rspec-sidekiq/actions
|
350
346
|
[github_actions_badge]: https://github.com/wspurgin/rspec-sidekiq/actions/workflows/main.yml/badge.svg
|
351
347
|
|
@@ -171,7 +171,7 @@ module RSpec
|
|
171
171
|
end
|
172
172
|
|
173
173
|
def with(*expected_arguments)
|
174
|
-
@expected_arguments = expected_arguments
|
174
|
+
@expected_arguments = normalize_arguments(expected_arguments)
|
175
175
|
self
|
176
176
|
end
|
177
177
|
|
@@ -237,18 +237,17 @@ module RSpec
|
|
237
237
|
RSpec::Support::ObjectFormatter.format(thing)
|
238
238
|
end
|
239
239
|
|
240
|
-
def
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
when Symbol then arg.to_s
|
247
|
-
when Hash then JSON.parse(arg.to_json)
|
248
|
-
else
|
249
|
-
arg
|
250
|
-
end
|
240
|
+
def normalize_arguments(args)
|
241
|
+
if args.is_a?(Array)
|
242
|
+
args.map{ |x| normalize_arguments(x) }
|
243
|
+
elsif args.is_a?(Hash)
|
244
|
+
args.each_with_object({}) do |(key, value), hash|
|
245
|
+
hash[key.to_s] = normalize_arguments(value)
|
251
246
|
end
|
247
|
+
elsif args.is_a?(Symbol)
|
248
|
+
args.to_s
|
249
|
+
else
|
250
|
+
args
|
252
251
|
end
|
253
252
|
end
|
254
253
|
end
|
@@ -9,7 +9,7 @@ module RSpec
|
|
9
9
|
class HaveEnqueuedSidekiqJob < Base
|
10
10
|
def initialize(expected_arguments)
|
11
11
|
super()
|
12
|
-
@expected_arguments = expected_arguments
|
12
|
+
@expected_arguments = normalize_arguments(expected_arguments)
|
13
13
|
end
|
14
14
|
|
15
15
|
def matches?(job_class)
|
@@ -17,7 +17,7 @@ module RSpec
|
|
17
17
|
|
18
18
|
@actual_jobs = EnqueuedJobs.new(klass)
|
19
19
|
|
20
|
-
actual_jobs.includes?(
|
20
|
+
actual_jobs.includes?(expected_arguments, expected_options)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
data/lib/rspec-sidekiq.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-sidekiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aidan Coyle
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-08-
|
13
|
+
date: 2023-08-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec-core
|