lib/splash/cli/commands.rb in prometheus-splash-0.2.0 vs lib/splash/cli/commands.rb in prometheus-splash-0.3.0

- old
+ new

@@ -25,10 +25,11 @@ option :callback, :type => :boolean, :default => true option :hostname, :type => :string def execute(name) if is_root? then if options[:hostname] then + splash_exit({ :case => :options_incompatibility, :more => '--hostname forbidden with delagate commands'}) if get_config.commands[name.to_sym][:delegate_to] puts "Remote Splash configured commands on #{options[:hostname]}:" puts "ctrl+c for interrupt" begin transport = get_default_client if transport.class == Hash and transport.include? :case then @@ -120,9 +121,13 @@ if options[:detail] then puts " - command line : '#{list[command][:command]}'" puts " - command description : '#{list[command][:desc]}'" puts " - command failure callback : '#{list[command.to_sym][:on_failure]}'" if list[command.to_sym][:on_failure] puts " - command success callback : '#{list[command.to_sym][:on_success]}'" if list[command.to_sym][:on_success] + if list[command.to_sym][:schedule] + sched,val = list[command.to_sym][:schedule].flatten + puts " - command scheduled : #{sched} #{val}." + end end end splash_exit case: :quiet_exit end