miser 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miser/cli.rb +10 -0
- data/lib/miser/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fda99a48c4969ba886c0b2dc435f164569a0c151
|
4
|
+
data.tar.gz: 31779ecc137d6af397f5d34f296462e037d9180a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de00777bf3c7d21771480fc18fcb1bb265f4638ee3851d121b61d3b0da6e93c5e8365d9ebc57ea56d5df1ebd850bff9e6060cf403517770247cf9b5f00d4ca97
|
7
|
+
data.tar.gz: 1f2fda6c86f8e025bac80dc4eaaa5e8487262dfc7e04db871f754b654b3c481ca2e851e368e656df3841f06f3393b075407948c5696d4dd92b1def60d48db73f
|
data/lib/miser/cli.rb
CHANGED
@@ -34,6 +34,16 @@ module Miser
|
|
34
34
|
mail.deliver(report)
|
35
35
|
end
|
36
36
|
|
37
|
+
desc 'interactive', 'run interactive mode'
|
38
|
+
option :echo, type: :boolean, desc: 'no echo mode', default: false
|
39
|
+
def interactive
|
40
|
+
puts "Please enter what to run and press enter:"
|
41
|
+
mode = options[:echo] ? :cooked : :noecho
|
42
|
+
command = STDIN.send(mode, &:gets).strip
|
43
|
+
cmd = "#{Process.argv0} #{command}"
|
44
|
+
exec cmd
|
45
|
+
end
|
46
|
+
|
37
47
|
desc 'schedule TIME *ARGS', 'schedule check every TIME'
|
38
48
|
def schedule(time, *args)
|
39
49
|
hour, minute = time.split(':')
|
data/lib/miser/version.rb
CHANGED