andrewtimberlake-whenever 0.1.5.1 → 0.1.5.2

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.
Files changed (3) hide show
  1. data/bin/whenever +2 -3
  2. data/whenever.gemspec +1 -1
  3. metadata +1 -1
@@ -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
- warn "[fail] couldn't read existing crontab"
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{whenever}
5
- s.version = "0.1.5.1"
5
+ s.version = "0.1.5.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Javan Makhmali"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: andrewtimberlake-whenever
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5.1
4
+ version: 0.1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javan Makhmali