outboxable 0.1.0 → 0.1.2
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/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/generators/outboxable/install_generator.rb +2 -2
- data/lib/outboxable/connection.rb +5 -5
- data/lib/outboxable/version.rb +1 -1
- data/lib/templates/initializer.rb +2 -2
- metadata +2 -3
- data/outboxable.gemspec +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1d338ac197df1adcd420ef12703e96615086f8cc7a0062b72f11deaaec68666
|
4
|
+
data.tar.gz: 8af422939a04418b12fdb66701b310d49399ba12c974cbeb7718c91b2975760a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fa5c959e651053d21bc817f58e93ed9d5b58badf44abda041308de7b5be2f17a380bf1656095ad5fde6d9e55cf5c54e241b8fb91980ca800570d2d2028ab6f3
|
7
|
+
data.tar.gz: 90f310a90f39dcebce8ae111aaeec53db9ea056d5e995763a58380e904ad6c17152696af05299db7a087fa55d37f8fe219c141395d12b520fe433f733eb4f279
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -9,7 +9,7 @@ Please take into consideration that this Gem is **opinionated**, meaning it expe
|
|
9
9
|
1. When using RabbitMQ, it only publishes events to a ***topic*** exchange.
|
10
10
|
1. It assumes that you are using routing keys to publish to the topic exchange.
|
11
11
|
1. It publishes events in a background job using [Sidekiq](https://github.com/sidekiq/sidekiq). Therefore, you application must use Sidekiq.
|
12
|
-
1. It implements the [polling publisher pattern](https://microservices.io/patterns/data/polling-publisher.html). For that, it uses [](https://github.com/sidekiq-cron/sidekiq-cron) to check the unpublished outboxes every 5 seconds after the initialization of the application.
|
12
|
+
1. It implements the [polling publisher pattern](https://microservices.io/patterns/data/polling-publisher.html). For that, it uses [sidekiq-cron](https://github.com/sidekiq-cron/sidekiq-cron) to check the unpublished outboxes every 5 seconds after the initialization of the application.
|
13
13
|
|
14
14
|
## Installation
|
15
15
|
|
@@ -56,7 +56,7 @@ module Outboxable
|
|
56
56
|
specversion: '1.0',
|
57
57
|
type: resource.routing_key,
|
58
58
|
datacontenttype: 'application/json',
|
59
|
-
data:
|
59
|
+
data: resource.payload
|
60
60
|
}.to_json
|
61
61
|
end
|
62
62
|
end
|
@@ -6,7 +6,7 @@ module Outboxable
|
|
6
6
|
|
7
7
|
# Copy initializer into user app
|
8
8
|
def copy_initializer
|
9
|
-
copy_file('initializer.rb', 'config/initializers/
|
9
|
+
copy_file('initializer.rb', 'config/initializers/z_outboxable.rb')
|
10
10
|
end
|
11
11
|
|
12
12
|
# Copy user information (model & Migrations) into user app
|
@@ -33,4 +33,4 @@ module Outboxable
|
|
33
33
|
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
34
34
|
end
|
35
35
|
end
|
36
|
-
end
|
36
|
+
end
|
@@ -7,11 +7,11 @@ module Outboxable
|
|
7
7
|
|
8
8
|
def initialize
|
9
9
|
@connection = Bunny.new(
|
10
|
-
host:
|
11
|
-
port:
|
12
|
-
user:
|
13
|
-
password:
|
14
|
-
vhost:
|
10
|
+
host: Outboxable.configuration.rabbitmq_host,
|
11
|
+
port: Outboxable.configuration.rabbitmq_port,
|
12
|
+
user: Outboxable.configuration.rabbitmq_user,
|
13
|
+
password: Outboxable.configuration.rabbitmq_password,
|
14
|
+
vhost: Outboxable.configuration.rabbitmq_vhost
|
15
15
|
)
|
16
16
|
|
17
17
|
@connection.start
|
data/lib/outboxable/version.rb
CHANGED
@@ -12,7 +12,7 @@ module Outboxable
|
|
12
12
|
specversion: '1.0',
|
13
13
|
type: resource.routing_key,
|
14
14
|
datacontenttype: 'application/json',
|
15
|
-
data:
|
15
|
+
data: resource.payload
|
16
16
|
}.to_json
|
17
17
|
end
|
18
18
|
end
|
@@ -33,4 +33,4 @@ Outboxable.configure do |config|
|
|
33
33
|
config.rabbitmq_password = ENV.fetch('RABBITMQ__PASSWORD')
|
34
34
|
config.rabbitmq_vhost = ENV.fetch('RABBITMQ__VHOST')
|
35
35
|
config.rabbitmq_event_bus_exchange = ENV.fetch('EVENTBUS__EXCHANGE_NAME')
|
36
|
-
end
|
36
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: outboxable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brusk Awat
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|
@@ -67,7 +67,6 @@ files:
|
|
67
67
|
- lib/templates/create_outboxable_outboxes.rb
|
68
68
|
- lib/templates/initializer.rb
|
69
69
|
- lib/templates/outbox.rb
|
70
|
-
- outboxable.gemspec
|
71
70
|
- sig/outboxable.rbs
|
72
71
|
homepage: https://githuh.com/broosk1993/outboxable
|
73
72
|
licenses:
|
data/outboxable.gemspec
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative "lib/outboxable/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
spec.name = "outboxable"
|
7
|
-
spec.version = Outboxable::VERSION
|
8
|
-
spec.authors = ["Brusk Awat"]
|
9
|
-
spec.email = ["broosk.edogawa@gmail.com"]
|
10
|
-
|
11
|
-
spec.summary = "An opiniated Gem for Rails applications to implement the transactional outbox pattern."
|
12
|
-
spec.description = "The Outboxable Gem is tailored for Rails applications to implement the transactional outbox pattern. It currently only supports ActiveRecord."
|
13
|
-
spec.homepage = "https://githuh.com/broosk1993/outboxable"
|
14
|
-
spec.license = "MIT"
|
15
|
-
spec.required_ruby_version = ">= 2.6.0"
|
16
|
-
|
17
|
-
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
18
|
-
|
19
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
20
|
-
spec.metadata["source_code_uri"] = "https://githuh.com/broosk1993/outboxable"
|
21
|
-
spec.metadata["changelog_uri"] = "https://githuh.com/broosk1993/outboxable/CHANGELOG.md"
|
22
|
-
|
23
|
-
# Specify which files should be added to the gem when it is released.
|
24
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
|
-
spec.files = Dir.chdir(__dir__) do
|
26
|
-
`git ls-files -z`.split("\x0").reject do |f|
|
27
|
-
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
|
28
|
-
end
|
29
|
-
end
|
30
|
-
spec.bindir = "exe"
|
31
|
-
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
32
|
-
spec.require_paths = ["lib"]
|
33
|
-
|
34
|
-
spec.add_dependency 'bunny', '>= 2.19.0'
|
35
|
-
spec.add_dependency 'connection_pool', '~> 2.3.0'
|
36
|
-
end
|