thunder 0.4.2 → 0.4.3
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.
- data/CHANGELOG +3 -0
- data/DESIGN.md +0 -0
- data/README.md +9 -9
- data/Rakefile +0 -0
- data/lib/thunder.rb +5 -1
- data/lib/thunder/help/default.rb +0 -1
- data/lib/thunder/options/optparse.rb +0 -0
- data/lib/thunder/options/trollop.rb +0 -0
- data/lib/thunder/version.rb +1 -1
- data/spec/spec_thunder.rb +0 -0
- metadata +4 -5
data/CHANGELOG
CHANGED
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
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
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
|
-
|
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
|
|
data/lib/thunder/help/default.rb
CHANGED
@@ -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
|
data/lib/thunder/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2012-09-12 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
|
-
description:
|
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: []
|