fugit 1.12.1 → 1.12.2
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 +7 -0
- data/CREDITS.md +1 -0
- data/LICENSE.txt +1 -1
- data/README.md +6 -0
- data/lib/fugit/at.rb +9 -4
- data/lib/fugit/cron.rb +2 -0
- 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: dbfc8b39f64a9745e37dcc8f20b5e923378a76a66a5ceecda42d9892ebcfc6fb
|
|
4
|
+
data.tar.gz: 19dc7123a550e62a242aed23ce401a8f3084cbc6fb6321e281dc03b706702b0a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '089240f70ced2e63f3cd18c74dd58da00e372137ee2768b002a24fb452cf6c0f0bd539e192667a0e20b2dd83082eccefc82ff2c8605a0ca405e667c6ba3c81c6'
|
|
7
|
+
data.tar.gz: 59dca013d409f191481ad0f3038ed697627f5f2f5b589cfd33c9547cde3d35ab6771c35f28b751504dc6325b107b1556b75949fab0f4ca94d47204ebfb3b14b1
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
# CHANGELOG.md
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
## fugit 1.12.2 released 2026-05-28
|
|
6
|
+
|
|
7
|
+
* Fix "divide by zero" gh-117
|
|
8
|
+
* Let at parse 'now', gh-111
|
|
9
|
+
* Let Fugit::At pass options to Chronic, gh-116
|
|
10
|
+
|
|
11
|
+
|
|
5
12
|
## fugit 1.12.1 released 2025-10-14
|
|
6
13
|
|
|
7
14
|
* Fix Fugit::Cron#to_cron_s to include & if @day_and
|
data/CREDITS.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
# fugit credits
|
|
3
3
|
|
|
4
|
+
* JebeenLee https://github.com/JebeenLee gh-117 divide by zero
|
|
4
5
|
* Eric Claerhout https://github.com/swebra gh-114 rweek readme clarity
|
|
5
6
|
* Hugh Kelsey https://github.com/hughkelsey gh-114 rweek/rday / wed%4+1,wed%4
|
|
6
7
|
* 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
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.2
|
|
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-05-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: raabro
|