sunspot_solr 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/sunspot/solr/server.rb +3 -2
- data/lib/sunspot/solr/tasks.rb +22 -28
- data/solr/contexts/solr.xml +0 -1
- metadata +14 -20
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 53b055ef533243d56a2f670eb7643bbb82f3f033
|
4
|
+
data.tar.gz: c20d9eed7d364db48933405efa47dc4e9a334e95
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fed1ab3dd72542db53fbfbc415ecd7094e9ba0ab3bb1b77fe43cdb6226780e2fe0457c6b6f70ebd632442fcd79e340e2f03deb4a9e0bcb8510066636b7f191fb
|
7
|
+
data.tar.gz: 70b905ed0bc45b5f2d9e6b23280563c1d18e9d6b47301e8ac69333f727c8cb33a80a9d7179074fd0846a92f10c54dfbb9a7f99480da22152b510762254df888a
|
data/lib/sunspot/solr/server.rb
CHANGED
@@ -30,7 +30,7 @@ module Sunspot
|
|
30
30
|
|
31
31
|
#
|
32
32
|
# Bootstrap a new solr_home by creating all required
|
33
|
-
# directories.
|
33
|
+
# directories.
|
34
34
|
#
|
35
35
|
# ==== Returns
|
36
36
|
#
|
@@ -99,6 +99,7 @@ module Sunspot
|
|
99
99
|
command << "-Dsolr.data.dir=#{solr_data_dir}" if solr_data_dir
|
100
100
|
command << "-Dsolr.solr.home=#{solr_home}" if solr_home
|
101
101
|
command << "-Djava.util.logging.config.file=#{logging_config_path}" if logging_config_path
|
102
|
+
command << "-Djava.awt.headless=true"
|
102
103
|
command << '-jar' << File.basename(solr_jar)
|
103
104
|
FileUtils.cd(File.dirname(solr_jar)) do
|
104
105
|
exec(*command)
|
@@ -180,7 +181,7 @@ module Sunspot
|
|
180
181
|
end
|
181
182
|
end
|
182
183
|
|
183
|
-
#
|
184
|
+
#
|
184
185
|
# Create new solr_home, config, log and pid directories
|
185
186
|
#
|
186
187
|
# ==== Returns
|
data/lib/sunspot/solr/tasks.rb
CHANGED
@@ -1,33 +1,32 @@
|
|
1
1
|
namespace :sunspot do
|
2
2
|
namespace :solr do
|
3
3
|
desc 'Start the Solr instance'
|
4
|
-
task :
|
5
|
-
|
6
|
-
|
7
|
-
abort("This command is not supported on #{RUBY_PLATFORM}. " +
|
8
|
-
"Use rake sunspot:solr:run to run Solr in the foreground.")
|
9
|
-
end
|
10
|
-
|
11
|
-
if defined?(Sunspot::Rails::Server)
|
12
|
-
Sunspot::Rails::Server.new.start
|
13
|
-
else
|
14
|
-
Sunspot::Solr::Server.new.start
|
15
|
-
end
|
16
|
-
|
17
|
-
puts "Successfully started Solr ..."
|
4
|
+
task start: :environment do
|
5
|
+
server.start
|
6
|
+
puts 'Successfully started Solr ...'
|
18
7
|
end
|
19
8
|
|
20
9
|
desc 'Run the Solr instance in the foreground'
|
21
|
-
task :
|
22
|
-
|
23
|
-
Sunspot::Rails::Server.new.run
|
24
|
-
else
|
25
|
-
Sunspot::Solr::Server.new.run
|
26
|
-
end
|
10
|
+
task run: :environment do
|
11
|
+
server.run
|
27
12
|
end
|
28
13
|
|
29
14
|
desc 'Stop the Solr instance'
|
30
|
-
task :
|
15
|
+
task stop: :environment do
|
16
|
+
server.stop
|
17
|
+
puts 'Successfully stopped Solr ...'
|
18
|
+
end
|
19
|
+
|
20
|
+
desc 'Restart the Solr instance'
|
21
|
+
task restart: :environment do
|
22
|
+
Rake::Task['sunspot:solr:stop'].invoke if File.exist?(server.pid_path)
|
23
|
+
Rake::Task['sunspot:solr:start'].invoke
|
24
|
+
end
|
25
|
+
|
26
|
+
# for backwards compatibility
|
27
|
+
task reindex: :"sunspot:reindex"
|
28
|
+
|
29
|
+
def server
|
31
30
|
case RUBY_PLATFORM
|
32
31
|
when /w(in)?32$/, /java$/
|
33
32
|
abort("This command is not supported on #{RUBY_PLATFORM}. " +
|
@@ -35,15 +34,10 @@ namespace :sunspot do
|
|
35
34
|
end
|
36
35
|
|
37
36
|
if defined?(Sunspot::Rails::Server)
|
38
|
-
Sunspot::Rails::Server.new
|
37
|
+
Sunspot::Rails::Server.new
|
39
38
|
else
|
40
|
-
Sunspot::Solr::Server.new
|
39
|
+
Sunspot::Solr::Server.new
|
41
40
|
end
|
42
|
-
|
43
|
-
puts "Successfully stopped Solr ..."
|
44
41
|
end
|
45
|
-
|
46
|
-
# for backwards compatibility
|
47
|
-
task :reindex => :"sunspot:reindex"
|
48
42
|
end
|
49
43
|
end
|
data/solr/contexts/solr.xml
CHANGED
@@ -4,5 +4,4 @@
|
|
4
4
|
<Set name="contextPath"><SystemProperty name="hostContext" default="/solr"/></Set>
|
5
5
|
<Set name="war"><SystemProperty name="jetty.home"/>/webapps/solr.war</Set>
|
6
6
|
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home"/>/etc/webdefault.xml</Set>
|
7
|
-
<Set name="tempDirectory"><Property name="jetty.home" default="."/>/solr-webapp</Set>
|
8
7
|
</Configure>
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sunspot_solr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
5
|
-
prerelease:
|
4
|
+
version: 2.1.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Mat Brown
|
@@ -27,38 +26,34 @@ authors:
|
|
27
26
|
autorequire:
|
28
27
|
bindir: bin
|
29
28
|
cert_chain: []
|
30
|
-
date:
|
29
|
+
date: 2014-05-07 00:00:00.000000000 Z
|
31
30
|
dependencies:
|
32
31
|
- !ruby/object:Gem::Dependency
|
33
32
|
name: rspec
|
34
33
|
requirement: !ruby/object:Gem::Requirement
|
35
|
-
none: false
|
36
34
|
requirements:
|
37
|
-
- - ~>
|
35
|
+
- - "~>"
|
38
36
|
- !ruby/object:Gem::Version
|
39
37
|
version: '1.1'
|
40
38
|
type: :development
|
41
39
|
prerelease: false
|
42
40
|
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
none: false
|
44
41
|
requirements:
|
45
|
-
- - ~>
|
42
|
+
- - "~>"
|
46
43
|
- !ruby/object:Gem::Version
|
47
44
|
version: '1.1'
|
48
45
|
- !ruby/object:Gem::Dependency
|
49
46
|
name: hanna
|
50
47
|
requirement: !ruby/object:Gem::Requirement
|
51
|
-
none: false
|
52
48
|
requirements:
|
53
|
-
- -
|
49
|
+
- - ">="
|
54
50
|
- !ruby/object:Gem::Version
|
55
51
|
version: '0'
|
56
52
|
type: :development
|
57
53
|
prerelease: false
|
58
54
|
version_requirements: !ruby/object:Gem::Requirement
|
59
|
-
none: false
|
60
55
|
requirements:
|
61
|
-
- -
|
56
|
+
- - ">="
|
62
57
|
- !ruby/object:Gem::Version
|
63
58
|
version: '0'
|
64
59
|
description: |2
|
@@ -130,32 +125,31 @@ files:
|
|
130
125
|
homepage: https://github.com/outoftime/sunspot/tree/master/sunspot_solr
|
131
126
|
licenses:
|
132
127
|
- MIT
|
128
|
+
metadata: {}
|
133
129
|
post_install_message:
|
134
130
|
rdoc_options:
|
135
|
-
- --webcvs=http://github.com/outoftime/sunspot/tree/master/%s
|
136
|
-
- --title
|
131
|
+
- "--webcvs=http://github.com/outoftime/sunspot/tree/master/%s"
|
132
|
+
- "--title"
|
137
133
|
- Sunspot-Solr - Bundled Solr distribution for Sunspot - API Documentation
|
138
|
-
- --main
|
134
|
+
- "--main"
|
139
135
|
- README.rdoc
|
140
136
|
require_paths:
|
141
137
|
- lib
|
142
138
|
required_ruby_version: !ruby/object:Gem::Requirement
|
143
|
-
none: false
|
144
139
|
requirements:
|
145
|
-
- -
|
140
|
+
- - ">="
|
146
141
|
- !ruby/object:Gem::Version
|
147
142
|
version: '0'
|
148
143
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
|
-
none: false
|
150
144
|
requirements:
|
151
|
-
- -
|
145
|
+
- - ">="
|
152
146
|
- !ruby/object:Gem::Version
|
153
147
|
version: '0'
|
154
148
|
requirements: []
|
155
149
|
rubyforge_project: sunspot
|
156
|
-
rubygems_version:
|
150
|
+
rubygems_version: 2.2.2
|
157
151
|
signing_key:
|
158
|
-
specification_version:
|
152
|
+
specification_version: 4
|
159
153
|
summary: Bundled Solr distribution for Sunspot
|
160
154
|
test_files:
|
161
155
|
- spec/server_spec.rb
|