chewy_kiqqer 0.1.1 → 0.1.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/lib/chewy_kiqqer/index.rb +1 -1
- data/lib/chewy_kiqqer/version.rb +1 -1
- data/spec/index_spec.rb +6 -6
- data/spec/mixin_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab6ba869248f50e0523a5c1f1eb20995d8241215
|
4
|
+
data.tar.gz: 9362d964aa15b44fd090021343403c9f83567d3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a49b7ba2b973d2bc5c56a65a77881c86aea3c73b7e4373a2846cb56dda439ae88428083f39ed0384aa22ee64067a59bceb2ea79e899a2a919b11c63fb7365702
|
7
|
+
data.tar.gz: 7bd4a9d417ec5358eb0025ef42aa706b903d64e49c5b4a56f08b1186f1ca5d741ebcaf7e2ffd36ad95b34d4ea5e19065ecc8b3a3a3550fa63393be722b0ec799
|
data/lib/chewy_kiqqer/index.rb
CHANGED
@@ -9,7 +9,7 @@ module ChewyKiqqer
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def enqueue(object)
|
12
|
-
Sidekiq::Client.push(queue
|
12
|
+
Sidekiq::Client.push('queue' => @queue, 'class' => ChewyKiqqer::Worker, 'args' => [@index_name, backref_ids(object)])
|
13
13
|
end
|
14
14
|
|
15
15
|
def backref(object)
|
data/lib/chewy_kiqqer/version.rb
CHANGED
data/spec/index_spec.rb
CHANGED
@@ -42,9 +42,9 @@ describe ChewyKiqqer::Index do
|
|
42
42
|
queue: 'hello'
|
43
43
|
|
44
44
|
Sidekiq::Client.should_receive(:push)
|
45
|
-
.with(queue
|
46
|
-
class
|
47
|
-
args
|
45
|
+
.with('queue' => 'hello',
|
46
|
+
'class' => ChewyKiqqer::Worker,
|
47
|
+
'args' => ['foo#bar', [24]])
|
48
48
|
idx.enqueue object
|
49
49
|
end
|
50
50
|
|
@@ -54,9 +54,9 @@ describe ChewyKiqqer::Index do
|
|
54
54
|
idx = ChewyKiqqer::Index.new index: 'foo#bar'
|
55
55
|
|
56
56
|
Sidekiq::Client.should_receive(:push)
|
57
|
-
.with(queue
|
58
|
-
class
|
59
|
-
args
|
57
|
+
.with('queue' => :my_default,
|
58
|
+
'class' => ChewyKiqqer::Worker,
|
59
|
+
'args' => ['foo#bar', [24]])
|
60
60
|
idx.enqueue object
|
61
61
|
end
|
62
62
|
end
|
data/spec/mixin_spec.rb
CHANGED
@@ -38,8 +38,8 @@ describe ChewyKiqqer::Mixin do
|
|
38
38
|
context '#install hooks' do
|
39
39
|
|
40
40
|
it 'installs the hooks' do
|
41
|
-
Gummi.should_receive(:after_save).with(:
|
42
|
-
Gummi.should_receive(:after_destroy).with(:
|
41
|
+
Gummi.should_receive(:after_save).with(:queue_chewy_jobs)
|
42
|
+
Gummi.should_receive(:after_destroy).with(:queue_chewy_jobs)
|
43
43
|
Gummi.install_chewy_hooks
|
44
44
|
end
|
45
45
|
|