resque-stages 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/resque/plugins/stages.rb +2 -0
- data/lib/resque/plugins/stages/staged_job.rb +4 -0
- data/lib/resque/plugins/stages/version.rb +1 -1
- data/spec/resque/plugins/stages_spec.rb +8 -12
- 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: 5cd7806755d4dd68b345e13f058f6018df4a2501262f7408b5ff0ef51b0c4c07
|
4
|
+
data.tar.gz: 8f43021dba1e51d28877358cc68f470a5895da667bf7aebd5e1291bfa605c023
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b1a4db410a255e0fc5a52fa1e9b96fe5efd9368140c769ff6b5261954ecd87e516b224d895787fba2d68c29b06e6463ec2955c0fe1fce2bac74af1686c1dbe3
|
7
|
+
data.tar.gz: 0fa5cb6e4eb3820a67ca303afcc9f536c84eaa86f7a80c5860321ebd3ce4a492c8e23e04334b1c0f6cfa720a02346f433699762179ca4ad7c566832961d51220
|
data/Gemfile.lock
CHANGED
@@ -324,7 +324,11 @@ RSpec.describe Resque::Plugins::Stages do
|
|
324
324
|
perform_args[0].delete :staged_job_id
|
325
325
|
perform_args[0]["this_is"] = "silly"
|
326
326
|
|
327
|
-
|
327
|
+
if perform_args.length > 1
|
328
|
+
expect(perform_job.args).to eq perform_args
|
329
|
+
else
|
330
|
+
expect(perform_job.args).to eq match_args
|
331
|
+
end
|
328
332
|
end
|
329
333
|
|
330
334
|
it "creates a new job if there is no id" do
|
@@ -334,7 +338,7 @@ RSpec.describe Resque::Plugins::Stages do
|
|
334
338
|
perform_args[0].delete :staged_job_id
|
335
339
|
end
|
336
340
|
|
337
|
-
expect(perform_job.args).to eq
|
341
|
+
expect(perform_job.args).to eq match_args
|
338
342
|
end
|
339
343
|
end
|
340
344
|
|
@@ -351,16 +355,8 @@ RSpec.describe Resque::Plugins::Stages do
|
|
351
355
|
context "CompressedJob" do
|
352
356
|
let(:job) { Resque::Plugins::Stages::StagedJob.create_job(stage, CompressedJob, "This", 1, :is, an: "arglist") }
|
353
357
|
let(:load_job) { Resque::Plugins::Stages::StagedJob.new(job.job_id) }
|
354
|
-
let(:perform_args)
|
355
|
-
|
356
|
-
"payload" => CompressedJob.compressed_args([{ "staged_job_id" => job.job_id }, "This", 1, :is, an: "arglist"]),
|
357
|
-
staged_job_id: job.job_id }]
|
358
|
-
end
|
359
|
-
let(:match_args) do
|
360
|
-
[{ "resque_compressed" => true,
|
361
|
-
"payload" => CompressedJob.compressed_args([{ "staged_job_id" => job.job_id }, "This", 1, :is, an: "arglist"]),
|
362
|
-
staged_job_id: job.job_id }]
|
363
|
-
end
|
358
|
+
let(:perform_args) { job.enqueue_compressed_args }
|
359
|
+
let(:match_args) { ["This", 1, "is", "an" => "arglist"] }
|
364
360
|
let(:perform_job) { CompressedJob.perform_job(*perform_args) }
|
365
361
|
|
366
362
|
it_behaves_like "it loads from args"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque-stages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RealNobody
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|