tire_async_index 0.0.2 → 0.0.3
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/.travis.yml +10 -0
- data/README.md +3 -1
- data/lib/tire_async_index.rb +8 -3
- data/lib/tire_async_index/version.rb +1 -1
- data/lib/tire_async_index/workers/resque_update_index_job.rb +3 -1
- data/lib/tire_async_index/workers/sidekiq_update_index_worker.rb +1 -1
- data/spec/tire_async_index_spec.rb +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4081d651b185b14d81c3b64215259f417f389ff
|
4
|
+
data.tar.gz: 68903a28cc33e94f6c4295efeaa9e014cc4582e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35ffbb447e495545dce03f6208df65a6419c7008ea2253df63aaaabce852fa9896b2362317b86c492fba44b000cf71c56785e585c3af23c6045f5996ef6bc406
|
7
|
+
data.tar.gz: d1ad3588b6584adbd491c5a5f254a55aa7bc94910c55bd40e3afba0ebec7f3ff9c6c8ff2b72e59b2796e59dfb3b440c04d27edcfe01d707c2024f9112e25f42e
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -4,8 +4,10 @@ It's extension for [Tire](https://github.com/karmi/tire/) (client for the Elasti
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
Add this line to your application's Gemfile:
|
7
|
+
Add this line to your application's Gemfile after `tire` and `sidekiq` or `resque` gems:
|
8
8
|
|
9
|
+
gem 'tire'
|
10
|
+
gem 'sidekiq' #'resque'
|
9
11
|
gem 'tire_async_index'
|
10
12
|
|
11
13
|
And then execute:
|
data/lib/tire_async_index.rb
CHANGED
@@ -9,19 +9,24 @@ module TireAsyncIndex
|
|
9
9
|
def configure
|
10
10
|
self.configuration ||= Configuration.new
|
11
11
|
yield(configuration)
|
12
|
+
reconfig_workers
|
12
13
|
end
|
13
14
|
|
14
|
-
def
|
15
|
+
def queue
|
15
16
|
self.configuration.queue
|
16
17
|
end
|
17
18
|
|
18
19
|
def engine
|
19
20
|
self.configuration.engine
|
20
21
|
end
|
21
|
-
end
|
22
22
|
|
23
|
-
|
23
|
+
def reconfig_workers
|
24
|
+
SidekiqUpdateIndexWorker.sidekiq_options_hash["queue"] = TireAsyncIndex.queue if defined?(Sidekiq)
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
24
28
|
|
25
29
|
require 'tire_async_index/workers/sidekiq_update_index_worker' if defined?(Sidekiq)
|
26
30
|
require 'tire_async_index/workers/resque_update_index_job' if defined?(Resque)
|
27
31
|
require 'tire/model/async_callbacks'
|
32
|
+
TireAsyncIndex.configure {}
|
@@ -11,7 +11,7 @@ end
|
|
11
11
|
describe TireAsyncIndex do
|
12
12
|
context "configurable" do
|
13
13
|
it "valid default config settings" do
|
14
|
-
TireAsyncIndex.
|
14
|
+
TireAsyncIndex.queue.should eql :normal
|
15
15
|
TireAsyncIndex.engine.should eql :none
|
16
16
|
end
|
17
17
|
|
@@ -20,7 +20,7 @@ describe TireAsyncIndex do
|
|
20
20
|
config.use_queue :high
|
21
21
|
end
|
22
22
|
|
23
|
-
TireAsyncIndex.
|
23
|
+
TireAsyncIndex.queue.should eql :high
|
24
24
|
end
|
25
25
|
|
26
26
|
it "should be able to set sidekiq as engine" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tire_async_index
|
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
|
- Sergey Efremov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-03-
|
11
|
+
date: 2013-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tire
|
@@ -131,6 +131,7 @@ extra_rdoc_files: []
|
|
131
131
|
files:
|
132
132
|
- .gitignore
|
133
133
|
- .rspec
|
134
|
+
- .travis.yml
|
134
135
|
- Gemfile
|
135
136
|
- LICENSE.txt
|
136
137
|
- README.md
|