command_timer 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -55,12 +55,18 @@ module CommandTimer
55
55
  end
56
56
 
57
57
  def wait_input_to_continue(command)
58
- input = ""
59
- until ["c", "C", "continue"].include?(input) do
60
- print "Input C to execute the next command: "
58
+ loop do
59
+ print "Input C to execute the next command or S to skip: "
61
60
  input = STDIN.gets.chomp
61
+ if ["c", "C", "continue"].include?(input)
62
+ command.exec
63
+ break
64
+ end
65
+ if ["s", "S", "skip"].include?(input)
66
+ puts "Command skipped."
67
+ break
68
+ end
62
69
  end
63
- command.exec
64
70
  end
65
71
 
66
72
  def echo_commands
@@ -68,7 +74,11 @@ module CommandTimer
68
74
  puts "--------------------"
69
75
  puts "Command #{index + 1}"
70
76
  puts command.description if command.description
71
- puts "Will be executed at #{command.burn_time}"
77
+ if command.burn_time
78
+ puts "Will be executed at #{command.burn_time}"
79
+ else
80
+ puts "Be executed by user input"
81
+ end
72
82
  command.echo_command
73
83
  end
74
84
  puts "--------------------"
@@ -1,3 +1,3 @@
1
1
  module CommandTimer
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: command_timer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-11 00:00:00.000000000 Z
12
+ date: 2012-07-12 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Simple tool to execute commands on schedule
15
15
  email: