duration.rb 0.6.0 → 0.6.2

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: 879170199d5fdc472851ece21f3896aa08d7767484045d281834255ca51d8c84
4
- data.tar.gz: a35e1867f9712bb9aa415bcb577434e0683908c9f0c2579dfcaf27476770907c
3
+ metadata.gz: 96a11b338ddcec99f2b1b42f0c98b478937688114644edf233bee9b6a894c75d
4
+ data.tar.gz: 74717586689952c86539c811efbb6c4666b768b9dd2345759b0f4638a7b9b7a7
5
5
  SHA512:
6
- metadata.gz: b4ab866878939cd01e8ab62ff977fb53e974fb67b6ea2385c4837f60d2420b73e418ed75ba21aac52143487dd9b6b6c4818a11aac969ce7e14cc403ce7678928
7
- data.tar.gz: 8b51e85072dbeede9062953fa1391a848242934c0d09559715a66bfc902cbd1284c7e53ef3e6811cbf859611c6f3d746d412eaf1e127e17e619c2a783446d552
6
+ metadata.gz: 501a0a8bc4e39897ac84e5c3ec1ad346115a68b0a2c6f99b8bd1b7d3622bebe5821ccc8cf058e961c52285920783ef57ce9c0f8ec7bb085cb69f1db3fc4c37d9
7
+ data.tar.gz: eb816a10954321a09980a31c0cce9409574a556ee958b4500d9cccfdb849813c683279f9c94d239b6d212275e1f08fd4157e092f113d6ef2ba813bbe87e88138
data/CHANGELOG CHANGED
@@ -1,5 +1,23 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 20260819
4
+
5
+ 0.6.2: ~ duration.rb.gemspec: spec.files reordered, the globs first.
6
+
7
+ 1. ~ duration.rb.gemspec: spec.files reordered, the two Dir globs first and the loose files alphabetically after them, as moby and measurand have it. The globs are what the gem is and the rest is paperwork, so adding a file to the paperwork now never disturbs them. This gemspec had sorted the globs in among the loose files by path, which monotonic.rb shared. The same 35 files ship, in the same gem; only the order in the source changes.
8
+ 2. ~ duration.rb.gemspec: + a trailing comma to the last element of spec.files, which had none. Without it the reorder would have moved an uncommaed line into the middle of the list and the gemspec would not have parsed.
9
+ 3. ~ Duration::VERSION: /0.6.1/0.6.2/
10
+
11
+
12
+ ## 20260816
13
+
14
+ 0.6.1: Documentation fixes for Months, which said one thing in the README and another in the class comment, and showed a third in the examples.
15
+
16
+ 1. ~ lib/Duration/Months.rb: /Months is slated for removal in 0.5.0/Months is therefore slated for removal/. 0.5.1 dropped the version from README.md, 0.5.0 having been and gone with Months still in place, but left the class comment still naming it, so the two have disagreed since and the comment is now two minor versions stale.
17
+ 2. ~ README.md: + 6.months.ago and 6.months.hence to the Time Calculations examples, each with the mean month noted beside it. Every other unit was shown and Months alone omitted, which implies that Months does not answer ago and hence, when 0.4.0 decided that it does and A Note on Months says as much eleven lines below. The examples are what is read first, so the omission was the louder statement of the two.
18
+ 3. ~ Duration::VERSION: /0.6.0/0.6.1/
19
+
20
+
3
21
  ## 20260812
4
22
 
5
23
  0.6.0: The unit classes are now autoloaded so as to avoid circular loading messages when running the tests. It's faster too!
data/README.md CHANGED
@@ -127,12 +127,19 @@ minutes reads the files for seconds and minutes and leaves the rest unread.
127
127
  5.days.ago # => #<Time:> (now - 5.days.to_seconds.to_f)
128
128
  6.weeks.ago # => #<Time:> (now - 6.weeks.to_seconds.to_f)
129
129
 
130
+ # Months too, but by the Gregorian mean month rather than a calendar month, so
131
+ # the result is approximate. See A Note on Months below.
132
+ 6.months.ago # => #<Time:> (now - 6.months.to_seconds.to_f)
133
+
130
134
  # The future
131
135
  2.seconds.hence # => #<Time:> (now + 2.seconds.to_seconds.to_f)
132
136
  3.minutes.hence # => #<Time:> (now + 3.minutes.to_seconds.to_f)
133
137
  4.hours.hence # => #<Time:> (now + 4.hours.to_seconds.to_f)
134
138
  5.days.hence # => #<Time:> (now + 5.days.to_seconds.to_f)
135
139
  6.weeks.hence # => #<Time:> (now + 6.weeks.to_seconds.to_f)
140
+
141
+ # Again by the mean month, and so approximate:
142
+ 6.months.hence # => #<Time:> (now + 6.months.to_seconds.to_f)
136
143
  ```
137
144
 
138
145
  ### A Note on Months
data/duration.rb.gemspec CHANGED
@@ -22,13 +22,13 @@ Gem::Specification.new do |spec|
22
22
  spec.required_ruby_version = '>= 2.5'
23
23
 
24
24
  spec.files = [
25
+ Dir['lib/**/*.rb'],
26
+ Dir['test/**/*.rb'],
25
27
  'CHANGELOG',
26
28
  'duration.rb.gemspec',
27
29
  'Gemfile',
28
- Dir['lib/**/*.rb'],
29
30
  'Rakefile',
30
31
  'README.md',
31
- Dir['test/**/*.rb']
32
32
  ].flatten
33
33
 
34
34
  spec.development_dependencies = %w{
@@ -11,7 +11,7 @@ module Duration
11
11
  #
12
12
  # ago and hence (via Relative) inherit the same caveat: they displace by the
13
13
  # mean month rather than an actual calendar month, so they are approximate,
14
- # not calendar-correct. Months is slated for removal in 0.5.0.
14
+ # not calendar-correct. Months is therefore slated for removal.
15
15
  class Months
16
16
  include Common
17
17
  include Relative
@@ -1,3 +1,3 @@
1
1
  module Duration
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duration.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoran