cron_format 0.5.0 → 0.6.0
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/cron_format.rb +6 -3
- metadata +27 -23
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 892de132d0417d5060080143683755b47c1e89af1c814c0c2df5ad8fda54b27d
|
4
|
+
data.tar.gz: cb300817a2585aad227d75e2718616991550c5f3367ee546b10ad173c06eabd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06614ad37ee7e682d2aa2c39fc8e33d0169f1a5a26cf7ba96fc52aaa9b904995b27126105db37a3aecb1f642d4c40961efa6b57c17f8223a994e06589f6b4dd7
|
7
|
+
data.tar.gz: 79278c3a5ff3db3e04790c5bef10309cd5b7a189af3251f8a3adc66bab551ff4c06014afa301f2ca23ff061f2c634ac5fcb009b3eee526690778a600385576e8
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/cron_format.rb
CHANGED
@@ -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
|
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.
|
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
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
13
|
+
MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
|
14
|
+
YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTkwOTEwMTI1MDI0WhcN
|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IVmN+nH8YkatpGyQVk+tpEONGLDyjp5uwMh5Xb7eobCmY
|
30
|
+
+E4Nxz+eWlozyzIAB+RXNcc/S6ACa2M/Fsd3gbjVZ6rZmlrefm1OaBy3i49NAp+0
|
31
|
+
uxM0sfh44SuH9nDixq5s7+yIVdaTT2495vJxeTBCMLxFvbdREy997Q33I6TqwIiQ
|
32
|
+
2B7mFz+NYWE9h76gknZRjabNqZkoIB0B/j5H98EDOyUTXYOG90NDMDdPaGpn7up9
|
33
|
+
tTLM6QEYgLe1FaUx88+ZU2NU8LIdV2I82VB/qgnjc20VwwQKVKN1oOROVil1B7MK
|
34
|
+
EOhYx2GL5jEPgQKXBS+ffeAN99v6T7SkHTEz7vFyucrEEMkngpp9oy+vlfZQWL7N
|
35
|
+
p6Ef7ciqPYpk9dcgBiC5AsmWmtb+cnHRrFQbEyU43PJ3jI5bx7OlgZGEU0V8g7hB
|
36
|
+
7wJJUc154LVYK+xBm6tZ/98Y
|
32
37
|
-----END CERTIFICATE-----
|
33
|
-
date: 2019-
|
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
|
-
|
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
|