resque_spec 0.17.0 → 0.18.1
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 +5 -5
- data/README.md +6 -18
- data/lib/resque_spec/scheduler.rb +5 -2
- data/lib/resque_spec/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 38399f5b3aacdb7864ae1101449c6503fa67227a032ea86a7e3447410cedbbf5
|
4
|
+
data.tar.gz: 348ebcfe24c589c9c02d956d5f7e4e654384ff7d5f76cd51f4e3c98515863b33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0609f884100cc19e2862500a76cd7794f78ae3ec4e663ae3b0854fec63ee5e369b5571ac273130ece8f2e556df0a831f80bdb5f0517d2b488dd46ad75bc65170'
|
7
|
+
data.tar.gz: 6a204ca5dd6089f424ef34acbd52ac6bf5e80722bcc5d4f88ec85b64c8649f3a4d994dac578cd7779bc1a31df21436890c916e6fa9a4d3de50e7321dc0a3d16f
|
data/README.md
CHANGED
@@ -10,19 +10,6 @@ on
|
|
10
10
|
|
11
11
|
ResqueSpec will also fire Resque hooks if you are using them. See below.
|
12
12
|
|
13
|
-
Version 0.16.0 works with `Resque >~ v1.19` and up and `rspec >= 3.0.0`.
|
14
|
-
Version 0.15.0 works with `Resque >~ v1.19` and up and `rspec >= v2.5.0`
|
15
|
-
|
16
|
-
Resque 2
|
17
|
-
========
|
18
|
-
|
19
|
-
Use the `resque_2` branch via your `Gemfile` to use with v2.0.0.pre.1+ of
|
20
|
-
`resque`.
|
21
|
-
|
22
|
-
```ruby
|
23
|
-
gem 'resque', github: 'leshill/resque_spec', ref: 'resque_2'
|
24
|
-
```
|
25
|
-
|
26
13
|
Install
|
27
14
|
-------
|
28
15
|
|
@@ -202,19 +189,19 @@ describe "#welcome_email" do
|
|
202
189
|
|
203
190
|
subject { described_class }
|
204
191
|
it { should have_queue_size_of(1) }
|
205
|
-
it { should have_queued(:welcome_email, user.id) }
|
192
|
+
it { should have_queued(:welcome_email, [user.id]) }
|
206
193
|
end
|
207
194
|
```
|
208
195
|
|
209
196
|
resque-scheduler with Specs
|
210
197
|
==========================
|
211
198
|
|
212
|
-
|
213
|
-
|
214
|
-
*n.b.* Yes, you also need to require resque-scheduler, this works (check the docs for other ways):
|
199
|
+
Update the Gemfile to enable the `resque-schedular` matchers:
|
215
200
|
|
216
201
|
```ruby
|
217
|
-
|
202
|
+
group :test do
|
203
|
+
gem 'resque_spec', require: 'resque_spec/scheduler'
|
204
|
+
end
|
218
205
|
```
|
219
206
|
|
220
207
|
Given this scenario
|
@@ -476,6 +463,7 @@ Contributors
|
|
476
463
|
* Ilya Katz (@ilyakatz) : Cleanup README.md for RSpec 3
|
477
464
|
* (@addbrick) : Compare times as integers in `have_scheduled` matcher
|
478
465
|
* Serious Haircut (@serioushaircut) : Fix ArgumentListMatcher to make it work with any\_args
|
466
|
+
* Harry Lascelles (@hlascelles) : Fix error when resque-spec is disabled
|
479
467
|
|
480
468
|
Copyright
|
481
469
|
=========
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'resque_spec'
|
2
|
+
require 'resque-scheduler'
|
2
3
|
|
3
4
|
module ResqueSpec
|
4
5
|
module SchedulerExt
|
@@ -7,6 +8,8 @@ module ResqueSpec
|
|
7
8
|
klass.instance_eval do
|
8
9
|
alias :enqueue_at_without_resque_spec :enqueue_at
|
9
10
|
alias :enqueue_in_without_resque_spec :enqueue_in
|
11
|
+
alias :enqueue_at_with_queue_without_resque_spec :enqueue_at_with_queue
|
12
|
+
alias :enqueue_in_with_queue_without_resque_spec :enqueue_in_with_queue
|
10
13
|
alias :remove_delayed_without_resque_spec :remove_delayed
|
11
14
|
end
|
12
15
|
end
|
@@ -22,7 +25,7 @@ module ResqueSpec
|
|
22
25
|
end
|
23
26
|
|
24
27
|
def enqueue_at_with_queue(queue, time, klass, *args)
|
25
|
-
return enqueue_at_with_queue_without_resque_spec(time, klass, *args) if ResqueSpec.disable_ext
|
28
|
+
return enqueue_at_with_queue_without_resque_spec(queue, time, klass, *args) if ResqueSpec.disable_ext
|
26
29
|
|
27
30
|
ResqueSpec.enqueue_at_with_queue(queue, time, klass, *args)
|
28
31
|
end
|
@@ -34,7 +37,7 @@ module ResqueSpec
|
|
34
37
|
end
|
35
38
|
|
36
39
|
def enqueue_in_with_queue(queue, time, klass, *args)
|
37
|
-
return enqueue_in_with_queue_without_resque_spec(time, klass, *args) if ResqueSpec.disable_ext
|
40
|
+
return enqueue_in_with_queue_without_resque_spec(queue, time, klass, *args) if ResqueSpec.disable_ext
|
38
41
|
|
39
42
|
ResqueSpec.enqueue_in_with_queue(queue, time, klass, *args)
|
40
43
|
end
|
data/lib/resque_spec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque_spec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Hill
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: resque
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.26.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.26.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec-core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 4.3.1
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 4.3.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: pry
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
186
|
version: 1.3.6
|
187
187
|
requirements: []
|
188
188
|
rubyforge_project:
|
189
|
-
rubygems_version: 2.
|
189
|
+
rubygems_version: 2.7.6
|
190
190
|
signing_key:
|
191
191
|
specification_version: 4
|
192
192
|
summary: RSpec matchers for Resque
|