From 1159dbf305603b60a1e5d2b9ff77a9cf30775296 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 7 Nov 2019 13:21:46 +0900 Subject: Promote delegate to default gems --- doc/maintainers.rdoc | 6 ++++-- doc/standard_library.rdoc | 2 +- lib/delegate/delegate.gemspec | 27 +++++++++++++++++++++++++++ lib/delegate/version.rb | 3 +++ tool/sync_default_gems.rb | 2 ++ 5 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 lib/delegate/delegate.gemspec create mode 100644 lib/delegate/version.rb diff --git a/doc/maintainers.rdoc b/doc/maintainers.rdoc index cf13ad6588..32d6296830 100644 --- a/doc/maintainers.rdoc +++ b/doc/maintainers.rdoc @@ -52,8 +52,6 @@ Zachary Scott (zzak) Masatoshi SEKI (seki) [lib/debug.rb] _unmaintained_ -[lib/delegate.rb] - _unmaintained_ [lib/erb.rb] Masatoshi SEKI (seki), Takashi Kokubun (k0kubun) [lib/find.rb] @@ -170,6 +168,10 @@ Zachary Scott (zzak) Kenta Murata (mrkn), Kouhei Sutou (kou) https://github.com/ruby/csv https://rubygems.org/gems/csv +[lib/delegate.rb] + _unmaintained_ + https://github.com/ruby/delegate + https://rubygems.org/gems/delegate [lib/e2mmap.rb] Keiju ISHITSUKA (keiju) https://rubygems.org/gems/e2mmap diff --git a/doc/standard_library.rdoc b/doc/standard_library.rdoc index a18d6ea001..3e4c7de7f7 100644 --- a/doc/standard_library.rdoc +++ b/doc/standard_library.rdoc @@ -13,7 +13,6 @@ Base64:: Support for encoding and decoding binary data using a Base64 representa Benchmark:: Provides methods to measure and report the time used to execute code CGI:: Support for the Common Gateway Interface protocol DEBUGGER__:: Debugging functionality for Ruby -Delegator:: Provides three abilities to delegate method calls to an object DRb:: Distributed object system for Ruby English.rb:: Require 'English.rb' to reference global variables with less cryptic names ERB:: An easy to use but powerful templating system for Ruby @@ -69,6 +68,7 @@ WIN32OLE:: Provides an interface for OLE Automation in Ruby Bundler:: Manage your Ruby application's gem dependencies CSV:: Provides an interface to read and write CSV files and data +Delegator:: Provides three abilities to delegate method calls to an object E2MM:: Module for defining custom exceptions with specific messages FileUtils:: Several file utility methods for copying, moving, removing, etc Forwardable:: Provides delegation of specified methods to a designated object diff --git a/lib/delegate/delegate.gemspec b/lib/delegate/delegate.gemspec new file mode 100644 index 0000000000..e51b50a98f --- /dev/null +++ b/lib/delegate/delegate.gemspec @@ -0,0 +1,27 @@ +begin + require_relative "lib/delegate/version" +rescue LoadError # Fallback to load version file in ruby core repository + require_relative "version" +end + +Gem::Specification.new do |spec| + spec.name = "delegate" + spec.version = Delegator::VERSION + spec.authors = ["Yukihiro Matsumoto"] + spec.email = ["matz@ruby-lang.org"] + + spec.summary = %q{Provides three abilities to delegate method calls to an object.} + spec.description = %q{Provides three abilities to delegate method calls to an object.} + spec.homepage = "https://github.com/ruby/delegate" + spec.license = "BSD-2-Clause" + + spec.metadata["homepage_uri"] = spec.homepage + spec.metadata["source_code_uri"] = spec.homepage + + spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do + `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } + end + spec.bindir = "exe" + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ["lib"] +end diff --git a/lib/delegate/version.rb b/lib/delegate/version.rb new file mode 100644 index 0000000000..456e8f772c --- /dev/null +++ b/lib/delegate/version.rb @@ -0,0 +1,3 @@ +class Delegator + VERSION = "0.1.0" +end diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 3c52a72640..31dd664cdc 100644 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -37,6 +37,7 @@ # * https://github.com/ruby/open3 # * https://github.com/ruby/getoptlong # * https://github.com/ruby/pstore +# * https://github.com/ruby/delegate # require 'fileutils' @@ -81,6 +82,7 @@ $repositories = { open3: "ruby/open3", getoptlong: "ruby/getoptlong", pstore: "ruby/pstore", + delegate: "ruby/delegate", } def sync_default_gems(gem) -- cgit v1.2.3