josevalim-thor 0.10.15 → 0.10.16

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -2,10 +2,12 @@
2
2
 
3
3
  * Improve spec coverage for Thor::Runner
4
4
  * Improve help output to list shorthand switches, too
5
- * Investigate and fix deep namespacing ("foo:bar:baz") issues
6
5
 
7
6
  == Current
8
7
 
8
+ * BACKWARDS INCOMPATIBLE: aliases are not generated automatically anymore
9
+ since it wrong behavior to the invocation system.
10
+
9
11
  * thor help now show information about any class/task. All those calls are
10
12
  possible:
11
13
 
data/lib/thor/base.rb CHANGED
@@ -483,7 +483,7 @@ class Thor
483
483
  # returns nil.
484
484
  #
485
485
  def from_superclass(method, default=nil)
486
- if self == baseclass
486
+ if self == baseclass || !superclass.respond_to?(method, true)
487
487
  default
488
488
  else
489
489
  value = superclass.send(method)
data/lib/thor/options.rb CHANGED
@@ -59,10 +59,9 @@ class Thor
59
59
  @non_assigned_required << option if option.required?
60
60
  @non_assigned_arguments << option if option.argument?
61
61
 
62
- # If there are no shortcuts specified, generate one using the first character
63
- shorts = option.aliases.dup
64
- shorts << "-" + option.human_name[0,1] if shorts.empty? and option.human_name.length > 1
65
- shorts.each { |short| @shorts[short.to_s] ||= option.switch_name }
62
+ option.aliases.each do |short|
63
+ @shorts[short.to_s] ||= option.switch_name
64
+ end
66
65
 
67
66
  mem[option.switch_name] = option
68
67
  mem
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: josevalim-thor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.15
4
+ version: 0.10.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yehuda Katz
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-26 00:00:00 -07:00
12
+ date: 2009-06-27 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15