vagabond 0.1.4 → 0.2.0

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.
@@ -1,87 +0,0 @@
1
- require 'mixlib/cli'
2
- require 'chef/log'
3
- require 'vagabond/config'
4
- require 'vagabond/vagabond'
5
- require 'vagabond/server'
6
- require 'vagabond/knife'
7
-
8
- module Vagabond
9
- class Commands
10
-
11
- include Mixlib::CLI
12
-
13
- DEFAULT_ACTIONS = Actions.constants.map do |konst|
14
- const = Actions.const_get(konst)
15
- const.public_instance_methods(false) if const.is_a?(Module)
16
- end.flatten.sort
17
-
18
- banner(
19
- (
20
- %w(Nodes:) + DEFAULT_ACTIONS.map{ |cmd|
21
- "\tvagabond #{cmd} NODE [options]"
22
- }.compact + %w(Server:) + (DEFAULT_ACTIONS + Server.public_instance_methods(false)).sort.map{ |cmd|
23
- next if cmd == 'server'
24
- "\tvagabond server #{cmd} [options]"
25
- }.compact + ['Knife:', "\tvagabond knife COMMAND [knife_options]"] + %w(Options:)
26
- ).join("\n")
27
- )
28
-
29
- option(:force_solo,
30
- :long => '--force-configure',
31
- :boolean => true,
32
- :default => false
33
- )
34
-
35
- option(:disable_solo,
36
- :long => '--disable-configure',
37
- :boolean => true,
38
- :default => false
39
- )
40
-
41
- option(:disable_auto_provision,
42
- :long => '--disable-auto-provision',
43
- :boolean => true,
44
- :default => false
45
- )
46
-
47
- option(:vagabond_file,
48
- :short => '-f FILE',
49
- :long => '--vagabond-file FILE'
50
- )
51
-
52
- option(:disable_local_server,
53
- :long => '--disable-local-server',
54
- :boolean => true,
55
- :default => false
56
- )
57
-
58
- option(:debug,
59
- :long => '--debug',
60
- :boolean => true,
61
- :default => false
62
- )
63
-
64
- option(:color,
65
- :long => '--color',
66
- :boolean => true
67
- )
68
-
69
- def run!(argv)
70
- # Turn off Chef logging since we will deal with
71
- # our own output
72
- Chef::Log.init('/dev/null')
73
- parse_options
74
- name_args = parse_options(argv)
75
- Config.merge!(config)
76
- Config[:debug] = STDOUT if Config[:debug]
77
- case name_args.first.to_s
78
- when 'server'
79
- Server.new(name_args.shift, name_args).send(:execute)
80
- when 'knife'
81
- Knife.new(name_args.shift, name_args).send(:execute)
82
- else
83
- Vagabond.new(name_args.shift, name_args).send(:execute)
84
- end
85
- end
86
- end
87
- end
@@ -1,7 +0,0 @@
1
- require 'mixlib/config'
2
-
3
- module Vagabond
4
- class Config
5
- extend Mixlib::Config
6
- end
7
- end