Skip to content

Commit

Permalink
Removes the need for the escape gem by using Shellwords; hopefully fi…
Browse files Browse the repository at this point in the history
…xes issues with quoting on Windows too
  • Loading branch information
alindeman committed Apr 15, 2012
1 parent 406a988 commit 94c62e2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion sunspot/sunspot.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]

s.add_dependency 'rsolr', '~>1.0.6'
s.add_dependency 'escape', '~>0.0.4'
s.add_dependency 'pr_geohash', '~>1.0'

s.add_development_dependency 'rspec', '~>2.6.0'
Expand Down
4 changes: 2 additions & 2 deletions sunspot_solr/lib/sunspot/solr/server.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'escape'
require 'shellwords'
require 'set'
require 'tempfile'
require 'sunspot/solr/java'
Expand Down Expand Up @@ -101,7 +101,7 @@ def run
command << "-Djava.util.logging.config.file=#{logging_config_path}" if logging_config_path
command << '-jar' << File.basename(solr_jar)
FileUtils.cd(File.dirname(solr_jar)) do
exec(Escape.shell_command(command))
exec(Shellwords.shelljoin(command))
end
end

Expand Down
2 changes: 0 additions & 2 deletions sunspot_solr/sunspot_solr.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ Gem::Specification.new do |s|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]

s.add_dependency 'escape', '~>0.0.4'

s.add_development_dependency 'rspec', '~> 1.1'
s.add_development_dependency 'hanna'

Expand Down

0 comments on commit 94c62e2

Please sign in to comment.