outoftime-sunspot_rails 0.10.2 → 0.10.3
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/VERSION.yml +2 -2
- data/lib/sunspot/rails/tasks.rb +16 -0
- metadata +2 -2
data/VERSION.yml
CHANGED
data/lib/sunspot/rails/tasks.rb
CHANGED
@@ -21,6 +21,22 @@ namespace :sunspot do
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
+
desc 'Run the Solr instance in the foreground. Windows users must use this task to run Solr'
|
25
|
+
task :run => :environment do
|
26
|
+
data_path = File.join(::Rails.root, 'solr', 'data', ::Rails.env)
|
27
|
+
solr_home =
|
28
|
+
if %w(solrconfig schema).all? { |file| File.exist?(File.join(::Rails.root, 'solr', 'conf', "#{file}.xml")) }
|
29
|
+
File.join(::Rails.root, 'solr')
|
30
|
+
end
|
31
|
+
FileUtils.mkdir_p(data_path)
|
32
|
+
port = Sunspot::Rails.configuration.port
|
33
|
+
command = ['sunspot-solr', 'run', '--', '-p', port.to_s, '-d', data_path]
|
34
|
+
if solr_home
|
35
|
+
command << '-s' << solr_home
|
36
|
+
end
|
37
|
+
exec(Escape.shell_command(command))
|
38
|
+
end
|
39
|
+
|
24
40
|
desc 'Stop the Solr instance'
|
25
41
|
task :stop => :environment do
|
26
42
|
FileUtils.cd(File.join(::Rails.root, 'solr', 'pids', ::Rails.env)) do
|
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.10.
|
4
|
+
version: 0.10.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mat Brown
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2009-
|
15
|
+
date: 2009-07-22 00:00:00 -07:00
|
16
16
|
default_executable:
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|