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

ruby-changes:31874

From: drbrain <ko1@a...>
Date: Mon, 2 Dec 2013 05:53:06 +0900 (JST)
Subject: [ruby-changes:31874] drbrain:r43953 (trunk): * lib/rubygems: Update to RubyGems master baa965b. Notable changes:

drbrain	2013-12-02 05:52:57 +0900 (Mon, 02 Dec 2013)

  New Revision: 43953

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

  Log:
    * lib/rubygems:  Update to RubyGems master baa965b.  Notable changes:
    
      Copy directories to lib/ when installing extensions.  This completes
      the fix for [ruby-trunk - Bug #9106]
    
    * test/rubygems:  ditto.

  Modified files:
    trunk/ChangeLog
    trunk/lib/rubygems/ext/ext_conf_builder.rb
    trunk/test/rubygems/test_gem_ext_builder.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43952)
+++ ChangeLog	(revision 43953)
@@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Dec  2 05:52:33 2013  Eric Hodel  <drbrain@s...>
+
+	* lib/rubygems:  Update to RubyGems master baa965b.  Notable changes:
+
+	  Copy directories to lib/ when installing extensions.  This completes
+	  the fix for [ruby-trunk - Bug #9106]
+
+	* test/rubygems:  ditto.
+
 Mon Dec  2 02:03:47 2013  Shota Fukumori  <her@s...>
 
 	* test/ruby/test_case.rb (test_nomethoderror):
Index: lib/rubygems/ext/ext_conf_builder.rb
===================================================================
--- lib/rubygems/ext/ext_conf_builder.rb	(revision 43952)
+++ lib/rubygems/ext/ext_conf_builder.rb	(revision 43953)
@@ -43,13 +43,15 @@ class Gem::Ext::ExtConfBuilder < Gem::Ex https://github.com/ruby/ruby/blob/trunk/lib/rubygems/ext/ext_conf_builder.rb#L43
         make dest_path, results
 
         if tmp_dest
-          FileEntry.new(tmp_dest).traverse do |ent|
-            # TODO remove in RubyGems 3
-            if lib_dir then
-              libent = ent.class.new lib_dir, ent.rel
-              libent.exist? or ent.copy libent.path
-            end
+          # TODO remove in RubyGems 3
+          if lib_dir then
+            FileUtils.mkdir_p lib_dir
+            entries = Dir.entries(tmp_dest) - %w[. ..]
+            entries = entries.map { |entry| File.join tmp_dest, entry }
+            FileUtils.cp_r entries, lib_dir
+          end
 
+          FileEntry.new(tmp_dest).traverse do |ent|
             destent = ent.class.new(dest_path, ent.rel)
             destent.exist? or File.rename(ent.path, destent.path)
           end
Index: test/rubygems/test_gem_ext_builder.rb
===================================================================
--- test/rubygems/test_gem_ext_builder.rb	(revision 43952)
+++ test/rubygems/test_gem_ext_builder.rb	(revision 43953)
@@ -117,6 +117,8 @@ install: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_ext_builder.rb#L117
     ext_lib_dir = File.join ext_dir, 'lib'
     FileUtils.mkdir ext_lib_dir
     FileUtils.touch File.join ext_lib_dir, 'a.rb'
+    FileUtils.mkdir File.join ext_lib_dir, 'a'
+    FileUtils.touch File.join ext_lib_dir, 'a', 'b.rb'
 
     use_ui @ui do
       @builder.build_extensions
@@ -127,6 +129,7 @@ install: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_ext_builder.rb#L129
     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.gem_dir, 'lib', 'a.rb'
+    assert_path_exists File.join @spec.gem_dir, 'lib', 'a', 'b.rb'
   end
 
   def test_build_extensions_none

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

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