From ab6c4f8be3dd0fb116ba2722a2fcdc53ad4ea0b7 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 15 Oct 2020 13:25:27 +0900 Subject: Merge rubygems-3.2.0.rc.2 --- lib/rubygems/commands/setup_command.rb | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'lib/rubygems/commands') 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) -- cgit v1.2.3