cron_format 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ae188fa6fbdd52dfef8995dc0b9b1f164d036bd77e9a15c5e30e9acc5ae8575
4
- data.tar.gz: 362ebbce43c0f775441efb0106a611b175cae5ecceccd803ebc8b583b92ae408
3
+ metadata.gz: 892de132d0417d5060080143683755b47c1e89af1c814c0c2df5ad8fda54b27d
4
+ data.tar.gz: cb300817a2585aad227d75e2718616991550c5f3367ee546b10ad173c06eabd8
5
5
  SHA512:
6
- metadata.gz: 48cb5f44186323f31f2ed2d3cec40a0031955c4de6bd1a66cc19fb5ef05f30d3e6059f2788e786c75f3dffc9e1f088ae6253a87c7a333a3dd618f654d261dcb5
7
- data.tar.gz: 4774ef323ddcdcc36f4313b2bd5ee91f5b5d2b5a8a5bdbb02c6fec79ce4e06b3bd806b34647ce6182eaf18492c58744a91ebae2ade7da3b929983c210b7e1dc5
6
+ metadata.gz: 06614ad37ee7e682d2aa2c39fc8e33d0169f1a5a26cf7ba96fc52aaa9b904995b27126105db37a3aecb1f642d4c40961efa6b57c17f8223a994e06589f6b4dd7
7
+ data.tar.gz: 79278c3a5ff3db3e04790c5bef10309cd5b7a189af3251f8a3adc66bab551ff4c06014afa301f2ca23ff061f2c634ac5fcb009b3eee526690778a600385576e8
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -49,7 +49,7 @@ class CronFormat
49
49
 
50
50
  nudge() #unless @cron_string =~ %r{/}
51
51
  #puts ':to_time : ' + @to_time.inspect
52
- parse()
52
+ parse(nudged: true)
53
53
  end
54
54
 
55
55
  private
@@ -130,7 +130,7 @@ class CronFormat
130
130
 
131
131
  end
132
132
 
133
- def parse()
133
+ def parse(nudged: false)
134
134
 
135
135
  puts ('0. @to_time: ' + @to_time.inspect).debug if @debug
136
136
 
@@ -337,6 +337,7 @@ class CronFormat
337
337
  and t.min < @to_time.min and raw_a[1] != '*') ) \
338
338
  and raw_a[2] == '*' then
339
339
 
340
+ puts 'incrementing the day' if @debug
340
341
  # increment the day
341
342
  t += DAY * ((@to_time.day - d[2].to_i) + 1)
342
343
  elsif t.min < @to_time.min and raw_a[1] == '*' then
@@ -372,7 +373,7 @@ class CronFormat
372
373
 
373
374
  # finally, if the date is still less than the current time we can
374
375
  # increment the date using any repeating intervals
375
- if t <= @to_time and repeaters.any? then
376
+ if (t < @to_time or (!nudged and t == @to_time)) and repeaters.any? then
376
377
 
377
378
  repeaters.each_with_index do |x,i|
378
379
 
@@ -399,6 +400,8 @@ class CronFormat
399
400
  end
400
401
 
401
402
  def increment_month(d)
403
+
404
+ puts 'inside increment_month' if @debug
402
405
 
403
406
  if d[3].to_i <= 11 then
404
407
  d[3].succ!
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.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -10,27 +10,32 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDXjCCAkagAwIBAgIBATANBgkqhkiG9w0BAQUFADAsMSowKAYDVQQDDCFnZW1t
14
- YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTgwNDA5MjI1MzA3WhcN
15
- MTkwNDA5MjI1MzA3WjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
16
- cnRzb24vREM9ZXUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDqyw5Y
17
- GTvVJJWLpkQqhlUx6RNmZLFRgqTQmle7sIyEtiB7qAtxSZxt2SEKEP+NgQUimlgH
18
- HwXx40mQ9crGr1d3+6bwkbi306MTZ6bdRsFfPwthMaevxvK86GGx2MbIpUQ/M0Qx
19
- RUuV1mwXFweHHARXwK7bHc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B7mFz+NYWE9h76gknZRjabNqZkoIB0B/j5H98EDOyUTXYOG90NDMDdPaGpn7up9
33
+ tTLM6QEYgLe1FaUx88+ZU2NU8LIdV2I82VB/qgnjc20VwwQKVKN1oOROVil1B7MK
34
+ EOhYx2GL5jEPgQKXBS+ffeAN99v6T7SkHTEz7vFyucrEEMkngpp9oy+vlfZQWL7N
35
+ p6Ef7ciqPYpk9dcgBiC5AsmWmtb+cnHRrFQbEyU43PJ3jI5bx7OlgZGEU0V8g7hB
36
+ 7wJJUc154LVYK+xBm6tZ/98Y
32
37
  -----END CERTIFICATE-----
33
- date: 2019-01-09 00:00:00.000000000 Z
38
+ date: 2019-09-10 00:00:00.000000000 Z
34
39
  dependencies:
35
40
  - !ruby/object:Gem::Dependency
36
41
  name: c32
@@ -78,8 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
83
  - !ruby/object:Gem::Version
79
84
  version: '0'
80
85
  requirements: []
81
- rubyforge_project:
82
- rubygems_version: 2.7.6
86
+ rubygems_version: 3.0.1
83
87
  signing_key:
84
88
  specification_version: 4
85
89
  summary: Accepts a cron expression and outputs the relative time (e.g. 0 7 1 1 * *
metadata.gz.sig CHANGED
Binary file