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

[rubygems/rubygems] Make rake package log messages to stdout by default

The logging to $stderr is only happening due to a bug in `FileUtils`.
Logging messages are not errors.

https://github.com/rubygems/rubygems/commit/4d1b6659e6
This commit is contained in:
David Rodríguez 2020-05-16 14:45:08 +02:00 committed by Hiroshi SHIBATA
parent f7d3522a54
commit 3660d14de6
Notes: git 2020-06-05 07:33:48 +09:00
2 changed files with 29 additions and 0 deletions

View file

@ -88,6 +88,7 @@ class Gem::PackageTask < Rake::PackageTask
super gem.full_name, :noversion
@gem_spec = gem
@package_files += gem_spec.files if gem_spec.files
@fileutils_output = $stdout
end
##

View file

@ -47,6 +47,34 @@ class TestGemPackageTask < Gem::TestCase
end
end
def test_gem_package_prints_to_stdout_by_default
gem = Gem::Specification.new do |g|
g.name = "pkgr"
g.version = "1.2.3"
g.authors = %w[author]
g.files = %w[x]
g.summary = 'summary'
end
pkg = Gem::PackageTask.new(gem) do |p|
p.package_files << "y"
end
assert_equal %w[x y], pkg.package_files
Dir.chdir @tempdir do
FileUtils.touch 'x'
FileUtils.touch 'y'
_, err = capture_io do
Rake.application['package'].invoke
end
assert_empty err
end
end
def test_gem_package_with_current_platform
RakeFileUtils.verbose_flag = false