diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-06-02 09:54:36 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-06-02 09:54:36 -0500 |
commit | 185fe2e9cce737d69d3b47a656f3651ce152c0c1 (patch) | |
tree | f3e290b570289e7dd12878cabfc29cc2a678a00c /railties/lib/rails | |
parent | 14a65cd982161364028da312f415c1ebe0bcd5ac (diff) | |
download | rails-185fe2e9cce737d69d3b47a656f3651ce152c0c1.tar.gz rails-185fe2e9cce737d69d3b47a656f3651ce152c0c1.tar.bz2 rails-185fe2e9cce737d69d3b47a656f3651ce152c0c1.zip |
In 9c4f003, gem installation quotes versions. Do the same for unpack and update tests to reflect the change.
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/gem_dependency.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/railties/lib/rails/gem_dependency.rb b/railties/lib/rails/gem_dependency.rb index 9f088a18dd..30bdf416fc 100644 --- a/railties/lib/rails/gem_dependency.rb +++ b/railties/lib/rails/gem_dependency.rb @@ -39,7 +39,7 @@ module Rails @load_paths_added = true rescue Gem::LoadError end - + def dependencies all_dependencies = specification.dependencies.map do |dependency| GemDependency.new(dependency.name, :requirement => dependency.version_requirements) @@ -47,7 +47,7 @@ module Rails all_dependencies += all_dependencies.map(&:dependencies).flatten all_dependencies.uniq end - + def gem_dir(base_directory) File.join(base_directory, specification.full_name) end @@ -78,13 +78,13 @@ module Rails puts cmd puts %x(#{cmd}) end - + def unpack_to(directory) FileUtils.mkdir_p directory Dir.chdir directory do Gem::GemRunner.new.run(unpack_command) end - + # copy the gem's specification into GEMDIR/.specification so that # we can access information about the gem on deployment systems # without having the gem installed @@ -103,7 +103,7 @@ private ################################################################### def specification @spec ||= Gem.source_index.search(Gem::Dependency.new(@name, @requirement)).sort_by { |s| s.version }.last end - + def gem_command RUBY_PLATFORM =~ /win32/ ? 'gem.bat' : 'gem' end @@ -114,11 +114,11 @@ private ################################################################### cmd << "--source" << @source if @source cmd end - + def unpack_command cmd = %w(unpack) << @name - cmd << "--version" << "#{@requirement.to_s}" if @requirement + cmd << "--version" << %("#{@requirement.to_s}") if @requirement cmd end end -end
\ No newline at end of file +end |