...
 
Commits (5)
=== 4.4.5 / 2018-05-22
* Make internal command state less mutable. (@doriantaylor)
=== 4.4.4 / 2018-01-18
* Fix deprecated constant warnings on Ruby 2.5. (@mattbrictson)
......
ruby-commander (4.4.5-1) unstable; urgency=medium
* New upstream version 4.4.5
* d/control: Bump Standard Version 4.1.4
* Add patch: replace gemspec git execution
-- Youhei SASAKI <uwabami@gfd-dennou.org> Tue, 05 Jun 2018 18:38:28 +0900
ruby-commander (4.4.4-1) unstable; urgency=medium
* Team upload.
......
......@@ -8,7 +8,7 @@ Build-Depends: debhelper (>= 11~),
rake,
ruby-highline (>= 1.7.2),
ruby-rspec
Standards-Version: 4.1.3
Standards-Version: 4.1.4
Vcs-Git: https://salsa.debian.org/ruby-team/ruby-commander.git
Vcs-Browser: https://salsa.debian.org/ruby-team/ruby-commander
Homepage: https://github.com/commander-rb/commander
......
......@@ -7,7 +7,7 @@ Subject: Test suite adjustments
1 file changed, 7 deletions(-)
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 83ed668..d5da5b7 100644
index 9426755..9a89cfc 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,12 +1,5 @@
......
From: Youhei SASAKI <uwabami@gfd-dennou.org>
Date: Tue, 5 Jun 2018 18:35:21 +0900
Subject: Replace gemspec git execution
Signed-off-by: Youhei SASAKI <uwabami@gfd-dennou.org>
---
commander.gemspec | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/commander.gemspec b/commander.gemspec
index 08c8890..563e727 100644
--- a/commander.gemspec
+++ b/commander.gemspec
@@ -13,9 +13,9 @@ Gem::Specification.new do |s|
s.summary = 'The complete solution for Ruby command-line executables'
s.description = 'The complete solution for Ruby command-line executables. Commander bridges the gap between other terminal related libraries you know and love (OptionParser, HighLine), while providing many new features, and an elegant API.'
- s.files = `git ls-files`.split("\n")
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
- s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
+ s.files = [".gitignore",".rspec",".rubocop.yml",".rubocop_todo.yml",".travis.yml","DEVELOPMENT","Gemfile","History.rdoc","LICENSE","Manifest","README.md","Rakefile","bin/commander","commander.gemspec","debian/changelog","debian/commander.1","debian/compat","debian/control","debian/copyright","debian/patches/0001-Test-suite-adjustments.patch","debian/patches/series","debian/ruby-commander.docs","debian/ruby-commander.manpages","debian/ruby-tests.rake","debian/rules","debian/source/format","debian/tests/control","debian/tests/run-test","debian/watch","lib/commander.rb","lib/commander/blank.rb","lib/commander/command.rb","lib/commander/configure.rb","lib/commander/core_ext.rb","lib/commander/core_ext/array.rb","lib/commander/core_ext/object.rb","lib/commander/delegates.rb","lib/commander/help_formatters.rb","lib/commander/help_formatters/base.rb","lib/commander/help_formatters/terminal.rb","lib/commander/help_formatters/terminal/command_help.erb","lib/commander/help_formatters/terminal/help.erb","lib/commander/help_formatters/terminal_compact.rb","lib/commander/help_formatters/terminal_compact/command_help.erb","lib/commander/help_formatters/terminal_compact/help.erb","lib/commander/import.rb","lib/commander/methods.rb","lib/commander/platform.rb","lib/commander/runner.rb","lib/commander/user_interaction.rb","lib/commander/version.rb","spec/command_spec.rb","spec/configure_spec.rb","spec/core_ext/array_spec.rb","spec/core_ext/object_spec.rb","spec/help_formatters/terminal_compact_spec.rb","spec/help_formatters/terminal_spec.rb","spec/methods_spec.rb","spec/runner_spec.rb","spec/spec_helper.rb","spec/ui_spec.rb"]
+ s.test_files = ["spec/command_spec.rb","spec/configure_spec.rb","spec/core_ext/array_spec.rb","spec/core_ext/object_spec.rb","spec/help_formatters/terminal_compact_spec.rb","spec/help_formatters/terminal_spec.rb","spec/methods_spec.rb","spec/runner_spec.rb","spec/spec_helper.rb","spec/ui_spec.rb"]
+ s.executables = ['commander']
s.require_paths = ['lib']
s.add_runtime_dependency('highline', '~> 1.7.2')
0001-Test-suite-adjustments.patch
0002-Replace-gemspec-git-execution.patch
......@@ -171,9 +171,13 @@ module Commander
# Call the commands when_called block with _args_.
def call(args = [])
object = @when_called.shift
meth = @when_called.shift || :call
object, meth = @when_called[0, 2]
meth ||= :call
options = proxy_option_struct
# empty the proxy option stack before the next invocation
proxy_options.clear
case object
when Proc then object.call(args, options)
when Class then meth != :call ? object.new.send(meth, args, options) : object.new(args, options)
......
module Commander
VERSION = '4.4.4'.freeze
VERSION = '4.4.5'.freeze
end
......@@ -74,6 +74,16 @@ describe Commander::Command do
it 'should raise an error when no handler is present' do
expect { @command.when_called }.to raise_error(ArgumentError)
end
it 'should be able to be run more than once' do
expect(@command.run('once')).to eql('test once')
expect(@command.run('twice')).to eql('test twice')
end
it 'should empty @proxy_options after running' do
expect(@command.run('--verbose')).to eql('test ')
expect(@command.proxy_options.empty?).to be true
end
end
describe 'should populate options with' do
......