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 CHANGED
@@ -238,6 +238,7 @@ http://outoftime.lighthouseapp.com/projects/20339-sunspot
238
238
 
239
239
  Mat Brown (mat@patch.com)
240
240
  Peer Allan (peer.allan@gmail.com)
241
+ Michael Moen (michael@underpantsgnome.com)
241
242
 
242
243
  == License
243
244
 
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 11
2
+ :patch: 12
3
3
  :major: 0
4
4
  :minor: 9
@@ -54,7 +54,8 @@ module Sunspot #:nodoc:
54
54
  end
55
55
 
56
56
  #
57
- # The URL to call if you are running Solr with multicore. Default '/solr'.
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
- # only changed this to allow me to test the path attribute
87
- YAML.load(file)[RAILS_ENV]
87
+ YAML.load(file)[::Rails.env]
88
88
  end
89
89
  end
90
90
  end
@@ -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 ||= Sunspot::Rails::Configuration.new
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
- RAILS_ENV = 'path_test'
12
- config ||= Sunspot::Rails::Configuration.new
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: outoftime-sunspot_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.11
4
+ version: 0.9.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mat Brown