[前][次][番号順一覧][スレッド一覧]

ruby-changes:32050

From: drbrain <ko1@a...>
Date: Wed, 11 Dec 2013 04:54:29 +0900 (JST)
Subject: [ruby-changes:32050] drbrain:r44129 (trunk): * lib/rubygems: Update to RubyGems master ec8ed22. Notable changes

drbrain	2013-12-11 04:54:19 +0900 (Wed, 11 Dec 2013)

  New Revision: 44129

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44129

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/lib/rubygems/basic_specification.rb
    trunk/lib/rubygems/commands/outdated_command.rb
    trunk/lib/rubygems/ext/builder.rb
    trunk/lib/rubygems/source/git.rb
    trunk/lib/rubygems/specification.rb
    trunk/lib/rubygems/uninstaller.rb
    trunk/test/rubygems/test_gem.rb
    trunk/test/rubygems/test_gem_dependency_installer.rb
    trunk/test/rubygems/test_gem_ext_builder.rb
    trunk/test/rubygems/test_gem_installer.rb
    trunk/test/rubygems/test_gem_request_set.rb
    trunk/test/rubygems/test_gem_resolver_git_specification.rb
    trunk/test/rubygems/test_gem_source_git.rb
    trunk/test/rubygems/test_gem_specification.rb
    trunk/test/rubygems/test_gem_stub_specification.rb
    trunk/test/rubygems/test_gem_uninstaller.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44128)
+++ ChangeLog	(revision 44129)
@@ -1,3 +1,18 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Dec 11 04:54:03 2013  Eric Hodel  <drbrain@s...>
+
+	* 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.
+
 Wed Dec 11 03:18:08 2013  Marc-Andre Lafortune  <ruby-core@m...>
 
 	* insns.def: Fix optimization bug of Float#/ [Bug #9238]
Index: lib/rubygems/basic_specification.rb
===================================================================
--- lib/rubygems/basic_specification.rb	(revision 44128)
+++ lib/rubygems/basic_specification.rb	(revision 44129)
@@ -12,7 +12,7 @@ class Gem::BasicSpecification https://github.com/ruby/ruby/blob/trunk/lib/rubygems/basic_specification.rb#L12
   ##
   # Sets the directory where extensions for this gem will be installed.
 
-  attr_writer :extension_install_dir # :nodoc:
+  attr_writer :extension_dir # :nodoc:
 
   ##
   # The path this gemspec was loaded from.  This attribute is not persisted.
@@ -69,16 +69,10 @@ class Gem::BasicSpecification https://github.com/ruby/ruby/blob/trunk/lib/rubygems/basic_specification.rb#L69
   end
 
   ##
-  # The directory the named +extension+ was installed into after being built.
-  #
-  # Usage:
-  #
-  #   spec.extensions.each do |ext|
-  #     puts spec.extension_install_dir ext
-  #   end
+  # Returns full path to the directory where gem's extensions are installed.
 
-  def extension_install_dir
-    @extension_install_dir ||=
+  def extension_dir
+    @extension_dir ||=
       File.join base_dir, 'extensions', Gem::Platform.local.to_s,
                 Gem.extension_api_version, full_name
   end
@@ -123,7 +117,7 @@ class Gem::BasicSpecification https://github.com/ruby/ruby/blob/trunk/lib/rubygems/basic_specification.rb#L117
       File.join full_gem_path, path
     end
 
-    full_paths.unshift extension_install_dir unless @extensions.empty?
+    full_paths.unshift extension_dir unless @extensions.empty?
 
     full_paths
   end
@@ -152,7 +146,7 @@ class Gem::BasicSpecification https://github.com/ruby/ruby/blob/trunk/lib/rubygems/basic_specification.rb#L146
   def loaded_from= path
     @loaded_from   = path && path.to_s
 
-    @extension_install_dir = nil
+    @extension_dir = nil
     @full_gem_path         = nil
     @gems_dir              = nil
     @base_dir              = nil
@@ -196,11 +190,11 @@ class Gem::BasicSpecification https://github.com/ruby/ruby/blob/trunk/lib/rubygems/basic_specification.rb#L190
   def require_paths
     return @require_paths if @extensions.empty?
 
-    relative_extension_install_dir =
+    relative_extension_dir =
       File.join '..', '..', 'extensions', Gem::Platform.local.to_s,
                 Gem.extension_api_version, full_name
 
-    [relative_extension_install_dir].concat @require_paths
+    [relative_extension_dir].concat @require_paths
   end
 
   ##
Index: lib/rubygems/ext/builder.rb
===================================================================
--- lib/rubygems/ext/builder.rb	(revision 44128)
+++ lib/rubygems/ext/builder.rb	(revision 44129)
@@ -186,7 +186,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/lib/rubygems/ext/builder.rb#L186
       say "This could take a while..."
     end
 
-    dest_path = @spec.extension_install_dir
+    dest_path = @spec.extension_dir
 
     FileUtils.rm_f @spec.gem_build_complete_path
 
@@ -205,9 +205,9 @@ EOF https://github.com/ruby/ruby/blob/trunk/lib/rubygems/ext/builder.rb#L205
   # Writes +output+ to gem_make.out in the extension install directory.
 
   def write_gem_make_out output # :nodoc:
-    destination = File.join @spec.extension_install_dir, 'gem_make.out'
+    destination = File.join @spec.extension_dir, 'gem_make.out'
 
-    FileUtils.mkdir_p @spec.extension_install_dir
+    FileUtils.mkdir_p @spec.extension_dir
 
     open destination, 'wb' do |io| io.puts output end
 
Index: lib/rubygems/specification.rb
===================================================================
--- lib/rubygems/specification.rb	(revision 44128)
+++ lib/rubygems/specification.rb	(revision 44129)
@@ -1744,7 +1744,7 @@ class Gem::Specification < Gem::BasicSpe https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification.rb#L1744
   # directory.
 
   def gem_build_complete_path # :nodoc:
-    File.join extension_install_dir, 'gem.build_complete'
+    File.join extension_dir, 'gem.build_complete'
   end
 
   ##
Index: lib/rubygems/source/git.rb
===================================================================
--- lib/rubygems/source/git.rb	(revision 44128)
+++ lib/rubygems/source/git.rb	(revision 44129)
@@ -191,7 +191,7 @@ class Gem::Source::Git < Gem::Source https://github.com/ruby/ruby/blob/trunk/lib/rubygems/source/git.rb#L191
             spec.loaded_from = loaded_from
             spec.base_dir = base_dir
 
-            spec.extension_install_dir =
+            spec.extension_dir =
               File.join base_dir, 'extensions', Gem::Platform.local.to_s,
                 Gem.extension_api_version, "#{name}-#{dir_shortref}"
 
Index: lib/rubygems/commands/outdated_command.rb
===================================================================
--- lib/rubygems/commands/outdated_command.rb	(revision 44128)
+++ lib/rubygems/commands/outdated_command.rb	(revision 44129)
@@ -17,7 +17,7 @@ class Gem::Commands::OutdatedCommand < G https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/outdated_command.rb#L17
 
   def description # :nodoc:
     <<-EOF
-The outdated command lists gems you way wish to upgrade to a newer version.
+The outdated command lists gems you may wish to upgrade to a newer version.
 
 You can check for dependency mismatches using the dependency command and
 update the gems with the update or install commands.
Index: lib/rubygems/uninstaller.rb
===================================================================
--- lib/rubygems/uninstaller.rb	(revision 44128)
+++ lib/rubygems/uninstaller.rb	(revision 44129)
@@ -247,7 +247,7 @@ class Gem::Uninstaller https://github.com/ruby/ruby/blob/trunk/lib/rubygems/uninstaller.rb#L247
       File.writable?(spec.base_dir)
 
     FileUtils.rm_rf spec.full_gem_path
-    FileUtils.rm_rf spec.extension_install_dir
+    FileUtils.rm_rf spec.extension_dir
 
     old_platform_name = spec.original_name
     gemspec           = spec.spec_file
Index: test/rubygems/test_gem_request_set.rb
===================================================================
--- test/rubygems/test_gem_request_set.rb	(revision 44128)
+++ test/rubygems/test_gem_request_set.rb	(revision 44129)
@@ -72,18 +72,17 @@ class TestGemRequestSet < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_request_set.rb#L72
     rs = Gem::RequestSet.new
     installed = []
 
-    Tempfile.open 'gem.deps.rb' do |io|
+    open 'gem.deps.rb', 'w' do |io|
       io.puts 'gem "a"'
-      io.flush
+    end
 
-      options = {
-        :gemdeps     => io.path,
-        :install_dir => "#{@gemhome}2",
-      }
+    options = {
+      :gemdeps     => 'gem.deps.rb',
+      :install_dir => "#{@gemhome}2",
+    }
 
-      rs.install_from_gemdeps options do |req, installer|
-        installed << req.full_name
-      end
+    rs.install_from_gemdeps options do |req, installer|
+      installed << req.full_name
     end
 
     assert_includes installed, 'a-2'
Index: test/rubygems/test_gem.rb
===================================================================
--- test/rubygems/test_gem.rb	(revision 44128)
+++ test/rubygems/test_gem.rb	(revision 44129)
@@ -338,7 +338,7 @@ class TestGem < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem.rb#L338
     end
   end
 
-  def test_self_extension_install_dir_shared
+  def test_self_extension_dir_shared
     enable_shared, RbConfig::CONFIG['ENABLE_SHARED'] =
       RbConfig::CONFIG['ENABLE_SHARED'], 'yes'
 
@@ -347,7 +347,7 @@ class TestGem < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem.rb#L347
     RbConfig::CONFIG['ENABLE_SHARED'] = enable_shared
   end
 
-  def test_self_extension_install_dir_static
+  def test_self_extension_dir_static
     enable_shared, RbConfig::CONFIG['ENABLE_SHARED'] =
       RbConfig::CONFIG['ENABLE_SHARED'], 'no'
 
Index: test/rubygems/test_gem_stub_specification.rb
===================================================================
--- test/rubygems/test_gem_stub_specification.rb	(revision 44128)
+++ test/rubygems/test_gem_stub_specification.rb	(revision 44129)
@@ -23,7 +23,7 @@ class TestStubSpecification < Gem::TestC https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_stub_specification.rb#L23
   def test_initialize_extension
     stub = stub_with_extension
 
-    ext_install_dir = Pathname(stub.extension_install_dir)
+    ext_install_dir = Pathname(stub.extension_dir)
     full_gem_path = Pathname(stub.full_gem_path)
     relative_install_dir = ext_install_dir.relative_path_from full_gem_path
     relative_install_dir = relative_install_dir.to_s
@@ -70,7 +70,7 @@ class TestStubSpecification < Gem::TestC https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_stub_specification.rb#L70
 
       refute stub.contains_requirable_file? 'nonexistent'
 
-      assert_path_exists stub.extension_install_dir
+      assert_path_exists stub.extension_dir
     end
   end
 
@@ -78,7 +78,7 @@ class TestStubSpecification < Gem::TestC https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_stub_specification.rb#L78
     stub = stub_with_extension
 
     expected = [
-      stub.extension_install_dir,
+      stub.extension_dir,
       File.join(stub.full_gem_path, 'lib'),
     ]
 
Index: test/rubygems/test_gem_specification.rb
===================================================================
--- test/rubygems/test_gem_specification.rb	(revision 44128)
+++ test/rubygems/test_gem_specification.rb	(revision 44129)
@@ -1115,7 +1115,7 @@ dependencies: [] https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L1115
   def test_build_extensions
     ext_spec
 
-    refute_path_exists @ext.extension_install_dir, 'sanity check'
+    refute_path_exists @ext.extension_dir, 'sanity check'
     refute_empty @ext.extensions, 'sanity check'
 
     extconf_rb = File.join @ext.gem_dir, @ext.extensions.first
@@ -1133,7 +1133,7 @@ dependencies: [] https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L1133
 
     @ext.build_extensions
 
-    assert_path_exists @ext.extension_install_dir
+    assert_path_exists @ext.extension_dir
   end
 
   def test_build_extensions_built
@@ -1142,14 +1142,14 @@ dependencies: [] https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L1142
     refute_empty @ext.extensions, 'sanity check'
 
     gem_build_complete =
-      File.join @ext.extension_install_dir, 'gem.build_complete'
+      File.join @ext.extension_dir, 'gem.build_complete'
 
-    FileUtils.mkdir_p @ext.extension_install_dir
+    FileUtils.mkdir_p @ext.extension_dir
     FileUtils.touch gem_build_complete
 
     @ext.build_extensions
 
-    gem_make_out = File.join @ext.extension_install_dir, 'gem_make.out'
+    gem_make_out = File.join @ext.extension_dir, 'gem_make.out'
     refute_path_exists gem_make_out
   end
 
@@ -1171,7 +1171,7 @@ dependencies: [] https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L1171
 
     spec.build_extensions
 
-    refute_path_exists spec.extension_install_dir
+    refute_path_exists spec.extension_dir
   end
 
   def test_build_extensions_error
@@ -1243,19 +1243,19 @@ dependencies: [] https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L1243
 
     @ext.build_extensions
 
-    gem_make_out = File.join @ext.extension_install_dir, 'gem_make.out'
+    gem_make_out = File.join @ext.extension_dir, 'gem_make.out'
     refute_path_exists gem_make_out
   ensure
     FileUtils.chmod 0755, @gemhome
   end
 
   def test_build_extensions_none
-    refute_path_exists @a1.extension_install_dir, 'sanity check'
+    refute_path_exists @a1.extension_dir, 'sanity check'
     assert_empty @a1.extensions, 'sanity check'
 
     @a1.build_extensions
 
-    refute_path_exists @a1.extension_install_dir
+    refute_path_exists @a1.extension_dir
   end
 
   def test_build_extensions_old
@@ -1267,7 +1267,7 @@ dependencies: [] https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L1267
 
     @ext.build_extensions
 
-    gem_make_out = File.join @ext.extension_install_dir, 'gem_make.out'
+    gem_make_out = File.join @ext.extension_dir, 'gem_make.out'
     refute_path_exists gem_make_out
   end
 
@@ -1293,7 +1293,7 @@ dependencies: [] https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L1293
 
     @ext.build_extensions
 
-    gem_make_out = File.join @ext.extension_install_dir, 'gem_make.out'
+    gem_make_out = File.join @ext.extension_dir, 'gem_make.out'
     assert_path_exists gem_make_out
   end
 
@@ -1323,7 +1323,7 @@ dependencies: [] https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L1323
 
     refute @ext.contains_requirable_file? 'nonexistent'
 
-    assert_path_exists @ext.extension_install_dir
+    assert_path_exists @ext.extension_dir
   end
 
   def test_date
@@ -1444,7 +1444,7 @@ dependencies: [] https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L1444
     assert_equal ['ext/extconf.rb'], ext_spec.extensions
   end
 
-  def test_extension_install_dir
+  def test_extension_dir
     enable_shared, RbConfig::CONFIG['ENABLE_SHARED'] =
       RbConfig::CONFIG['ENABLE_SHARED'], 'no'
 
@@ -1456,7 +1456,7 @@ dependencies: [] https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L1456
       File.join(@ext.base_dir, 'extensions', Gem::Platform.local.to_s,
                 "#{Gem.ruby_api_version}-static", @ext.full_name)
 
-    assert_equal expected, @ext.extension_install_dir
+    assert_equal expected, @ext.extension_dir
   ensure
     RbConfig::CONFIG['ENABLE_SHARED'] = enable_shared
   end
@@ -1610,7 +1610,7 @@ dependencies: [] https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L1610
   end
 
   def test_gem_build_complete_path
-    expected = File.join @a1.extension_install_dir, 'gem.build_complete'
+    expected = File.join @a1.extension_dir, 'gem.build_complete'
     assert_equal expected, @a1.gem_build_complete_path
   end
 
@@ -1743,7 +1743,7 @@ dependencies: [] https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L1743
 
     @ext.require_path = 'lib'
 
-    ext_install_dir = Pathname(@ext.extension_install_dir)
+    ext_install_dir = Pathname(@ext.extension_dir)
     full_gem_path = Pathname(@ext.full_gem_path)
     relative_install_dir = ext_install_dir.relative_path_from full_gem_path
 
@@ -1762,7 +1762,7 @@ dependencies: [] https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L1762
     @ext.require_path = 'lib'
 
     expected = [
-      @ext.extension_install_dir,
+      @ext.extension_dir,
       File.join(@gemhome, 'gems', @ext.original_name, 'lib'),
     ]
 
Index: test/rubygems/test_gem_dependency_installer.rb
===================================================================
--- test/rubygems/test_gem_dependency_installer.rb	(revision 44128)
+++ test/rubygems/test_gem_dependency_installer.rb	(revision 44129)
@@ -407,7 +407,7 @@ class TestGemDependencyInstaller < Gem:: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_dependency_installer.rb#L407
     _, f1_gem = util_gem 'f', '1', 'e' => nil
 
     Gem::Installer.new(e1_gem).install
-    FileUtils.rm_r e1.extension_install_dir
+    FileUtils.rm_r e1.extension_dir
 
     FileUtils.mv e1_gem, @tempdir
     FileUtils.mv f1_gem, @tempdir
@@ -420,7 +420,7 @@ class TestGemDependencyInstaller < Gem:: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_dependency_installer.rb#L420
 
     assert_equal %w[f-1], inst.installed_gems.map { |s| s.full_name }
 
-    assert_path_exists e1.extension_install_dir
+    assert_path_exists e1.extension_dir
   end
 
   def test_install_dependency_old
Index: test/rubygems/test_gem_uninstaller.rb
===================================================================
--- test/rubygems/test_gem_uninstaller.rb	(revision 44128)
+++ test/rubygems/test_gem_uninstaller.rb	(revision 44129)
@@ -223,12 +223,12 @@ create_makefile '#{@spec.name}' https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_uninstaller.rb#L223
       installer.install
     end
 
-    assert_path_exists @spec.extension_install_dir, 'sanity check'
+    assert_path_exists @spec.extension_dir, 'sanity check'
 
     uninstaller = Gem::Uninstaller.new @spec.name, :executables => true
     uninstaller.uninstall
 
-    refute_path_exists @spec.extension_install_dir
+    refute_path_exists @spec.extension_dir
   end
 
   def test_uninstall_nonexistent
Index: test/rubygems/test_gem_ext_builder.rb
===================================================================
--- test/rubygems/test_gem_ext_builder.rb	(revision 44128)
+++ test/rubygems/test_gem_ext_builder.rb	(revision 44129)
@@ -124,10 +124,10 @@ install: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_ext_builder.rb#L124
       @builder.build_extensions
     end
 
-    assert_path_exists @spec.extension_install_dir
+    assert_path_exists @spec.extension_dir
     assert_path_exists @spec.gem_build_complete_path
-    assert_path_exists File.join @spec.extension_install_dir, 'gem_make.out'
-    assert_path_exists File.join @spec.extension_install_dir, 'a.rb'
+    assert_path_exists File.join @spec.extension_dir, 'gem_make.out'
+    assert_path_exists File.join @spec.extension_dir, 'a.rb'
     assert_path_exists File.join @spec.gem_dir, 'lib', 'a.rb'
     assert_path_exists File.join @spec.gem_dir, 'lib', 'a', 'b.rb'
   end
@@ -140,11 +140,11 @@ install: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_ext_builder.rb#L140
     assert_equal '', @ui.output
     assert_equal '', @ui.error
 
-    refute_path_exists File.join @spec.extension_install_dir, 'gem_make.out'
+    refute_path_exists File.join @spec.extension_dir, 'gem_make.out'
   end
 
   def test_build_extensions_rebuild_failure
-    FileUtils.mkdir_p @spec.extension_install_dir
+    FileUtils.mkdir_p @spec.extension_dir
     FileUtils.touch @spec.gem_build_complete_path
 
     @spec.extensions << nil
@@ -175,7 +175,7 @@ install: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_ext_builder.rb#L175
                  @ui.output
     assert_equal '', @ui.error
 
-    gem_make_out = File.join @spec.extension_install_dir, 'gem_make.out'
+    gem_make_out = File.join @spec.extension_dir, 'gem_make.out'
 
     assert_match %r%#{Regexp.escape Gem.ruby} extconf\.rb%,
                  File.read(gem_make_out)
@@ -187,7 +187,7 @@ install: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_ext_builder.rb#L187
 
   def test_build_extensions_unsupported
     FileUtils.mkdir_p @spec.gem_dir
-    gem_make_out = File.join @spec.extension_install_dir, 'gem_make.out'
+    gem_make_out = File.join @spec.extension_dir, 'gem_make.out'
     @spec.extensions << nil
 
     e = assert_raises Gem::Ext::BuildError do
@@ -239,7 +239,7 @@ install: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_ext_builder.rb#L239
     path = File.join @spec.gem_dir, "extconf_args"
 
     assert_equal args.inspect, File.read(path).strip
-    assert_path_exists @spec.extension_install_dir
+    assert_path_exists @spec.exten (... truncated)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]