cron_format 0.3.0 → 0.3.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c57e56c6118c71ec947e6e8b204594d8849e3293
4
- data.tar.gz: a40f45eb9830c5adedc8bf115c42464189337564
3
+ metadata.gz: 6b7a9ad799ea0d334a9bcdd94b3cd030bc94b6e0
4
+ data.tar.gz: cfa16945499ebd07cad406d1b44ab5397a701ac3
5
5
  SHA512:
6
- metadata.gz: b8cf6fbc415bed166afe1c8b9373633eeb8134a07b66fe06de1e09303b53c5856d010fc378c46faa62eeb0c2f9384f1d6c22d15998acbb98d0e49cc0e997d42e
7
- data.tar.gz: 2ba604ae1fb8ba9c56cc42112895f72e308092d861f01f847a15957ceaca7c5e9a133206b9f92afcbaf1d51ceac0bfaedd3942fd6fb378dabf4cf2f4f896869a
6
+ metadata.gz: 80640d911aa6ca0a7754edbd853b546bab8a8d664ec0c62bccae10f30adab0858edf3e11bc43f5b36fb150563b9caab17a3aeeaa93e2223261576000b035fe2e
7
+ data.tar.gz: 72804d3f01e34d5ae5b3f478d249fa4248f5d88af191fb58584cd275400e70ffedaddd6cd6bbc48a51ffdc66a95fca002ed7dc14e852b656e49417ddeda9022b
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/cron_format.rb CHANGED
@@ -25,6 +25,7 @@ class CronFormat
25
25
  def next()
26
26
 
27
27
  nudge() #unless @cron_string =~ %r{/}
28
+ #puts ':to_time : ' + @to_time.inspect
28
29
  parse()
29
30
  end
30
31
 
@@ -32,10 +33,11 @@ class CronFormat
32
33
 
33
34
  def nudge()
34
35
 
36
+ t1 = @to_time
35
37
  a = @cron_string.split
36
38
 
37
- val = if @cron_string =~ %r{[/,]} then
38
- a.reverse.detect{|x| x[/[\/,]/]}
39
+ val = if @cron_string =~ %r{[/,-]} then
40
+ a.reverse.detect{|x| x[/[\/,-]/]}
39
41
  else
40
42
  a.detect{|x| x != '*'}
41
43
  end
@@ -53,7 +55,7 @@ class CronFormat
53
55
 
54
56
  else
55
57
 
56
- if val =~ /,/ then
58
+ if val =~ /[,-]/ then
57
59
  1
58
60
  else
59
61
  val.to_i
@@ -81,6 +83,7 @@ class CronFormat
81
83
  ]
82
84
 
83
85
  r = units[index].call @to_time, n
86
+ #r += MINUTE if r == t1
84
87
 
85
88
  @to_time = r
86
89
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cron_format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  MmJuAQVfTk9wZd03YN619a64hLGIvud4ASW7UVAW0B4U0PcmbhHvne07e11jt7j5
32
32
  WwVcDIvT38Bo3hAt
33
33
  -----END CERTIFICATE-----
34
- date: 2015-03-11 00:00:00.000000000 Z
34
+ date: 2015-04-02 00:00:00.000000000 Z
35
35
  dependencies: []
36
36
  description:
37
37
  email: james@r0bertson.co.uk
@@ -60,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
60
60
  version: '0'
61
61
  requirements: []
62
62
  rubyforge_project:
63
- rubygems_version: 2.2.2
63
+ rubygems_version: 2.4.5
64
64
  signing_key:
65
65
  specification_version: 4
66
66
  summary: cron_format
metadata.gz.sig CHANGED
Binary file