From d6ec12417a1d554825a291dae10e8508a0cbbd06 Mon Sep 17 00:00:00 2001 From: hsbt Date: Fri, 20 Jul 2018 02:24:59 +0000 Subject: Promote Shell library to default gems. * doc/*: Move entry to default gems category from standard library. * lib/shell/*: Added `Shell::VERSION` and re-used it with @RELEASE_VERSION. * test/shell/test_command_processor.rb: added missing require for test library. * tool/sync_default_gems.rb: Support shell library. We need to ignore shellwords.rb when syncing shell* files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- doc/maintainers.rdoc | 4 ++-- doc/standard_library.rdoc | 2 +- lib/shell/shell.gemspec | 21 +++++++++++++++++++++ lib/shell/version.rb | 3 ++- test/shell/test_command_processor.rb | 1 + tool/sync_default_gems.rb | 8 +++++--- 6 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 lib/shell/shell.gemspec diff --git a/doc/maintainers.rdoc b/doc/maintainers.rdoc index 3ec9178985..1b5fb9fd14 100644 --- a/doc/maintainers.rdoc +++ b/doc/maintainers.rdoc @@ -117,8 +117,6 @@ Zachary Scott (zzak) Akinori MUSHA (knu) [lib/securerandom.rb] Tanaka Akira (akr) -[lib/shell.rb, lib/shell/*] - Keiju ISHITSUKA (keiju) [lib/shellwords.rb] Akinori MUSHA (knu) [lib/singleton.rb] @@ -219,6 +217,8 @@ Zachary Scott (zzak) [lib/scanf.rb] David A. Black (dblack) https://github.com/ruby/scanf +[lib/shell.rb, lib/shell/*] + Keiju ISHITSUKA (keiju) [lib/sync.rb] Keiju ISHITSUKA (keiju) [lib/tracer.rb] diff --git a/doc/standard_library.rdoc b/doc/standard_library.rdoc index e9fd533f32..1919e225f5 100644 --- a/doc/standard_library.rdoc +++ b/doc/standard_library.rdoc @@ -47,7 +47,6 @@ Rinda:: The Linda distributed computing paradigm in Ruby Gem:: Package management framework for Ruby SecureRandom:: Interface for secure random number generator Set:: Provides a class to deal with collections of unordered, unique values -Shell:: An idiomatic Ruby interface for common UNIX shell commands Shellwords:: Manipulates strings with word parsing rules of UNIX Bourne shell Singleton:: Implementation of the Singleton pattern for Ruby Tempfile:: A utility class for managing temporary files @@ -93,6 +92,7 @@ RDoc:: Produces HTML and command-line documentation for Ruby REXML:: An XML toolkit for Ruby RSS:: Family of libraries that support various formats of XML "feeds" Scanf:: A Ruby implementation of the C function scanf(3) +Shell:: An idiomatic Ruby interface for common UNIX shell commands Synchronizer:: A module that provides a two-phase lock with a counter Tracer:: Outputs a source level execution trace of a Ruby program WEBrick:: An HTTP server toolkit for Ruby diff --git a/lib/shell/shell.gemspec b/lib/shell/shell.gemspec new file mode 100644 index 0000000000..ffd42d5ad9 --- /dev/null +++ b/lib/shell/shell.gemspec @@ -0,0 +1,21 @@ +require_relative "version" + +Gem::Specification.new do |spec| + spec.name = "shell" + spec.version = Shell::VERSION + spec.authors = ["Keiju ISHITSUKA"] + spec.email = ["keiju@ruby-lang.org"] + + spec.summary = %q{An idiomatic Ruby interface for common UNIX shell commands.} + spec.description = %q{An idiomatic Ruby interface for common UNIX shell commands.} + spec.homepage = "https://github.com/ruby/shell" + spec.license = "BSD-2-Clause" + + spec.files = [".gitignore", ".travis.yml", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "lib/shell.rb", "lib/shell/builtin-command.rb", "lib/shell/command-processor.rb", "lib/shell/error.rb", "lib/shell/filter.rb", "lib/shell/process-controller.rb", "lib/shell/system-command.rb", "lib/shell/version.rb", "shell.gemspec"] + 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 diff --git a/lib/shell/version.rb b/lib/shell/version.rb index bb4e7dfb8e..f48f781b2c 100644 --- a/lib/shell/version.rb +++ b/lib/shell/version.rb @@ -11,6 +11,7 @@ # class Shell # :nodoc: - @RELEASE_VERSION = "0.7" + VERSION = "0.7" + @RELEASE_VERSION = VERSION @LAST_UPDATE_DATE = "07/03/20" end diff --git a/test/shell/test_command_processor.rb b/test/shell/test_command_processor.rb index 06b5ecc1d9..d0bcf8e349 100644 --- a/test/shell/test_command_processor.rb +++ b/test/shell/test_command_processor.rb @@ -1,4 +1,5 @@ # frozen_string_literal: false +require 'test/unit' require 'shell' require 'tmpdir' diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index f4e5a73381..75094376e2 100644 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -30,6 +30,7 @@ # * https://github.com/ruby/irb # * https://github.com/ruby/sync # * https://github.com/ruby/tracer +# * https://github.com/ruby/shell # $repositories = { @@ -62,7 +63,8 @@ $repositories = { rss: 'ruby/rss', irb: 'ruby/irb', sync: 'ruby/sync', - tracer: 'ruby/tracer' + tracer: 'ruby/tracer', + shell: 'ruby/shell' } def sync_default_gems(gem) @@ -226,14 +228,14 @@ 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" + when "rexml", "rss", "matrix", "irb", "csv", "shell" sync_lib gem else end end def sync_lib(repo) - `rm -rf lib/#{repo}* test/#{repo}` + `rm -rf lib/#{repo}.rb lib/#{repo}/* test/#{repo}` `cp -rf ../#{repo}/lib/* lib` `cp -rf ../#{repo}/test/#{repo} test` `cp -f ../#{repo}/#{repo}.gemspec lib/#{repo}` -- cgit v1.2.3