sof-cycle 0.1.10 → 0.1.11

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: efa206d4535b7a45567f643a71738506a7c5a3f318180cba1d576a618b178877
4
- data.tar.gz: 3946a1dbfc81ef89d33db3ca0bd1df0fd74dc86cc6aef967055dbdac755afd27
3
+ metadata.gz: 98a3b894aa388fbe5e272203915060486d219d54872ee3f54bbbc9aed3c343d7
4
+ data.tar.gz: 4023edaf4b2c668680d4fb7147f920b7dff727ade6bc02a64c5d928dabc5bbd5
5
5
  SHA512:
6
- metadata.gz: 697ee468ec9ed5a57f2b1e33fa1ae38f865fac62082edca445f263b8862d368017a5ca42667c12bfa45c05853790dcc3163e7577f13ca60c0d8981085cebf4e1
7
- data.tar.gz: c20956003342ba14086a563430d04370872eff64eec0e63b9c7c153f892fe6973a6c805d95bf31f4ae05e12d566a33709858cb3dd35fc996c54c36851c7ab10e
6
+ metadata.gz: 32ed188de45051c75b5e9fc41f26f59ccba11e2432eb7714601eed2baa581a70b00136cd7b7e8c5bac50d5966dca221540b92e570c6ac06aa7bbfe9a1be72123
7
+ data.tar.gz: e2b243c6387a5a79b7c1dfda6c7a2efb31f692f5196924abf7351bcfbf9ba87e7416e5528533f9a7ab29c7200c709e9b2d426a00db8222c570621bd16b040210
data/CHANGELOG.md CHANGED
@@ -5,10 +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.10] - 2025-09-04
9
-
10
- ## [0.1.9] - 2025-09-04
8
+ ## [0.1.11] - 2025-09-05
11
9
 
12
10
  ### Changed
13
11
 
14
- - Make use of scoping for `Cycle.cycle_handlers` to prevent collisions with other Cycle classes.
12
+ - Use `time_span.notation` instead of `TimeSpan.notation` in `Cycle#notation`.
13
+
14
+ ## [0.1.10] - 2025-09-04
@@ -0,0 +1 @@
1
+ 1dd8e44d63d65dc2efc605dc2957fde47f7b9dfb7b91ddc7cca43bbc420b10366c26512eb940261381f54ad41d3a240dfa13abeaf8d52688c0ba1075b425ac9f
@@ -2,6 +2,6 @@
2
2
 
3
3
  module SOF
4
4
  class Cycle
5
- VERSION = "0.1.10"
5
+ VERSION = "0.1.11"
6
6
  end
7
7
  end
data/lib/sof/cycle.rb CHANGED
@@ -236,7 +236,7 @@ module SOF
236
236
  [
237
237
  "V#{volume}",
238
238
  self.class.notation_id,
239
- TimeSpan.notation(hash.slice(:period, :period_count)),
239
+ time_span.notation,
240
240
  hash.fetch(:from, nil)
241
241
  ].compact.join
242
242
  end
data/lib/sof/time_span.rb CHANGED
@@ -49,6 +49,10 @@ module SOF
49
49
  end
50
50
  end
51
51
 
52
+ def notation
53
+ [period_count, code].join
54
+ end
55
+
52
56
  # Class used to calculate the windows of time so that
53
57
  # a TimeSpan object will know the correct end of year,
54
58
  # quarter, etc.
@@ -63,7 +67,7 @@ module SOF
63
67
  end
64
68
 
65
69
  def for_notation(notation)
66
- types.find do |klass|
70
+ DatePeriod.types.find do |klass|
67
71
  klass.code == notation.to_s.upcase
68
72
  end
69
73
  end
@@ -189,7 +193,7 @@ module SOF
189
193
  end
190
194
  attr_reader :window
191
195
 
192
- delegate [:end_date, :begin_date] => :window
196
+ delegate [:end_date, :begin_date, :code] => :window
193
197
 
194
198
  def end_date_of_period(date)
195
199
  window.end_of_period(date)
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.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Gay
@@ -53,6 +53,7 @@ files:
53
53
  - Rakefile
54
54
  - checksums/sof-cycle-0.1.0.gem.sha512
55
55
  - checksums/sof-cycle-0.1.1.gem.sha512
56
+ - checksums/sof-cycle-0.1.10.gem.sha512
56
57
  - checksums/sof-cycle-0.1.2.gem.sha512
57
58
  - checksums/sof-cycle-0.1.6.gem.sha512
58
59
  - checksums/sof-cycle-0.1.7.gem.sha512