Skip to content

Commit d6a5fe7

Browse files
committed
* lib/rubygems: Update to RubyGems master ec8ed22. Notable changes
include: * Renamed extension_install_dir to extension_dir (backwards compatible). * Fixed creation of gem.deps.rb.lock file from TestGemRequestSet#test_install_from_gemdeps_install_dir * Fixed a typo and some documentation. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent d36a129 commit d6a5fe7

17 files changed

+77
-69
lines changed

ChangeLog

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
Wed Dec 11 04:54:03 2013 Eric Hodel <drbrain@segment7.net>
2+
3+
* lib/rubygems: Update to RubyGems master ec8ed22. Notable changes
4+
include:
5+
6+
* Renamed extension_install_dir to extension_dir (backwards
7+
compatible).
8+
9+
* Fixed creation of gem.deps.rb.lock file from
10+
TestGemRequestSet#test_install_from_gemdeps_install_dir
11+
12+
* Fixed a typo and some documentation.
13+
14+
* test/rubygems: ditto.
15+
116
Wed Dec 11 03:18:08 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
217

318
* insns.def: Fix optimization bug of Float#/ [Bug #9238]

lib/rubygems/basic_specification.rb

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Gem::BasicSpecification
1212
##
1313
# Sets the directory where extensions for this gem will be installed.
1414

15-
attr_writer :extension_install_dir # :nodoc:
15+
attr_writer :extension_dir # :nodoc:
1616

1717
##
1818
# The path this gemspec was loaded from. This attribute is not persisted.
@@ -69,16 +69,10 @@ def default_gem?
6969
end
7070

7171
##
72-
# The directory the named +extension+ was installed into after being built.
73-
#
74-
# Usage:
75-
#
76-
# spec.extensions.each do |ext|
77-
# puts spec.extension_install_dir ext
78-
# end
72+
# Returns full path to the directory where gem's extensions are installed.
7973

80-
def extension_install_dir
81-
@extension_install_dir ||=
74+
def extension_dir
75+
@extension_dir ||=
8276
File.join base_dir, 'extensions', Gem::Platform.local.to_s,
8377
Gem.extension_api_version, full_name
8478
end
@@ -123,7 +117,7 @@ def full_require_paths
123117
File.join full_gem_path, path
124118
end
125119

126-
full_paths.unshift extension_install_dir unless @extensions.empty?
120+
full_paths.unshift extension_dir unless @extensions.empty?
127121

128122
full_paths
129123
end
@@ -152,7 +146,7 @@ def gems_dir
152146
def loaded_from= path
153147
@loaded_from = path && path.to_s
154148

155-
@extension_install_dir = nil
149+
@extension_dir = nil
156150
@full_gem_path = nil
157151
@gems_dir = nil
158152
@base_dir = nil
@@ -196,11 +190,11 @@ def raw_require_paths # :nodoc:
196190
def require_paths
197191
return @require_paths if @extensions.empty?
198192

199-
relative_extension_install_dir =
193+
relative_extension_dir =
200194
File.join '..', '..', 'extensions', Gem::Platform.local.to_s,
201195
Gem.extension_api_version, full_name
202196

203-
[relative_extension_install_dir].concat @require_paths
197+
[relative_extension_dir].concat @require_paths
204198
end
205199

206200
##

lib/rubygems/commands/outdated_command.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def initialize
1717

1818
def description # :nodoc:
1919
<<-EOF
20-
The outdated command lists gems you way wish to upgrade to a newer version.
20+
The outdated command lists gems you may wish to upgrade to a newer version.
2121
2222
You can check for dependency mismatches using the dependency command and
2323
update the gems with the update or install commands.

lib/rubygems/ext/builder.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def build_extensions
186186
say "This could take a while..."
187187
end
188188

189-
dest_path = @spec.extension_install_dir
189+
dest_path = @spec.extension_dir
190190

191191
FileUtils.rm_f @spec.gem_build_complete_path
192192

@@ -205,9 +205,9 @@ def build_extensions
205205
# Writes +output+ to gem_make.out in the extension install directory.
206206

207207
def write_gem_make_out output # :nodoc:
208-
destination = File.join @spec.extension_install_dir, 'gem_make.out'
208+
destination = File.join @spec.extension_dir, 'gem_make.out'
209209

210-
FileUtils.mkdir_p @spec.extension_install_dir
210+
FileUtils.mkdir_p @spec.extension_dir
211211

212212
open destination, 'wb' do |io| io.puts output end
213213

lib/rubygems/source/git.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def specs
191191
spec.loaded_from = loaded_from
192192
spec.base_dir = base_dir
193193

194-
spec.extension_install_dir =
194+
spec.extension_dir =
195195
File.join base_dir, 'extensions', Gem::Platform.local.to_s,
196196
Gem.extension_api_version, "#{name}-#{dir_shortref}"
197197

lib/rubygems/specification.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1744,7 +1744,7 @@ def full_name
17441744
# directory.
17451745

17461746
def gem_build_complete_path # :nodoc:
1747-
File.join extension_install_dir, 'gem.build_complete'
1747+
File.join extension_dir, 'gem.build_complete'
17481748
end
17491749

17501750
##

lib/rubygems/uninstaller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def remove(spec)
247247
File.writable?(spec.base_dir)
248248

249249
FileUtils.rm_rf spec.full_gem_path
250-
FileUtils.rm_rf spec.extension_install_dir
250+
FileUtils.rm_rf spec.extension_dir
251251

252252
old_platform_name = spec.original_name
253253
gemspec = spec.spec_file

test/rubygems/test_gem.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def test_self_ensure_gem_directories_write_protected_parents
338338
end
339339
end
340340

341-
def test_self_extension_install_dir_shared
341+
def test_self_extension_dir_shared
342342
enable_shared, RbConfig::CONFIG['ENABLE_SHARED'] =
343343
RbConfig::CONFIG['ENABLE_SHARED'], 'yes'
344344

@@ -347,7 +347,7 @@ def test_self_extension_install_dir_shared
347347
RbConfig::CONFIG['ENABLE_SHARED'] = enable_shared
348348
end
349349

350-
def test_self_extension_install_dir_static
350+
def test_self_extension_dir_static
351351
enable_shared, RbConfig::CONFIG['ENABLE_SHARED'] =
352352
RbConfig::CONFIG['ENABLE_SHARED'], 'no'
353353

test/rubygems/test_gem_dependency_installer.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ def test_install_dependency_existing_extension
407407
_, f1_gem = util_gem 'f', '1', 'e' => nil
408408

409409
Gem::Installer.new(e1_gem).install
410-
FileUtils.rm_r e1.extension_install_dir
410+
FileUtils.rm_r e1.extension_dir
411411

412412
FileUtils.mv e1_gem, @tempdir
413413
FileUtils.mv f1_gem, @tempdir
@@ -420,7 +420,7 @@ def test_install_dependency_existing_extension
420420

421421
assert_equal %w[f-1], inst.installed_gems.map { |s| s.full_name }
422422

423-
assert_path_exists e1.extension_install_dir
423+
assert_path_exists e1.extension_dir
424424
end
425425

426426
def test_install_dependency_old

test/rubygems/test_gem_ext_builder.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ def test_build_extensions
124124
@builder.build_extensions
125125
end
126126

127-
assert_path_exists @spec.extension_install_dir
127+
assert_path_exists @spec.extension_dir
128128
assert_path_exists @spec.gem_build_complete_path
129-
assert_path_exists File.join @spec.extension_install_dir, 'gem_make.out'
130-
assert_path_exists File.join @spec.extension_install_dir, 'a.rb'
129+
assert_path_exists File.join @spec.extension_dir, 'gem_make.out'
130+
assert_path_exists File.join @spec.extension_dir, 'a.rb'
131131
assert_path_exists File.join @spec.gem_dir, 'lib', 'a.rb'
132132
assert_path_exists File.join @spec.gem_dir, 'lib', 'a', 'b.rb'
133133
end
@@ -140,11 +140,11 @@ def test_build_extensions_none
140140
assert_equal '', @ui.output
141141
assert_equal '', @ui.error
142142

143-
refute_path_exists File.join @spec.extension_install_dir, 'gem_make.out'
143+
refute_path_exists File.join @spec.extension_dir, 'gem_make.out'
144144
end
145145

146146
def test_build_extensions_rebuild_failure
147-
FileUtils.mkdir_p @spec.extension_install_dir
147+
FileUtils.mkdir_p @spec.extension_dir
148148
FileUtils.touch @spec.gem_build_complete_path
149149

150150
@spec.extensions << nil
@@ -175,7 +175,7 @@ def test_build_extensions_extconf_bad
175175
@ui.output
176176
assert_equal '', @ui.error
177177

178-
gem_make_out = File.join @spec.extension_install_dir, 'gem_make.out'
178+
gem_make_out = File.join @spec.extension_dir, 'gem_make.out'
179179

180180
assert_match %r%#{Regexp.escape Gem.ruby} extconf\.rb%,
181181
File.read(gem_make_out)
@@ -187,7 +187,7 @@ def test_build_extensions_extconf_bad
187187

188188
def test_build_extensions_unsupported
189189
FileUtils.mkdir_p @spec.gem_dir
190-
gem_make_out = File.join @spec.extension_install_dir, 'gem_make.out'
190+
gem_make_out = File.join @spec.extension_dir, 'gem_make.out'
191191
@spec.extensions << nil
192192

193193
e = assert_raises Gem::Ext::BuildError do
@@ -239,7 +239,7 @@ def test_build_extensions_with_build_args
239239
path = File.join @spec.gem_dir, "extconf_args"
240240

241241
assert_equal args.inspect, File.read(path).strip
242-
assert_path_exists @spec.extension_install_dir
242+
assert_path_exists @spec.extension_dir
243243
end
244244

245245
def test_initialize

0 commit comments

Comments
 (0)