From 2e3a7f70ae71650be6ea38a483f66ce17ca5eb1d Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 25 Aug 2020 21:17:19 +0900 Subject: Promote nkf to default gems --- doc/maintainers.rdoc | 5 +++-- doc/standard_library.rdoc | 2 +- ext/nkf/nkf.gemspec | 24 ++++++++++++++++++++++++ tool/sync_default_gems.rb | 8 ++++++++ 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 ext/nkf/nkf.gemspec diff --git a/doc/maintainers.rdoc b/doc/maintainers.rdoc index b5934b7688..50b1053c3d 100644 --- a/doc/maintainers.rdoc +++ b/doc/maintainers.rdoc @@ -86,8 +86,6 @@ Zachary Scott (zzak) Koichi Sasada (ko1) [ext/monitor] Koichi Sasada (ko1) -[ext/nkf] - NARUSE, Yui (naruse) [ext/objspace] _unmaintained_ [ext/pathname] @@ -319,6 +317,9 @@ Zachary Scott (zzak) NARUSE, Yui (naruse), Hiroshi SHIBATA (hsbt) https://github.com/flori/json https://rubygems.org/gems/json +[ext/nkf] + NARUSE, Yui (naruse) + https://github.com/ruby/nkf [ext/openssl] Kazuki Yamaguchi (rhe) https://github.com/ruby/openssl diff --git a/doc/standard_library.rdoc b/doc/standard_library.rdoc index 2f65c0b028..fd5b8c567d 100644 --- a/doc/standard_library.rdoc +++ b/doc/standard_library.rdoc @@ -31,7 +31,6 @@ un.rb:: Utilities to replace common UNIX commands Coverage:: Provides coverage measurement for Ruby Digest:: Provides a framework for message digest libraries Monitor:: Provides an object or module to use safely by more than one thread -NKF:: Ruby extension for Network Kanji Filter objspace:: Extends ObjectSpace module to add methods for internal statistics Pathname:: Representation of the name of a file or directory on the filesystem PTY:: Creates and manages pseudo terminals @@ -98,6 +97,7 @@ Fiddle:: A libffi wrapper for Ruby GDBM:: Ruby extension for the GNU dbm (gdbm) library IO:: Extensions for Ruby IO class, including #wait, #nonblock and ::console JSON:: Implements Javascript Object Notation for Ruby +NKF:: Ruby extension for Network Kanji Filter OpenSSL:: Provides SSL, TLS and general purpose cryptography for Ruby Psych:: A YAML parser and emitter for Ruby Readline:: Provides an interface for GNU Readline and Edit Line (libedit) diff --git a/ext/nkf/nkf.gemspec b/ext/nkf/nkf.gemspec new file mode 100644 index 0000000000..23f1dcdbaf --- /dev/null +++ b/ext/nkf/nkf.gemspec @@ -0,0 +1,24 @@ +Gem::Specification.new do |spec| + spec.name = "nkf" + spec.version = "0.1.0" + spec.authors = ["NARUSE Yui"] + spec.email = ["naruse@airemix.jp"] + + spec.summary = %q{Ruby extension for Network Kanji Filter} + spec.description = %q{Ruby extension for Network Kanji Filter} + spec.homepage = "https://github.com/ruby/nkf" + spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0") + spec.licenses = ["Ruby", "BSD-2-Clause"] + + spec.metadata["homepage_uri"] = spec.homepage + spec.metadata["source_code_uri"] = spec.homepage + + # Specify which files should be added to the gem when it is released. + # The `git ls-files -z` loads the files in the RubyGem that have been added into git. + 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/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 4842f81973..c2ebd39e82 100644 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -66,6 +66,7 @@ $repositories = { find: "ruby/find", rinda: "ruby/rinda", erb: "ruby/erb", + nkf: "ruby/nkf", } def sync_default_gems(gem) @@ -271,6 +272,13 @@ def sync_default_gems(gem) cp_r("#{upstream}/test/erb", "test") cp_r("#{upstream}/erb.gemspec", "lib") cp_r("#{upstream}/exe/erb", "libexec") + when "nkf" + rm_rf(%w[ext/nkf test/nkf]) + cp_r("#{upstream}/ext/nkf", "ext") + cp_r("#{upstream}/lib", "ext/nkf") + cp_r("#{upstream}/test/nkf", "test") + cp_r("#{upstream}/nkf.gemspec", "ext/nkf") + `git checkout ext/nkf/depend` else sync_lib gem end -- cgit v1.2.3