Class: IV::CLI::Command::Init
Instance Attribute Summary
#iv_config
Instance Method Summary
collapse
invalid_command?, run_command
included
included
Instance Method Details
#run(args, options = {}) ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/iv-cli/commands/init.rb', line 21
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_file, "w") do |f|
f.puts "---"
write_default_opscode(f)
end
end
|