sunspot_rails 2.2.4 → 2.2.5
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/sunspot/rails.rb +2 -0
- data/lib/sunspot/rails/configuration.rb +7 -0
- data/spec/configuration_spec.rb +8 -0
- data/spec/rails_template/config/sunspot.yml +1 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b486e494f2f1a9cb4e2ae5a48020ff25ad4df89e
|
4
|
+
data.tar.gz: d8895bf88c97f05fbad3c6e17b49b0c8f7fe37ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91fc7586cb8fd9dbe7dcfdf0d9fe61b2effdf196085f442b475ff791c7bc7e3fc0f5147f8c9877f8cc1fd6f71d997e891a28316ffa7d2bb7e9e6fb753a90affb
|
7
|
+
data.tar.gz: 5c71e44309d9b8d2949950a521b22d232e05e260a8010db22194c2ea394c5f6fa85715467c2f38652373b27a55c75ab0e91c70edbe8ba66601e1e4ab08bbde85
|
data/lib/sunspot/rails.rb
CHANGED
@@ -52,6 +52,7 @@ module Sunspot #:nodoc:
|
|
52
52
|
).to_s
|
53
53
|
config.solr.read_timeout = sunspot_rails_configuration.read_timeout
|
54
54
|
config.solr.open_timeout = sunspot_rails_configuration.open_timeout
|
55
|
+
config.solr.proxy = sunspot_rails_configuration.proxy
|
55
56
|
config
|
56
57
|
end
|
57
58
|
|
@@ -66,6 +67,7 @@ module Sunspot #:nodoc:
|
|
66
67
|
).to_s
|
67
68
|
config.solr.read_timeout = sunspot_rails_configuration.read_timeout
|
68
69
|
config.solr.open_timeout = sunspot_rails_configuration.open_timeout
|
70
|
+
config.solr.proxy = sunspot_rails_configuration.proxy
|
69
71
|
config
|
70
72
|
end
|
71
73
|
end
|
@@ -15,6 +15,7 @@ module Sunspot #:nodoc:
|
|
15
15
|
# memory: 1G
|
16
16
|
# solr_jar: /some/path/solr15/start.jar
|
17
17
|
# bind_address: 0.0.0.0
|
18
|
+
# proxy: false
|
18
19
|
# disabled: false
|
19
20
|
# test:
|
20
21
|
# solr:
|
@@ -23,6 +24,7 @@ module Sunspot #:nodoc:
|
|
23
24
|
# log_level: OFF
|
24
25
|
# open_timeout: 0.5
|
25
26
|
# read_timeout: 2
|
27
|
+
# proxy: false
|
26
28
|
# production:
|
27
29
|
# solr:
|
28
30
|
# scheme: http
|
@@ -35,6 +37,7 @@ module Sunspot #:nodoc:
|
|
35
37
|
# solr_home: /some/path
|
36
38
|
# open_timeout: 0.5
|
37
39
|
# read_timeout: 2
|
40
|
+
# proxy: http://proxy.com:12345
|
38
41
|
# master_solr:
|
39
42
|
# hostname: localhost
|
40
43
|
# port: 8982
|
@@ -298,6 +301,10 @@ module Sunspot #:nodoc:
|
|
298
301
|
@open_timeout ||= user_configuration_from_key('solr', 'open_timeout')
|
299
302
|
end
|
300
303
|
|
304
|
+
def proxy
|
305
|
+
@proxy ||= user_configuration_from_key('solr', 'proxy')
|
306
|
+
end
|
307
|
+
|
301
308
|
#
|
302
309
|
# Whether or not to disable Solr.
|
303
310
|
# Defaults to false.
|
data/spec/configuration_spec.rb
CHANGED
@@ -22,6 +22,10 @@ describe Sunspot::Rails::Configuration, "default values without a sunspot.yml" d
|
|
22
22
|
@config.userinfo.should be_nil
|
23
23
|
end
|
24
24
|
|
25
|
+
it "should not set a proxy" do
|
26
|
+
@config.proxy.should be_nil
|
27
|
+
end
|
28
|
+
|
25
29
|
describe "port" do
|
26
30
|
it "should default to port 8981 in test" do
|
27
31
|
::Rails.stub(:env => 'test')
|
@@ -158,6 +162,10 @@ describe Sunspot::Rails::Configuration, "user provided sunspot.yml" do
|
|
158
162
|
it "should handle the 'open_timeout' property when set" do
|
159
163
|
@config.open_timeout.should == 0.5
|
160
164
|
end
|
165
|
+
|
166
|
+
it "should handle the 'proxy' property when set" do
|
167
|
+
@config.proxy.should == 'http://proxy.com:12345'
|
168
|
+
end
|
161
169
|
end
|
162
170
|
|
163
171
|
describe Sunspot::Rails::Configuration, "with auto_index_callback and auto_remove_callback set" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sunspot_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mat Brown
|
@@ -26,7 +26,7 @@ authors:
|
|
26
26
|
autorequire:
|
27
27
|
bindir: bin
|
28
28
|
cert_chain: []
|
29
|
-
date: 2016-
|
29
|
+
date: 2016-03-05 00:00:00.000000000 Z
|
30
30
|
dependencies:
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: rails
|
@@ -48,14 +48,14 @@ dependencies:
|
|
48
48
|
requirements:
|
49
49
|
- - '='
|
50
50
|
- !ruby/object:Gem::Version
|
51
|
-
version: 2.2.
|
51
|
+
version: 2.2.5
|
52
52
|
type: :runtime
|
53
53
|
prerelease: false
|
54
54
|
version_requirements: !ruby/object:Gem::Requirement
|
55
55
|
requirements:
|
56
56
|
- - '='
|
57
57
|
- !ruby/object:Gem::Version
|
58
|
-
version: 2.2.
|
58
|
+
version: 2.2.5
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: nokogiri
|
61
61
|
requirement: !ruby/object:Gem::Requirement
|