outoftime-sunspot_rails 0.9.8 → 0.9.9

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -58,6 +58,14 @@ Sunspot::Rails as a gem, add the following line to your project's Rakefile:
58
58
 
59
59
  require 'sunspot/rails/tasks'
60
60
 
61
+ If you wish to make modifications to the Solr schema, you can create a custom
62
+ Solr home in your project directory. In order to do so, create the directory
63
+ <code>RAILS_ROOT/solr/conf</code>, and copy in the contents of the Solr gem's
64
+ <code>solr/solr/conf</code> directory. If the files are in the right place,
65
+ Sunspot::Rails will detect them and tell Solr to use your local configurations.
66
+ Use caution when modifying <code>schema.xml</code> - Sunspot relies on the
67
+ field naming scheme in the packaged schema file.
68
+
61
69
  To start up a Solr instance, issue the following:
62
70
 
63
71
  rake sunspot:solr:start
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 8
2
+ :patch: 9
3
3
  :major: 0
4
4
  :minor: 9
@@ -18,7 +18,7 @@ begin
18
18
  'spec/mock_app/{tmp,log,solr}']
19
19
  s.add_dependency 'rails', '~> 2.1'
20
20
  s.add_dependency 'escape', '>= 0.0.4'
21
- s.add_dependency 'outoftime-sunspot', '>= 0.7.2'
21
+ s.add_dependency 'outoftime-sunspot', '>= 0.8.2'
22
22
  s.add_development_dependency 'rspec', '~> 1.2'
23
23
  s.add_development_dependency 'rspec-rails', '~> 1.2'
24
24
  s.add_development_dependency 'ruby-debug', '~> 0.10'
@@ -6,10 +6,18 @@ namespace :sunspot do
6
6
  task :start => :environment do
7
7
  data_path = File.join(::Rails.root, 'solr', 'data', ::Rails.env)
8
8
  pid_path = File.join(::Rails.root, 'solr', 'pids', ::Rails.env)
9
+ solr_home =
10
+ if %w(solrconfig schema).all? { |file| File.exist?(File.join(::Rails.root, 'solr', 'conf', "#{file}.xml")) }
11
+ File.join(::Rails.root, 'solr')
12
+ end
9
13
  [data_path, pid_path].each { |path| FileUtils.mkdir_p(path) }
10
14
  port = Sunspot::Rails.configuration.port
11
15
  FileUtils.cd(File.join(pid_path)) do
12
- system(Escape.shell_command(['sunspot-solr', 'start', '--', '-p', port.to_s, '-d', data_path]))
16
+ command = ['sunspot-solr', 'start', '--', '-p', port.to_s, '-d', data_path]
17
+ if solr_home
18
+ command << '-s' << solr_home
19
+ end
20
+ system(Escape.shell_command(command))
13
21
  end
14
22
  end
15
23
 
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.8
4
+ version: 0.9.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mat Brown
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 0.7.2
43
+ version: 0.8.2
44
44
  version:
45
45
  - !ruby/object:Gem::Dependency
46
46
  name: rspec