commander 4.0.3 → 4.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,8 @@
1
+ 4.0.4 / 2011-04-04
2
+ ==================
3
+
4
+ * Fixed program(:key) behavior for non-Array keys like name, version, description under Ruby 1.9
5
+ * All specs should pass under Ruby 1.9 now
1
6
 
2
7
  4.0.3 / 2010-04-06
3
8
  ==================
@@ -1,4 +1,3 @@
1
-
2
1
  = Commander
3
2
 
4
3
  The complete solution for Ruby command-line executables.
@@ -17,7 +16,7 @@ features, and an elegant API.
17
16
  * Packaged with two help formatters (Terminal, TerminalCompact)
18
17
  * Imports the highline gem for interacting with the terminal
19
18
  * Adds additional user interaction functionality
20
- * Highly customizable progress bar with intuative, simple usage
19
+ * Highly customizable progress bar with intuitive, simple usage
21
20
  * Multi-word command name support such as 'drupal module install MOD', rather than 'drupal module_install MOD'
22
21
  * Sexy paging for long bodies of text
23
22
  * Support for MacOS text-to-speech
@@ -164,7 +163,7 @@ simplify common tasks using the following methods:
164
163
  # Speech synthesis
165
164
  speak 'What is your favorite food? '
166
165
  food = ask 'favorite food?: '
167
- speak "wow, I like #{food} too. We have so much alike."
166
+ speak "Wow, I like #{food} too. We have so much in common."
168
167
 
169
168
  # Execute arbitrary applescript
170
169
  applescript 'foo'
@@ -285,13 +284,13 @@ You may:
285
284
  === Formatters
286
285
 
287
286
  Two core formatters are currently available, the default Terminal formatter as well
288
- as TerminalCompact. To utilize a different formatter simply use :formatter like below:
287
+ as TerminalCompact. To utilize a different formatter simply use :help_formatter like below:
289
288
 
290
- program :formatter, Commander::HelpFormatter::TerminalCompact
289
+ program :help_formatter, Commander::HelpFormatter::TerminalCompact
291
290
 
292
291
  Or utilize the help formatter aliases:
293
292
 
294
- program :formatter, :compact
293
+ program :help_formatter, :compact
295
294
 
296
295
  This abstraction could be utilized to generate HTML documentation for your executable.
297
296
 
@@ -1,12 +1,12 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  Gem::Specification.new do |s|
4
+ require File.join(File.dirname(__FILE__), 'lib', 'commander', 'version')
4
5
  s.name = %q{commander}
5
- s.version = "4.0.3"
6
+ s.version = Commander::VERSION
6
7
 
7
8
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
9
  s.authors = ["TJ Holowaychuk"]
9
- s.date = %q{2010-04-06}
10
10
  s.default_executable = %q{commander}
11
11
  s.description = %q{The complete solution for Ruby command-line executables}
12
12
  s.email = %q{tj@vision-media.ca}
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Commander", "--main", "README.rdoc"]
18
18
  s.require_paths = ["lib"]
19
19
  s.rubyforge_project = %q{commander}
20
- s.rubygems_version = %q{1.3.6}
20
+ s.rubygems_version = %q{1.3.5}
21
21
  s.summary = %q{The complete solution for Ruby command-line executables}
22
22
 
23
23
  if s.respond_to? :specification_version then
@@ -119,7 +119,9 @@ module Commander
119
119
  elsif block
120
120
  @program[key] = block
121
121
  else
122
- @program[key] = *args unless args.empty?
122
+ unless args.empty?
123
+ @program[key] = (args.count == 1 && args[0]) || args
124
+ end
123
125
  @program[key]
124
126
  end
125
127
  end
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Commander
3
- VERSION = '4.0.3'
3
+ VERSION = '4.0.4'
4
4
  end
@@ -48,7 +48,7 @@ end
48
48
 
49
49
  def run *args
50
50
  new_command_runner *args do
51
- program :formatter, Commander::HelpFormatter::Base
51
+ program :help_formatter, Commander::HelpFormatter::Base
52
52
  end.run!
53
53
  @output.string
54
54
  end
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commander
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 4
7
- - 0
8
- - 3
9
- version: 4.0.3
4
+ prerelease:
5
+ version: 4.0.4
10
6
  platform: ruby
11
7
  authors:
12
8
  - TJ Holowaychuk
@@ -14,20 +10,17 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2010-04-06 00:00:00 -07:00
13
+ date: 2011-04-04 00:00:00 -07:00
18
14
  default_executable: commander
19
15
  dependencies:
20
16
  - !ruby/object:Gem::Dependency
21
17
  name: highline
22
18
  prerelease: false
23
19
  requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
24
21
  requirements:
25
22
  - - ">="
26
23
  - !ruby/object:Gem::Version
27
- segments:
28
- - 1
29
- - 5
30
- - 0
31
24
  version: 1.5.0
32
25
  type: :runtime
33
26
  version_requirements: *id001
@@ -114,24 +107,21 @@ rdoc_options:
114
107
  require_paths:
115
108
  - lib
116
109
  required_ruby_version: !ruby/object:Gem::Requirement
110
+ none: false
117
111
  requirements:
118
112
  - - ">="
119
113
  - !ruby/object:Gem::Version
120
- segments:
121
- - 0
122
114
  version: "0"
123
115
  required_rubygems_version: !ruby/object:Gem::Requirement
116
+ none: false
124
117
  requirements:
125
118
  - - ">="
126
119
  - !ruby/object:Gem::Version
127
- segments:
128
- - 1
129
- - 2
130
120
  version: "1.2"
131
121
  requirements: []
132
122
 
133
123
  rubyforge_project: commander
134
- rubygems_version: 1.3.6
124
+ rubygems_version: 1.5.3
135
125
  signing_key:
136
126
  specification_version: 3
137
127
  summary: The complete solution for Ruby command-line executables