command_timer 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/command_timer/runner.rb +15 -5
- data/lib/command_timer/version.rb +1 -1
- metadata +2 -2
data/lib/command_timer/runner.rb
CHANGED
@@ -55,12 +55,18 @@ module CommandTimer
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def wait_input_to_continue(command)
|
58
|
-
|
59
|
-
|
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
|
-
|
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 "--------------------"
|
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.
|
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-
|
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:
|