andrewtimberlake-whenever 0.1.5.1 → 0.1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/whenever +2 -3
- data/whenever.gemspec +1 -1
- metadata +1 -1
data/bin/whenever
CHANGED
@@ -41,9 +41,9 @@ if options[:write]
|
|
41
41
|
command << "-l"
|
42
42
|
|
43
43
|
existing_crontab = `#{command.join(' ')}`
|
44
|
+
kept_lines = []
|
44
45
|
if $?.exitstatus == 0
|
45
46
|
lines = existing_crontab.split(/\n/)
|
46
|
-
kept_lines = []
|
47
47
|
keep = true
|
48
48
|
lines.each do |line|
|
49
49
|
keep = false if line =~ /#BEGIN.*#{Regexp.escape(file_path)}/
|
@@ -53,8 +53,7 @@ if options[:write]
|
|
53
53
|
keep = true if line =~ /#END.*#{Regexp.escape(file_path)}/
|
54
54
|
end
|
55
55
|
else
|
56
|
-
|
57
|
-
exit(1)
|
56
|
+
#An error probably means that the crontab doesn't exist
|
58
57
|
end
|
59
58
|
|
60
59
|
tmp_cron_file = Tempfile.new('whenever_tmp_cron').path
|
data/whenever.gemspec
CHANGED