chewy_kiqqer 0.1.2 → 0.1.3

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: ab6ba869248f50e0523a5c1f1eb20995d8241215
4
- data.tar.gz: 9362d964aa15b44fd090021343403c9f83567d3d
3
+ metadata.gz: c9bae4da58d909b44300b9d31d016c894aa1d1b2
4
+ data.tar.gz: 418f8fc4223f123d3ade0dfc092bdbfa9c713739
5
5
  SHA512:
6
- metadata.gz: a49b7ba2b973d2bc5c56a65a77881c86aea3c73b7e4373a2846cb56dda439ae88428083f39ed0384aa22ee64067a59bceb2ea79e899a2a919b11c63fb7365702
7
- data.tar.gz: 7bd4a9d417ec5358eb0025ef42aa706b903d64e49c5b4a56f08b1186f1ca5d741ebcaf7e2ffd36ad95b34d4ea5e19065ecc8b3a3a3550fa63393be722b0ec799
6
+ metadata.gz: cfb145ae5e7562e191b1296ea9536ce15b643afb05fe771e52f5cafca062104d0ba68800a9be8afe54a2a6531a8a4332fe0f5a0386adca42ff8ecb7428606fe0
7
+ data.tar.gz: 7501d9ca3a1c8a74ae6d6edf40f504642c6a93b4339aef7f49ad562f04c8e26e4f5733c95c4bf8450c9472e97c4cdf8d7b55821afa3fbea4874474f0a05a7626
@@ -1,3 +1,3 @@
1
1
  module ChewyKiqqer
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -3,5 +3,9 @@ require 'sidekiq'
3
3
  module ChewyKiqqer
4
4
  class Worker
5
5
  include Sidekiq::Worker
6
+
7
+ def perform(index_name, ids)
8
+ Chewy.derive_type(index_name).import ids
9
+ end
6
10
  end
7
11
  end
@@ -1,15 +1,16 @@
1
1
  require 'chewy_kiqqer'
2
+ require 'chewy'
2
3
 
3
- desribe ChewyKiqqer::Worker do
4
+ describe ChewyKiqqer::Worker do
4
5
 
5
6
  let(:worker) { ChewyKiqqer::Worker.new }
6
7
 
7
8
  it 'calls the indexing with chewy' do
8
9
  index = double
9
10
  Chewy.should_receive(:derive_type).with('foo#bar').and_return(index)
10
- index.should_receive(:import).with(17)
11
+ index.should_receive(:import).with([17])
11
12
 
12
- worker.perform('foo#bar', index)
13
+ worker.perform('foo#bar', [17])
13
14
  end
14
15
 
15
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chewy_kiqqer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Hahn
@@ -114,7 +114,7 @@ files:
114
114
  - lib/chewy_kiqqer/worker.rb
115
115
  - spec/index_spec.rb
116
116
  - spec/mixin_spec.rb
117
- - spec/worker.spec.rb
117
+ - spec/worker_spec.rb
118
118
  homepage: ''
119
119
  licenses:
120
120
  - Apache V2
@@ -143,4 +143,4 @@ summary: Small helper gem that allows you to automatically run all chewy index u
143
143
  test_files:
144
144
  - spec/index_spec.rb
145
145
  - spec/mixin_spec.rb
146
- - spec/worker.spec.rb
146
+ - spec/worker_spec.rb