mothership 0.3.4 → 0.3.5
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/lib/mothership/inputs.rb +10 -7
- data/lib/mothership/version.rb +1 -1
- metadata +18 -16
data/lib/mothership/inputs.rb
CHANGED
|
@@ -149,14 +149,17 @@ class Mothership
|
|
|
149
149
|
else
|
|
150
150
|
context.instance_exec(given, *args, &convert)
|
|
151
151
|
end
|
|
152
|
-
elsif meta[:type] == :integer
|
|
153
|
-
given.to_i
|
|
154
|
-
elsif meta[:type] == :float
|
|
155
|
-
given.to_f
|
|
156
|
-
elsif meta[:type] == :boolean
|
|
157
|
-
given == "true"
|
|
158
152
|
else
|
|
159
|
-
|
|
153
|
+
case meta[:type]
|
|
154
|
+
when :integer, :number, :numeric
|
|
155
|
+
given.to_i
|
|
156
|
+
when :float
|
|
157
|
+
given.to_f
|
|
158
|
+
when :boolean
|
|
159
|
+
given == "true"
|
|
160
|
+
else
|
|
161
|
+
given
|
|
162
|
+
end
|
|
160
163
|
end
|
|
161
164
|
end
|
|
162
165
|
|
data/lib/mothership/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mothership
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 25
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 3
|
|
9
|
-
-
|
|
10
|
-
version: 0.3.
|
|
9
|
+
- 5
|
|
10
|
+
version: 0.3.5
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Alex Suraci
|
|
@@ -15,7 +15,8 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2012-12-
|
|
18
|
+
date: 2012-12-07 00:00:00 -08:00
|
|
19
|
+
default_executable:
|
|
19
20
|
dependencies:
|
|
20
21
|
- !ruby/object:Gem::Dependency
|
|
21
22
|
name: rake
|
|
@@ -58,22 +59,23 @@ extra_rdoc_files: []
|
|
|
58
59
|
files:
|
|
59
60
|
- LICENSE
|
|
60
61
|
- Rakefile
|
|
61
|
-
- lib/mothership
|
|
62
|
+
- lib/mothership.rb
|
|
63
|
+
- lib/mothership/help/printer.rb
|
|
64
|
+
- lib/mothership/help/commands.rb
|
|
65
|
+
- lib/mothership/version.rb
|
|
62
66
|
- lib/mothership/callbacks.rb
|
|
63
|
-
- lib/mothership/
|
|
67
|
+
- lib/mothership/inputs.rb
|
|
64
68
|
- lib/mothership/errors.rb
|
|
65
|
-
- lib/mothership/
|
|
66
|
-
- lib/mothership/
|
|
69
|
+
- lib/mothership/command.rb
|
|
70
|
+
- lib/mothership/base.rb
|
|
67
71
|
- lib/mothership/help.rb
|
|
68
|
-
- lib/mothership/inputs.rb
|
|
69
72
|
- lib/mothership/parser.rb
|
|
70
|
-
- lib/mothership/version.rb
|
|
71
|
-
- lib/mothership.rb
|
|
72
73
|
- spec/arguments_spec.rb
|
|
74
|
+
- spec/spec_helper.rb
|
|
73
75
|
- spec/combination_spec.rb
|
|
74
|
-
- spec/flags_spec.rb
|
|
75
76
|
- spec/Rakefile
|
|
76
|
-
- spec/
|
|
77
|
+
- spec/flags_spec.rb
|
|
78
|
+
has_rdoc: true
|
|
77
79
|
homepage: https://github.com/vito/mothership
|
|
78
80
|
licenses: []
|
|
79
81
|
|
|
@@ -103,13 +105,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
103
105
|
requirements: []
|
|
104
106
|
|
|
105
107
|
rubyforge_project: mothership
|
|
106
|
-
rubygems_version: 1.
|
|
108
|
+
rubygems_version: 1.6.2
|
|
107
109
|
signing_key:
|
|
108
110
|
specification_version: 3
|
|
109
111
|
summary: Command-line library for big honkin' CLI apps.
|
|
110
112
|
test_files:
|
|
111
113
|
- spec/arguments_spec.rb
|
|
114
|
+
- spec/spec_helper.rb
|
|
112
115
|
- spec/combination_spec.rb
|
|
113
|
-
- spec/flags_spec.rb
|
|
114
116
|
- spec/Rakefile
|
|
115
|
-
- spec/
|
|
117
|
+
- spec/flags_spec.rb
|