lib/guignol/commands/base.rb in guignol-0.3.4 vs lib/guignol/commands/base.rb in guignol-0.3.5

- old
+ new

@@ -14,11 +14,11 @@ @options = options end # Run the block for each server in +configs+ (in parallel). def run - before_run(@configs) or return + before_run(@configs, @options) or return results = {} Parallel.each(@configs, parallel_options) do |name,config| instance = Guignol::Models::Instance.new(name, config) results[name] = run_on_server(instance, @options) @@ -47,11 +47,16 @@ yield end end - private + def self.add_force_option + method_option :force, + :aliases => %w(-f), :type => :boolean, :default => false, + :desc => 'Do not ask for confirmation' + end + private def parallel_options if RUBY_VERSION >= '1.9.3' # 1.9.3 has bugs with Excon / SSL connections { :in_threads => 0 }