fugit 1.12.1 → 1.12.3
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
- data/CHANGELOG.md +12 -0
- data/CREDITS.md +2 -0
- data/LICENSE.txt +1 -1
- data/README.md +6 -0
- data/lib/fugit/at.rb +9 -4
- data/lib/fugit/cron.rb +7 -2
- data/lib/fugit/parse.rb +5 -5
- data/lib/fugit.rb +1 -1
- 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: f588451db0cf7643afd0ecd89313863b4ca89913872547f0dd8342343fec1b57
|
|
4
|
+
data.tar.gz: a0832d2aecbe4b158a3deef01ac7c230cd8de3ff2c3dc5a1da4e871a516d27c6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5fca6043aef60a7c895b991f364714f1d26f3ef0922d477fc624a4f4cdc51dc948542fca4638567e2416fa4ff4c75e267f03991d7624f2515745d8e8be203314
|
|
7
|
+
data.tar.gz: 8ddb37f7d0f961dc341757fff83ef1cf844df7a7ffc7aaedc1eed0dca6fea4be217029e2a266cb8ce774303e174f4e27713854b4058cf6f12b3c2aa6eb78d1ca
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
# CHANGELOG.md
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
## fugit 1.12.3 released 2026-07-01
|
|
6
|
+
|
|
7
|
+
* Wrap-around for weekday ranges with step value, gh-119 Nicolas Bachschmidt
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## fugit 1.12.2 released 2026-05-28
|
|
11
|
+
|
|
12
|
+
* Fix "divide by zero" gh-117
|
|
13
|
+
* Let at parse 'now', gh-111
|
|
14
|
+
* Let Fugit::At pass options to Chronic, gh-116
|
|
15
|
+
|
|
16
|
+
|
|
5
17
|
## fugit 1.12.1 released 2025-10-14
|
|
6
18
|
|
|
7
19
|
* Fix Fugit::Cron#to_cron_s to include & if @day_and
|
data/CREDITS.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
# fugit credits
|
|
3
3
|
|
|
4
|
+
* Nicolas Bachschmidt https://github.com/baarde gh-120 weekday wrap fix
|
|
5
|
+
* JebeenLee https://github.com/JebeenLee gh-117 divide by zero
|
|
4
6
|
* Eric Claerhout https://github.com/swebra gh-114 rweek readme clarity
|
|
5
7
|
* Hugh Kelsey https://github.com/hughkelsey gh-114 rweek/rday / wed%4+1,wed%4
|
|
6
8
|
* Mark R. James, https://github.com/mrj, AM vs America/Los_Angeles, gh-113
|
data/LICENSE.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
Copyright (c) 2017-
|
|
2
|
+
Copyright (c) 2017-2026, John Mettraux, jmettraux+flor@gmail.com
|
|
3
3
|
|
|
4
4
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
5
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
# fugit
|
|
3
3
|
|
|
4
|
+
> Sed fugit interea, fugit irreparabile tempus
|
|
5
|
+
|
|
6
|
+
Virgil, _Georgics_ Book III
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
4
10
|
[](https://github.com/floraison/fugit/actions)
|
|
5
11
|
[](http://badge.fury.io/rb/fugit)
|
|
6
12
|
|
data/lib/fugit/at.rb
CHANGED
|
@@ -6,14 +6,19 @@ module Fugit
|
|
|
6
6
|
|
|
7
7
|
class << self
|
|
8
8
|
|
|
9
|
-
def parse(s)
|
|
9
|
+
def parse(s, opts={})
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
do_parse(s, opts || {}) rescue nil
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def do_parse(s)
|
|
14
|
+
def do_parse(s, opts={})
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
case s
|
|
17
|
+
when /^now$/i then ::EtOrbi::EoTime.now
|
|
18
|
+
when String then ::EtOrbi.parse(s, opts || {})
|
|
19
|
+
when ::EtOrbi::EoTime then s
|
|
20
|
+
else ::EtOrbi.make_time(s)
|
|
21
|
+
end
|
|
17
22
|
end
|
|
18
23
|
end
|
|
19
24
|
end
|
data/lib/fugit/cron.rb
CHANGED
|
@@ -591,6 +591,8 @@ module Fugit
|
|
|
591
591
|
# let it go, "* */24 * * *" and "* */27 * * *" are okay
|
|
592
592
|
# gh-86 and gh-103
|
|
593
593
|
|
|
594
|
+
return false if sla && sla < 1
|
|
595
|
+
|
|
594
596
|
edn = max if sla && edn.nil?
|
|
595
597
|
|
|
596
598
|
return nil if sta.nil? && edn.nil? && sla.nil?
|
|
@@ -690,8 +692,11 @@ module Fugit
|
|
|
690
692
|
if ha || mo
|
|
691
693
|
@weekdays << [ a, ha || mo ]
|
|
692
694
|
elsif sl
|
|
693
|
-
|
|
694
|
-
|
|
695
|
+
z ||= (a ? a : 6)
|
|
696
|
+
a ||= 0
|
|
697
|
+
z = z + 7 if a > z
|
|
698
|
+
(a..z).step(sl < 1 ? 1 : sl)
|
|
699
|
+
.each { |i| @weekdays << [ (i > 6) ? i - 7 : i ] }
|
|
695
700
|
elsif z
|
|
696
701
|
z = z + 7 if a > z
|
|
697
702
|
(a..z).each { |i| @weekdays << [ (i > 6) ? i - 7 : i ] }
|
data/lib/fugit/parse.rb
CHANGED
|
@@ -8,13 +8,13 @@ module Fugit
|
|
|
8
8
|
|
|
9
9
|
def parse_cron(s); ::Fugit::Cron.parse(s); end
|
|
10
10
|
def parse_duration(s); ::Fugit::Duration.parse(s); end
|
|
11
|
-
def parse_nat(s, opts={}); ::Fugit::Nat.parse(s, opts); end
|
|
12
|
-
def parse_at(s); ::Fugit::At.parse(s); end
|
|
11
|
+
def parse_nat(s, opts={}); ::Fugit::Nat.parse(s, opts || {}); end
|
|
12
|
+
def parse_at(s, opts={}); ::Fugit::At.parse(s, opts || {}); end
|
|
13
13
|
def parse_in(s); parse_duration(s); end
|
|
14
14
|
|
|
15
15
|
def do_parse_cron(s); ::Fugit::Cron.do_parse(s); end
|
|
16
16
|
def do_parse_duration(s); ::Fugit::Duration.do_parse(s); end
|
|
17
|
-
def do_parse_nat(s, opts={}); ::Fugit::Nat.do_parse(s, opts); end
|
|
17
|
+
def do_parse_nat(s, opts={}); ::Fugit::Nat.do_parse(s, opts || {}); end
|
|
18
18
|
def do_parse_at(s); ::Fugit::At.do_parse(s); end
|
|
19
19
|
def do_parse_in(s); do_parse_duration(s); end
|
|
20
20
|
|
|
@@ -24,8 +24,8 @@ module Fugit
|
|
|
24
24
|
|
|
25
25
|
(opts[:cron] != false && parse_cron(s)) || # 542ms 616ms
|
|
26
26
|
(opts[:duration] != false && parse_duration(s)) || # 645ms # 534ms
|
|
27
|
-
(opts[:nat] != false && parse_nat(s, opts)) || # 2s # 35s
|
|
28
|
-
(opts[:at] != false && parse_at(s)) || # 568ms 622ms
|
|
27
|
+
(opts[:nat] != false && parse_nat(s, opts || {})) || # 2s # 35s
|
|
28
|
+
(opts[:at] != false && parse_at(s, opts || {})) || # 568ms 622ms
|
|
29
29
|
nil
|
|
30
30
|
end
|
|
31
31
|
|
data/lib/fugit.rb
CHANGED
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.12.
|
|
4
|
+
version: 1.12.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John Mettraux
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-07-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: raabro
|