paper_trail_diff 0.18.0 → 0.18.1

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: e73cc91680f27caa4eae93b2de5b4616d79910f6d42010cb314779df5f895391
4
- data.tar.gz: 9968c963fa388d1767be11ea445c6cc48ad6ca79db37f6bfafcbb096b052fc1f
3
+ metadata.gz: ad3666012fcd5a04c16d09f8336fdc5c4cdafe2ce97cd90f4226625570116709
4
+ data.tar.gz: 191bc03e2ee82b2632b4ab7186783d1c7b0001121b6fabf2d36d218aa35137ab
5
5
  SHA512:
6
- metadata.gz: 8bab067829aa8e73069bf42b3c197806ffc8b72848d706cc2a40026469fc9eb5d575d098f1dd65bc1378c3cedca55a5f92dfec727cdf97712e4e2c1f3cfd29d4
7
- data.tar.gz: 7aa9cb02aae5c331f6bbff04a20aac1ce33ff74168a813d1a90b46e9dab2bc8a2a99e2526eb2408dab38f1d8c4b24ffdbcd38a3a58fe7a2627591a7b39ad4008
6
+ metadata.gz: cf7ce4c548feede465232fa61bf4f48f1e2120e420d6d0c557d5ec104f99b8e90ce2131491d946bc84255eac13f0579943c4e49dee941250d5f0db96806b16af
7
+ data.tar.gz: 4d60f634640d0e9d358b991e2e8eeba974308e461b5c9e0f04b6f2ccb19fa6723c7b620f50b65f57b67a24b70f84b9a25ed4850f25c50698ae3e6a417165c99d
data/CHANGELOG.md CHANGED
@@ -3,6 +3,19 @@
3
3
  All notable changes to this project will be documented in this file. The
4
4
  project follows [Semantic Versioning](https://semver.org/).
5
5
 
6
+ ## [0.18.1] - 2026-11-18
7
+
8
+ ### Fixed
9
+
10
+ - A record saved in the same instant as a transaction's last version no
11
+ longer drops out of a snapshot. Where that last version was of a record the
12
+ history does not hold, such as a comment on another article, it was read
13
+ with only some of its columns, and if it was the first version of its class
14
+ the gem asked about, every later version of that class was compared as a
15
+ bare time for the rest of the process. A `belongs_to` target created in the same second, as a
16
+ database that stores whole seconds dates it, then read as created after the
17
+ boundary, so the snapshot left it out. 0.18.0 is affected.
18
+
6
19
  ## [0.18.0] - 2026-11-15
7
20
 
8
21
  ### Breaking changes
@@ -180,15 +180,16 @@ module PaperTrailDiff
180
180
  .where(dated[:transaction_id].eq(table[:transaction_id]))
181
181
  end
182
182
 
183
- # The last versions not held, read only for what places them. With
184
- # none missing, the relation reads nothing.
183
+ # The last versions not held, read whole: a boundary placed at one is
184
+ # compared as a version, and what a version is, is asked once for its
185
+ # class (see Support.per_model), so a row read in part would answer for
186
+ # every version after it. With none missing, the relation reads nothing.
185
187
  #: (untyped, Hash[untyped, untyped], Hash[untyped, Array[untyped]]) -> Array[untyped]
186
188
  def other(version_class, last, held)
187
189
  missing = last.reject do |number, id|
188
190
  held.fetch(number).any? { |version| version.id == id }
189
191
  end
190
192
  version_class.where(version_class.primary_key => missing.values)
191
- .select(version_class.primary_key, :created_at, :transaction_id)
192
193
  end
193
194
  end
194
195
  end
@@ -2,5 +2,5 @@
2
2
  # rbs_inline: enabled
3
3
 
4
4
  module PaperTrailDiff
5
- VERSION = '0.18.0'
5
+ VERSION = '0.18.1'
6
6
  end
@@ -116,8 +116,10 @@ module PaperTrailDiff
116
116
  # : (untyped) -> untyped
117
117
  def newest: (untyped) -> untyped
118
118
 
119
- # The last versions not held, read only for what places them. With
120
- # none missing, the relation reads nothing.
119
+ # The last versions not held, read whole: a boundary placed at one is
120
+ # compared as a version, and what a version is, is asked once for its
121
+ # class (see Support.per_model), so a row read in part would answer for
122
+ # every version after it. With none missing, the relation reads nothing.
121
123
  # : (untyped, Hash[untyped, untyped], Hash[untyped, Array[untyped]]) -> Array[untyped]
122
124
  def other: (untyped, Hash[untyped, untyped], Hash[untyped, Array[untyped]]) -> Array[untyped]
123
125
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paper_trail_diff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Williams
@@ -322,11 +322,11 @@ licenses:
322
322
  metadata:
323
323
  allowed_push_host: https://rubygems.org
324
324
  bug_tracker_uri: https://github.com/aheathwilliams/paper_trail_diff/issues
325
- changelog_uri: https://github.com/aheathwilliams/paper_trail_diff/blob/v0.18.0/CHANGELOG.md
326
- documentation_uri: https://github.com/aheathwilliams/paper_trail_diff/blob/v0.18.0/README.md
325
+ changelog_uri: https://github.com/aheathwilliams/paper_trail_diff/blob/v0.18.1/CHANGELOG.md
326
+ documentation_uri: https://github.com/aheathwilliams/paper_trail_diff/blob/v0.18.1/README.md
327
327
  homepage_uri: https://github.com/aheathwilliams/paper_trail_diff
328
328
  rubygems_mfa_required: 'true'
329
- source_code_uri: https://github.com/aheathwilliams/paper_trail_diff/tree/v0.18.0
329
+ source_code_uri: https://github.com/aheathwilliams/paper_trail_diff/tree/v0.18.1
330
330
  rdoc_options: []
331
331
  require_paths:
332
332
  - lib