rubygems-update 2.2.0 → 2.2.1
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +2 -2
- data.tar.gz.sig +0 -0
- data/History.txt +26 -0
- data/lib/rubygems.rb +11 -8
- data/lib/rubygems/basic_specification.rb +18 -0
- data/lib/rubygems/commands/contents_command.rb +3 -3
- data/lib/rubygems/commands/install_command.rb +12 -8
- data/lib/rubygems/commands/setup_command.rb +8 -8
- data/lib/rubygems/compatibility.rb +3 -1
- data/lib/rubygems/defaults.rb +10 -10
- data/lib/rubygems/deprecate.rb +1 -1
- data/lib/rubygems/installer.rb +2 -2
- data/lib/rubygems/platform.rb +1 -1
- data/lib/rubygems/rdoc.rb +1 -1
- data/lib/rubygems/request_set/lockfile.rb +6 -1
- data/lib/rubygems/resolver.rb +0 -21
- data/lib/rubygems/resolver/installer_set.rb +2 -33
- data/lib/rubygems/specification.rb +1 -1
- data/lib/rubygems/test_case.rb +6 -6
- data/lib/rubygems/uninstaller.rb +1 -1
- data/test/rubygems/test_gem.rb +62 -40
- data/test/rubygems/test_gem_commands_contents_command.rb +3 -3
- data/test/rubygems/test_gem_commands_environment_command.rb +1 -1
- data/test/rubygems/test_gem_commands_install_command.rb +15 -0
- data/test/rubygems/test_gem_commands_update_command.rb +1 -1
- data/test/rubygems/test_gem_dependency_installer.rb +1 -1
- data/test/rubygems/test_gem_installer.rb +4 -4
- data/test/rubygems/test_gem_request_set_lockfile.rb +9 -1
- data/test/rubygems/test_gem_specification.rb +45 -5
- data/test/rubygems/test_gem_uninstaller.rb +17 -0
- metadata +26 -26
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e97ccc1877f6b954281b807df1da89661eaa83a3
|
4
|
+
data.tar.gz: 5acbcfd60eefc261fbfe228f9956253f7a249167
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5def3e84a3f43361d02f1d0d666cc045a375c32954210c1a4593101f1180608f2ab2e89852383a6ec187068d1b153b0fe556e490839e7c7e83104a4dd7a5477d
|
7
|
+
data.tar.gz: 8796158be7be1294af2913a6ee140836ef0589acbe04fadcb715fa9db2423297c6945632256c4664da949aa46abd5d33d0703bc02612cc5203e102dd34256982
|
checksums.yaml.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
9ґ���e�(
|
2
|
+
�[DXj��l���q��d1C}� ��+.�")�"n:PɊrA.2x
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,5 +1,31 @@
|
|
1
1
|
# coding: UTF-8
|
2
2
|
|
3
|
+
=== 2.2.1 / 2014-01-06
|
4
|
+
|
5
|
+
Bug fixes:
|
6
|
+
|
7
|
+
* Platforms in the Gemfile.lock GEM section are now handled correctly. Bug
|
8
|
+
#767 by Diego Viola.
|
9
|
+
* RubyGems now displays which gem couldn't be uninstalled from the home
|
10
|
+
directory. Pull request #757 by Michal Papis.
|
11
|
+
* Removed unused method Gem::Resolver#find_conflict_state. Pull request #759
|
12
|
+
by Smit Shah.
|
13
|
+
* Fixed installing gems from local files without dependencies. Issue #760 by
|
14
|
+
Arash Mousavi, pull request #764 by Tim Moore.
|
15
|
+
* Removed TODO about syntax that works in Ruby 1.8.7. Pull request #765 by
|
16
|
+
Benjamin Fleischer.
|
17
|
+
* Switched Gem.ruby_api_version to use RbConfig::CONFIG['ruby_version'] which
|
18
|
+
has the same value but is overridable by packagers through
|
19
|
+
--with-ruby-version= when configuring ruby. Bug #770 by Jeremy Evans.
|
20
|
+
* RubyGems now prefers the bundler API for `gem install` to reduce HTTP
|
21
|
+
requests. (This change was intended for RubyGems 2.2.0 but was missed.)
|
22
|
+
This should address bug #762 by Dan Peterson and bug #766 by mipearson.
|
23
|
+
* Added Gem::BasicSpecification#source_paths so documentation or analysis
|
24
|
+
tools can work properly as require_paths no longer returns extension source
|
25
|
+
directories. Bug #758 Vít Ondruch.
|
26
|
+
* Gem.read_binary can read read-only files again. This caused file://
|
27
|
+
repositories to stop working. Bug #761 by John Anderson.
|
28
|
+
|
3
29
|
=== 2.2.0 / 2013-12-26
|
4
30
|
|
5
31
|
Special thanks to Vít Ondruch and Michal Papis for testing and finding bugs in
|
data/lib/rubygems.rb
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
require 'rbconfig'
|
9
9
|
|
10
10
|
module Gem
|
11
|
-
VERSION = '2.2.
|
11
|
+
VERSION = '2.2.1'
|
12
12
|
end
|
13
13
|
|
14
14
|
# Must be first since it unloads the prelude from 1.9.2
|
@@ -572,7 +572,7 @@ module Gem
|
|
572
572
|
# gem's paths are inserted before site lib directory by default.
|
573
573
|
|
574
574
|
def self.load_path_insert_index
|
575
|
-
index = $LOAD_PATH.index
|
575
|
+
index = $LOAD_PATH.index RbConfig::CONFIG['sitelibdir']
|
576
576
|
|
577
577
|
index
|
578
578
|
end
|
@@ -743,8 +743,8 @@ module Gem
|
|
743
743
|
def self.prefix
|
744
744
|
prefix = File.dirname RUBYGEMS_DIR
|
745
745
|
|
746
|
-
if prefix != File.expand_path(
|
747
|
-
prefix != File.expand_path(
|
746
|
+
if prefix != File.expand_path(RbConfig::CONFIG['sitelibdir']) and
|
747
|
+
prefix != File.expand_path(RbConfig::CONFIG['libdir']) and
|
748
748
|
'lib' == File.basename(RUBYGEMS_DIR) then
|
749
749
|
prefix
|
750
750
|
end
|
@@ -765,6 +765,10 @@ module Gem
|
|
765
765
|
f.flock(File::LOCK_EX)
|
766
766
|
f.read
|
767
767
|
end
|
768
|
+
rescue Errno::EACCES
|
769
|
+
open path, 'rb' do |f|
|
770
|
+
f.read
|
771
|
+
end
|
768
772
|
end
|
769
773
|
|
770
774
|
##
|
@@ -772,8 +776,8 @@ module Gem
|
|
772
776
|
|
773
777
|
def self.ruby
|
774
778
|
if @ruby.nil? then
|
775
|
-
@ruby = File.join(
|
776
|
-
"#{
|
779
|
+
@ruby = File.join(RbConfig::CONFIG['bindir'],
|
780
|
+
"#{RbConfig::CONFIG['ruby_install_name']}#{RbConfig::CONFIG['EXEEXT']}")
|
777
781
|
|
778
782
|
@ruby = "\"#{@ruby}\"" if @ruby =~ /\s/
|
779
783
|
end
|
@@ -785,8 +789,7 @@ module Gem
|
|
785
789
|
# Returns a String containing the API compatibility version of Ruby
|
786
790
|
|
787
791
|
def self.ruby_api_version
|
788
|
-
@ruby_api_version ||=
|
789
|
-
"#{ConfigMap[:MAJOR]}.#{ConfigMap[:MINOR]}.#{ConfigMap[:TEENY]}"
|
792
|
+
@ruby_api_version ||= RbConfig::CONFIG['ruby_version'].dup
|
790
793
|
end
|
791
794
|
|
792
795
|
##
|
@@ -206,6 +206,24 @@ class Gem::BasicSpecification
|
|
206
206
|
[relative_extension_dir].concat @require_paths
|
207
207
|
end
|
208
208
|
|
209
|
+
##
|
210
|
+
# Returns the paths to the source files for use with analysis and
|
211
|
+
# documentation tools. These paths are relative to full_gem_path.
|
212
|
+
|
213
|
+
def source_paths
|
214
|
+
paths = raw_require_paths.dup
|
215
|
+
|
216
|
+
if @extensions then
|
217
|
+
ext_dirs = @extensions.map do |extension|
|
218
|
+
extension.split(File::SEPARATOR, 2).first
|
219
|
+
end.uniq
|
220
|
+
|
221
|
+
paths.concat ext_dirs
|
222
|
+
end
|
223
|
+
|
224
|
+
paths.uniq
|
225
|
+
end
|
226
|
+
|
209
227
|
##
|
210
228
|
# Return a Gem::Specification from this gem
|
211
229
|
|
@@ -94,11 +94,11 @@ prefix or only the files that are requireable.
|
|
94
94
|
spec.files.sort.map do |file|
|
95
95
|
case file
|
96
96
|
when /\A#{spec.bindir}\//
|
97
|
-
[
|
97
|
+
[RbConfig::CONFIG['bindir'], $POSTMATCH]
|
98
98
|
when /\.so\z/
|
99
|
-
[
|
99
|
+
[RbConfig::CONFIG['archdir'], file]
|
100
100
|
else
|
101
|
-
[
|
101
|
+
[RbConfig::CONFIG['rubylibdir'], file]
|
102
102
|
end
|
103
103
|
end
|
104
104
|
end
|
@@ -228,7 +228,18 @@ to write the specification by hand. For example:
|
|
228
228
|
def install_gem_without_dependencies name, req # :nodoc:
|
229
229
|
gem = nil
|
230
230
|
|
231
|
-
if
|
231
|
+
if local? then
|
232
|
+
if name =~ /\.gem$/ and File.file? name then
|
233
|
+
source = Gem::Source::SpecificFile.new name
|
234
|
+
spec = source.spec
|
235
|
+
else
|
236
|
+
source = Gem::Source::Local.new
|
237
|
+
spec = source.find_gem name, req
|
238
|
+
end
|
239
|
+
gem = source.download spec if spec
|
240
|
+
end
|
241
|
+
|
242
|
+
if remote? and not gem then
|
232
243
|
dependency = Gem::Dependency.new name, req
|
233
244
|
dependency.prerelease = options[:prerelease]
|
234
245
|
|
@@ -236,13 +247,6 @@ to write the specification by hand. For example:
|
|
236
247
|
gem = fetcher.download_to_cache dependency
|
237
248
|
end
|
238
249
|
|
239
|
-
if local? and not gem then
|
240
|
-
source = Gem::Source::Local.new
|
241
|
-
spec = source.find_gem name, req
|
242
|
-
|
243
|
-
gem = source.download spec
|
244
|
-
end
|
245
|
-
|
246
250
|
inst = Gem::Installer.new gem, options
|
247
251
|
inst.install
|
248
252
|
|
@@ -13,7 +13,7 @@ class Gem::Commands::SetupCommand < Gem::Command
|
|
13
13
|
|
14
14
|
super 'setup', 'Install RubyGems',
|
15
15
|
:format_executable => true, :document => %w[ri],
|
16
|
-
:site_or_vendor =>
|
16
|
+
:site_or_vendor => 'sitelibdir',
|
17
17
|
:destdir => '', :prefix => '', :previous_version => ''
|
18
18
|
|
19
19
|
add_option '--previous-version=VERSION',
|
@@ -36,7 +36,7 @@ class Gem::Commands::SetupCommand < Gem::Command
|
|
36
36
|
|
37
37
|
add_option '--[no-]vendor',
|
38
38
|
'Install into vendorlibdir not sitelibdir' do |vendor, options|
|
39
|
-
options[:site_or_vendor] = vendor ?
|
39
|
+
options[:site_or_vendor] = vendor ? 'vendorlibdir' : 'sitelibdir'
|
40
40
|
end
|
41
41
|
|
42
42
|
add_option '--[no-]format-executable',
|
@@ -343,19 +343,19 @@ TEXT
|
|
343
343
|
site_or_vendor = options[:site_or_vendor]
|
344
344
|
|
345
345
|
if prefix.empty? then
|
346
|
-
lib_dir =
|
347
|
-
bin_dir =
|
346
|
+
lib_dir = RbConfig::CONFIG[site_or_vendor]
|
347
|
+
bin_dir = RbConfig::CONFIG['bindir']
|
348
348
|
else
|
349
349
|
# Apple installed RubyGems into libdir, and RubyGems <= 1.1.0 gets
|
350
350
|
# confused about installation location, so switch back to
|
351
351
|
# sitelibdir/vendorlibdir.
|
352
352
|
if defined?(APPLE_GEM_HOME) and
|
353
353
|
# just in case Apple and RubyGems don't get this patched up proper.
|
354
|
-
(prefix ==
|
354
|
+
(prefix == RbConfig::CONFIG['libdir'] or
|
355
355
|
# this one is important
|
356
|
-
prefix == File.join(
|
357
|
-
lib_dir =
|
358
|
-
bin_dir =
|
356
|
+
prefix == File.join(RbConfig::CONFIG['libdir'], 'ruby')) then
|
357
|
+
lib_dir = RbConfig::CONFIG[site_or_vendor]
|
358
|
+
bin_dir = RbConfig::CONFIG['bindir']
|
359
359
|
else
|
360
360
|
lib_dir = File.join prefix, 'lib'
|
361
361
|
bin_dir = File.join prefix, 'bin'
|
@@ -33,6 +33,8 @@ end
|
|
33
33
|
module Gem
|
34
34
|
RubyGemsVersion = VERSION
|
35
35
|
|
36
|
+
# TODO remove at RubyGems 3
|
37
|
+
|
36
38
|
RbConfigPriorities = %w[
|
37
39
|
MAJOR
|
38
40
|
MINOR
|
@@ -45,7 +47,7 @@ module Gem
|
|
45
47
|
unless defined?(ConfigMap)
|
46
48
|
##
|
47
49
|
# Configuration settings from ::RbConfig
|
48
|
-
ConfigMap = Hash.new do |cm, key|
|
50
|
+
ConfigMap = Hash.new do |cm, key| # TODO remove at RubyGems 3
|
49
51
|
cm[key] = RbConfig::CONFIG[key.to_s]
|
50
52
|
end
|
51
53
|
else
|
data/lib/rubygems/defaults.rb
CHANGED
@@ -29,22 +29,22 @@ module Gem
|
|
29
29
|
def self.default_dir
|
30
30
|
path = if defined? RUBY_FRAMEWORK_VERSION then
|
31
31
|
[
|
32
|
-
File.dirname(
|
32
|
+
File.dirname(RbConfig::CONFIG['sitedir']),
|
33
33
|
'Gems',
|
34
|
-
|
34
|
+
RbConfig::CONFIG['ruby_version']
|
35
35
|
]
|
36
|
-
elsif
|
36
|
+
elsif RbConfig::CONFIG['rubylibprefix'] then
|
37
37
|
[
|
38
|
-
|
38
|
+
RbConfig::CONFIG['rubylibprefix'],
|
39
39
|
'gems',
|
40
|
-
|
40
|
+
RbConfig::CONFIG['ruby_version']
|
41
41
|
]
|
42
42
|
else
|
43
43
|
[
|
44
|
-
|
44
|
+
RbConfig::CONFIG['libdir'],
|
45
45
|
ruby_engine,
|
46
46
|
'gems',
|
47
|
-
|
47
|
+
RbConfig::CONFIG['ruby_version']
|
48
48
|
]
|
49
49
|
end
|
50
50
|
|
@@ -74,7 +74,7 @@ module Gem
|
|
74
74
|
|
75
75
|
def self.user_dir
|
76
76
|
parts = [Gem.user_home, '.gem', ruby_engine]
|
77
|
-
parts <<
|
77
|
+
parts << RbConfig::CONFIG['ruby_version'] unless RbConfig::CONFIG['ruby_version'].empty?
|
78
78
|
File.join parts
|
79
79
|
end
|
80
80
|
|
@@ -100,7 +100,7 @@ module Gem
|
|
100
100
|
# Deduce Ruby's --program-prefix and --program-suffix from its install name
|
101
101
|
|
102
102
|
def self.default_exec_format
|
103
|
-
exec_format =
|
103
|
+
exec_format = RbConfig::CONFIG['ruby_install_name'].sub('ruby', '%s') rescue '%s'
|
104
104
|
|
105
105
|
unless exec_format =~ /%s/ then
|
106
106
|
raise Gem::Exception,
|
@@ -117,7 +117,7 @@ module Gem
|
|
117
117
|
if defined? RUBY_FRAMEWORK_VERSION then # mac framework support
|
118
118
|
'/usr/bin'
|
119
119
|
else # generic install
|
120
|
-
|
120
|
+
RbConfig::CONFIG['bindir']
|
121
121
|
end
|
122
122
|
end
|
123
123
|
|
data/lib/rubygems/deprecate.rb
CHANGED
@@ -50,7 +50,7 @@ module Gem::Deprecate
|
|
50
50
|
class_eval {
|
51
51
|
old = "_deprecated_#{name}"
|
52
52
|
alias_method old, name
|
53
|
-
define_method name do |*args, &block|
|
53
|
+
define_method name do |*args, &block|
|
54
54
|
klass = self.kind_of? Module
|
55
55
|
target = klass ? "#{self}." : "#{self.class}#"
|
56
56
|
msg = [ "NOTE: #{target}#{name} is deprecated",
|
data/lib/rubygems/installer.rb
CHANGED
@@ -480,7 +480,7 @@ class Gem::Installer
|
|
480
480
|
#
|
481
481
|
|
482
482
|
def shebang(bin_file_name)
|
483
|
-
ruby_name =
|
483
|
+
ruby_name = RbConfig::CONFIG['ruby_install_name'] if @env_shebang
|
484
484
|
path = File.join gem_dir, spec.bindir, bin_file_name
|
485
485
|
first_line = File.open(path, "rb") {|file| file.gets}
|
486
486
|
|
@@ -493,7 +493,7 @@ class Gem::Installer
|
|
493
493
|
|
494
494
|
if which = Gem.configuration[:custom_shebang]
|
495
495
|
# replace bin_file_name with "ruby" to avoid endless loops
|
496
|
-
which = which.gsub(/ #{bin_file_name}$/," #{
|
496
|
+
which = which.gsub(/ #{bin_file_name}$/," #{RbConfig::CONFIG['ruby_install_name']}")
|
497
497
|
|
498
498
|
which = which.gsub(/\$(\w+)/) do
|
499
499
|
case $1
|
data/lib/rubygems/platform.rb
CHANGED
data/lib/rubygems/rdoc.rb
CHANGED
@@ -193,7 +193,7 @@ class Gem::RDoc # :nodoc: all
|
|
193
193
|
::RDoc::Parser::C.reset
|
194
194
|
|
195
195
|
args = @spec.rdoc_options
|
196
|
-
args.concat @spec.
|
196
|
+
args.concat @spec.source_paths
|
197
197
|
args.concat @spec.extra_rdoc_files
|
198
198
|
|
199
199
|
case config_args = Gem.configuration[:rdoc]
|
@@ -303,7 +303,12 @@ class Gem::RequestSet::Lockfile
|
|
303
303
|
type, data, = get [:text, :requirement]
|
304
304
|
|
305
305
|
if type == :text and column == 4 then
|
306
|
-
|
306
|
+
version, platform = data.split '-', 2
|
307
|
+
|
308
|
+
platform =
|
309
|
+
platform ? Gem::Platform.new(platform) : Gem::Platform::RUBY
|
310
|
+
|
311
|
+
last_spec = set.add name, version, platform
|
307
312
|
else
|
308
313
|
dependency = parse_dependency name, data
|
309
314
|
|
data/lib/rubygems/resolver.rb
CHANGED
@@ -178,27 +178,6 @@ class Gem::Resolver
|
|
178
178
|
res.to_a
|
179
179
|
end
|
180
180
|
|
181
|
-
##
|
182
|
-
# Finds the State in +states+ that matches the +conflict+ so that we can try
|
183
|
-
# other possible sets.
|
184
|
-
#
|
185
|
-
# If no good candidate is found, the first state is tried.
|
186
|
-
|
187
|
-
def find_conflict_state conflict, states # :nodoc:
|
188
|
-
until states.empty? do
|
189
|
-
state = states.pop
|
190
|
-
|
191
|
-
explain :consider, state.dep, conflict.failed_dep
|
192
|
-
|
193
|
-
if conflict.for_spec? state.spec
|
194
|
-
state.conflicts << [state.spec, conflict]
|
195
|
-
return state
|
196
|
-
end
|
197
|
-
end
|
198
|
-
|
199
|
-
nil
|
200
|
-
end
|
201
|
-
|
202
181
|
##
|
203
182
|
# Extracts the specifications that may be able to fulfill +dependency+ and
|
204
183
|
# returns those that match the local platform and all those that match.
|
@@ -28,11 +28,10 @@ class Gem::Resolver::InstallerSet < Gem::Resolver::Set
|
|
28
28
|
|
29
29
|
@f = Gem::SpecFetcher.fetcher
|
30
30
|
|
31
|
-
@all = Hash.new { |h,k| h[k] = [] }
|
32
31
|
@always_install = []
|
33
32
|
@ignore_dependencies = false
|
34
33
|
@ignore_installed = false
|
35
|
-
@
|
34
|
+
@remote_set = Gem::Resolver::BestSet.new if consider_remote?
|
36
35
|
@specs = {}
|
37
36
|
end
|
38
37
|
|
@@ -79,16 +78,7 @@ class Gem::Resolver::InstallerSet < Gem::Resolver::Set
|
|
79
78
|
end
|
80
79
|
end
|
81
80
|
|
82
|
-
if consider_remote?
|
83
|
-
load_remote_specs dep
|
84
|
-
|
85
|
-
@all[name].each do |remote_source, n|
|
86
|
-
if dep.match? n then
|
87
|
-
res << Gem::Resolver::IndexSpecification.new(
|
88
|
-
self, n.name, n.version, remote_source, n.platform)
|
89
|
-
end
|
90
|
-
end
|
91
|
-
end
|
81
|
+
res.concat @remote_set.find_all req if consider_remote?
|
92
82
|
|
93
83
|
res
|
94
84
|
end
|
@@ -101,27 +91,6 @@ class Gem::Resolver::InstallerSet < Gem::Resolver::Set
|
|
101
91
|
]
|
102
92
|
end
|
103
93
|
|
104
|
-
##
|
105
|
-
# Loads remote prerelease specs if +dep+ is a prerelease dependency
|
106
|
-
|
107
|
-
def load_remote_specs dep # :nodoc:
|
108
|
-
types = [:released]
|
109
|
-
types << :prerelease if dep.prerelease?
|
110
|
-
|
111
|
-
types.each do |type|
|
112
|
-
next if @loaded_remote_specs.include? type
|
113
|
-
@loaded_remote_specs << type
|
114
|
-
|
115
|
-
list, = @f.available_specs type
|
116
|
-
|
117
|
-
list.each do |uri, specs|
|
118
|
-
specs.each do |n|
|
119
|
-
@all[n.name] << [uri, n]
|
120
|
-
end
|
121
|
-
end
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
94
|
##
|
126
95
|
# Called from IndexSpecification to get a true Specification
|
127
96
|
# object.
|
@@ -327,7 +327,7 @@ class Gem::Specification < Gem::BasicSpecification
|
|
327
327
|
add_bindir(@executables),
|
328
328
|
@extra_rdoc_files,
|
329
329
|
@extensions,
|
330
|
-
].flatten.
|
330
|
+
].flatten.uniq.compact.sort
|
331
331
|
end
|
332
332
|
|
333
333
|
######################################################################
|
data/lib/rubygems/test_case.rb
CHANGED
@@ -294,10 +294,10 @@ class Gem::TestCase < MiniTest::Unit::TestCase
|
|
294
294
|
|
295
295
|
Gem.searcher = nil
|
296
296
|
Gem::SpecFetcher.fetcher = nil
|
297
|
-
@orig_BASERUBY =
|
298
|
-
|
297
|
+
@orig_BASERUBY = RbConfig::CONFIG['BASERUBY']
|
298
|
+
RbConfig::CONFIG['BASERUBY'] = RbConfig::CONFIG['ruby_install_name']
|
299
299
|
|
300
|
-
@orig_arch =
|
300
|
+
@orig_arch = RbConfig::CONFIG['arch']
|
301
301
|
|
302
302
|
if win_platform?
|
303
303
|
util_set_arch 'i386-mswin32'
|
@@ -315,8 +315,8 @@ class Gem::TestCase < MiniTest::Unit::TestCase
|
|
315
315
|
def teardown
|
316
316
|
$LOAD_PATH.replace @orig_LOAD_PATH if @orig_LOAD_PATH
|
317
317
|
|
318
|
-
|
319
|
-
|
318
|
+
RbConfig::CONFIG['BASERUBY'] = @orig_BASERUBY
|
319
|
+
RbConfig::CONFIG['arch'] = @orig_arch
|
320
320
|
|
321
321
|
if defined? Gem::RemoteFetcher then
|
322
322
|
Gem::RemoteFetcher.fetcher = nil
|
@@ -898,7 +898,7 @@ Also, a list:
|
|
898
898
|
# Set the platform to +arch+
|
899
899
|
|
900
900
|
def util_set_arch(arch)
|
901
|
-
|
901
|
+
RbConfig::CONFIG['arch'] = arch
|
902
902
|
platform = Gem::Platform.new arch
|
903
903
|
|
904
904
|
Gem.instance_variable_set :@platforms, nil
|
data/lib/rubygems/uninstaller.rb
CHANGED
@@ -237,7 +237,7 @@ class Gem::Uninstaller
|
|
237
237
|
unless path_ok?(@gem_home, spec) or
|
238
238
|
(@user_install and path_ok?(Gem.user_dir, spec)) then
|
239
239
|
e = Gem::GemNotInHomeException.new \
|
240
|
-
"Gem is not installed in directory #{@gem_home}"
|
240
|
+
"Gem '#{spec.full_name}' is not installed in directory #{@gem_home}"
|
241
241
|
e.spec = spec
|
242
242
|
|
243
243
|
raise e
|
data/test/rubygems/test_gem.rb
CHANGED
@@ -199,30 +199,30 @@ class TestGem < Gem::TestCase
|
|
199
199
|
end
|
200
200
|
|
201
201
|
def test_self_default_exec_format
|
202
|
-
orig_RUBY_INSTALL_NAME =
|
203
|
-
|
202
|
+
orig_RUBY_INSTALL_NAME = RbConfig::CONFIG['ruby_install_name']
|
203
|
+
RbConfig::CONFIG['ruby_install_name'] = 'ruby'
|
204
204
|
|
205
205
|
assert_equal '%s', Gem.default_exec_format
|
206
206
|
ensure
|
207
|
-
|
207
|
+
RbConfig::CONFIG['ruby_install_name'] = orig_RUBY_INSTALL_NAME
|
208
208
|
end
|
209
209
|
|
210
210
|
def test_self_default_exec_format_18
|
211
|
-
orig_RUBY_INSTALL_NAME =
|
212
|
-
|
211
|
+
orig_RUBY_INSTALL_NAME = RbConfig::CONFIG['ruby_install_name']
|
212
|
+
RbConfig::CONFIG['ruby_install_name'] = 'ruby18'
|
213
213
|
|
214
214
|
assert_equal '%s18', Gem.default_exec_format
|
215
215
|
ensure
|
216
|
-
|
216
|
+
RbConfig::CONFIG['ruby_install_name'] = orig_RUBY_INSTALL_NAME
|
217
217
|
end
|
218
218
|
|
219
219
|
def test_self_default_exec_format_jruby
|
220
|
-
orig_RUBY_INSTALL_NAME =
|
221
|
-
|
220
|
+
orig_RUBY_INSTALL_NAME = RbConfig::CONFIG['ruby_install_name']
|
221
|
+
RbConfig::CONFIG['ruby_install_name'] = 'jruby'
|
222
222
|
|
223
223
|
assert_equal 'j%s', Gem.default_exec_format
|
224
224
|
ensure
|
225
|
-
|
225
|
+
RbConfig::CONFIG['ruby_install_name'] = orig_RUBY_INSTALL_NAME
|
226
226
|
end
|
227
227
|
|
228
228
|
def test_self_default_sources
|
@@ -230,6 +230,7 @@ class TestGem < Gem::TestCase
|
|
230
230
|
end
|
231
231
|
|
232
232
|
def test_self_detect_gemdeps
|
233
|
+
skip 'Insecure operation - chdir' if RUBY_VERSION <= "1.8.7"
|
233
234
|
rubygems_gemdeps, ENV['RUBYGEMS_GEMDEPS'] = ENV['RUBYGEMS_GEMDEPS'], '-'
|
234
235
|
|
235
236
|
FileUtils.mkdir_p 'detect/a/b'
|
@@ -565,24 +566,43 @@ class TestGem < Gem::TestCase
|
|
565
566
|
end
|
566
567
|
|
567
568
|
def test_self_prefix_libdir
|
568
|
-
orig_libdir =
|
569
|
-
|
569
|
+
orig_libdir = RbConfig::CONFIG['libdir']
|
570
|
+
RbConfig::CONFIG['libdir'] = @@project_dir
|
570
571
|
|
571
572
|
assert_nil Gem.prefix
|
572
573
|
ensure
|
573
|
-
|
574
|
+
RbConfig::CONFIG['libdir'] = orig_libdir
|
574
575
|
end
|
575
576
|
|
576
577
|
def test_self_prefix_sitelibdir
|
577
|
-
orig_sitelibdir =
|
578
|
-
|
578
|
+
orig_sitelibdir = RbConfig::CONFIG['sitelibdir']
|
579
|
+
RbConfig::CONFIG['sitelibdir'] = @@project_dir
|
579
580
|
|
580
581
|
assert_nil Gem.prefix
|
581
582
|
ensure
|
582
|
-
|
583
|
+
RbConfig::CONFIG['sitelibdir'] = orig_sitelibdir
|
584
|
+
end
|
585
|
+
|
586
|
+
def test_self_read_binary
|
587
|
+
open 'test', 'w' do |io|
|
588
|
+
io.write "\xCF\x80"
|
589
|
+
end
|
590
|
+
|
591
|
+
assert_equal ["\xCF", "\x80"], Gem.read_binary('test').chars.to_a
|
592
|
+
|
593
|
+
skip 'chmod not supported' if Gem.win_platform?
|
594
|
+
|
595
|
+
begin
|
596
|
+
File.chmod 0444, 'test'
|
597
|
+
|
598
|
+
assert_equal ["\xCF", "\x80"], Gem.read_binary('test').chars.to_a
|
599
|
+
ensure
|
600
|
+
File.chmod 0644, 'test'
|
601
|
+
end
|
583
602
|
end
|
584
603
|
|
585
604
|
def test_self_refresh
|
605
|
+
skip 'Insecure operation - mkdir' if RUBY_VERSION <= "1.8.7"
|
586
606
|
util_make_gems
|
587
607
|
|
588
608
|
a1_spec = @a1.spec_file
|
@@ -602,6 +622,7 @@ class TestGem < Gem::TestCase
|
|
602
622
|
end
|
603
623
|
|
604
624
|
def test_self_refresh_keeps_loaded_specs_activated
|
625
|
+
skip 'Insecure operation - mkdir' if RUBY_VERSION <= "1.8.7"
|
605
626
|
util_make_gems
|
606
627
|
|
607
628
|
a1_spec = @a1.spec_file
|
@@ -624,46 +645,44 @@ class TestGem < Gem::TestCase
|
|
624
645
|
|
625
646
|
def test_self_ruby_escaping_spaces_in_path
|
626
647
|
orig_ruby = Gem.ruby
|
627
|
-
orig_bindir =
|
628
|
-
orig_ruby_install_name =
|
629
|
-
orig_exe_ext =
|
648
|
+
orig_bindir = RbConfig::CONFIG['bindir']
|
649
|
+
orig_ruby_install_name = RbConfig::CONFIG['ruby_install_name']
|
650
|
+
orig_exe_ext = RbConfig::CONFIG['EXEEXT']
|
630
651
|
|
631
|
-
|
632
|
-
|
633
|
-
|
652
|
+
RbConfig::CONFIG['bindir'] = "C:/Ruby 1.8/bin"
|
653
|
+
RbConfig::CONFIG['ruby_install_name'] = "ruby"
|
654
|
+
RbConfig::CONFIG['EXEEXT'] = ".exe"
|
634
655
|
Gem.instance_variable_set("@ruby", nil)
|
635
656
|
|
636
657
|
assert_equal "\"C:/Ruby 1.8/bin/ruby.exe\"", Gem.ruby
|
637
658
|
ensure
|
638
659
|
Gem.instance_variable_set("@ruby", orig_ruby)
|
639
|
-
|
640
|
-
|
641
|
-
|
660
|
+
RbConfig::CONFIG['bindir'] = orig_bindir
|
661
|
+
RbConfig::CONFIG['ruby_install_name'] = orig_ruby_install_name
|
662
|
+
RbConfig::CONFIG['EXEEXT'] = orig_exe_ext
|
642
663
|
end
|
643
664
|
|
644
665
|
def test_self_ruby_path_without_spaces
|
645
666
|
orig_ruby = Gem.ruby
|
646
|
-
orig_bindir =
|
647
|
-
orig_ruby_install_name =
|
648
|
-
orig_exe_ext =
|
667
|
+
orig_bindir = RbConfig::CONFIG['bindir']
|
668
|
+
orig_ruby_install_name = RbConfig::CONFIG['ruby_install_name']
|
669
|
+
orig_exe_ext = RbConfig::CONFIG['EXEEXT']
|
649
670
|
|
650
|
-
|
651
|
-
|
652
|
-
|
671
|
+
RbConfig::CONFIG['bindir'] = "C:/Ruby18/bin"
|
672
|
+
RbConfig::CONFIG['ruby_install_name'] = "ruby"
|
673
|
+
RbConfig::CONFIG['EXEEXT'] = ".exe"
|
653
674
|
Gem.instance_variable_set("@ruby", nil)
|
654
675
|
|
655
676
|
assert_equal "C:/Ruby18/bin/ruby.exe", Gem.ruby
|
656
677
|
ensure
|
657
678
|
Gem.instance_variable_set("@ruby", orig_ruby)
|
658
|
-
|
659
|
-
|
660
|
-
|
679
|
+
RbConfig::CONFIG['bindir'] = orig_bindir
|
680
|
+
RbConfig::CONFIG['ruby_install_name'] = orig_ruby_install_name
|
681
|
+
RbConfig::CONFIG['EXEEXT'] = orig_exe_ext
|
661
682
|
end
|
662
683
|
|
663
684
|
def test_self_ruby_api_version
|
664
|
-
|
665
|
-
orig_MINOR, Gem::ConfigMap[:MINOR] = Gem::ConfigMap[:MINOR], '2'
|
666
|
-
orig_TEENY, Gem::ConfigMap[:TEENY] = Gem::ConfigMap[:TEENY], '3'
|
685
|
+
orig_ruby_version, RbConfig::CONFIG['ruby_version'] = RbConfig::CONFIG['ruby_version'], '1.2.3'
|
667
686
|
|
668
687
|
Gem.instance_variable_set :@ruby_api_version, nil
|
669
688
|
|
@@ -671,9 +690,7 @@ class TestGem < Gem::TestCase
|
|
671
690
|
ensure
|
672
691
|
Gem.instance_variable_set :@ruby_api_version, nil
|
673
692
|
|
674
|
-
|
675
|
-
Gem::ConfigMap[:MINOR] = orig_MINOR
|
676
|
-
Gem::ConfigMap[:TEENY] = orig_TEENY
|
693
|
+
RbConfig::CONFIG['ruby_version'] = orig_ruby_version
|
677
694
|
end
|
678
695
|
|
679
696
|
def test_self_ruby_version_1_8_5
|
@@ -825,7 +842,7 @@ class TestGem < Gem::TestCase
|
|
825
842
|
|
826
843
|
def test_self_user_dir
|
827
844
|
parts = [@userhome, '.gem', Gem.ruby_engine]
|
828
|
-
parts <<
|
845
|
+
parts << RbConfig::CONFIG['ruby_version'] unless RbConfig::CONFIG['ruby_version'].empty?
|
829
846
|
|
830
847
|
assert_equal File.join(parts), Gem.user_dir
|
831
848
|
end
|
@@ -857,6 +874,7 @@ class TestGem < Gem::TestCase
|
|
857
874
|
end
|
858
875
|
|
859
876
|
def test_self_needs_picks_up_unresolved_deps
|
877
|
+
skip 'loading from unsafe file' if RUBY_VERSION <= "1.8.7"
|
860
878
|
save_loaded_features do
|
861
879
|
util_clear_gems
|
862
880
|
a = util_spec "a", "1"
|
@@ -949,6 +967,7 @@ class TestGem < Gem::TestCase
|
|
949
967
|
end
|
950
968
|
|
951
969
|
def test_load_plugins
|
970
|
+
skip 'Insecure operation - chdir' if RUBY_VERSION <= "1.8.7"
|
952
971
|
plugin_path = File.join "lib", "rubygems_plugin.rb"
|
953
972
|
|
954
973
|
Dir.chdir @tempdir do
|
@@ -1102,6 +1121,7 @@ class TestGem < Gem::TestCase
|
|
1102
1121
|
end
|
1103
1122
|
|
1104
1123
|
def test_auto_activation_of_detected_gemdeps_file
|
1124
|
+
skip 'Insecure operation - chdir' if RUBY_VERSION <= "1.8.7"
|
1105
1125
|
util_clear_gems
|
1106
1126
|
|
1107
1127
|
a = new_spec "a", "1", nil, "lib/a.rb"
|
@@ -1264,6 +1284,7 @@ class TestGem < Gem::TestCase
|
|
1264
1284
|
end
|
1265
1285
|
|
1266
1286
|
def test_use_gemdeps_automatic
|
1287
|
+
skip 'Insecure operation - chdir' if RUBY_VERSION <= "1.8.7"
|
1267
1288
|
rubygems_gemdeps, ENV['RUBYGEMS_GEMDEPS'] = ENV['RUBYGEMS_GEMDEPS'], '-'
|
1268
1289
|
|
1269
1290
|
spec = util_spec 'a', 1
|
@@ -1300,6 +1321,7 @@ class TestGem < Gem::TestCase
|
|
1300
1321
|
end
|
1301
1322
|
|
1302
1323
|
def test_use_gemdeps_specific
|
1324
|
+
skip 'Insecure operation - read' if RUBY_VERSION <= "1.8.7"
|
1303
1325
|
rubygems_gemdeps, ENV['RUBYGEMS_GEMDEPS'] = ENV['RUBYGEMS_GEMDEPS'], 'x'
|
1304
1326
|
|
1305
1327
|
spec = util_spec 'a', 1
|
@@ -169,9 +169,9 @@ lib/foo.rb
|
|
169
169
|
end
|
170
170
|
|
171
171
|
expected = [
|
172
|
-
File.join(
|
173
|
-
File.join(
|
174
|
-
File.join(
|
172
|
+
File.join(RbConfig::CONFIG['bindir'], 'default_command'),
|
173
|
+
File.join(RbConfig::CONFIG['rubylibdir'], 'default/gem.rb'),
|
174
|
+
File.join(RbConfig::CONFIG['archdir'], 'default_gem.so')
|
175
175
|
].sort.join "\n"
|
176
176
|
|
177
177
|
assert_equal expected, @ui.output.chomp
|
@@ -26,7 +26,7 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
|
|
26
26
|
assert_match %r|INSTALLATION DIRECTORY: #{Regexp.escape @gemhome}|,
|
27
27
|
@ui.output
|
28
28
|
assert_match %r|RUBYGEMS PREFIX: |, @ui.output
|
29
|
-
assert_match %r|RUBY EXECUTABLE:.*#{
|
29
|
+
assert_match %r|RUBY EXECUTABLE:.*#{RbConfig::CONFIG['ruby_install_name']}|,
|
30
30
|
@ui.output
|
31
31
|
assert_match %r|EXECUTABLE DIRECTORY:|, @ui.output
|
32
32
|
assert_match %r|RUBYGEMS PLATFORMS:|, @ui.output
|
@@ -316,6 +316,7 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
316
316
|
end
|
317
317
|
|
318
318
|
def test_execute_rdoc
|
319
|
+
skip if RUBY_VERSION <= "1.8.7"
|
319
320
|
specs = spec_fetcher do |fetcher|
|
320
321
|
fetcher.gem 'a', 2
|
321
322
|
end
|
@@ -559,6 +560,20 @@ ERROR: Possible alternatives: non_existent_with_hint
|
|
559
560
|
assert_equal %w[a-2], @cmd.installed_specs.map { |spec| spec.full_name }
|
560
561
|
end
|
561
562
|
|
563
|
+
def test_install_gem_ignore_dependencies_specific_file
|
564
|
+
spec = quick_spec 'a', 2
|
565
|
+
|
566
|
+
util_build_gem spec
|
567
|
+
|
568
|
+
FileUtils.mv spec.cache_file, @tempdir
|
569
|
+
|
570
|
+
@cmd.options[:ignore_dependencies] = true
|
571
|
+
|
572
|
+
@cmd.install_gem File.join(@tempdir, spec.file_name), nil
|
573
|
+
|
574
|
+
assert_equal %w[a-2], @cmd.installed_specs.map { |s| s.full_name }
|
575
|
+
end
|
576
|
+
|
562
577
|
def test_parses_requirement_from_gemname
|
563
578
|
spec_fetcher do |fetcher|
|
564
579
|
fetcher.gem 'a', 2
|
@@ -217,6 +217,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
|
|
217
217
|
end
|
218
218
|
|
219
219
|
def test_execute_rdoc
|
220
|
+
skip if RUBY_VERSION <= "1.8.7"
|
220
221
|
spec_fetcher do |fetcher|
|
221
222
|
fetcher.gem 'a', 2
|
222
223
|
|
@@ -239,7 +240,6 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
|
|
239
240
|
|
240
241
|
a2 = @specs['a-2']
|
241
242
|
|
242
|
-
assert_path_exists File.join(a2.doc_dir, 'ri')
|
243
243
|
assert_path_exists File.join(a2.doc_dir, 'rdoc')
|
244
244
|
end
|
245
245
|
|
@@ -551,7 +551,7 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|
551
551
|
|
552
552
|
env = "/\\S+/env" unless Gem.win_platform?
|
553
553
|
|
554
|
-
assert_match %r|\A#!#{env} #{
|
554
|
+
assert_match %r|\A#!#{env} #{RbConfig::CONFIG['ruby_install_name']}\n|,
|
555
555
|
File.read(File.join(@gemhome, 'bin', 'a_bin'))
|
556
556
|
end
|
557
557
|
|
@@ -84,8 +84,8 @@ load Gem.bin_path('a', 'executable', version)
|
|
84
84
|
orig_RUBY_FRAMEWORK_VERSION = RUBY_FRAMEWORK_VERSION
|
85
85
|
Object.send :remove_const, :RUBY_FRAMEWORK_VERSION
|
86
86
|
end
|
87
|
-
orig_bindir =
|
88
|
-
|
87
|
+
orig_bindir = RbConfig::CONFIG['bindir']
|
88
|
+
RbConfig::CONFIG['bindir'] = Gem.bindir
|
89
89
|
|
90
90
|
util_conflict_executable false
|
91
91
|
|
@@ -102,7 +102,7 @@ load Gem.bin_path('a', 'executable', version)
|
|
102
102
|
ensure
|
103
103
|
Object.const_set :RUBY_FRAMEWORK_VERSION, orig_RUBY_FRAMEWORK_VERSION if
|
104
104
|
orig_RUBY_FRAMEWORK_VERSION
|
105
|
-
|
105
|
+
RbConfig::CONFIG['bindir'] = orig_bindir
|
106
106
|
end
|
107
107
|
|
108
108
|
def test_check_executable_overwrite_format_executable
|
@@ -1192,7 +1192,7 @@ gem 'other', version
|
|
1192
1192
|
|
1193
1193
|
env_shebang = "/usr/bin/env" unless Gem.win_platform?
|
1194
1194
|
|
1195
|
-
assert_equal("#!#{env_shebang} #{
|
1195
|
+
assert_equal("#!#{env_shebang} #{RbConfig::CONFIG['ruby_install_name']}",
|
1196
1196
|
shebang)
|
1197
1197
|
end
|
1198
1198
|
|
@@ -218,6 +218,7 @@ GEM
|
|
218
218
|
c (~> 4)
|
219
219
|
d
|
220
220
|
e (~> 5.0, >= 5.0.1)
|
221
|
+
b (3-x86_64-linux)
|
221
222
|
|
222
223
|
PLATFORMS
|
223
224
|
#{Gem::Platform::RUBY}
|
@@ -238,7 +239,14 @@ DEPENDENCIES
|
|
238
239
|
|
239
240
|
assert lockfile_set, 'could not find a LockSet'
|
240
241
|
|
241
|
-
assert_equal %w[a-2], lockfile_set.specs.map { |tuple| tuple.full_name }
|
242
|
+
assert_equal %w[a-2 b-3], lockfile_set.specs.map { |tuple| tuple.full_name }
|
243
|
+
|
244
|
+
expected = [
|
245
|
+
Gem::Platform::RUBY,
|
246
|
+
Gem::Platform.new('x86_64-linux'),
|
247
|
+
]
|
248
|
+
|
249
|
+
assert_equal expected, lockfile_set.specs.map { |tuple| tuple.platform }
|
242
250
|
|
243
251
|
spec = lockfile_set.specs.first
|
244
252
|
|
@@ -999,8 +999,8 @@ dependencies: []
|
|
999
999
|
assert_equal 'summary', spec.summary
|
1000
1000
|
assert_same spec.summary, new_spec.summary
|
1001
1001
|
|
1002
|
-
assert_equal %w[
|
1003
|
-
|
1002
|
+
assert_equal %w[README.txt bin/exec ext/extconf.rb lib/file.rb
|
1003
|
+
test/file.rb].sort,
|
1004
1004
|
spec.files
|
1005
1005
|
refute_same spec.files, new_spec.files, 'files'
|
1006
1006
|
|
@@ -1109,7 +1109,31 @@ dependencies: []
|
|
1109
1109
|
@a2.executable = 'app'
|
1110
1110
|
|
1111
1111
|
assert_equal nil, @a2.bindir
|
1112
|
-
assert_equal %w[lib/code.rb
|
1112
|
+
assert_equal %w[app lib/code.rb].sort, @a2.files
|
1113
|
+
end
|
1114
|
+
|
1115
|
+
def test_extensions_equals_nil
|
1116
|
+
@a2.instance_variable_set(:@extensions, nil)
|
1117
|
+
assert_equal nil, @a2.instance_variable_get(:@extensions)
|
1118
|
+
assert_equal %w[lib/code.rb], @a2.files
|
1119
|
+
end
|
1120
|
+
|
1121
|
+
def test_test_files_equals_nil
|
1122
|
+
@a2.instance_variable_set(:@test_files, nil)
|
1123
|
+
assert_equal nil, @a2.instance_variable_get(:@test_files)
|
1124
|
+
assert_equal %w[lib/code.rb], @a2.files
|
1125
|
+
end
|
1126
|
+
|
1127
|
+
def test_executables_equals_nil
|
1128
|
+
@a2.instance_variable_set(:@executables, nil)
|
1129
|
+
assert_equal nil, @a2.instance_variable_get(:@executables)
|
1130
|
+
assert_equal %w[lib/code.rb], @a2.files
|
1131
|
+
end
|
1132
|
+
|
1133
|
+
def test_extra_rdoc_files_equals_nil
|
1134
|
+
@a2.instance_variable_set(:@extra_rdoc_files, nil)
|
1135
|
+
assert_equal nil, @a2.instance_variable_get(:@extra_rdoc_files)
|
1136
|
+
assert_equal %w[lib/code.rb], @a2.files
|
1113
1137
|
end
|
1114
1138
|
|
1115
1139
|
def test_build_extensions
|
@@ -1437,7 +1461,7 @@ dependencies: []
|
|
1437
1461
|
def test_executable_equals
|
1438
1462
|
@a2.executable = 'app'
|
1439
1463
|
assert_equal 'app', @a2.executable
|
1440
|
-
assert_equal %w[lib/code.rb
|
1464
|
+
assert_equal %w[bin/app lib/code.rb].sort, @a2.files
|
1441
1465
|
end
|
1442
1466
|
|
1443
1467
|
def test_extensions
|
@@ -1785,6 +1809,22 @@ dependencies: []
|
|
1785
1809
|
assert_kind_of Gem::Source::Installed, @a1.source
|
1786
1810
|
end
|
1787
1811
|
|
1812
|
+
def test_source_paths
|
1813
|
+
ext_spec
|
1814
|
+
|
1815
|
+
@ext.require_paths = %w[lib ext foo]
|
1816
|
+
@ext.extensions << 'bar/baz'
|
1817
|
+
|
1818
|
+
expected = %w[
|
1819
|
+
lib
|
1820
|
+
ext
|
1821
|
+
foo
|
1822
|
+
bar
|
1823
|
+
]
|
1824
|
+
|
1825
|
+
assert_equal expected, @ext.source_paths
|
1826
|
+
end
|
1827
|
+
|
1788
1828
|
def test_full_require_paths
|
1789
1829
|
ext_spec
|
1790
1830
|
|
@@ -2435,7 +2475,7 @@ duplicate dependency on b (>= 1.2.3), (~> 1.2) use:
|
|
2435
2475
|
assert_equal '["lib2"] are not files', e.message
|
2436
2476
|
end
|
2437
2477
|
|
2438
|
-
assert_equal %w[
|
2478
|
+
assert_equal %w[bin/exec ext/a/extconf.rb lib/code.rb lib2 test/suite.rb].sort,
|
2439
2479
|
@a1.files
|
2440
2480
|
end
|
2441
2481
|
|
@@ -131,6 +131,23 @@ class TestGemUninstaller < Gem::InstallerTestCase
|
|
131
131
|
Gem::Installer.exec_format = nil
|
132
132
|
end
|
133
133
|
|
134
|
+
def test_remove_not_in_home
|
135
|
+
uninstaller = Gem::Uninstaller.new nil, :install_dir => "#{@gemhome}2"
|
136
|
+
|
137
|
+
e = assert_raises Gem::GemNotInHomeException do
|
138
|
+
use_ui ui do
|
139
|
+
uninstaller.remove @spec
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
expected =
|
144
|
+
"Gem '#{@spec.full_name}' is not installed in directory #{@gemhome}2"
|
145
|
+
|
146
|
+
assert_equal expected, e.message
|
147
|
+
|
148
|
+
assert_path_exists @spec.gem_dir
|
149
|
+
end
|
150
|
+
|
134
151
|
def test_path_ok_eh
|
135
152
|
uninstaller = Gem::Uninstaller.new nil
|
136
153
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygems-update
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -32,104 +32,104 @@ cert_chain:
|
|
32
32
|
KDyY1VIazVgoC8XvR4h/95/iScPiuglzA+DBG1hip1xScAtw05BrXyUNrc9CEMYU
|
33
33
|
wgF94UVoHRp6ywo8I7NP3HcwFQDFNEZPNGXsng==
|
34
34
|
-----END CERTIFICATE-----
|
35
|
-
date:
|
35
|
+
date: 2014-01-07 00:00:00.000000000 Z
|
36
36
|
dependencies:
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: minitest
|
39
39
|
requirement: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- - ~>
|
41
|
+
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '5.
|
43
|
+
version: '5.2'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
46
|
version_requirements: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
|
-
- - ~>
|
48
|
+
- - "~>"
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: '5.
|
50
|
+
version: '5.2'
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
52
|
name: rdoc
|
53
53
|
requirement: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
|
-
- - ~>
|
55
|
+
- - "~>"
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: '4.0'
|
58
58
|
type: :development
|
59
59
|
prerelease: false
|
60
60
|
version_requirements: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
|
-
- - ~>
|
62
|
+
- - "~>"
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: '4.0'
|
65
65
|
- !ruby/object:Gem::Dependency
|
66
66
|
name: builder
|
67
67
|
requirement: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
|
-
- - ~>
|
69
|
+
- - "~>"
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '2.1'
|
72
72
|
type: :development
|
73
73
|
prerelease: false
|
74
74
|
version_requirements: !ruby/object:Gem::Requirement
|
75
75
|
requirements:
|
76
|
-
- - ~>
|
76
|
+
- - "~>"
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '2.1'
|
79
79
|
- !ruby/object:Gem::Dependency
|
80
80
|
name: hoe-seattlerb
|
81
81
|
requirement: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
|
-
- - ~>
|
83
|
+
- - "~>"
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '1.2'
|
86
86
|
type: :development
|
87
87
|
prerelease: false
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
89
|
requirements:
|
90
|
-
- - ~>
|
90
|
+
- - "~>"
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '1.2'
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: ZenTest
|
95
95
|
requirement: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
|
-
- - ~>
|
97
|
+
- - "~>"
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '4.5'
|
100
100
|
type: :development
|
101
101
|
prerelease: false
|
102
102
|
version_requirements: !ruby/object:Gem::Requirement
|
103
103
|
requirements:
|
104
|
-
- - ~>
|
104
|
+
- - "~>"
|
105
105
|
- !ruby/object:Gem::Version
|
106
106
|
version: '4.5'
|
107
107
|
- !ruby/object:Gem::Dependency
|
108
108
|
name: rake
|
109
109
|
requirement: !ruby/object:Gem::Requirement
|
110
110
|
requirements:
|
111
|
-
- - ~>
|
111
|
+
- - "~>"
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: 0.9.3
|
114
114
|
type: :development
|
115
115
|
prerelease: false
|
116
116
|
version_requirements: !ruby/object:Gem::Requirement
|
117
117
|
requirements:
|
118
|
-
- - ~>
|
118
|
+
- - "~>"
|
119
119
|
- !ruby/object:Gem::Version
|
120
120
|
version: 0.9.3
|
121
121
|
- !ruby/object:Gem::Dependency
|
122
122
|
name: hoe
|
123
123
|
requirement: !ruby/object:Gem::Requirement
|
124
124
|
requirements:
|
125
|
-
- - ~>
|
125
|
+
- - "~>"
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: '3.7'
|
128
128
|
type: :development
|
129
129
|
prerelease: false
|
130
130
|
version_requirements: !ruby/object:Gem::Requirement
|
131
131
|
requirements:
|
132
|
-
- - ~>
|
132
|
+
- - "~>"
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: '3.7'
|
135
135
|
description: |-
|
@@ -173,8 +173,9 @@ extra_rdoc_files:
|
|
173
173
|
- UPGRADING.rdoc
|
174
174
|
- hide_lib_for_update/note.txt
|
175
175
|
files:
|
176
|
-
- .autotest
|
177
|
-
- .document
|
176
|
+
- ".autotest"
|
177
|
+
- ".document"
|
178
|
+
- ".gemtest"
|
178
179
|
- CVE-2013-4287.txt
|
179
180
|
- CVE-2013-4363.txt
|
180
181
|
- History.txt
|
@@ -512,7 +513,6 @@ files:
|
|
512
513
|
- util/create_certs.rb
|
513
514
|
- util/create_encrypted_key.rb
|
514
515
|
- util/update_bundled_ca_certificates.rb
|
515
|
-
- .gemtest
|
516
516
|
homepage: http://rubygems.org
|
517
517
|
licenses:
|
518
518
|
- Ruby
|
@@ -520,24 +520,24 @@ licenses:
|
|
520
520
|
metadata: {}
|
521
521
|
post_install_message:
|
522
522
|
rdoc_options:
|
523
|
-
- --main
|
523
|
+
- "--main"
|
524
524
|
- README.rdoc
|
525
|
-
- --title=RubyGems Update Documentation
|
525
|
+
- "--title=RubyGems Update Documentation"
|
526
526
|
require_paths:
|
527
527
|
- hide_lib_for_update
|
528
528
|
required_ruby_version: !ruby/object:Gem::Requirement
|
529
529
|
requirements:
|
530
|
-
- -
|
530
|
+
- - ">="
|
531
531
|
- !ruby/object:Gem::Version
|
532
532
|
version: 1.8.7
|
533
533
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
534
534
|
requirements:
|
535
|
-
- -
|
535
|
+
- - ">="
|
536
536
|
- !ruby/object:Gem::Version
|
537
537
|
version: '0'
|
538
538
|
requirements: []
|
539
539
|
rubyforge_project: rubygems-update
|
540
|
-
rubygems_version: 2.
|
540
|
+
rubygems_version: 2.2.0
|
541
541
|
signing_key:
|
542
542
|
specification_version: 4
|
543
543
|
summary: RubyGems is a package management framework for Ruby
|
metadata.gz.sig
CHANGED
Binary file
|