standard_ledger 0.7.0 → 0.8.0

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: ddedb70c2937f7108178cce27f7150b58c39c5aadfdab2561947b626bd345d9c
4
- data.tar.gz: be910d616703d17691bdc6f184247b5efe78bc959006c24f43ee4bfbeb5df263
3
+ metadata.gz: 764772bfbc5d54165460fe4bcb75c3c1c708136ac0a5c20face111aeb866298c
4
+ data.tar.gz: a5f692a20fa2fc0d800249276325e8fe99e4607b34047f3c6ebaf87ab929f01d
5
5
  SHA512:
6
- metadata.gz: 1bd764a4596fb6468f5ffa9b2d51e39a5203f6135bbdbde6cacec33091aa0e86cedaa1393392f417378a720f6e26987438c8a46fc80028204ecf0250ed3a7c49
7
- data.tar.gz: 829aad11a875317df036555736281f0ca6d961045bd3a5b2dd6090592ce0aabce772583b34d7fd403c69a4f331bb11f46e6a9622ccc62f510fb0574dea8bd85a
6
+ metadata.gz: a4da13dc9f29813caa213aa6693d2c960a6506fabe32faf4d29b67a872b00ef0daa4d1c3efd8c77061b795c2dee253dbf9e3305a81b3b5c4ca454155450f0342
7
+ data.tar.gz: ce26ae4bf9b159ee039d997cca604fb01a4b87f96ee0874f9a54bdb7167bcb898b38a11e52651b8951147d5eea55d91d210c3bff394d55b6cb31987cf6f23158
data/CHANGELOG.md CHANGED
@@ -6,6 +6,27 @@ project adheres to [Semantic Versioning](https://semver.org/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.8.0] - 2026-10-28
10
+
11
+ ### Fixed
12
+
13
+ - **An idempotent replay inside a host transaction no longer poisons it on
14
+ Postgres.** `create!` now inserts inside a savepoint
15
+ (`transaction(requires_new: true)`), so a duplicate idempotency key rolls back
16
+ only that INSERT. Before, the failed INSERT aborted the host's whole
17
+ transaction and the rescue's `find_by` raised `PG::InFailedSqlTransaction`,
18
+ as did every later statement in it. Covered by a deterministic duplicate and
19
+ a two-connection race on the new Postgres CI leg.
20
+
21
+ ### Changed
22
+
23
+ - **The suite also runs on PostgreSQL in CI** (`test (postgres)`). Set
24
+ `DATABASE_URL` to a database whose name contains `test` to run it locally;
25
+ the dummy schema is loaded with `force: true`.
26
+
27
+ - **Requires Rails 8.1** (`railties`, `activerecord`, `activesupport` `>= 8.1`,
28
+ was `>= 8.0`). Every consumer app runs 8.1; 8.0 was never exercised in CI.
29
+
9
30
  ## [0.7.0] - 2026-09-24
10
31
 
11
32
  The Phase 4 release. The removals the cleanup plan scheduled for it (the
@@ -80,7 +80,13 @@ module StandardLedger
80
80
 
81
81
  validate_standard_ledger_idempotency_index!
82
82
 
83
- super
83
+ # A savepoint, so a duplicate rolls back only this INSERT. Hosts post
84
+ # inside their own transaction, and on Postgres a failed statement
85
+ # aborts the whole transaction: without it the find_by below, and
86
+ # every later statement in the host's transaction, raises
87
+ # PG::InFailedSqlTransaction. With no outer transaction this is the
88
+ # same single transaction create! would open anyway.
89
+ transaction(requires_new: true) { super(attributes, &block) }
84
90
  rescue ActiveRecord::RecordNotUnique => e
85
91
  raise unless standard_ledger_idempotency_violation?(e)
86
92
 
@@ -1,3 +1,3 @@
1
1
  module StandardLedger
2
- VERSION = "0.7.0"
2
+ VERSION = "0.8.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standard_ledger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaryl Sim
@@ -15,42 +15,42 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '8.0'
18
+ version: '8.1'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: '8.0'
25
+ version: '8.1'
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: activerecord
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: '8.0'
32
+ version: '8.1'
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '8.0'
39
+ version: '8.1'
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: activesupport
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: '8.0'
46
+ version: '8.1'
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: '8.0'
53
+ version: '8.1'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: brakeman
56
56
  requirement: !ruby/object:Gem::Requirement
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  requirements: []
146
- rubygems_version: 4.0.3
146
+ rubygems_version: 4.0.10
147
147
  specification_version: 4
148
148
  summary: Immutable, append-only journal entries and materialized-view refresh for
149
149
  Rails apps.