lib/rocketstarter/rocket_starter_options.rb in rocketstarter-0.0.3 vs lib/rocketstarter/rocket_starter_options.rb in rocketstarter-0.1.0
- old
+ new
@@ -102,11 +102,11 @@
opts.on( '--createdb', 'execute rake db:create:all at last' ) do
@@command_line_params[:createdb] = true
end
- opts.on( '--dbpassword', 'write password to config/database.yml file' ) do |p|
+ opts.on( '--dbpassword=password', 'write password to config/database.yml file' ) do |p|
@@command_line_params[:dbpassword] = p
end
opts.on( '--emulate', 'enable emulation mode' ) do
@@command_line_params[:emulate] = true
@@ -180,11 +180,12 @@
begin
File.open(self[:rocket_starter_conf_path], "w") do |yamlfile|
yamlfile.puts "# Rocket_starter conf file"
yamlfile.puts ""
- yamlfile.puts Rocket_starter_options::static_default_values.to_yaml
+ output = Rocket_starter_options::static_default_values.merge(@@command_line_params)
+ yamlfile.puts output.to_yaml
end
puts "Put template yaml file to #{self[:rocket_starter_conf_path]}"
rescue
puts "Warning:Could not open for writing. check parmitions."
end
@@ -194,10 +195,10 @@
def put_pluginlist_file
# check put path
Rocket_starter_options::error_with_show_usage "plugin list path is empty. set --pluginlist_path paramater." if "" == self[:pluginlist_path]
unless "y" == Readline.readline("Would a template of plugin list file put to #{self[:pluginlist_path]}? [y/N] > ").downcase
- puts "Set your plugin list path to --pluginlist_path paramater."
+ puts "Set your plugin list path to --listpath paramater."
exit
end
begin
File.open(self[:pluginlist_path]) do |textfile|