From a78ec93036644c41f936128a2b6d52f3136ad64c Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Wed, 24 Sep 2008 18:45:53 +0200 Subject: Partially revert 185fe2e9cce737d69d3b47a656f3651ce152c0c1 We shouldn't quote the unpack command's requirement as it's passed through GemRunner which takes care of it for us. --- railties/lib/rails/gem_dependency.rb | 4 +++- railties/test/gem_dependency_test.rb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'railties') diff --git a/railties/lib/rails/gem_dependency.rb b/railties/lib/rails/gem_dependency.rb index 471e03fa5f..d58ae450eb 100644 --- a/railties/lib/rails/gem_dependency.rb +++ b/railties/lib/rails/gem_dependency.rb @@ -120,7 +120,9 @@ module Rails def unpack_command cmd = %w(unpack) << @name - cmd << "--version" << %("#{@requirement.to_s}") if @requirement + # We don't quote this requirement as it's run through GemRunner instead + # of shelling out to gem + cmd << "--version" << @requirement.to_s if @requirement cmd end end diff --git a/railties/test/gem_dependency_test.rb b/railties/test/gem_dependency_test.rb index 964ca50992..c94c950455 100644 --- a/railties/test/gem_dependency_test.rb +++ b/railties/test/gem_dependency_test.rb @@ -37,7 +37,7 @@ uses_mocha "Plugin Tests" do end def test_gem_with_version_unpack_install_command - assert_equal ["unpack", "hpricot", "--version", '"= 0.6"'], @gem_with_version.unpack_command + assert_equal ["unpack", "hpricot", "--version", '= 0.6'], @gem_with_version.unpack_command end def test_gem_adds_load_paths -- cgit v1.2.3