From fc85bdeb77ae642348bb797ef9ffb65913dfc77c Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 7 Nov 2019 16:34:03 +0900 Subject: [PATCH] Promote cgi to default gems --- doc/maintainers.rdoc | 12 ++++++++---- doc/standard_library.rdoc | 2 +- lib/cgi/cgi.gemspec | 27 +++++++++++++++++++++++++++ lib/cgi/version.rb | 3 +++ tool/sync_default_gems.rb | 9 +++++++++ 5 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 lib/cgi/cgi.gemspec create mode 100644 lib/cgi/version.rb diff --git a/doc/maintainers.rdoc b/doc/maintainers.rdoc index 64089cc501..56e921303a 100644 --- a/doc/maintainers.rdoc +++ b/doc/maintainers.rdoc @@ -44,8 +44,6 @@ Zachary Scott (zzak) Akinori MUSHA (knu) [lib/base64.rb] Yusuke Endoh (mame) -[lib/cgi.rb, lib/cgi/*] - Takeyuki Fujioka (xibbar) [lib/drb.rb, lib/drb/*] Masatoshi SEKI (seki) [lib/debug.rb] @@ -114,8 +112,6 @@ Zachary Scott (zzak) === Extensions -[ext/cgi] - Nobuyoshi Nakada (nobu) [ext/continuation] Koichi Sasada (ko1) [ext/coverage] @@ -162,6 +158,10 @@ Zachary Scott (zzak) Hiroshi SHIBATA (hsbt) https://github.com/bundler/bundler https://rubygems.org/gems/bundler +[lib/cgi.rb, lib/cgi/*] + Takeyuki Fujioka (xibbar) + https://github.com/ruby/cgi + https://rubygems.org/gems/cgi [lib/csv.rb] Kenta Murata (mrkn), Kouhei Sutou (kou) https://github.com/ruby/csv @@ -270,6 +270,10 @@ Zachary Scott (zzak) Kenta Murata (mrkn) https://github.com/ruby/bigdecimal https://rubygems.org/gems/bigdecimal +[ext/cgi] + Nobuyoshi Nakada (nobu) + https://github.com/ruby/cgi + https://rubygems.org/gems/cgi [ext/date] _unmaintained_ https://github.com/ruby/date diff --git a/doc/standard_library.rdoc b/doc/standard_library.rdoc index b6b0eb41de..ed6829fe89 100644 --- a/doc/standard_library.rdoc +++ b/doc/standard_library.rdoc @@ -10,7 +10,6 @@ description. Abbrev:: Calculates a set of unique abbreviations for a given set of strings Base64:: Support for encoding and decoding binary data using a Base64 representation -CGI:: Support for the Common Gateway Interface protocol DEBUGGER__:: Debugging functionality for Ruby DRb:: Distributed object system for Ruby English.rb:: Require 'English.rb' to reference global variables with less cryptic names @@ -65,6 +64,7 @@ WIN32OLE:: Provides an interface for OLE Automation in Ruby Benchmark:: Provides methods to measure and report the time used to execute code Bundler:: Manage your Ruby application's gem dependencies +CGI:: Support for the Common Gateway Interface protocol 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 diff --git a/lib/cgi/cgi.gemspec b/lib/cgi/cgi.gemspec new file mode 100644 index 0000000000..403d31c978 --- /dev/null +++ b/lib/cgi/cgi.gemspec @@ -0,0 +1,27 @@ +begin + require_relative "lib/cgi/version" +rescue LoadError # Fallback to load version file in ruby core repository + require_relative "version" +end + +Gem::Specification.new do |spec| + spec.name = "cgi" + spec.version = CGI::VERSION + spec.authors = ["Yukihiro Matsumoto"] + spec.email = ["matz@ruby-lang.org"] + + spec.summary = %q{Support for the Common Gateway Interface protocol.} + spec.description = %q{Support for the Common Gateway Interface protocol.} + spec.homepage = "https://github.com/ruby/cgi" + 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/cgi/version.rb b/lib/cgi/version.rb new file mode 100644 index 0000000000..9d17c91b95 --- /dev/null +++ b/lib/cgi/version.rb @@ -0,0 +1,3 @@ +class CGI + VERSION = "0.1.0" +end diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 5f5825e22a..3e0bd4eba9 100644 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -41,6 +41,7 @@ # * https://github.com/ruby/benchmark # * https://github.com/ruby/net-pop # * https://github.com/ruby/net-smtp +# * https://github.com/ruby/cgi # require 'fileutils' @@ -89,6 +90,7 @@ $repositories = { benchmark: "ruby/benchmark", netpop: "ruby/net-pop", netsmtp: "ruby/net-smtp", + cgi: "ruby/cgi", } def sync_default_gems(gem) @@ -226,6 +228,13 @@ def sync_default_gems(gem) rm_rf("test/racc/lib") rm_rf("lib/racc/cparse-jruby.jar") `git checkout ext/racc/cparse/README ext/racc/cparse/depend` + when "cgi" + rm_rf(%w[lib/cgi.rb lib/cgi ext/cgi test/cgi]) + cp_r("#{upstream}/ext/cgi", "ext") + cp_r("#{upstream}/lib", ".") + cp_r("#{upstream}/test/cgi", "test") + cp_r("#{upstream}/cgi.gemspec", "lib/cgi") + `git checkout ext/cgi/escape/depend` when "netpop" sync_lib "net-pop" mv "lib/net-pop.gemspec", "lib/net/pop"