Class: IV::CLI::Command::Init
Instance Attribute Summary
#config
Instance Method Summary
collapse
invalid_command?, run_command
#fail
Instance Method Details
#run(args, options = {}) ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/iv-cli/commands/init.rb', line 19
def run(args, options = {})
parse_options(args)
validate
puts "Generating config directory in ~/.iv"
::FileUtils.mkdir_p(self.class.config_dir)
puts "Generating config file ~/.iv/config.yml"
::File.open(self.class.config, "w") do |f|
f.puts "---"
write_default_opscode(f)
end
end
|