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

ruby-changes:51828

From: hsbt <ko1@a...>
Date: Wed, 25 Jul 2018 20:54:03 +0900 (JST)
Subject: [ruby-changes:51828] hsbt:r64042 (trunk): Promote Forwardable to default gems.

hsbt	2018-07-25 20:53:57 +0900 (Wed, 25 Jul 2018)

  New Revision: 64042

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

  Log:
    Promote Forwardable to default gems.
    
      * lib/forwardable.rb: Added Forwardable::VERSION and re-use it.
      * lib/forwardable/forwardable.gemspec: Added initial gemspec.
      * tool/sync_default_gems.rb: Support forwaradable repository.

  Added files:
    trunk/lib/forwardable/forwardable.gemspec
  Modified files:
    trunk/lib/forwardable.rb
    trunk/tool/sync_default_gems.rb
Index: tool/sync_default_gems.rb
===================================================================
--- tool/sync_default_gems.rb	(revision 64041)
+++ tool/sync_default_gems.rb	(revision 64042)
@@ -31,6 +31,7 @@ https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L31
 # * https://github.com/ruby/sync
 # * https://github.com/ruby/tracer
 # * https://github.com/ruby/shell
+# * https://github.com/ruby/forwardable
 #
 
 $repositories = {
@@ -64,7 +65,8 @@ $repositories = { https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L65
   irb: 'ruby/irb',
   sync: 'ruby/sync',
   tracer: 'ruby/tracer',
-  shell: 'ruby/shell'
+  shell: 'ruby/shell',
+  forwardable: "ruby/forwardable"
 }
 
 def sync_default_gems(gem)
@@ -202,16 +204,21 @@ def sync_default_gems(gem) https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L204
     `cp -rf ../tracer/lib/* lib`
     `cp -rf ../tracer/test/test_tracer.rb test`
     `cp -f ../tracer/tracer.gemspec lib`
-  when "rexml", "rss", "matrix", "irb", "csv", "shell", "logger", "ostruct", "scanf", "webrick", "fileutils"
+  when "rexml", "rss", "matrix", "irb", "csv", "shell", "logger", "ostruct", "scanf", "webrick", "fileutils", "forwardable"
     sync_lib gem
   else
   end
 end
 
 def sync_lib(repo)
-  `rm -rf lib/#{repo}.rb lib/#{repo}/* test/#{repo}`
+  `rm -rf lib/#{repo}.rb lib/#{repo}/* test/test_#{repo}.rb test/#{repo}`
   `cp -rf ../#{repo}/lib/* lib`
-  `cp -rf ../#{repo}/test/#{repo} test`
+  tests = if File.directory?("test/#{repo}")
+            "test/#{repo}"
+          else
+            "test/test_#{repo}.rb"
+          end
+  `cp -rf ../#{repo}/#{tests} test`
   gemspec = if File.directory?("lib/#{repo}")
               "lib/#{repo}/#{repo}.gemspec"
             else
Index: lib/forwardable.rb
===================================================================
--- lib/forwardable.rb	(revision 64041)
+++ lib/forwardable.rb	(revision 64042)
@@ -113,7 +113,8 @@ module Forwardable https://github.com/ruby/ruby/blob/trunk/lib/forwardable.rb#L113
   require 'forwardable/impl'
 
   # Version of +forwardable.rb+
-  FORWARDABLE_VERSION = "1.2.0"
+  VERSION = "1.2.0"
+  FORWARDABLE_VERSION = VERSION
 
   @debug = nil
   class << self
Index: lib/forwardable/forwardable.gemspec
===================================================================
--- lib/forwardable/forwardable.gemspec	(nonexistent)
+++ lib/forwardable/forwardable.gemspec	(revision 64042)
@@ -0,0 +1,21 @@ https://github.com/ruby/ruby/blob/trunk/lib/forwardable/forwardable.gemspec#L1
+require_relative "../forwardable"
+
+Gem::Specification.new do |spec|
+  spec.name          = "forwardable"
+  spec.version       = Forwardable::VERSION
+  spec.authors       = ["Keiju ISHITSUKA"]
+  spec.email         = ["keiju@r..."]
+
+  spec.summary       = %q{Provides delegation of specified methods to a designated object.}
+  spec.description   = %q{Provides delegation of specified methods to a designated object.}
+  spec.homepage      = "https://github.com/ruby/forwardable"
+  spec.license       = "BSD-2-Clause"
+
+  spec.files         = [".gitignore", ".travis.yml", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "forwardable.gemspec", "lib/forwardable.rb", "lib/forwardable/impl.rb"]
+  spec.bindir        = "exe"
+  spec.executables   = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+  spec.require_paths = ["lib"]
+
+  spec.add_development_dependency "bundler"
+  spec.add_development_dependency "rake"
+end

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

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