fugit 1.8.0 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fugit might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/CREDITS.md +2 -0
- data/LICENSE.txt +1 -1
- data/lib/fugit/duration.rb +6 -4
- 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: b1839fa07acc6287be95f8076c19afa2c9d6c9b5500ac1b03febab61959b5057
|
4
|
+
data.tar.gz: 839ff5c0f85ccd51625febfdbfedd017e46962d288cf313307b706830dc838c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5336bf251441fa3f7372d48aec2196cf86831b24c64110955f2ccf2df2e6e1ec84a68b318b53be8282f87794f40c09778bddd47abec3f65fe1469544a758fabb
|
7
|
+
data.tar.gz: 0fdd70455097838c21c3f03c9dca20889b4aba07f67d790136e40be2d8686b0a6ad8a594fff1fe28e7cd4d322ad66a8a31aa71750cd435c7601345487ae89bdb
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
# CHANGELOG.md
|
3
3
|
|
4
4
|
|
5
|
+
## fugit 1.8.1 released 2023-01-20
|
6
|
+
|
7
|
+
* Fix for month subtraction, gh-84, @mreinsch
|
8
|
+
* Fix duration - time, gh-85, @mreinsch
|
9
|
+
|
10
|
+
|
5
11
|
## fugit 1.8.0 released 2022-12-06
|
6
12
|
|
7
13
|
* Introduce Fugit.parse_cronish and .do_parse_cronish, gh-70
|
data/CREDITS.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
|
2
2
|
# fugit credits
|
3
3
|
|
4
|
+
* Michael Reinsch, https://github.com/mreinsch, gh-84 and gh-85
|
5
|
+
* Marc Anguera, https://github.com/markets, gh-70 and Sidekiq-Cron
|
4
6
|
* ski-nine, https://github.com/ski-nine, gh-81
|
5
7
|
* Joseph Halter, https://github.com/JosephHalter, gh-79
|
6
8
|
* James Healy, https://github.com/yob, gh-76
|
data/LICENSE.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
Copyright (c) 2017-
|
2
|
+
Copyright (c) 2017-2023, 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/lib/fugit/duration.rb
CHANGED
@@ -68,8 +68,10 @@ module Fugit
|
|
68
68
|
hou: { a: 'h', r: 'h', i: 'H', s: 3600, I: true, l: 'hour' },
|
69
69
|
min: { a: 'm', r: 'm', i: 'M', s: 60, I: true, l: 'minute' },
|
70
70
|
sec: { a: 's', r: 's', i: 'S', s: 1, I: true, l: 'second' } }.freeze
|
71
|
-
|
72
|
-
|
71
|
+
|
72
|
+
INFLA_KEYS, NON_INFLA_KEYS = KEYS
|
73
|
+
.partition { |k, v| v[:I] }
|
74
|
+
.collect(&:freeze)
|
73
75
|
|
74
76
|
def _to_s(key)
|
75
77
|
|
@@ -240,7 +242,7 @@ module Fugit
|
|
240
242
|
n, m = at[1] / 12, at[1] % 12
|
241
243
|
at[0], at[1] = at[0] + n, m
|
242
244
|
elsif at[1] < 1
|
243
|
-
n, m = -at[1] / 12,
|
245
|
+
n, m = (-at[1]) / 12 + 1, (11+at[1]) % 12 + 1
|
244
246
|
at[0], at[1] = at[0] - n, m
|
245
247
|
end
|
246
248
|
|
@@ -269,7 +271,7 @@ module Fugit
|
|
269
271
|
when Numeric then add_numeric(-a)
|
270
272
|
when Fugit::Duration then add_duration(-a)
|
271
273
|
when String then add_duration(-self.class.parse(a))
|
272
|
-
when ::Time, ::EtOrbi::EoTime then add_to_time(a)
|
274
|
+
when ::Time, ::EtOrbi::EoTime then opposite.add_to_time(a)
|
273
275
|
else fail ArgumentError.new(
|
274
276
|
"cannot subtract #{a.class} instance to a Fugit::Duration")
|
275
277
|
end
|
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.8.
|
4
|
+
version: 1.8.1
|
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: 2023-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: raabro
|