[rubygems/rubygems] Fix headings levels in Changelogs

And adapt release scripts and configuration to the new structure.

3deb1aedae
This commit is contained in:
Antoine Marguerie 2025-05-21 15:07:54 +02:00 committed by Hiroshi SHIBATA
parent 803dae70cb
commit 11492bd88d
2 changed files with 12 additions and 10 deletions

View file

@ -7,8 +7,8 @@ require_relative "../command"
# RubyGems checkout or tarball. # RubyGems checkout or tarball.
class Gem::Commands::SetupCommand < Gem::Command class Gem::Commands::SetupCommand < Gem::Command
HISTORY_HEADER = %r{^#\s*[\d.a-zA-Z]+\s*/\s*\d{4}-\d{2}-\d{2}\s*$} HISTORY_HEADER = %r{^##\s*[\d.a-zA-Z]+\s*/\s*\d{4}-\d{2}-\d{2}\s*$}
VERSION_MATCHER = %r{^#\s*([\d.a-zA-Z]+)\s*/\s*\d{4}-\d{2}-\d{2}\s*$} VERSION_MATCHER = %r{^##\s*([\d.a-zA-Z]+)\s*/\s*\d{4}-\d{2}-\d{2}\s*$}
ENV_PATHS = %w[/usr/bin/env /bin/env].freeze ENV_PATHS = %w[/usr/bin/env /bin/env].freeze

View file

@ -380,20 +380,22 @@ class TestGemCommandsSetupCommand < Gem::TestCase
File.open "CHANGELOG.md", "w" do |io| File.open "CHANGELOG.md", "w" do |io|
io.puts <<-HISTORY_TXT io.puts <<-HISTORY_TXT
# #{Gem::VERSION} / 2013-03-26 # Changelog
## Bug fixes: ## #{Gem::VERSION} / 2013-03-26
### Bug fixes:
* Fixed release note display for LANG=C when installing rubygems * Fixed release note display for LANG=C when installing rubygems
* π is tasty * π is tasty
# 2.0.2 / 2013-03-06 ## 2.0.2 / 2013-03-06
## Bug fixes: ### Bug fixes:
* Other bugs fixed * Other bugs fixed
# 2.0.1 / 2013-03-05 ## 2.0.1 / 2013-03-05
## Bug fixes: ### Bug fixes:
* Yet more bugs fixed * Yet more bugs fixed
HISTORY_TXT HISTORY_TXT
end end
@ -403,9 +405,9 @@ class TestGemCommandsSetupCommand < Gem::TestCase
end end
expected = <<-EXPECTED expected = <<-EXPECTED
# #{Gem::VERSION} / 2013-03-26 ## #{Gem::VERSION} / 2013-03-26
## Bug fixes: ### Bug fixes:
* Fixed release note display for LANG=C when installing rubygems * Fixed release note display for LANG=C when installing rubygems
* π is tasty * π is tasty