sof-cycle 0.1.15 → 0.1.16

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ace7e7bdb57808f1c633cf78aaab4fc7949e6820e86089c283926e0c22558bbd
4
- data.tar.gz: 5c12b7d8d840f2afe367d13cc7e5864fd835d62e2f0b9bc480d17873e706182c
3
+ metadata.gz: 231dc1ad6fc3d374cd70a0684f1d67206ccc7bec0335d1510b03f219a1a8fc5d
4
+ data.tar.gz: f0d524a077e23d84544833cae34d8d0695817bc10f092ffc84c560371edaffa9
5
5
  SHA512:
6
- metadata.gz: d1c8dda915931d2a5cd860ebf1ad79d2c6cc353d8794a159cc52720bde02f2e3e3aa7001fbb7af240dbf16c1b212f44ce28eacb7ec10fa1868dd47c7860406ae
7
- data.tar.gz: ea2ca6604e38d85894d0df757010449f839040b28c01de608270cdffc536ed5f8e62125ecea7ec59f9100106eae6a3ab2a3243b68b4218a7269b671f483e9bad
6
+ metadata.gz: 54c7a1a4f2a1960050e282ce5209c327f3b6c16b18ed9c5c1696564f7a99b30dbfbded433bf9a60a1f8ebf4ddac6d1d98b44d42413327fb7b5caf9152e6267d1
7
+ data.tar.gz: 4cf103728536a77b00dadfea353f616882d095468ca5c3c02e6d838736d4ecdb0e0fb7f67da980632443eb9270ba2d4714b20e44bddd8b38189c7242af02ab6b
data/CHANGELOG.md CHANGED
@@ -5,6 +5,10 @@ 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.15] - 2026-07-27
8
+ ## [0.1.16] - 2026-10-08
9
+
10
+ ### Added
9
11
 
10
- ## [0.1.14] - 2026-04-27
12
+ - `Cycle#activated_by(date)` returns the cycle anchored on that date, or itself when already active
13
+
14
+ ## [0.1.15] - 2026-07-27
@@ -0,0 +1 @@
1
+ c566d1094fde450d0b42a5014f89d077cbae3c1a23f0535ac21e16d9fc3d23151c7651a403d4e4f292384187b47188218e7baa78189c98d582a6f45da918aa9c
@@ -2,6 +2,6 @@
2
2
 
3
3
  module SOF
4
4
  class Cycle
5
- VERSION = "0.1.15"
5
+ VERSION = "0.1.16"
6
6
  end
7
7
  end
data/lib/sof/cycle.rb CHANGED
@@ -329,6 +329,21 @@ module SOF
329
329
  reset ? Cycle.for(activated_notation(reset)) : self
330
330
  end
331
331
 
332
+ # The cycle anchored on `date`. A cycle already active — anchored, or of
333
+ # a kind that is never dormant — returns itself.
334
+ #
335
+ # @param date [Date, Time] the act that anchors this cycle
336
+ # @return [Cycle] the activated cycle, or self when already active
337
+ #
338
+ # @example
339
+ # Cycle.for("V1E24M").activated_by(Date.new(2025, 4, 17))
340
+ # # => Cycle.for("V1E24MF2025-04-17")
341
+ def activated_by(date)
342
+ return self if active?
343
+
344
+ Cycle.for(activated_notation(date))
345
+ end
346
+
332
347
  # From the supplied anchor date, are there enough in-window completions to
333
348
  # satisfy the cycle?
334
349
  #
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.15
4
+ version: 0.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Gay
@@ -57,6 +57,7 @@ files:
57
57
  - checksums/sof-cycle-0.1.12.gem.sha512
58
58
  - checksums/sof-cycle-0.1.13.gem.sha512
59
59
  - checksums/sof-cycle-0.1.14.gem.sha512
60
+ - checksums/sof-cycle-0.1.15.gem.sha512
60
61
  - checksums/sof-cycle-0.1.2.gem.sha512
61
62
  - checksums/sof-cycle-0.1.3.gem.sha512
62
63
  - checksums/sof-cycle-0.1.4.gem.sha512