[rubygems/rubygems] Add mtime to Gem::Package::TarWriter#add_file argument
commit819ecd115d663e5d0c7e1f14902f5bfde0a7414a
authorYusuke Nakamura <[email protected]>
Sat, 3 May 2025 14:59:41 +0000 (3 23:59 +0900)
committerHiroshi SHIBATA <[email protected]>
Thu, 8 May 2025 09:03:04 +0000 (8 18:03 +0900)
tree9f305345e33828e8cfadd4dd8a55c27704201731
parent8685a81e6a0bdf7b766af930ee0e05a28e07d69b
[rubygems/rubygems] Add mtime to Gem::Package::TarWriter#add_file argument

Since 9e21dd9, Gem::Package::TarWriter#add_file adds the file to
the tar with Gem.source_date_epoch for its mtime.
This behavior breaks the code depending on the previous add_file
behavior.
Therefore, add_file accepts mtime as an argument, and uses
Gem.source_date_epoch if not specified.

https://github.com/rubygems/rubygems/commit/7020ea98a0
lib/rubygems/package/tar_writer.rb
test/rubygems/test_gem_package_tar_writer.rb