mothership 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  class Mothership
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
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
- app = new
31
- app.input = Inputs.new(@@global, app, global_parser.given)
30
+ global = new
31
+ global.input = Inputs.new(@@global, global, global_parser.given)
32
32
 
33
- return app.default_action unless name
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 app.unknown_command(cmdname) unless cmd
38
+ return global.unknown_command(cmdname) unless cmd
39
39
 
40
- app.execute(cmd, argv, global_parser.given)
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: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
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-04 00:00:00 Z
18
+ date: 2012-09-05 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rake