[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:
parent
f7d3522a54
commit
3660d14de6
Notes:
git
2020-06-05 07:33:48 +09:00
@ -88,6 +88,7 @@ class Gem::PackageTask < Rake::PackageTask
|
|||||||
super gem.full_name, :noversion
|
super gem.full_name, :noversion
|
||||||
@gem_spec = gem
|
@gem_spec = gem
|
||||||
@package_files += gem_spec.files if gem_spec.files
|
@package_files += gem_spec.files if gem_spec.files
|
||||||
|
@fileutils_output = $stdout
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -47,6 +47,34 @@ class TestGemPackageTask < Gem::TestCase
|
|||||||
end
|
end
|
||||||
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
|
def test_gem_package_with_current_platform
|
||||||
RakeFileUtils.verbose_flag = false
|
RakeFileUtils.verbose_flag = false
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user