resque-approve 0.0.5 → 0.0.6

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: 28e9f67dae51237cce2245ee2c7343836ed0c6af
4
- data.tar.gz: 69de06a449ab4e709f56131005a57d304c2e59f2
3
+ metadata.gz: ee5e9584baffb7e24c9750f12f3768248f4e9d6a
4
+ data.tar.gz: c14f3fb0f73deda9988b021f1e4dc0a905be9994
5
5
  SHA512:
6
- metadata.gz: 391a1cd9fab421d38cfe389721ac71cd81d3bc5fc90d4d81e0ce78716481d4543b21e92d33e15b58d2d1f74cfcf50a8ca6de26e2228102bc7d0132da5ec28529
7
- data.tar.gz: 10d233c67b06d08732531efe6f429e027b2b6ea9d9286cea0cdf3bfd7622fc13f1aae6c4a4c375ad7bb143e1d3b3252f3d1b56ecaa3bf25003bee00dae714e76
6
+ metadata.gz: 5161a81c04021dcd41df1dd9a47429365879a863784727be18dd39d8d02b335e2441b7f66beb35cd04b29906c8723998687f334ba1b048d900a18e57aa979677
7
+ data.tar.gz: 3fc6b0a22310d11b56893cfe9ad08cd692a6b53d0c512b45eb4fc7ebf53c6cc2ce84db2817dcdac3bd04726abc2e204162ffb13d051473308fe356abef007931
@@ -166,7 +166,7 @@ module Resque
166
166
  end
167
167
 
168
168
  def paused_count_key
169
- @pause_key ||= "approve.job_queue.#{approval_key}.paused.count"
169
+ @paused_count_key ||= "approve.job_queue.#{approval_key}.paused.count"
170
170
  end
171
171
  end
172
172
  end
@@ -3,7 +3,7 @@
3
3
  module Resque
4
4
  module Plugins
5
5
  module Approve
6
- VERSION = "0.0.5"
6
+ VERSION = "0.0.6"
7
7
  end
8
8
  end
9
9
  end
@@ -377,14 +377,34 @@ RSpec.describe Resque::Plugins::Approve::PendingJobQueue do
377
377
  expect(job_queue).to be_paused
378
378
  end
379
379
 
380
+ it "counts approvals while paused" do
381
+ expect(job_queue).not_to be_paused
382
+ job_queue.pause
383
+ expect(job_queue).to be_paused
384
+ job_queue.pause
385
+ expect(job_queue).to be_paused
386
+
387
+ job_queue.approve_num 8
388
+ job_queue.approve_one
389
+ expect(job_queue).to be_paused
390
+ expect(job_queue.num_ignored).to eq 9
391
+ end
392
+
380
393
  it "can be resumed" do
381
394
  expect(job_queue).not_to be_paused
382
395
  job_queue.resume
383
396
  expect(job_queue).not_to be_paused
384
397
  job_queue.pause
385
398
  expect(job_queue).to be_paused
399
+
400
+ job_queue.approve_num 8
401
+ job_queue.approve_one
402
+ expect(job_queue).to be_paused
403
+ expect(job_queue.num_ignored).to eq 9
404
+
386
405
  job_queue.resume
387
406
  expect(job_queue).not_to be_paused
407
+ expect(job_queue.num_ignored).to be_zero
388
408
  end
389
409
  end
390
410
  end
data/spec/examples.txt CHANGED
@@ -77,7 +77,8 @@ example_id | status | run_time
77
77
  ./spec/approve/pending_job_queue_spec.rb[1:13:1] | passed | 0.01936 seconds |
78
78
  ./spec/approve/pending_job_queue_spec.rb[1:14:1] | passed | 0.00438 seconds |
79
79
  ./spec/approve/pending_job_queue_spec.rb[1:14:2] | passed | 0.01135 seconds |
80
- ./spec/approve/pending_job_queue_spec.rb[1:14:3] | passed | 0.01363 seconds |
80
+ ./spec/approve/pending_job_queue_spec.rb[1:14:3] | passed | 1.29 seconds |
81
+ ./spec/approve/pending_job_queue_spec.rb[1:14:4] | passed | 0.91509 seconds |
81
82
  ./spec/approve/pending_job_spec.rb[1:1:1] | passed | 0.00512 seconds |
82
83
  ./spec/approve/pending_job_spec.rb[1:1:2] | passed | 0.00385 seconds |
83
84
  ./spec/approve/pending_job_spec.rb[1:1:3] | passed | 0.00416 seconds |
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-approve
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - RealNobody
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-05 00:00:00.000000000 Z
11
+ date: 2019-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis