jettywrapper 1.0.2 → 1.0.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/lib/jettywrapper.rb +2 -1
- data/lib/jettywrapper/version.rb +1 -1
- data/spec/lib/jettywrapper_spec.rb +6 -1
- metadata +4 -4
data/lib/jettywrapper.rb
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
require 'loggable'
|
|
4
4
|
require 'singleton'
|
|
5
5
|
require 'fileutils'
|
|
6
|
+
require 'shellwords'
|
|
6
7
|
require 'socket'
|
|
7
8
|
require 'timeout'
|
|
8
9
|
require 'childprocess'
|
|
@@ -223,7 +224,7 @@ class Jettywrapper
|
|
|
223
224
|
|
|
224
225
|
def java_variables
|
|
225
226
|
["-Djetty.port=#{@port}",
|
|
226
|
-
"-Dsolr.solr.home=#{@solr_home}"]
|
|
227
|
+
"-Dsolr.solr.home=#{Shellwords.escape(@solr_home)}"]
|
|
227
228
|
end
|
|
228
229
|
|
|
229
230
|
# Start the jetty server. Check the pid file to see if it is running already,
|
data/lib/jettywrapper/version.rb
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
GEMVERSION = "1.0.
|
|
1
|
+
GEMVERSION = "1.0.3"
|
|
@@ -60,7 +60,12 @@ module Hydra
|
|
|
60
60
|
command.should include("-Dsolr.solr.home=#{@jetty_params[:solr_home]}")
|
|
61
61
|
command.should include("-Djetty.port=#{@jetty_params[:jetty_port]}")
|
|
62
62
|
command.should include("-Xmx256mb")
|
|
63
|
-
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
it "escapes the :solr_home parameter" do
|
|
66
|
+
ts = Jettywrapper.configure(@jetty_params.merge(:solr_home => '/path with spaces/to/solr'))
|
|
67
|
+
command = ts.jetty_command
|
|
68
|
+
command.should include("-Dsolr.solr.home=/path\\ with\\ spaces/to/solr")
|
|
64
69
|
end
|
|
65
70
|
|
|
66
71
|
it "has a pid if it has been started" do
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jettywrapper
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 17
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 1.0.
|
|
9
|
+
- 3
|
|
10
|
+
version: 1.0.3
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Bess Sadler
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-10
|
|
18
|
+
date: 2011-11-10 00:00:00 -06:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|