cron_format 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +2 -2
- data.tar.gz.sig +0 -0
- data/lib/cron_format.rb +12 -4
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c57e56c6118c71ec947e6e8b204594d8849e3293
|
4
|
+
data.tar.gz: a40f45eb9830c5adedc8bf115c42464189337564
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8cf6fbc415bed166afe1c8b9373633eeb8134a07b66fe06de1e09303b53c5856d010fc378c46faa62eeb0c2f9384f1d6c22d15998acbb98d0e49cc0e997d42e
|
7
|
+
data.tar.gz: 2ba604ae1fb8ba9c56cc42112895f72e308092d861f01f847a15957ceaca7c5e9a133206b9f92afcbaf1d51ceac0bfaedd3942fd6fb378dabf4cf2f4f896869a
|
checksums.yaml.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
_�K�8���هv[8tg�����dO7�E��S�Z���'�0���pu��N����okDk<�ls
|
2
|
+
ҡ�c<�=���j��" ��=���p`W�\�`W���6�s�/:����[~d/%a�B8EH�Rؑ�� tt5W��SI��`�P؉�
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/cron_format.rb
CHANGED
@@ -34,8 +34,8 @@ class CronFormat
|
|
34
34
|
|
35
35
|
a = @cron_string.split
|
36
36
|
|
37
|
-
val = if @cron_string =~ %r{
|
38
|
-
a.reverse.detect{|x| x[
|
37
|
+
val = if @cron_string =~ %r{[/,]} then
|
38
|
+
a.reverse.detect{|x| x[/[\/,]/]}
|
39
39
|
else
|
40
40
|
a.detect{|x| x != '*'}
|
41
41
|
end
|
@@ -45,12 +45,19 @@ class CronFormat
|
|
45
45
|
if val then
|
46
46
|
index = a.index(val)
|
47
47
|
|
48
|
-
r = val[
|
48
|
+
r = val[/,|\/(\d+)$/,1]
|
49
49
|
|
50
50
|
n = if r then
|
51
|
+
|
51
52
|
index == 4 ? r.to_i * 7 : 0
|
53
|
+
|
52
54
|
else
|
53
|
-
|
55
|
+
|
56
|
+
if val =~ /,/ then
|
57
|
+
1
|
58
|
+
else
|
59
|
+
val.to_i
|
60
|
+
end
|
54
61
|
end
|
55
62
|
end
|
56
63
|
|
@@ -74,6 +81,7 @@ class CronFormat
|
|
74
81
|
]
|
75
82
|
|
76
83
|
r = units[index].call @to_time, n
|
84
|
+
|
77
85
|
@to_time = r
|
78
86
|
|
79
87
|
end
|
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.3.0
|
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-
|
34
|
+
date: 2015-03-11 00:00:00.000000000 Z
|
35
35
|
dependencies: []
|
36
36
|
description:
|
37
37
|
email: james@r0bertson.co.uk
|
metadata.gz.sig
CHANGED
Binary file
|