cron2english 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cron2english/all.rb +1 -1
- data/lib/cron2english/version.rb +1 -1
- data/spec/parse_spec.rb +9 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d2df405acc0f1f54c8fec13bd4d120075a00bc5
|
4
|
+
data.tar.gz: 03caaaf1412d066fe29f13178847cf1a40f1a9f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b440b887f3a00765e64037e6bd8cb1020e9aba9ea862cd2dd032c97acc3c88f0277209461b939591cfc90c4aa38336e370e6f722c24516ddbeda459b3b34295
|
7
|
+
data.tar.gz: b282b53ba7dcc63d7734c3d7ee4b39ce6e9f85151ea040a0541ba63b510fd02ab814f54ba7778e150f80204fff010c092fa306d58fcafd9c546667079efd9be6
|
data/lib/cron2english/all.rb
CHANGED
data/lib/cron2english/version.rb
CHANGED
data/spec/parse_spec.rb
CHANGED
@@ -5,18 +5,18 @@ describe Cron2English do
|
|
5
5
|
[
|
6
6
|
["40 5 * * *", ["5:40am", "every day"]],
|
7
7
|
["0 5 * * 1", ["5am", "every Monday"]],
|
8
|
-
["10 8 15 * *", ["8:
|
9
|
-
["40 5 * * *", ["5:
|
10
|
-
["50 6 * * 1", ["6:
|
11
|
-
["1 2 * apr mOn", ["2:
|
12
|
-
["1 2 3 4 7", ["2:
|
8
|
+
["10 8 15 * *", ["8:10am on", "the 15th of", "every month"]],
|
9
|
+
["40 5 * * *", ["5:40am", "every day"]],
|
10
|
+
["50 6 * * 1", ["6:50am", "every Monday"]],
|
11
|
+
["1 2 * apr mOn", ["2:01am", "every Monday in", "April"]],
|
12
|
+
["1 2 3 4 7", ["2:01am on", "the third of -- or every Sunday in --", "April"]],
|
13
13
|
["1-20/3 * * * *", ["every 3 minutes from 1 to 20 past", "every hour of", "every day"]],
|
14
14
|
["1,2,3 * * * *", ["1, 2, and 3 minutes past", "every hour of", "every day"]],
|
15
15
|
["1-9,15-30 * * * *", ["from 1 to 9 minutes; and from 15 to 30 minutes past", "every hour of", "every day"]],
|
16
16
|
["1-9/3,15-30/4 * * * *", ["every 3 minutes from 1 to 9; and every 4 minutes from 15 to 30 past", "every hour of", "every day"]],
|
17
|
-
["1 2 3 jan mon", ["2:
|
18
|
-
["1 2 3 4 mON", ["2:
|
19
|
-
["1 2 3 jan 5", ["2:
|
17
|
+
["1 2 3 jan mon", ["2:01am on", "the third of -- or every Monday in --", "January"]],
|
18
|
+
["1 2 3 4 mON", ["2:01am on", "the third of -- or every Monday in --", "April"]],
|
19
|
+
["1 2 3 jan 5", ["2:01am on", "the third of -- or every Friday in --", "January"]],
|
20
20
|
["@reboot", ["reboot"]],
|
21
21
|
["@yearly", ["yearly"]],
|
22
22
|
["@annually", ["annually"]],
|
@@ -26,6 +26,7 @@ describe Cron2English do
|
|
26
26
|
["@midnight", ["midnight"]],
|
27
27
|
["@hourly", ["hourly"]],
|
28
28
|
["*/3 * * * *", ["every third minute of", "every hour of", "every day"]],
|
29
|
+
["0 5 * 2,3 *", ["5am", "every day of", "February and March"]],
|
29
30
|
].each do |cronspec, english|
|
30
31
|
it "should parse the cronspec #{cronspec}" do
|
31
32
|
result = Cron2English.parse(cronspec)
|