sof-cycle 0.1.18 → 0.1.19
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 +6 -6
- data/checksums/sof-cycle-0.1.18.gem.sha512 +1 -0
- data/lib/sof/cycle/version.rb +1 -1
- data/lib/sof/cycle.rb +6 -5
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0c55fcf5568b377afa4873ddd3adf5d2631bd0f05f87a80d003efacafa6ecc6c
|
|
4
|
+
data.tar.gz: e8cf4dd826a396d47b40107decb70a957435f3d4754b15379ba89c14c0864004
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4600b3a56d63b1c9177072e96f45292ab8f536827dabac963b29dc896e41c2b2cdee52ce8edc5578a8a3675a3d8c09d8d1bc52cbb0e5f9e39540d76f47adb56a
|
|
7
|
+
data.tar.gz: a4089a2360039fb791b06d463abda71fe82fb01d381acf7b6caa83c83381a78359c8841fed7e11d9b3321e20e847834a94bf3e0621f4ee46146467db3cfe541d
|
data/CHANGELOG.md
CHANGED
|
@@ -5,14 +5,14 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [0.1.
|
|
8
|
+
## [0.1.19] - 2026-10-26
|
|
9
9
|
|
|
10
|
-
###
|
|
10
|
+
### Changed
|
|
11
11
|
|
|
12
|
-
- `Cycle#in_force_by
|
|
12
|
+
- `Cycle#in_force_by` anchors a dormant cycle on the date that meets its volume rather than the latest, so later dates count toward the next window
|
|
13
13
|
|
|
14
|
-
## [0.1.
|
|
14
|
+
## [0.1.18] - 2026-10-22
|
|
15
15
|
|
|
16
|
-
###
|
|
16
|
+
### Added
|
|
17
17
|
|
|
18
|
-
- `Cycle#
|
|
18
|
+
- `Cycle#in_force_by(dates)` anchors a dormant End-of or Interval cycle on the latest date once the dates meet its volume, then resets it by them
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f523d1ba6aebd4f1255f259f102f28c2a733ac16086fd2d30a49353bb34b6dc314010872a17487fcee1478facbcff25910bd2a0bf356ffb4ebfc7b7f952694a2
|
data/lib/sof/cycle/version.rb
CHANGED
data/lib/sof/cycle.rb
CHANGED
|
@@ -347,8 +347,8 @@ module SOF
|
|
|
347
347
|
end
|
|
348
348
|
|
|
349
349
|
# The cycle in force given the dates that satisfy it: a dormant E or I
|
|
350
|
-
# cycle anchors on the
|
|
351
|
-
#
|
|
350
|
+
# cycle anchors on the date that meets its volume, then `reset_by` moves
|
|
351
|
+
# it by the dates past that anchor.
|
|
352
352
|
#
|
|
353
353
|
# @param dates [Array<Date, Time, nil>] the acts that satisfy this cycle
|
|
354
354
|
# @return [Cycle] the cycle in force, or self when nothing brings it in
|
|
@@ -359,10 +359,11 @@ module SOF
|
|
|
359
359
|
def in_force_by(dates)
|
|
360
360
|
return self unless recurring? && dormant_capable?
|
|
361
361
|
|
|
362
|
-
days = Array(dates).filter_map { it&.to_date }
|
|
363
|
-
return
|
|
362
|
+
days = Array(dates).filter_map { it&.to_date }.sort
|
|
363
|
+
return reset_by(days) unless from_date.nil?
|
|
364
|
+
return self if days.size < volume
|
|
364
365
|
|
|
365
|
-
activated_by(days
|
|
366
|
+
activated_by(days[volume - 1]).reset_by(days)
|
|
366
367
|
end
|
|
367
368
|
|
|
368
369
|
# From the supplied anchor date, are there enough in-window completions to
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sof-cycle
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.19
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jim Gay
|
|
@@ -60,6 +60,7 @@ files:
|
|
|
60
60
|
- checksums/sof-cycle-0.1.15.gem.sha512
|
|
61
61
|
- checksums/sof-cycle-0.1.16.gem.sha512
|
|
62
62
|
- checksums/sof-cycle-0.1.17.gem.sha512
|
|
63
|
+
- checksums/sof-cycle-0.1.18.gem.sha512
|
|
63
64
|
- checksums/sof-cycle-0.1.2.gem.sha512
|
|
64
65
|
- checksums/sof-cycle-0.1.3.gem.sha512
|
|
65
66
|
- checksums/sof-cycle-0.1.4.gem.sha512
|