outoftime-sunspot_rails 0.9.11 → 0.9.12
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/README.rdoc +1 -0
- data/VERSION.yml +1 -1
- data/lib/sunspot/rails/configuration.rb +3 -3
- data/spec/configuration_spec.rb +4 -5
- metadata +1 -1
data/README.rdoc
CHANGED
data/VERSION.yml
CHANGED
@@ -54,7 +54,8 @@ module Sunspot #:nodoc:
|
|
54
54
|
end
|
55
55
|
|
56
56
|
#
|
57
|
-
# The
|
57
|
+
# The path to the Solr servlet (useful if you are running multicore).
|
58
|
+
# Default '/solr'.
|
58
59
|
#
|
59
60
|
# ==== Returns
|
60
61
|
#
|
@@ -83,8 +84,7 @@ module Sunspot #:nodoc:
|
|
83
84
|
path = File.join(::Rails.root, 'config', 'sunspot.yml')
|
84
85
|
if File.exist?(path)
|
85
86
|
File.open(path) do |file|
|
86
|
-
|
87
|
-
YAML.load(file)[RAILS_ENV]
|
87
|
+
YAML.load(file)[::Rails.env]
|
88
88
|
end
|
89
89
|
end
|
90
90
|
end
|
data/spec/configuration_spec.rb
CHANGED
@@ -2,16 +2,15 @@ require File.join(File.dirname(__FILE__), 'spec_helper')
|
|
2
2
|
|
3
3
|
describe "Configuration" do
|
4
4
|
it "should handle the 'path' property when not set" do
|
5
|
-
config
|
5
|
+
config = Sunspot::Rails::Configuration.new
|
6
6
|
config.path.should == '/solr'
|
7
7
|
end
|
8
8
|
|
9
9
|
it "should handle the 'path' property when set" do
|
10
10
|
silence_stderr do
|
11
|
-
|
12
|
-
config
|
11
|
+
Rails.stub!(:env => 'path_test')
|
12
|
+
config = Sunspot::Rails::Configuration.new
|
13
13
|
config.path.should == '/solr/path_test'
|
14
|
-
RAILS_ENV = 'test'
|
15
14
|
end
|
16
15
|
end
|
17
|
-
end
|
16
|
+
end
|