Skip to content

Commit

Permalink
Server#solr_home was assuming Rails.root instead of config.solr_home,…
Browse files Browse the repository at this point in the history
… which should already include the trailing '/solr'.
  • Loading branch information
nz committed Oct 7, 2010
1 parent a9324c1 commit b09e2dc
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion sunspot_rails/lib/sunspot/rails/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def solr_data_dir
# Directory to use for Solr home.
#
def solr_home
File.join(configuration.solr_home, 'solr')
File.join(configuration.solr_home)
end

#
Expand Down
4 changes: 0 additions & 4 deletions sunspot_rails/spec/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@
@config.pid_path.should == '/some/path/solr/pids/test'
end

it "should handle the 'solr_home' property when not set" do
@config.solr_home.should_not == nil
end

it "should handle the 'auto_commit_after_request' propery when not set" do
@config.auto_commit_after_request?.should == true
end
Expand Down
1 change: 0 additions & 1 deletion sunspot_rails/spec/rails2/config/sunspot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ test:
solr:
hostname: localhost
port: 8980
solr_home: ../solr_test
development:
solr:
hostname: localhost
Expand Down
1 change: 0 additions & 1 deletion sunspot_rails/spec/rails3/config/sunspot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ test:
solr:
hostname: localhost
port: 8980
solr_home: ../solr_test
development:
solr:
hostname: localhost
Expand Down
2 changes: 1 addition & 1 deletion sunspot_rails/spec/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
before :each do
@server = Sunspot::Rails::Server.new
@config = Sunspot::Rails::Configuration.new
@solr_home = File.join(@config.solr_home, 'solr')
@solr_home = File.join(@config.solr_home)
end

it "sets the correct Solr home" do
Expand Down

0 comments on commit b09e2dc

Please sign in to comment.