sequel-pgt_outbox 0.2.4 → 0.2.6

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: d400feeb0e873e210869a96f7ab1727be097e5ab3d0193098a8b66d5ffc393d5
4
- data.tar.gz: '00708f11ab284c776ccf130e6e96047a6688f320882afc11589a6152dcffaa38'
3
+ metadata.gz: 70a404cb73996a6861aa16cd7b019bd8c204ddb61a32b104ee8d5fa27586c66a
4
+ data.tar.gz: c42b48956721b67f16f15e2830fc37d866426b8fc0956488e431d9b6a885fd79
5
5
  SHA512:
6
- metadata.gz: 0a15f2188eacc67bc47b6ba0c407d77917503f309e2a1ff5f5cb2ba7e3995522d69c2b7c46957ff4322ed3163eea6fd08d3ff2673b69844623e8abe08cea625a
7
- data.tar.gz: f7b58b27d95fe3d9239043bbea0ef328efe3650dd1f6c68e9a5c3265a01069f0ac0bd3adfb27afe93a0a5bb32452eb8e038bb681d0a89ed6704b2e33c74831cd
6
+ metadata.gz: 8b6c99927c37acb1d2afd44d3fe383e278be2a77ea8fdde20783a67f9c576a64ce955639a051798807add8b08f1bc800fa0ad833d37c98a40da35c8076f45706
7
+ data.tar.gz: 587d1b67805e2f43cad2f9bb12e36930be4a4c544545f3e009e570a40ef972f8f5f07ccfe994852131c3d484d3ebc0ae939e49db04d39020f03c902d48e42d13
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.2.4"
2
+ ".": "0.2.6"
3
3
  }
data/.version.txt CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 0.2.6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.6](https://github.com/rubyists/sequel-pgt_outbox/compare/v0.2.5...v0.2.6) (2025-02-16)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * 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))
9
+
10
+ ## [0.2.5](https://github.com/rubyists/sequel-pgt_outbox/compare/v0.2.4...v0.2.5) (2025-02-16)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * Correct docs so that extension is used ([#13](https://github.com/rubyists/sequel-pgt_outbox/issues/13)) ([c050c5e](https://github.com/rubyists/sequel-pgt_outbox/commit/c050c5e831e3285b4b2168150ed3ea66dea680e6))
16
+
3
17
  ## [0.2.4](https://github.com/rubyists/sequel-pgt_outbox/compare/v0.2.3...v0.2.4) (2025-02-16)
4
18
 
5
19
 
data/Readme.adoc CHANGED
@@ -1,12 +1,45 @@
1
- = Transaction Outbox for Postgres
2
- :context: https://morningcoffee.io/what-is-a-transaction-outbox-and-why-you-need-it.html[outbox pattern]
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
+
15
+ image::https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg[Conventional Commits,link=https://www.conventionalcommits.org/en/v1.0.0/]
16
+
17
+ == Wtf?
18
+
19
+ This gem provides a way to implement the transactional {outbox-pattern} using triggers
20
+ (stored procedures) in the {postgresql} RDBMS.
21
+
22
+ This only provides the "writing events to the outbox table" part of the outbox pattern.
23
+ It does not provide the "reading and handling events from the outbox table" part.
24
+ That is up to the application to implement.
25
+
26
+ There are many libraries that can be used to read and handle events from the outbox table,
27
+ among them are:
28
+
29
+ - {eventide}
30
+ - {rails-event-store}
31
+ - {tobox}
32
+
33
+ PgtOutbox utilizes the ruby {sequel} ORM to interact with the database, but once it's set up,
34
+ it doesn't require any ruby nor {sequel} code for the outbox population to operate. It
35
+ all runs on the {postgresql} cluster, guaranteeing no matter how the database writes
36
+ occur, the outbox events will always be generated.
3
37
 
4
- This gem provides a way to implement the transaction {context} using triggers (stored procedures) in Postgres.
38
+ == Features
5
39
 
6
- It utilizes the ruby Sequel ORM to interact with the database, but once it's set up,
7
- it doesn't require any ruby nor Sequel code for the outbox population to operate. It
8
- all runs on the PostgreSQL cluster, guaranteeing no matter how the database writes
9
- occur, the outbox events will always be generated.
40
+ * Create outbox table(s) to store events
41
+ * Create function(s) to write events to outbox table
42
+ * Create trigger(s) to attach to tables so their changes write events to the outbox(es)
10
43
 
11
44
  == Installation
12
45
 
@@ -27,8 +60,10 @@ gem install sequel-pgt_outbox
27
60
  ### Using the sequel cli
28
61
 
29
62
  ```bash
30
- sequel -r sequel/pgt_outbox postgres://localhost/mydb
63
+ sequel -r sequel/pgt_outbox postgres:///spgt_test
31
64
  Your database is stored in DB...
65
+ irb(main):000> DB.extension :pgt_output
66
+ => #<Sequel::Postgres::Database database=spgt_test>
32
67
  irb(main):001> DB.create_table(:foo) { primary_key :id; String :s; Integer :i }
33
68
  => nil
34
69
  irb(main):002> function = DB.pgt_setup_outbox(:foo)
@@ -83,7 +118,7 @@ spgt_test=# \d
83
118
 
84
119
  spgt_test=# \q
85
120
  bougyman@framezotz ~/rubyists/sequel-pgt_outbox
86
- % be ./exe/outboxify postgres:///spgt_test foo
121
+ % outboxify postgres:///spgt_test foo
87
122
  bougyman@framezotz ~/rubyists/sequel-pgt_outbox
88
123
  % psql spgt_test
89
124
  psql (16.4)
@@ -106,18 +141,33 @@ spgt_test=#
106
141
 
107
142
  ## Development
108
143
 
109
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
144
+ After checking out the repo, run `bundle install` or `bin/setup` to install dependencies.
145
+
146
+ Then, either set the PGT_SPEC_DB environment variable to an existing PostgreSQL db of your choice,
147
+ or run `rake createdb` to create a testing one (`spgt_test`).
148
+
149
+ Finally run `rake spec` to run the tests.
150
+
151
+ You can also run `bin/console` for an interactive prompt that will allow you to experiment.
152
+
153
+ To install this gem from source onto your local machine, run `bundle exec rake install`.
154
+
155
+ ### Conventional Commits & Commit Messages
110
156
 
111
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
157
+ This project uses the {conventional-commits} specification for commit messages, as well as for PR titles.
158
+ This allows for automated (by {release-please}) release management, changelog generation, and versioning.
159
+ Please follow the specification when writing commit messages.
112
160
 
113
161
  ## Contributing
114
162
 
115
- Bug reports and pull requests are welcome on GitHub at https://github.com/rubyists/sequel-pgt_outbox. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/rubyists/sequel-pgt_outbox/blob/main/CODE_OF_CONDUCT.md).
163
+ Bug reports and pull requests are welcome on GitHub at {github-home}.
164
+ Discussions are welcome in the discussions section of the repository.
116
165
 
117
166
  ## License
118
167
 
119
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
168
+ The gem is available as open source under the terms of the {mit}.
120
169
 
121
170
  ## Code of Conduct
122
171
 
123
- Everyone interacting in the Sequel::PgtOutbox project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/rubyists/sequel-pgt_outbox/blob/main/CODE_OF_CONDUCT.md).
172
+ Everyone interacting in the PgtOutbox project's codebases, issue trackers,
173
+ and discussions is expected to follow the {coc}.
@@ -3,7 +3,7 @@
3
3
  module Rubyists
4
4
  module PgtOutbox
5
5
  # x-release-please-start-version
6
- VERSION = '0.2.4'
6
+ VERSION = '0.2.6'
7
7
  # x-release-please-end
8
8
  end
9
9
  end
data/oci/Gemfile CHANGED
@@ -3,5 +3,5 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  # x-release-please-start-version
6
- gem 'sequel-pgt_outbox', '= 0.2.4'
6
+ gem 'sequel-pgt_outbox', '= 0.2.6'
7
7
  # x-release-please-end
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
4
+ version: 0.2.6
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 transaction outbox pattern.
84
+ summary: Triggers to implement (an important) part of a transactional outbox pattern.
85
85
  test_files: []