зеркало из https://github.com/github/ruby.git
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
fd87d68028
Коммит
26e6462b81
|
@ -113,7 +113,8 @@ module Forwardable
|
|||
require 'forwardable/impl'
|
||||
|
||||
# Version of +forwardable.rb+
|
||||
FORWARDABLE_VERSION = "1.2.0"
|
||||
VERSION = "1.2.0"
|
||||
FORWARDABLE_VERSION = VERSION
|
||||
|
||||
@debug = nil
|
||||
class << self
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
require_relative "../forwardable"
|
||||
|
||||
Gem::Specification.new do |spec|
|
||||
spec.name = "forwardable"
|
||||
spec.version = Forwardable::VERSION
|
||||
spec.authors = ["Keiju ISHITSUKA"]
|
||||
spec.email = ["keiju@ruby-lang.org"]
|
||||
|
||||
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
|
|
@ -31,6 +31,7 @@
|
|||
# * 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 = {
|
|||
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)
|
|||
`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
|
||||
|
|
Загрузка…
Ссылка в новой задаче