summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rubygems/commands/setup_command.rb4
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb18
2 files changed, 12 insertions, 10 deletions
diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb
index 301ce25314..85e28ccedd 100644
--- a/lib/rubygems/commands/setup_command.rb
+++ b/lib/rubygems/commands/setup_command.rb
@@ -7,8 +7,8 @@ require_relative "../command"
# RubyGems checkout or tarball.
class Gem::Commands::SetupCommand < Gem::Command
- 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*$}
+ 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*$}
ENV_PATHS = %w[/usr/bin/env /bin/env].freeze
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb
index c3622c02cd..7105c1ccec 100644
--- a/test/rubygems/test_gem_commands_setup_command.rb
+++ b/test/rubygems/test_gem_commands_setup_command.rb
@@ -380,20 +380,22 @@ class TestGemCommandsSetupCommand < Gem::TestCase
File.open "CHANGELOG.md", "w" do |io|
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
* π is tasty
-# 2.0.2 / 2013-03-06
+## 2.0.2 / 2013-03-06
-## Bug fixes:
+### Bug fixes:
* Other bugs fixed
-# 2.0.1 / 2013-03-05
+## 2.0.1 / 2013-03-05
-## Bug fixes:
+### Bug fixes:
* Yet more bugs fixed
HISTORY_TXT
end
@@ -403,9 +405,9 @@ class TestGemCommandsSetupCommand < Gem::TestCase
end
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
* π is tasty