[前][次][番号順一覧][スレッド一覧]

ruby-changes:34432

From: hsbt <ko1@a...>
Date: Mon, 23 Jun 2014 18:13:19 +0900 (JST)
Subject: [ruby-changes:34432] hsbt:r46513 (trunk): * tool/rbinstall.rb: support to install bundle gems.

hsbt	2014-06-23 18:13:14 +0900 (Mon, 23 Jun 2014)

  New Revision: 46513

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46513

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

  Modified files:
    trunk/ChangeLog
    trunk/tool/rbinstall.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46512)
+++ ChangeLog	(revision 46513)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Jun 23 18:03:13 2014  SHIBATA Hiroshi  <shibata.hiroshi@g...>
+
+	* tool/rbinstall.rb: support to install bundle gems.
+
 Mon Jun 23 17:33:11 2014  Akinori MUSHA  <knu@i...>
 
 	* lib/net/imap.rb (Net::IMAP#fetch): [DOC] Describe how a range in
Index: tool/rbinstall.rb
===================================================================
--- tool/rbinstall.rb	(revision 46512)
+++ tool/rbinstall.rb	(revision 46513)
@@ -556,65 +556,6 @@ install?(:local, :comm, :man) do https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L556
   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 https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L715
   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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]