tobox 0.4.3 → 0.4.4

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: 2d3cc3ceebc694bccdf8ac4eb2ac340711d021ddc829b2068258cdf6554dfe1d
4
- data.tar.gz: f6ae93dcecb775bbfe13a76f979db5bc683a4d73fa9bde8a12795b69c70f157a
3
+ metadata.gz: 6df543cb30f2b30d82096fe3a8660207df0db55fe09f5d357c2b12258973c02d
4
+ data.tar.gz: 6bc6da61d457aa1a152da546b58d5229ac842d4efc039ae612bae71eb76d34c4
5
5
  SHA512:
6
- metadata.gz: 30221317cc684efda2b45d8b00e42f23906e4aa4f0eac31dd114005df200a69d6a23bea4761852c73d68c1dd2e275ab894cb8360852d2e6165c4c95318b5a733
7
- data.tar.gz: 3f4b11296b7d023fe0befc1da20e4bc2d5b4b001fd97373eb9824c43afc94ffa9c5dcc60185f8fc567ef0ebc7e2633a3fad9e5b26c12d2db7479d84be605310f
6
+ metadata.gz: afe16575fd95b63ed164188005073ccc3eb72e0e8dc2933a50da8553d952860235382d8d5b85d3ed2da522fb6a80510af1aaf69d05df79295bd65de7b8430c51
7
+ data.tar.gz: d4a408a481f1f3e556b79e7344f71fe359db9d7b604d03858148f148d1ad9a9b86381ed49cded366b0807b2614e11d7c7e02c430045440876d3e3c2d1f22a1ba
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.4.4] - 2023-07-26
4
+
5
+ ### Improvements
6
+
7
+ A new option, `database_options`, is now supported. The resulting hash is passed to ´Sequel.connect` on database initialization.
8
+
3
9
  ## [0.4.3] - 2023-06-01
4
10
 
5
11
  ### Bugfixes
data/README.md CHANGED
@@ -182,6 +182,15 @@ Accepts a URI pointing to a database, [where scheme identifies the database adap
182
182
  database_uri `"postgres://user:password@localhost/blog"`.
183
183
  ```
184
184
 
185
+ ### `database_options`
186
+
187
+ Accepts an hash of options, [which are directly passed to Sequel.connect](https://sequel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html):
188
+
189
+ ```ruby
190
+ database_options after_connect: -> (conn) { puts conn }
191
+ ```
192
+
193
+
185
194
  ### `table`
186
195
 
187
196
  the name of the database table where outbox events are stored (`:outbox` by default).
@@ -16,6 +16,7 @@ module Tobox
16
16
  logger: nil,
17
17
  log_level: nil,
18
18
  database_uri: nil,
19
+ database_options: nil,
19
20
  table: :outbox,
20
21
  group_column: nil,
21
22
  inbox_table: nil,
@@ -61,7 +62,7 @@ module Tobox
61
62
  @default_logger.level = @config[:log_level] || (env == "production" ? Logger::INFO : Logger::DEBUG)
62
63
 
63
64
  @database = if @config[:database_uri]
64
- database_opts = {}
65
+ database_opts = @config[:database_options] || {}
65
66
  database_opts[:max_connections] = @config[:concurrency] if @config[:worker] == :thread
66
67
  db = Sequel.connect(@config[:database_uri].to_s, database_opts)
67
68
  Array(@lifecycle_events[:database_connect]).each { |cb| cb.call(db) }
data/lib/tobox/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tobox
4
- VERSION = "0.4.3"
4
+ VERSION = "0.4.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tobox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - HoneyryderChuck
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-01 00:00:00.000000000 Z
11
+ date: 2023-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  - !ruby/object:Gem::Version
79
79
  version: '0'
80
80
  requirements: []
81
- rubygems_version: 3.4.6
81
+ rubygems_version: 3.4.10
82
82
  signing_key:
83
83
  specification_version: 4
84
84
  summary: Transactional outbox pattern implementation in ruby