base_app 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/base_app.rb +2 -1
- metadata +17 -5
data/lib/base_app.rb
CHANGED
@@ -21,8 +21,9 @@ class BaseApp
|
|
21
21
|
short, long, description, required, default_value = argspec
|
22
22
|
param_name = long.gsub '=', ''
|
23
23
|
@required_opts << param_name if required
|
24
|
+
@options[param_name] = default_value if default_value
|
24
25
|
create_getter_setter(long)
|
25
|
-
opts.on("-#{short}", "--#{long}", description) do |val|
|
26
|
+
opts.on("-#{short}", "--#{long} VAL", description) do |val|
|
26
27
|
@options[param_name] = val
|
27
28
|
setter = param_name.gsub("-", "_") + "="
|
28
29
|
self.send(setter,val)
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: base_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 31
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 4
|
10
|
+
version: 1.0.4
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Kyle Burton
|
@@ -10,7 +16,7 @@ autorequire:
|
|
10
16
|
bindir: bin
|
11
17
|
cert_chain: []
|
12
18
|
|
13
|
-
date:
|
19
|
+
date: 2011-02-05 00:00:00 -05:00
|
14
20
|
default_executable:
|
15
21
|
dependencies: []
|
16
22
|
|
@@ -36,21 +42,27 @@ rdoc_options: []
|
|
36
42
|
require_paths:
|
37
43
|
- lib
|
38
44
|
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
+
none: false
|
39
46
|
requirements:
|
40
47
|
- - ">="
|
41
48
|
- !ruby/object:Gem::Version
|
49
|
+
hash: 3
|
50
|
+
segments:
|
51
|
+
- 0
|
42
52
|
version: "0"
|
43
|
-
version:
|
44
53
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
45
55
|
requirements:
|
46
56
|
- - ">="
|
47
57
|
- !ruby/object:Gem::Version
|
58
|
+
hash: 3
|
59
|
+
segments:
|
60
|
+
- 0
|
48
61
|
version: "0"
|
49
|
-
version:
|
50
62
|
requirements: []
|
51
63
|
|
52
64
|
rubyforge_project:
|
53
|
-
rubygems_version: 1.
|
65
|
+
rubygems_version: 1.5.0
|
54
66
|
signing_key:
|
55
67
|
specification_version: 3
|
56
68
|
summary: Base class for command line applications.
|