mothership 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mothership/version.rb +1 -1
- data/lib/mothership.rb +7 -5
- metadata +4 -4
data/lib/mothership/version.rb
CHANGED
data/lib/mothership.rb
CHANGED
@@ -27,17 +27,19 @@ class Mothership
|
|
27
27
|
global_parser = Parser.new(@@global)
|
28
28
|
name, *argv = global_parser.parse_flags(argv, @@commands)
|
29
29
|
|
30
|
-
|
31
|
-
|
30
|
+
global = new
|
31
|
+
global.input = Inputs.new(@@global, global, global_parser.given)
|
32
32
|
|
33
|
-
return
|
33
|
+
return global.default_action unless name
|
34
34
|
|
35
35
|
cmdname = name.gsub("-", "_").to_sym
|
36
36
|
|
37
37
|
cmd = @@commands[cmdname]
|
38
|
-
return
|
38
|
+
return global.unknown_command(cmdname) unless cmd
|
39
39
|
|
40
|
-
|
40
|
+
ctx = cmd.context.new
|
41
|
+
ctx.input = global.input
|
42
|
+
ctx.execute(cmd, argv, global_parser.given)
|
41
43
|
|
42
44
|
code = @@exit_status
|
43
45
|
|
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: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alex Suraci
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-09-
|
18
|
+
date: 2012-09-05 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rake
|