* tool/rbinstall.rb: support to install bundle gems.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2014-06-23 09:13:14 +00:00
Родитель 4fa35e0e9d
Коммит 6f3e8df133
2 изменённых файлов: 16 добавлений и 59 удалений

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

@ -1,3 +1,7 @@
Mon Jun 23 18:03:13 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* tool/rbinstall.rb: support to install bundle gems.
Mon Jun 23 17:33:11 2014 Akinori MUSHA <knu@iDaemons.org>
* lib/net/imap.rb (Net::IMAP#fetch): [DOC] Describe how a range in

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

@ -556,65 +556,6 @@ install?(:local, :comm, :man) do
end
end
# :stopdoc:
module Gem
if defined?(Specification)
remove_const(:Specification)
end
class Specification < OpenStruct
def initialize(*)
super
yield(self) if defined?(yield)
self.executables ||= []
end
def self.load(path)
src = File.open(path, "rb") {|f| f.read}
src.sub!(/\A#.*/, '')
spec = eval(src, nil, path)
spec.date ||= last_date(path) || RUBY_RELEASE_DATE
spec
end
def self.last_date(path)
return unless $vcs
time = $vcs.get_revisions(path)[2] rescue return
return unless time
time.strftime("%Y-%m-%d")
end
def to_ruby
<<-GEMSPEC
Gem::Specification.new do |s|
s.name = #{name.dump}
s.version = #{version.dump}
s.date = #{date.dump}
s.summary = #{summary.dump}
s.description = #{description.dump}
s.homepage = #{homepage.dump}
s.authors = #{authors.inspect}
s.email = #{email.inspect}
s.files = #{files.inspect}
end
GEMSPEC
end
def add_dependency(*)
end
def add_development_dependency(*)
end
def add_runtime_dependency(*)
end
def self.unresolved_deps
[]
end
end
end
module RbInstall
module Specs
class FileCollector
@ -774,6 +715,18 @@ install?(:ext, :comm, :gem) do
end
end
install?(:ext, :comm, :gem) do
require 'pathname'
gem_dir = Gem.default_dir
directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
prepare "bundle gems", gem_dir, directories
Dir.glob(srcdir+'/gems/*.gem').each do |gem|
Gem.install gem
gemname = Pathname(gem).basename
puts "#{" "*30}#{gemname}"
end
end
parse_args()
include FileUtils