flying-sphinx 0.8.1 → 0.8.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.
data/HISTORY
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
0.8.2 - 28th August 2012
|
2
|
+
* Don't presume there is a Time.zone method (for Rails 2.3).
|
3
|
+
* Set client key as part of the configuration generation process (for Rails 2.3).
|
4
|
+
|
1
5
|
0.8.1 - 28th August 2012
|
2
6
|
* Load Thinking Sphinx when sending a generated configuration (as opposed to a hand-written file).
|
3
7
|
* Rebuild command now sends the new configuration up, as before.
|
data/lib/flying_sphinx/api.rb
CHANGED
@@ -6,10 +6,18 @@ describe FlyingSphinx::SphinxConfiguration do
|
|
6
6
|
let(:ts_config) { fire_double('ThinkingSphinx::Configuration',
|
7
7
|
:configuration => riddle_config, :version => '2.1.0-dev',
|
8
8
|
:generate => true) }
|
9
|
+
let(:searchd) { fire_double('Riddle::Configuration::Searchd',
|
10
|
+
:client_key= => true) }
|
9
11
|
let(:riddle_config) { fire_double('Riddle::Configuration',
|
10
|
-
:render => 'foo {}') }
|
12
|
+
:render => 'foo {}', :searchd => searchd) }
|
13
|
+
let(:fs_config) { fire_double('FlyingSphinx::Configuration',
|
14
|
+
:client_key => 'foo:bar') }
|
11
15
|
|
12
16
|
describe '#upload_to' do
|
17
|
+
before :each do
|
18
|
+
stub_const 'FlyingSphinx::Configuration', double(:new => fs_config)
|
19
|
+
end
|
20
|
+
|
13
21
|
let(:api) { fire_double('FlyingSphinx::API', :put => true) }
|
14
22
|
|
15
23
|
it "generates the Sphinx configuration" do
|
@@ -18,6 +26,12 @@ describe FlyingSphinx::SphinxConfiguration do
|
|
18
26
|
configuration.upload_to api
|
19
27
|
end
|
20
28
|
|
29
|
+
it "sets the client key" do
|
30
|
+
searchd.should_receive(:client_key=).with('foo:bar')
|
31
|
+
|
32
|
+
configuration.upload_to api
|
33
|
+
end
|
34
|
+
|
21
35
|
it "sends the configuration to the API" do
|
22
36
|
api.should_receive(:put).with('/', :configuration => 'foo {}',
|
23
37
|
:sphinx_version => '2.1.0-dev')
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flying-sphinx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 59
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 0.8.
|
9
|
+
- 2
|
10
|
+
version: 0.8.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Pat Allan
|