thunder 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ v0.4.3
2
+ - fixed handling of parameters and default commands
3
+
1
4
  v0.4.2
2
5
  - fixed boolean flags in default options processor
3
6
  - default help formatter now strips whitespace properly
data/DESIGN.md CHANGED
File without changes
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- Thunder
1
+ [Thunder](http://stevenkaras.github.com/thunder)
2
2
  =======
3
3
  Ruby gem for quick and easy command line interfaces
4
4
 
@@ -7,7 +7,7 @@ Usage
7
7
 
8
8
  gem install thunder
9
9
 
10
- see 'sample' for a quick overview of all features
10
+ see '[sample](http://github.com/stevenkaras/thunder/blob/master/sample)' for a quick overview of all features
11
11
 
12
12
  Philosophy
13
13
  ----------
@@ -21,13 +21,13 @@ Goals
21
21
  -----
22
22
  Provide a simple, DRY syntatic sugar library that provides the necessary services to create command line mappings to ruby methods. It will not provide any other services.
23
23
 
24
- Phase 1: call a method from the command line
25
- Phase 2: provide options and arguments
26
- Phase 3: provide help/banner formatter
27
- Phase 4: provide yardoc integration
28
- Phase 5: provide a bash-completion script
29
- Phase 6: ???
30
- Phase 7: Profit!
24
+ Development Phases
25
+
26
+ 1. call a method from the command line
27
+ 2. provide options and arguments
28
+ 3. provide help/banner formatter
29
+ 4. provide yardoc integration
30
+ 5. provide a bash-completion script
31
31
 
32
32
  Development
33
33
  -----------
data/Rakefile CHANGED
File without changes
data/lib/thunder.rb CHANGED
@@ -48,7 +48,11 @@ module Thunder
48
48
  end
49
49
  command_name = args.first.to_sym
50
50
  command_spec = self.class.thunder[:commands][command_name]
51
- args.shift if command_spec
51
+ if command_spec
52
+ args.shift
53
+ else
54
+ command_spec = self.class.thunder[:commands][self.class.thunder[:default_command]]
55
+ end
52
56
  return command_spec
53
57
  end
54
58
 
@@ -6,7 +6,6 @@ module Thunder
6
6
  # @see Thunder#help_command(command_spec)
7
7
  def help_command(command_spec)
8
8
  preamble = determine_preamble
9
- #TODO: add options to output
10
9
  footer = ""
11
10
  footer << command_spec[:description] + "\n" if command_spec[:description]
12
11
  footer << command_spec[:long_description] + "\n" if command_spec[:long_description]
File without changes
File without changes
@@ -1,4 +1,4 @@
1
1
  module Thunder
2
2
  # Version string for gemspec
3
- VERSION = "0.4.2"
3
+ VERSION = "0.4.3"
4
4
  end
data/spec/spec_thunder.rb CHANGED
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thunder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,10 +9,9 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-05 00:00:00.000000000 Z
12
+ date: 2012-09-12 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: Thor does everything and the kitchen sink. Thunder only does command
15
- line interfaces.
14
+ description: Thunder does command line interfaces. Nothing more, nothing less.
16
15
  email: steven.karas@gmail.com
17
16
  executables: []
18
17
  extensions: []
@@ -28,7 +27,7 @@ files:
28
27
  - DESIGN.md
29
28
  - Rakefile
30
29
  - README.md
31
- homepage: http://stevenkaras.github.com
30
+ homepage: http://stevenkaras.github.com/thunder
32
31
  licenses: []
33
32
  post_install_message:
34
33
  rdoc_options: []