summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-10-15 13:25:27 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-10-15 14:12:02 +0900
commitab6c4f8be3dd0fb116ba2722a2fcdc53ad4ea0b7 (patch)
tree05165659632b47771323a56f7f10d1f04d56f189 /lib/rubygems/commands
parentf0c7a05b4c7657f1cff1698e5560f49248a08bfd (diff)
Merge rubygems-3.2.0.rc.2
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3660
Diffstat (limited to 'lib/rubygems/commands')
-rw-r--r--lib/rubygems/commands/setup_command.rb19
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb
index 73c1b65223..b63920ab8d 100644
--- a/lib/rubygems/commands/setup_command.rb
+++ b/lib/rubygems/commands/setup_command.rb
@@ -533,14 +533,14 @@ By default, this RubyGems will install gem as:
# for installation of bundler as default gems
def bundler_man1_files_in(dir)
Dir.chdir dir do
- Dir['bundle*.1{,.txt}']
+ Dir['bundle*.1{,.txt,.ronn}']
end
end
# for installation of bundler as default gems
def bundler_man5_files_in(dir)
Dir.chdir dir do
- Dir['gemfile.5{,.txt}']
+ Dir['gemfile.5{,.txt,.ronn}']
end
end
@@ -617,15 +617,16 @@ abort "#{deprecation_message}"
def remove_old_man_files(man_dir)
man_dirs = { man_dir => "bundler/man" }
man_dirs.each do |old_man_dir, new_man_dir|
- man1_files = bundler_man1_files_in(new_man_dir)
+ ["1", "5"].each do |section|
+ man_files = send(:"bundler_man#{section}_files_in", new_man_dir)
- old_man1_dir = "#{old_man_dir}/man1"
+ old_man_dir_with_section = "#{old_man_dir}/man#{section}"
+ old_man_files = send(:"bundler_man#{section}_files_in", old_man_dir_with_section)
- old_man1_files = bundler_man1_files_in(old_man1_dir)
+ man_to_remove = old_man_files - man_files
- man1_to_remove = old_man1_files - man1_files
-
- remove_file_list(man1_to_remove, old_man1_dir)
+ remove_file_list(man_to_remove, old_man_dir_with_section)
+ end
end
end
@@ -638,8 +639,6 @@ abort "#{deprecation_message}"
history.force_encoding Encoding::UTF_8
- history = history.sub(/^# coding:.*?(?=^=)/m, '')
-
text = history.split(HISTORY_HEADER)
text.shift # correct an off-by-one generated by split
version_lines = history.scan(HISTORY_HEADER)