fugit 1.4.5 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/CREDITS.md +2 -0
- data/README.md +2 -0
- data/lib/fugit.rb +1 -1
- data/lib/fugit/cron.rb +2 -0
- data/lib/fugit/nat.rb +11 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae056967c15463b2aed7a2839f383b9965968ae19414d214f37841ccabdeb7e5
|
4
|
+
data.tar.gz: 33ddf5842af78f3bba3a477800dfde053bee82cde318575f7c78d3e25df8e910
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13c7b00c76df998cac5c3ab8e754e7519b34c91c4653afa2da3d036d874c020ad10b34d596e20147f0d3c73e8b3904197896d0dd914b093e571d2e699df44632
|
7
|
+
data.tar.gz: 59422402187e49a0ffe1b53f4798f3cab4427aa734bad7cfac8eafdb001e08728a7577f7c5f83ad197a3eaa06007c3a871714ccc8036fca1cf6361a3ed9f7a23
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
# CHANGELOG.md
|
3
3
|
|
4
4
|
|
5
|
+
## fugit 1.5.0 released 2021-06-08
|
6
|
+
|
7
|
+
* Accept "at 12 noon" and "at 12 midday" as "* 12 * * *", gh-57
|
8
|
+
* Accept "at 12pm" as "0 12 * * *", not "0 24 * * *", gh-57
|
9
|
+
* Accept "15/30 * * * *" as "15-59/30 * * * *", gh-56
|
10
|
+
|
11
|
+
|
5
12
|
## fugit 1.4.5 released 2021-04-22
|
6
13
|
|
7
14
|
* Accept "* * * Mon%2+2", gh-47
|
data/CREDITS.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
|
2
2
|
# fugit credits
|
3
3
|
|
4
|
+
* Khaled AbuShqear https://github.com/shqear93 gh-57, "12pm"
|
5
|
+
* John W Higgins https://github.com/wishdev gh-56, 15/30 cron decision
|
4
6
|
* Karen Sawrey https://github.com/karensawrey gh-47, Mon%2+1 rework idea
|
5
7
|
* Olle Jonsson https://github.com/olleolleolle gha Ruby 3.0
|
6
8
|
* Andy Pfister https://github.com/andyundso gh-53, entering DST
|
data/README.md
CHANGED
@@ -138,6 +138,8 @@ Example of cron strings understood by fugit:
|
|
138
138
|
# and more...
|
139
139
|
```
|
140
140
|
|
141
|
+
Please note that `'15/30 * * * *'` is interpreted as `'15-59/30 * * * *'` since fugit 1.4.6.
|
142
|
+
|
141
143
|
### the first Monday of the month
|
142
144
|
|
143
145
|
Fugit tries to follow the `man 5 crontab` documentation.
|
data/lib/fugit.rb
CHANGED
data/lib/fugit/cron.rb
CHANGED
data/lib/fugit/nat.rb
CHANGED
@@ -201,7 +201,7 @@ module Fugit
|
|
201
201
|
end
|
202
202
|
|
203
203
|
def ampm(i)
|
204
|
-
rex(:ampm, i, /[ \t]*(am|pm)/i)
|
204
|
+
rex(:ampm, i, /[ \t]*(am|pm|noon|midday|midnight)/i)
|
205
205
|
end
|
206
206
|
def dark(i)
|
207
207
|
rex(:dark, i, /[ \t]*dark/i)
|
@@ -473,17 +473,21 @@ module Fugit
|
|
473
473
|
slot(:monthday, "#{md0}-#{md1}")
|
474
474
|
end
|
475
475
|
|
476
|
+
def adjust_h(h, ap)
|
477
|
+
h = h.to_i
|
478
|
+
ap = ap || ''
|
479
|
+
(h < 12 && ap == 'pm' || ap == 'midnight') ? h + 12 : h
|
480
|
+
end
|
481
|
+
|
476
482
|
def rewrite_digital_hour(t)
|
477
483
|
h, m, ap = t.strinpd.split(/[: \t]+/)
|
478
|
-
h, m = h
|
479
|
-
h
|
480
|
-
slot(:hm, h.to_i, m.to_i)
|
484
|
+
h, m = adjust_h(h, ap), m.to_i
|
485
|
+
slot(:hm, h, m)
|
481
486
|
end
|
482
487
|
|
483
488
|
def rewrite_simple_hour(t)
|
484
489
|
h, ap = t.subgather(nil).collect(&:strinpd)
|
485
|
-
h = h
|
486
|
-
h = h + 12 if ap == 'pm'
|
490
|
+
h = adjust_h(h, ap)
|
487
491
|
slot(:hm, h, 0)
|
488
492
|
end
|
489
493
|
|
@@ -500,7 +504,7 @@ module Fugit
|
|
500
504
|
m = NMINUTES[m] || m
|
501
505
|
#p [ 1, '-->', h, m ]
|
502
506
|
|
503
|
-
h
|
507
|
+
h = adjust_h(h, apt && apt.strinpd)
|
504
508
|
|
505
509
|
slot(:hm, h, m)
|
506
510
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fugit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Mettraux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: raabro
|