This version fixes some setup commands.
  01e797f6aa/History.txt (L3)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2017-11-09 00:42:19 +00:00
Родитель cf3329cb8d
Коммит 3ba9e6b639
2 изменённых файлов: 25 добавлений и 1 удалений

Просмотреть файл

@ -10,7 +10,7 @@ require 'rbconfig'
require 'thread'
module Gem
VERSION = "2.7.1"
VERSION = "2.7.2"
end
# Must be first since it unloads the prelude from 1.9.2

Просмотреть файл

@ -294,6 +294,8 @@ By default, this RubyGems will install gem as:
say "Installing #{tool}" if @verbose
lib_files = rb_files_in path
lib_files.concat(template_files) if tool == 'Bundler'
pem_files = pem_files_in path
Dir.chdir path do
@ -354,6 +356,10 @@ By default, this RubyGems will install gem as:
mkdir_p Gem::Specification.default_specifications_dir
# Workaround for non-git environment.
gemspec = File.read('bundler/bundler.gemspec').gsub(/`git ls-files -z`/, "''")
File.open('bundler/bundler.gemspec', 'w'){|f| f.write gemspec }
bundler_spec = Gem::Specification.load("bundler/bundler.gemspec")
bundler_spec.files = Dir.chdir("bundler") { Dir["{*.md,{lib,exe,man}/**/*}"] }
bundler_spec.executables -= %w[bundler bundle_ruby]
@ -433,6 +439,22 @@ By default, this RubyGems will install gem as:
end
end
# for installation of bundler as default gems
def template_files
Dir.chdir "bundler/lib" do
(Dir[File.join('bundler', 'templates', '**', '*')] + Dir[File.join('bundler', 'templates', '**', '.*')]).
select{|f| !File.directory?(f)}
end
end
# for cleanup old bundler files
def template_files_in dir
Dir.chdir dir do
(Dir[File.join('templates', '**', '*')] + Dir[File.join('templates', '**', '.*')]).
select{|f| !File.directory?(f)}
end
end
def remove_old_bin_files(bin_dir)
old_bin_files = {
'gem_mirror' => 'gem mirror',
@ -470,8 +492,10 @@ abort "#{deprecation_message}"
lib_dirs[File.join(lib_dir, 'bundler')] = 'bundler/lib/bundler' if Gem::USE_BUNDLER_FOR_GEMDEPS
lib_dirs.each do |old_lib_dir, new_lib_dir|
lib_files = rb_files_in(new_lib_dir)
lib_files.concat(template_files_in(new_lib_dir)) if new_lib_dir =~ /bundler/
old_lib_files = rb_files_in(old_lib_dir)
old_lib_files.concat(template_files_in(old_lib_dir)) if old_lib_dir =~ /bundler/
to_remove = old_lib_files - lib_files