sequel-pgt_outbox 0.2.5 → 0.2.7
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 +4 -4
- data/.release-please-manifest.json +1 -1
- data/.version.txt +1 -1
- data/CHANGELOG.md +14 -0
- data/Readme.adoc +67 -13
- data/lib/sequel/pgt_outbox/version.rb +1 -1
- data/oci/Gemfile +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7123de7b64b4420a074b4582b45cd14265a37fde7d4d21f3c2299412ea79075d
|
4
|
+
data.tar.gz: e75d210ca899710840bbca70a54a185f56b95938c1d2dce01658c802db7b04c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fe2b0a4e292ed30fdd7ee41a96d250483f29e1e57849394666ab48bcf5442f551b1971b476c197a261206fbe3cf7a1b18523ddb15d04a7eb5f098e0ca52632e
|
7
|
+
data.tar.gz: 917ffb09105f2ece1e19ca870ba7ab5e9bd4fd2977676f5b0a80160f6eb0251182be9f962b15bf0b6638f23dd8a9fa4fd057201134e376a84cf2596695b484a6
|
data/.version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.7
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.2.7](https://github.com/rubyists/sequel-pgt_outbox/compare/v0.2.6...v0.2.7) (2025-02-16)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* Removes the github gem publish action which was broken ([#23](https://github.com/rubyists/sequel-pgt_outbox/issues/23)) ([d16e096](https://github.com/rubyists/sequel-pgt_outbox/commit/d16e096fd3659786c30114ca6116e221ad81ddfc))
|
9
|
+
|
10
|
+
## [0.2.6](https://github.com/rubyists/sequel-pgt_outbox/compare/v0.2.5...v0.2.6) (2025-02-16)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* Again with the transactional language, and force a release ([#21](https://github.com/rubyists/sequel-pgt_outbox/issues/21)) ([18b1824](https://github.com/rubyists/sequel-pgt_outbox/commit/18b1824c2592fbca2ca83928c521436c04696703))
|
16
|
+
|
3
17
|
## [0.2.5](https://github.com/rubyists/sequel-pgt_outbox/compare/v0.2.4...v0.2.5) (2025-02-16)
|
4
18
|
|
5
19
|
|
data/Readme.adoc
CHANGED
@@ -1,12 +1,46 @@
|
|
1
|
-
=
|
2
|
-
:
|
1
|
+
= Transactional Outbox for PostgreSQL
|
2
|
+
:toc:
|
3
|
+
:outbox-pattern: https://morningcoffee.io/what-is-a-transaction-outbox-and-why-you-need-it.html[outbox pattern]
|
4
|
+
:postgresql: https://www.postgresql.org/[PostgreSQL]
|
5
|
+
:sequel: https://sequel.jeremyevans.net/[Sequel]
|
6
|
+
:eventide: https://eventide-project.org/[Eventide]
|
7
|
+
:rails-event-store: https://railseventstore.org/[Rails Event Store]
|
8
|
+
:tobox: https://gitlab.com/os85/tobox[Tobox]
|
9
|
+
:release-please: https://github.com/googleapis/release-please[release-please]
|
10
|
+
:conventional-commits: https://www.conventionalcommits.org/en/v1.0.0/[Conventional Commits]
|
11
|
+
:github-home: https://github.com/rubyists/sequel-pgt_outbox
|
12
|
+
:coc: https://github.com/rubyists/sequel-pgt_outbox/blob/main/CODE_OF_CONDUCT.md[Code of Conduct]
|
13
|
+
:mit: https://opensource.org/licenses/MIT[MIT License]
|
14
|
+
:container-registry: https://github.com/rubyists/sequel-pgt_outbox/pkgs/container/sequel-pgt_outbox[Container Registry]
|
15
|
+
|
16
|
+
image::https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg[Conventional Commits,link=https://www.conventionalcommits.org/en/v1.0.0/]
|
17
|
+
|
18
|
+
== Wtf?
|
19
|
+
|
20
|
+
This gem provides a way to implement the transactional {outbox-pattern} using triggers
|
21
|
+
(stored procedures) in the {postgresql} RDBMS.
|
22
|
+
|
23
|
+
This only provides the "writing events to the outbox table" part of the outbox pattern.
|
24
|
+
It does not provide the "reading and handling events from the outbox table" part.
|
25
|
+
That is up to the application to implement.
|
26
|
+
|
27
|
+
There are many libraries that can be used to read and handle events from the outbox table,
|
28
|
+
among them are:
|
29
|
+
|
30
|
+
- {eventide}
|
31
|
+
- {rails-event-store}
|
32
|
+
- {tobox}
|
33
|
+
|
34
|
+
PgtOutbox utilizes the ruby {sequel} ORM to interact with the database, but once it's set up,
|
35
|
+
it doesn't require any ruby nor {sequel} code for the outbox population to operate. It
|
36
|
+
all runs on the {postgresql} cluster, guaranteeing no matter how the database writes
|
37
|
+
occur, the outbox events will always be generated.
|
3
38
|
|
4
|
-
|
39
|
+
== Features
|
5
40
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
occur, the outbox events will always be generated.
|
41
|
+
* Create outbox table(s) to store events
|
42
|
+
* Create function(s) to write events to outbox table
|
43
|
+
* Create trigger(s) to attach to tables so their changes write events to the outbox(es)
|
10
44
|
|
11
45
|
== Installation
|
12
46
|
|
@@ -22,6 +56,11 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
22
56
|
gem install sequel-pgt_outbox
|
23
57
|
```
|
24
58
|
|
59
|
+
=== Container
|
60
|
+
|
61
|
+
If you do not want to install the gem, you can use the provided Docker image,
|
62
|
+
available at the Rubyists Github {container-registry}.
|
63
|
+
|
25
64
|
## Usage
|
26
65
|
|
27
66
|
### Using the sequel cli
|
@@ -85,7 +124,7 @@ spgt_test=# \d
|
|
85
124
|
|
86
125
|
spgt_test=# \q
|
87
126
|
bougyman@framezotz ~/rubyists/sequel-pgt_outbox
|
88
|
-
%
|
127
|
+
% outboxify postgres:///spgt_test foo
|
89
128
|
bougyman@framezotz ~/rubyists/sequel-pgt_outbox
|
90
129
|
% psql spgt_test
|
91
130
|
psql (16.4)
|
@@ -108,18 +147,33 @@ spgt_test=#
|
|
108
147
|
|
109
148
|
## Development
|
110
149
|
|
111
|
-
After checking out the repo, run `
|
150
|
+
After checking out the repo, run `bundle install` or `bin/setup` to install dependencies.
|
151
|
+
|
152
|
+
Then, either set the PGT_SPEC_DB environment variable to an existing PostgreSQL db of your choice,
|
153
|
+
or run `rake createdb` to create a testing one (`spgt_test`).
|
154
|
+
|
155
|
+
Finally run `rake spec` to run the tests.
|
156
|
+
|
157
|
+
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
158
|
+
|
159
|
+
To install this gem from source onto your local machine, run `bundle exec rake install`.
|
160
|
+
|
161
|
+
### Conventional Commits & Commit Messages
|
112
162
|
|
113
|
-
|
163
|
+
This project uses the {conventional-commits} specification for commit messages, as well as for PR titles.
|
164
|
+
This allows for automated (by {release-please}) release management, changelog generation, and versioning.
|
165
|
+
Please follow the specification when writing commit messages.
|
114
166
|
|
115
167
|
## Contributing
|
116
168
|
|
117
|
-
Bug reports and pull requests are welcome on GitHub at
|
169
|
+
Bug reports and pull requests are welcome on GitHub at {github-home}.
|
170
|
+
Discussions are welcome in the discussions section of the repository.
|
118
171
|
|
119
172
|
## License
|
120
173
|
|
121
|
-
The gem is available as open source under the terms of the
|
174
|
+
The gem is available as open source under the terms of the {mit}.
|
122
175
|
|
123
176
|
## Code of Conduct
|
124
177
|
|
125
|
-
Everyone interacting in the
|
178
|
+
Everyone interacting in the PgtOutbox project's codebases, issue trackers,
|
179
|
+
and discussions is expected to follow the {coc}.
|
data/oci/Gemfile
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel-pgt_outbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bougyman
|
@@ -81,5 +81,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
81
|
requirements: []
|
82
82
|
rubygems_version: 3.6.2
|
83
83
|
specification_version: 4
|
84
|
-
summary: Triggers to implement a
|
84
|
+
summary: Triggers to implement (an important) part of a transactional outbox pattern.
|
85
85
|
test_files: []
|