rubygems-update 1.8.16 → 1.8.17
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/History.txt +15 -0
- data/lib/rubygems.rb +6 -4
- data/lib/rubygems/commands/pristine_command.rb +5 -1
- data/lib/rubygems/commands/setup_command.rb +13 -6
- data/lib/rubygems/custom_require.rb +2 -1
- data/lib/rubygems/defaults.rb +7 -0
- data/lib/rubygems/installer.rb +1 -1
- data/lib/rubygems/platform.rb +1 -0
- data/test/rubygems/test_gem_platform.rb +7 -0
- metadata +6 -6
data/History.txt
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
# coding: UTF-8
|
2
2
|
|
3
|
+
=== 1.8.17 / 2012-02-17
|
4
|
+
|
5
|
+
* 2 minor enhancements:
|
6
|
+
|
7
|
+
* Add MacRuby to the list of special cases for platforms (ferrous26)
|
8
|
+
* Add a default for where to install rubygems itself
|
9
|
+
|
10
|
+
* 3 bug fixes:
|
11
|
+
|
12
|
+
* Fixed gem loading issue caused by dependencies not resolving.
|
13
|
+
* Fixed umask error when stdlib is required and unresolved dependencies exist.
|
14
|
+
* Shebang munging would only take one arg after the cmd
|
15
|
+
* Define SUCKAGE better, ie only MRI 1.9.2
|
16
|
+
* Propagate env-shebang to the pristine command if set for install.
|
17
|
+
|
3
18
|
=== 1.8.16 / 2012-02-12
|
4
19
|
|
5
20
|
* 3 bug fixes:
|
data/lib/rubygems.rb
CHANGED
@@ -7,7 +7,9 @@
|
|
7
7
|
|
8
8
|
module Gem
|
9
9
|
QUICKLOADER_SUCKAGE = RUBY_VERSION =~ /^1\.9\.1/
|
10
|
-
|
10
|
+
|
11
|
+
# Only MRI 1.9.2 has the custom prelude.
|
12
|
+
GEM_PRELUDE_SUCKAGE = RUBY_VERSION =~ /^1\.9\.2/ and RUBY_ENGINE == "ruby"
|
11
13
|
end
|
12
14
|
|
13
15
|
if Gem::GEM_PRELUDE_SUCKAGE and defined?(Gem::QuickLoader) then
|
@@ -118,7 +120,7 @@ require "rubygems/deprecate"
|
|
118
120
|
# -The RubyGems Team
|
119
121
|
|
120
122
|
module Gem
|
121
|
-
VERSION = '1.8.
|
123
|
+
VERSION = '1.8.17'
|
122
124
|
|
123
125
|
##
|
124
126
|
# Raised when RubyGems is unable to load or activate a gem. Contains the
|
@@ -442,11 +444,11 @@ module Gem
|
|
442
444
|
# problem, then we will silently continue.
|
443
445
|
|
444
446
|
def self.ensure_gem_subdirectories dir = Gem.dir
|
445
|
-
require 'fileutils'
|
446
|
-
|
447
447
|
old_umask = File.umask
|
448
448
|
File.umask old_umask | 002
|
449
449
|
|
450
|
+
require 'fileutils'
|
451
|
+
|
450
452
|
%w[cache doc gems specifications].each do |name|
|
451
453
|
subdir = File.join dir, name
|
452
454
|
next if File.exist? subdir
|
@@ -94,10 +94,14 @@ extensions.
|
|
94
94
|
end
|
95
95
|
|
96
96
|
# TODO use installer options
|
97
|
+
install_defaults = Gem::ConfigFile::PLATFORM_DEFAULTS['install']
|
98
|
+
installer_env_shebang = install_defaults.to_s['--env-shebang']
|
99
|
+
|
97
100
|
installer = Gem::Installer.new(gem,
|
98
101
|
:wrappers => true,
|
99
102
|
:force => true,
|
100
|
-
:install_dir => spec.base_dir
|
103
|
+
:install_dir => spec.base_dir,
|
104
|
+
:env_shebang => installer_env_shebang)
|
101
105
|
installer.install
|
102
106
|
|
103
107
|
say "Restored #{spec.full_name}"
|
@@ -252,9 +252,19 @@ TEXT
|
|
252
252
|
end
|
253
253
|
|
254
254
|
def make_destination_dirs(install_destdir)
|
255
|
-
lib_dir =
|
256
|
-
bin_dir = nil
|
255
|
+
lib_dir, bin_dir = Gem.default_rubygems_dirs
|
257
256
|
|
257
|
+
unless lib_dir
|
258
|
+
lib_dir, bin_dir = generate_default_dirs(install_destdir)
|
259
|
+
end
|
260
|
+
|
261
|
+
mkdir_p lib_dir
|
262
|
+
mkdir_p bin_dir
|
263
|
+
|
264
|
+
return lib_dir, bin_dir
|
265
|
+
end
|
266
|
+
|
267
|
+
def generate_default_dirs(install_destdir)
|
258
268
|
prefix = options[:prefix]
|
259
269
|
site_or_vendor = options[:site_or_vendor]
|
260
270
|
|
@@ -283,10 +293,7 @@ TEXT
|
|
283
293
|
bin_dir = File.join install_destdir, bin_dir.gsub(/^[a-zA-Z]:/, '')
|
284
294
|
end
|
285
295
|
|
286
|
-
|
287
|
-
mkdir_p bin_dir
|
288
|
-
|
289
|
-
return lib_dir, bin_dir
|
296
|
+
[lib_dir, bin_dir]
|
290
297
|
end
|
291
298
|
|
292
299
|
def remove_old_bin_files(bin_dir)
|
@@ -55,7 +55,8 @@ module Kernel
|
|
55
55
|
return gem_original_require path
|
56
56
|
end
|
57
57
|
rescue LoadError => load_error
|
58
|
-
if load_error.message.
|
58
|
+
if load_error.message.start_with?("Could not find") or
|
59
|
+
(load_error.message.end_with?(path) and Gem.try_activate(path)) then
|
59
60
|
return gem_original_require(path)
|
60
61
|
end
|
61
62
|
|
data/lib/rubygems/defaults.rb
CHANGED
@@ -43,6 +43,13 @@ module Gem
|
|
43
43
|
@default_dir ||= File.join(*path)
|
44
44
|
end
|
45
45
|
|
46
|
+
##
|
47
|
+
# Paths where RubyGems' .rb files and bin files are installed
|
48
|
+
|
49
|
+
def self.default_rubygems_dirs
|
50
|
+
nil # default to standard layout
|
51
|
+
end
|
52
|
+
|
46
53
|
##
|
47
54
|
# Path for gems in the user's home directory
|
48
55
|
|
data/lib/rubygems/installer.rb
CHANGED
@@ -366,7 +366,7 @@ class Gem::Installer
|
|
366
366
|
|
367
367
|
if /\A#!/ =~ first_line then
|
368
368
|
# Preserve extra words on shebang line, like "-w". Thanks RPA.
|
369
|
-
shebang = first_line.sub(/\A\#!.*?ruby\S*(
|
369
|
+
shebang = first_line.sub(/\A\#!.*?ruby\S*((\s+\S+)+)/, "#!#{Gem.ruby}")
|
370
370
|
opts = $1
|
371
371
|
shebang.strip! # Avoid nasty ^M issues.
|
372
372
|
end
|
data/lib/rubygems/platform.rb
CHANGED
@@ -68,6 +68,7 @@ class Gem::Platform
|
|
68
68
|
when /aix(\d+)/ then [ 'aix', $1 ]
|
69
69
|
when /cygwin/ then [ 'cygwin', nil ]
|
70
70
|
when /darwin(\d+)?/ then [ 'darwin', $1 ]
|
71
|
+
when /^macruby$/ then [ 'macruby', nil ]
|
71
72
|
when /freebsd(\d+)/ then [ 'freebsd', $1 ]
|
72
73
|
when /hpux(\d+)/ then [ 'hpux', $1 ]
|
73
74
|
when /^java$/, /^jruby$/ then [ 'java', nil ]
|
@@ -43,6 +43,7 @@ class TestGemPlatform < Gem::TestCase
|
|
43
43
|
'sparc-solaris2.9' => ['sparc', 'solaris', '2.9'],
|
44
44
|
'universal-darwin8' => ['universal', 'darwin', '8'],
|
45
45
|
'universal-darwin9' => ['universal', 'darwin', '9'],
|
46
|
+
'universal-macruby' => ['universal', 'macruby', nil],
|
46
47
|
'i386-cygwin' => ['x86', 'cygwin', nil],
|
47
48
|
'i686-darwin' => ['x86', 'darwin', nil],
|
48
49
|
'i686-darwin8.4.1' => ['x86', 'darwin', '8'],
|
@@ -246,6 +247,12 @@ class TestGemPlatform < Gem::TestCase
|
|
246
247
|
refute_match 'dotnet-2.0', Gem::Platform.local
|
247
248
|
assert_match 'dotnet-4.0', Gem::Platform.local
|
248
249
|
|
250
|
+
util_set_arch 'universal-macruby-1.0'
|
251
|
+
assert_match 'universal-macruby', Gem::Platform.local
|
252
|
+
assert_match 'macruby', Gem::Platform.local
|
253
|
+
refute_match 'universal-macruby-0.10', Gem::Platform.local
|
254
|
+
assert_match 'universal-macruby-1.0', Gem::Platform.local
|
255
|
+
|
249
256
|
util_set_arch 'powerpc-darwin'
|
250
257
|
assert_match 'powerpc-darwin', Gem::Platform.local
|
251
258
|
|
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: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 1.8.
|
9
|
+
- 17
|
10
|
+
version: 1.8.17
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jim Weirich
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2012-02-
|
20
|
+
date: 2012-02-17 00:00:00 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: minitest
|
@@ -399,7 +399,7 @@ post_install_message:
|
|
399
399
|
rdoc_options:
|
400
400
|
- --main
|
401
401
|
- README.rdoc
|
402
|
-
- --title=RubyGems 1.8.
|
402
|
+
- --title=RubyGems 1.8.17 Documentation
|
403
403
|
require_paths:
|
404
404
|
- hide_lib_for_update
|
405
405
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -425,7 +425,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
425
425
|
requirements: []
|
426
426
|
|
427
427
|
rubyforge_project: rubygems
|
428
|
-
rubygems_version: 1.8.
|
428
|
+
rubygems_version: 1.8.16
|
429
429
|
signing_key:
|
430
430
|
specification_version: 3
|
431
431
|
summary: RubyGems is a package management framework for Ruby
|