lib/rocketstarter/rocket_starter_options.rb in rocketstarter-0.0.2 vs lib/rocketstarter/rocket_starter_options.rb in rocketstarter-0.0.3

- old
+ new

@@ -12,14 +12,14 @@ def initialize super() # default values self[:project] = "" - self[:rocket_starter_conf_path] = ENV["HOME"] + "/.rocketst_starter" + self[:rocket_starter_conf_path] = ENV["HOME"] + "/.rocket_starter" self[:rocket_starter_conf_path] = ENV['ROCKET_STARTER_CONF'] unless ENV['ROCKET_STARTER_CONF'].nil? self[:init] = false - self.merge(Rocket_starter_options::static_default_values) + self.merge!(Rocket_starter_options::static_default_values) end def parse @@ -81,13 +81,18 @@ opts.on( '--listpath=/path/to/listfile', 'plugin url list path for setup' ) do |p| @@command_line_params[:pluginlist_path] = p end + opts.on( '--skip-commit-plugins', "don't commit files for plugins" ) do + @@command_line_params[:skip_commit_for_plugins] = true + end + opts.on( '--skip-plugins', 'skip to setup plugins' ) do @@command_line_params[:skip_plugins] = true end + opts.on( '--rapt', 'use RaPT gem for plugins' ) do @@command_line_params[:rapt] = true end @@ -186,14 +191,14 @@ end # write a template plugin list file to :pluginlist_path def put_pluginlist_file # check put path - Sqld4r_options::error_with_show_usage "plugin list path is empty. set --pluginlist_path paramater." if self[:pluginlist_path].empty? + 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 command list path to --pluginlist_path paramater." + puts "Set your plugin list path to --pluginlist_path paramater." exit end begin File.open(self[:pluginlist_path]) do |textfile| @@ -249,11 +254,12 @@ defaults[:verbose] = false defaults[:sudo] = false defaults[:logging] = false defaults[:log_file] = ENV["HOME"] + "/rocket_starter.log" defaults[:skip_netbeans] = false - defaults[:pluginlist_path] = ENV["HOME"] + "/useful_plugins" + defaults[:pluginlist_path] = ENV["HOME"] + "/.rocket_starter_pluginlist" defaults[:skip_plugins] = false + defaults[:skip_commit_for_plugins] = false defaults[:rapt] = false defaults[:external] = false defaults[:createdb] = false defaults[:dbpassword] = "" defaults[:emulate] = false