1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rubygems/package.rb: Omit directories when packaging gems like

RubyGems 1.8.x
* test/rubygems/test_gem_package.rb:  Test for above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2012-12-10 00:13:42 +00:00
parent 0c0496ebd2
commit 91998d694c
3 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,9 @@
Mon Dec 10 09:13:08 2012 Eric Hodel <drbrain@segment7.net>
* lib/rubygems/package.rb: Omit directories when packaging gems like
RubyGems 1.8.x
* test/rubygems/test_gem_package.rb: Test for above.
Sun Dec 9 17:36:59 2012 Shugo Maeda <shugo@ruby-lang.org>
* vm_insnhelper.c (vm_call_opt_send): Kernel#send should not use

View file

@ -192,6 +192,8 @@ class Gem::Package
@spec.files.each do |file|
stat = File.stat file
next unless stat.file?
tar.add_file_simple file, stat.mode, stat.size do |dst_io|
open file, 'rb' do |src_io|
dst_io.write src_io.read 16384 until src_io.eof?

View file

@ -102,9 +102,10 @@ class TestGemPackage < Gem::Package::TarTestCase
def test_add_files
spec = Gem::Specification.new
spec.files = 'lib/code.rb'
spec.files = %w[lib/code.rb lib/empty]
FileUtils.mkdir_p 'lib/empty'
FileUtils.mkdir 'lib'
open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end
open 'lib/extra.rb', 'w' do |io| io.write '# lib/extra.rb' end