summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/commands')
-rw-r--r--lib/rubygems/commands/check_command.rb3
-rw-r--r--lib/rubygems/commands/unpack_command.rb2
-rw-r--r--lib/rubygems/commands/update_command.rb9
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/rubygems/commands/check_command.rb b/lib/rubygems/commands/check_command.rb
index ca5e14b12d..17c2c8f9c7 100644
--- a/lib/rubygems/commands/check_command.rb
+++ b/lib/rubygems/commands/check_command.rb
@@ -31,7 +31,8 @@ class Gem::Commands::CheckCommand < Gem::Command
def execute
if options[:test]
version = options[:version] || Gem::Requirement.default
- gem_spec = Gem::SourceIndex.from_installed_gems.search(get_one_gem_name, version).first
+ dep = Gem::Dependency.new get_one_gem_name, version
+ gem_spec = Gem::SourceIndex.from_installed_gems.search(dep).first
Gem::Validator.new.unit_test(gem_spec)
end
diff --git a/lib/rubygems/commands/unpack_command.rb b/lib/rubygems/commands/unpack_command.rb
index ef9436ae34..ab2494b0da 100644
--- a/lib/rubygems/commands/unpack_command.rb
+++ b/lib/rubygems/commands/unpack_command.rb
@@ -43,7 +43,7 @@ class Gem::Commands::UnpackCommand < Gem::Command
basename = File.basename(path).sub(/\.gem$/, '')
target_dir = File.expand_path File.join(options[:target], basename)
FileUtils.mkdir_p target_dir
- Gem::Installer.new(path).unpack target_dir
+ Gem::Installer.new(path, :unpack => true).unpack target_dir
say "Unpacked gem: '#{target_dir}'"
else
alert_error "Gem '#{gemname}' not installed."
diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb
index 4490f385dc..28d3a5d382 100644
--- a/lib/rubygems/commands/update_command.rb
+++ b/lib/rubygems/commands/update_command.rb
@@ -54,11 +54,10 @@ class Gem::Commands::UpdateCommand < Gem::Command
fail "No gem names are allowed with the --system option"
end
- spec = Gem::Specification.new
- spec.name = 'rubygems-update'
- spec.version = Gem::Version.new Gem::RubyGemsVersion
- spec.version = Gem::Version.new '1.1.1'
- hig['rubygems-update'] = spec
+ rubygems_update = Gem::Specification.new
+ rubygems_update.name = 'rubygems-update'
+ rubygems_update.version = Gem::Version.new Gem::RubyGemsVersion
+ hig['rubygems-update'] = rubygems_update
options[:user_install] = false
else