rubygems-update 1.8.8 → 1.8.9
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rubygems-update might be problematic. Click here for more details.
- data.tar.gz.sig +0 -0
- data/History.txt +7 -0
- data/lib/rubygems.rb +4 -2
- data/lib/rubygems/commands/uninstall_command.rb +4 -0
- data/test/rubygems/test_gem_commands_uninstall_command.rb +29 -0
- metadata +9 -9
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
data/lib/rubygems.rb
CHANGED
@@ -118,7 +118,7 @@ require "rubygems/deprecate"
|
|
118
118
|
# -The RubyGems Team
|
119
119
|
|
120
120
|
module Gem
|
121
|
-
VERSION = '1.8.
|
121
|
+
VERSION = '1.8.9'
|
122
122
|
|
123
123
|
##
|
124
124
|
# Raised when RubyGems is unable to load or activate a gem. Contains the
|
@@ -1027,7 +1027,9 @@ module Gem
|
|
1027
1027
|
# Use the +home+ and +paths+ values for Gem.dir and Gem.path. Used mainly
|
1028
1028
|
# by the unit tests to provide environment isolation.
|
1029
1029
|
|
1030
|
-
def self.use_paths(home, paths
|
1030
|
+
def self.use_paths(home, *paths)
|
1031
|
+
paths = nil if paths == [nil]
|
1032
|
+
paths = paths.first if Array === Array(paths).first
|
1031
1033
|
self.paths = { "GEM_HOME" => home, "GEM_PATH" => paths }
|
1032
1034
|
# TODO: self.paths = home, paths
|
1033
1035
|
end
|
@@ -73,6 +73,8 @@ class Gem::Commands::UninstallCommand < Gem::Command
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def execute
|
76
|
+
original_path = Gem.path
|
77
|
+
|
76
78
|
get_all_gem_names.each do |gem_name|
|
77
79
|
begin
|
78
80
|
Gem::Uninstaller.new(gem_name, options).uninstall
|
@@ -80,6 +82,8 @@ class Gem::Commands::UninstallCommand < Gem::Command
|
|
80
82
|
spec = e.spec
|
81
83
|
alert("In order to remove #{spec.name}, please execute:\n" \
|
82
84
|
"\tgem uninstall #{spec.name} --install-dir=#{spec.installation_path}")
|
85
|
+
ensure
|
86
|
+
Gem.use_paths(*original_path)
|
83
87
|
end
|
84
88
|
end
|
85
89
|
end
|
@@ -17,6 +17,34 @@ class TestGemCommandsUninstallCommand < Gem::InstallerTestCase
|
|
17
17
|
@executable = File.join(@gemhome, 'bin', 'executable')
|
18
18
|
end
|
19
19
|
|
20
|
+
def test_execute_mulitple
|
21
|
+
@other = quick_gem 'c'
|
22
|
+
util_make_exec @other
|
23
|
+
util_build_gem @other
|
24
|
+
|
25
|
+
@other_installer = util_installer @other, @gemhome
|
26
|
+
|
27
|
+
ui = Gem::MockGemUi.new
|
28
|
+
util_setup_gem ui
|
29
|
+
|
30
|
+
build_rake_in do
|
31
|
+
use_ui ui do
|
32
|
+
@other_installer.install
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
@cmd.options[:args] = [@spec.name, @other.name]
|
37
|
+
|
38
|
+
use_ui @ui do
|
39
|
+
@cmd.execute
|
40
|
+
end
|
41
|
+
|
42
|
+
output = @ui.output.split "\n"
|
43
|
+
|
44
|
+
assert_includes output, "Successfully uninstalled #{@spec.full_name}"
|
45
|
+
assert_includes output, "Successfully uninstalled #{@other.full_name}"
|
46
|
+
end
|
47
|
+
|
20
48
|
def test_execute_removes_executable
|
21
49
|
ui = Gem::MockGemUi.new
|
22
50
|
util_setup_gem ui
|
@@ -91,5 +119,6 @@ class TestGemCommandsUninstallCommand < Gem::InstallerTestCase
|
|
91
119
|
output = @ui.output
|
92
120
|
assert_match(/Successfully uninstalled/, output)
|
93
121
|
end
|
122
|
+
|
94
123
|
end
|
95
124
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygems-update
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 37
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 1.8.
|
9
|
+
- 9
|
10
|
+
version: 1.8.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jim Weirich
|
@@ -38,7 +38,7 @@ cert_chain:
|
|
38
38
|
x52qPcexcYZR7w==
|
39
39
|
-----END CERTIFICATE-----
|
40
40
|
|
41
|
-
date: 2011-08-
|
41
|
+
date: 2011-08-23 00:00:00 Z
|
42
42
|
dependencies:
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: minitest
|
@@ -155,11 +155,11 @@ dependencies:
|
|
155
155
|
requirements:
|
156
156
|
- - ~>
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
hash:
|
158
|
+
hash: 27
|
159
159
|
segments:
|
160
160
|
- 2
|
161
|
-
-
|
162
|
-
version: "2.
|
161
|
+
- 12
|
162
|
+
version: "2.12"
|
163
163
|
type: :development
|
164
164
|
version_requirements: *id008
|
165
165
|
description: |-
|
@@ -404,7 +404,7 @@ post_install_message:
|
|
404
404
|
rdoc_options:
|
405
405
|
- --main
|
406
406
|
- README.rdoc
|
407
|
-
- --title=RubyGems 1.8.
|
407
|
+
- --title=RubyGems 1.8.9 Documentation
|
408
408
|
require_paths:
|
409
409
|
- hide_lib_for_update
|
410
410
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -430,7 +430,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
430
430
|
requirements: []
|
431
431
|
|
432
432
|
rubyforge_project: rubygems
|
433
|
-
rubygems_version: 1.8.
|
433
|
+
rubygems_version: 1.8.8
|
434
434
|
signing_key:
|
435
435
|
specification_version: 3
|
436
436
|
summary: RubyGems is a package management framework for Ruby
|
metadata.gz.sig
CHANGED
Binary file
|