From 867204c4a558f318be9d39da47298d5ccc85ff17 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 10 Sep 2020 20:42:53 +0900 Subject: [PATCH] Promote syslog to default gems --- doc/maintainers.rdoc | 5 +++-- doc/standard_library.rdoc | 2 +- ext/syslog/syslog.gemspec | 23 +++++++++++++++++++++++ tool/sync_default_gems.rb | 9 +++++++++ 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 ext/syslog/syslog.gemspec diff --git a/doc/maintainers.rdoc b/doc/maintainers.rdoc index 00632c73c2..d687335162 100644 --- a/doc/maintainers.rdoc +++ b/doc/maintainers.rdoc @@ -89,8 +89,6 @@ Zachary Scott (zzak) [ext/socket] * Tanaka Akira (akr) * API change needs matz's approval -[ext/syslog] - Akinori MUSHA (knu) [ext/win32] NAKAMURA Usaku (usa) [ext/win32ole] @@ -348,6 +346,9 @@ Zachary Scott (zzak) Kouhei Sutou (kou) https://github.com/ruby/strscan https://rubygems.org/gems/strscan +[ext/syslog] + Akinori MUSHA (knu) + https://github.com/ruby/syslog [ext/zlib] NARUSE, Yui (naruse) https://github.com/ruby/zlib diff --git a/doc/standard_library.rdoc b/doc/standard_library.rdoc index c226ca48d9..08dde0f8cf 100644 --- a/doc/standard_library.rdoc +++ b/doc/standard_library.rdoc @@ -32,7 +32,6 @@ Pathname:: Representation of the name of a file or directory on the filesystem PTY:: Creates and manages pseudo terminals Ripper:: Provides an interface for parsing Ruby programs into S-expressions Socket:: Access underlying OS socket implementations -Syslog:: Ruby interface for the POSIX system logging facility WIN32OLE:: Provides an interface for OLE Automation in Ruby = Default gems @@ -103,6 +102,7 @@ Psych:: A YAML parser and emitter for Ruby Readline:: Provides an interface for GNU Readline and Edit Line (libedit) StringIO:: Pseudo I/O on String objects StringScanner:: Provides lexical scanning operations on a String +Syslog:: Ruby interface for the POSIX system logging facility Zlib:: Ruby interface for the zlib compression/decompression library = Bundled gems diff --git a/ext/syslog/syslog.gemspec b/ext/syslog/syslog.gemspec new file mode 100644 index 0000000000..8f73f5ad0d --- /dev/null +++ b/ext/syslog/syslog.gemspec @@ -0,0 +1,23 @@ +Gem::Specification.new do |spec| + spec.name = "syslog" + spec.version = "0.1.0" + spec.authors = ["Akinori MUSHA"] + spec.email = ["knu@idaemons.org"] + + spec.summary = %q{Ruby interface for the POSIX system logging facility.} + spec.description = %q{Ruby interface for the POSIX system logging facility.} + spec.homepage = "https://github.com/ruby/syslog" + 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 + + 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.extensions = ["ext/syslog/extconf.rb"] + 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 517f048b35..40ee949aab 100644 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -71,6 +71,7 @@ REPOSITORIES = { abbrev: "ruby/abbrev", shellwords: "ruby/shellwords", base64: "ruby/base64", + syslog: "ruby/syslog", } def sync_default_gems(gem) @@ -283,6 +284,14 @@ def sync_default_gems(gem) cp_r("#{upstream}/test/nkf", "test") cp_r("#{upstream}/nkf.gemspec", "ext/nkf") `git checkout ext/nkf/depend` + when "syslog" + rm_rf(%w[ext/syslog test/syslog test/test_syslog.rb]) + cp_r("#{upstream}/ext/syslog", "ext") + cp_r("#{upstream}/lib", "ext/syslog") + cp_r("#{upstream}/test/syslog", "test") + cp_r("#{upstream}/test/test_syslog.rb", "test") + cp_r("#{upstream}/syslog.gemspec", "ext/syslog") + `git checkout ext/syslog/depend` else sync_lib gem end