flying-sphinx 2.1.3 → 2.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 727f92b2356f83883fab5b51f106d39c43b8e89c57811a33fb5ea8541f21c09b
4
- data.tar.gz: 81451cc912cf38baad334a63f5e996bcb561da3bc94a6422da19c3b074f02ca0
3
+ metadata.gz: becb4d73c43a31cfec2fd25215d08bf1739a3e65992abb8dfdc986f23858ef7d
4
+ data.tar.gz: 7bc358f2990194925946c2c28ad7cbd49b88dc46d16d0485ebadcb82a794f830
5
5
  SHA512:
6
- metadata.gz: 2add3250b48d68914f9bdaddbcb0f502f3b1f6a503a7ada15989df33788fde8e8eeecdef9d16bc9acdb4ae501cb8b5df4118ed45121d913bc4733d60678fff4b
7
- data.tar.gz: 315fec177d81494362eecfcb4bb368fc9ab6ae096b9027fdb1f26b75528b8300bfe6b1c74bfeb844f6cc8184310fa69a62aa17ca56dbf515f6cbc007728c6daf
6
+ metadata.gz: 2962c39d42f25d92382887b0400027b16536e33ca8ce24cbbf739fcc61429ff4e34367dcb4a674d0459f5b4c44e0374de582fcf4aa904357040f734a4627ba82
7
+ data.tar.gz: fc33d8ecd8144d30e2fdccfcee9304bdb0723f701eb40130d0366762c58d06bb64127b4d37d35a4ef556f98a0ead0a7fa36c5a74aad58781eee2d31dd15c980e
data/CHANGELOG.markdown CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project (at least, from v0.4.0 onwards) are documented in this file.
4
4
 
5
+ ## 2.1.4 - 2019-03-10
6
+
7
+ ### Fixed
8
+
9
+ * Fixed the overriding of Flying Sphinx connection details by Thinking Sphinx's new prepare hook (added in Thinking Sphinx v4.2.0).
10
+
5
11
  ## 2.1.3 - 2018-12-12
6
12
 
7
13
  ### Fixed
data/README.textile CHANGED
@@ -39,4 +39,4 @@ h2. Contributors
39
39
 
40
40
  h2. Licence
41
41
 
42
- Copyright © 2011-2018 Pat Allan, released under an MIT licence.
42
+ Copyright © 2011-2019 Pat Allan, released under an MIT licence.
@@ -1,13 +1,29 @@
1
1
  class FlyingSphinx::Railtie < Rails::Railtie
2
2
  rake_tasks do
3
+ next unless FlyingSphinx::Railtie.remote_sphinx?
4
+
3
5
  require 'flying_sphinx/commands'
4
6
 
5
7
  ThinkingSphinx.rake_interface = FlyingSphinx::RakeInterface
6
8
 
7
9
  load File.expand_path('../tasks.rb', __FILE__)
8
- end if ENV['FLYING_SPHINX_IDENTIFIER'] || ENV['STAGED_SPHINX_IDENTIFIER']
10
+ end
9
11
 
10
12
  initializer "flying_sphinx.set_sphinx_host_and_port" do |app|
13
+ FlyingSphinx::Railtie.set_up_remote_connection
14
+ end
15
+
16
+ config.to_prepare do
17
+ FlyingSphinx::Railtie.set_up_remote_connection
18
+ end
19
+
20
+ def self.remote_sphinx?
21
+ ENV['FLYING_SPHINX_IDENTIFIER'] || ENV['STAGED_SPHINX_IDENTIFIER']
22
+ end
23
+
24
+ def self.set_up_remote_connection
25
+ return unless remote_sphinx?
26
+
11
27
  configuration = FlyingSphinx::Configuration.new
12
28
 
13
29
  ThinkingSphinx::Configuration.instance.settings['connection_options'] = {
@@ -15,5 +31,5 @@ class FlyingSphinx::Railtie < Rails::Railtie
15
31
  :port => 9306,
16
32
  :username => configuration.username
17
33
  }
18
- end if ENV['FLYING_SPHINX_IDENTIFIER'] || ENV['STAGED_SPHINX_IDENTIFIER']
34
+ end
19
35
  end
@@ -1,3 +1,3 @@
1
1
  module FlyingSphinx
2
- Version = '2.1.3'
2
+ Version = '2.1.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flying-sphinx
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Allan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-12 00:00:00.000000000 Z
11
+ date: 2019-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ey-hmac
@@ -305,8 +305,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
305
305
  - !ruby/object:Gem::Version
306
306
  version: '0'
307
307
  requirements: []
308
- rubyforge_project:
309
- rubygems_version: 2.7.6
308
+ rubygems_version: 3.0.3
310
309
  signing_key:
311
310
  specification_version: 4
312
311
  summary: Sphinx in the Cloud