tobox 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +9 -0
- data/lib/tobox/configuration.rb +2 -1
- data/lib/tobox/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6df543cb30f2b30d82096fe3a8660207df0db55fe09f5d357c2b12258973c02d
|
4
|
+
data.tar.gz: 6bc6da61d457aa1a152da546b58d5229ac842d4efc039ae612bae71eb76d34c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afe16575fd95b63ed164188005073ccc3eb72e0e8dc2933a50da8553d952860235382d8d5b85d3ed2da522fb6a80510af1aaf69d05df79295bd65de7b8430c51
|
7
|
+
data.tar.gz: d4a408a481f1f3e556b79e7344f71fe359db9d7b604d03858148f148d1ad9a9b86381ed49cded366b0807b2614e11d7c7e02c430045440876d3e3c2d1f22a1ba
|
data/CHANGELOG.md
CHANGED
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).
|
data/lib/tobox/configuration.rb
CHANGED
@@ -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
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.
|
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-
|
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.
|
81
|
+
rubygems_version: 3.4.10
|
82
82
|
signing_key:
|
83
83
|
specification_version: 4
|
84
84
|
summary: Transactional outbox pattern implementation in ruby
|