Skip to content

Commit 01e797f

Browse files
committed
Auto merge of #2070 - rubygems:prepare-to-release-rubygems272, r=hsbt
Prepare to release Rubygems 2.7.2 I added missing template for `bundle gem` with #2065
2 parents f8dca83 + 35abb74 commit 01e797f

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

lib/rubygems.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
require 'thread'
1111

1212
module Gem
13-
VERSION = "2.7.1"
13+
VERSION = "2.7.2"
1414
end
1515

1616
# Must be first since it unloads the prelude from 1.9.2

lib/rubygems/commands/setup_command.rb

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,19 @@ def rb_files_in dir
439439
end
440440
end
441441

442+
# for installation of bundler as default gems
442443
def template_files
443444
Dir.chdir "bundler/lib" do
444-
Dir[File.join('bundler', 'templates', '**', '*')].select{|f| !File.directory?(f)}
445+
(Dir[File.join('bundler', 'templates', '**', '*')] + Dir[File.join('bundler', 'templates', '**', '.*')]).
446+
select{|f| !File.directory?(f)}
447+
end
448+
end
449+
450+
# for cleanup old bundler files
451+
def template_files_in dir
452+
Dir.chdir dir do
453+
(Dir[File.join('templates', '**', '*')] + Dir[File.join('templates', '**', '.*')]).
454+
select{|f| !File.directory?(f)}
445455
end
446456
end
447457

@@ -482,10 +492,10 @@ def remove_old_lib_files lib_dir
482492
lib_dirs[File.join(lib_dir, 'bundler')] = 'bundler/lib/bundler' if Gem::USE_BUNDLER_FOR_GEMDEPS
483493
lib_dirs.each do |old_lib_dir, new_lib_dir|
484494
lib_files = rb_files_in(new_lib_dir)
485-
lib_files.concat(template_files) if new_lib_dir =~ /bundler/
495+
lib_files.concat(template_files_in(new_lib_dir)) if new_lib_dir =~ /bundler/
486496

487497
old_lib_files = rb_files_in(old_lib_dir)
488-
old_lib_files.concat(template_files) if old_lib_dir =~ /bundler/
498+
old_lib_files.concat(template_files_in(old_lib_dir)) if old_lib_dir =~ /bundler/
489499

490500
to_remove = old_lib_files - lib_files
491501

0 commit comments

Comments
 (0)