sof-cycle 0.1.5 → 0.1.6
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/lib/sof/cycle/version.rb +1 -1
- data/lib/sof/cycle.rb +2 -0
- data/lib/sof/cycles/within.rb +8 -0
- 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: 33cc5f466f7776bd9476664153cf9ae0e3f898132b348cffa0117a911ad7dda6
|
|
4
|
+
data.tar.gz: a30b3ea58dce3a953531deffba10f9199af3b283fdf70f99d7af55988aef428e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ce71b8b026ee7e78c6d6568dea2a88eb2d5faee74cbc4cc4e7c6f78bf7e328b46ba7017e71acf75f7b8613204e6e7a56b9592987d559c5883c1901ead1119718
|
|
7
|
+
data.tar.gz: 306c295e768f6616c80ebe3ee8adbfb734d64b01b2b4fd5d52a45ac9e913752b660bbc7a77129adfd66fb517adb6c0217ec11f4c62518c32620c788a3803c91b
|
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.6] - 2024-09-04
|
|
9
9
|
|
|
10
|
-
###
|
|
10
|
+
### Added
|
|
11
11
|
|
|
12
|
-
- `Cycle
|
|
12
|
+
- `Cycle.extend_period(count)` to get a new cycle with the modified period count
|
|
13
13
|
|
|
14
|
-
## [0.1.
|
|
14
|
+
## [0.1.5] - 2024-09-02
|
|
15
15
|
|
|
16
|
-
###
|
|
16
|
+
### Fixed
|
|
17
17
|
|
|
18
|
-
- `Cycle#last_completed`
|
|
18
|
+
- `Cycle#last_completed` works for dormant cycles too
|
data/lib/sof/cycle/version.rb
CHANGED
data/lib/sof/cycle.rb
CHANGED
|
@@ -165,6 +165,8 @@ module SOF
|
|
|
165
165
|
# Return the most recent completion date from the supplied array of dates
|
|
166
166
|
def last_completed(dates) = dates.compact.map(&:to_date).max
|
|
167
167
|
|
|
168
|
+
def extend_period(_ = nil) = self
|
|
169
|
+
|
|
168
170
|
# From the supplied anchor date, are there enough in-window completions to
|
|
169
171
|
# satisfy the cycle?
|
|
170
172
|
#
|
data/lib/sof/cycles/within.rb
CHANGED
|
@@ -12,6 +12,14 @@ module SOF
|
|
|
12
12
|
|
|
13
13
|
def to_s = "#{volume}x within #{date_range}"
|
|
14
14
|
|
|
15
|
+
def extend_period(count)
|
|
16
|
+
Cycle.for(
|
|
17
|
+
Parser.load(
|
|
18
|
+
parser.to_h.merge(period_count: period_count + count)
|
|
19
|
+
).to_s
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
|
|
15
23
|
def date_range
|
|
16
24
|
return humanized_span unless active?
|
|
17
25
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jim Gay
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-09-
|
|
11
|
+
date: 2024-09-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: forwardable
|