Merge pull request #3 from muhammadnawzad/main

Updates the variable rabbitmq_event_bus_exchange's name to rabbitmq_e…
This commit is contained in:
Brusk Awat 2023-12-14 10:59:53 +03:00 committed by GitHub
commit faa35a5791
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 74 additions and 57 deletions

3
.gitignore vendored
View File

@ -10,4 +10,5 @@
# rspec failure tracking
.rspec_status
*.gem
*.gem
.idea

12
Gemfile
View File

@ -5,12 +5,12 @@ source 'https://rubygems.org'
# Specify your gem's dependencies in outboxable.gemspec
gemspec
gem 'rake', '~> 13.0'
gem 'rspec', '~> 3.0'
gem 'rubocop-rails', '~> 2.18'
gem 'rake', '~> 13.1'
gem 'rspec', '~> 3.12'
gem 'rubocop-rails', '~> 2.22'
group :development, :test do
gem 'activesupport', '~> 7.0'
gem 'sidekiq', '~> 7.0'
gem 'sidekiq-cron', '~> 1.10'
gem 'activesupport', '~> 7.1'
gem 'sidekiq', '~> 7.2'
gem 'sidekiq-cron', '~> 1.11'
end

View File

@ -1,86 +1,102 @@
PATH
remote: .
specs:
outboxable (1.0.5)
bunny (>= 2.19.0)
connection_pool (~> 2.3.0)
outboxable (1.0.6)
bunny (>= 2.22)
connection_pool (~> 2.4)
GEM
remote: https://rubygems.org/
specs:
activesupport (7.0.4.3)
activesupport (7.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
amq-protocol (2.3.2)
ast (2.4.2)
bunny (2.20.3)
base64 (0.2.0)
bigdecimal (3.1.4)
bunny (2.22.0)
amq-protocol (~> 2.3, >= 2.3.1)
sorted_set (~> 1, >= 1.0.2)
concurrent-ruby (1.2.2)
connection_pool (2.3.0)
connection_pool (2.4.1)
diff-lcs (1.5.0)
drb (2.2.0)
ruby2_keywords
et-orbi (1.2.7)
tzinfo
fugit (1.8.1)
fugit (1.9.0)
et-orbi (~> 1, >= 1.2.7)
raabro (~> 1.4)
globalid (1.1.0)
activesupport (>= 5.0)
i18n (1.12.0)
globalid (1.2.1)
activesupport (>= 6.1)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
json (2.6.3)
minitest (5.18.0)
parallel (1.22.1)
parser (3.2.2.0)
json (2.7.1)
language_server-protocol (3.17.0.3)
minitest (5.20.0)
mutex_m (0.2.0)
parallel (1.23.0)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
raabro (1.4.0)
rack (2.2.6.4)
racc (1.7.3)
rack (3.0.8)
rainbow (3.1.1)
rake (13.0.6)
rake (13.1.0)
rbtree (0.4.6)
redis-client (0.14.1)
redis-client (0.18.0)
connection_pool
regexp_parser (2.7.0)
rexml (3.2.5)
regexp_parser (2.8.3)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.1)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.5)
rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rubocop (1.49.0)
rspec-support (3.12.1)
rubocop (1.58.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.0.0)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.0, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.28.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-rails (2.18.0)
rubocop-rails (2.22.2)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
set (1.0.3)
sidekiq (7.0.7)
sidekiq (7.2.0)
concurrent-ruby (< 2)
connection_pool (>= 2.3.0)
rack (>= 2.2.4)
redis-client (>= 0.11.0)
sidekiq-cron (1.10.0)
redis-client (>= 0.14.0)
sidekiq-cron (1.11.0)
fugit (~> 1.8)
globalid (>= 1.0.1)
sidekiq (>= 6)
@ -89,19 +105,19 @@ GEM
set (~> 1.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)
unicode-display_width (2.5.0)
PLATFORMS
x86_64-linux
DEPENDENCIES
activesupport (~> 7.0)
activesupport (~> 7.1)
outboxable!
rake (~> 13.0)
rspec (~> 3.0)
rubocop-rails (~> 2.18)
sidekiq (~> 7.0)
sidekiq-cron (~> 1.10)
rake (~> 13.1)
rspec (~> 3.12)
rubocop-rails (~> 2.22)
sidekiq (~> 7.2)
sidekiq-cron (~> 1.11)
BUNDLED WITH
2.4.7
2.4.17

View File

@ -31,7 +31,7 @@ For use with ActiveRecord, run:
$ rails g outboxable:install --orm activerecord
```
For use with Mongoid, run:
For use with Mongoid, run:
```shell
$ rails g outboxable:install --orm mongoid
@ -82,7 +82,7 @@ Outboxable.configure do |config|
config.rabbitmq_user = ENV.fetch('RABBITMQ__USERNAME')
config.rabbitmq_password = ENV.fetch('RABBITMQ__PASSWORD')
config.rabbitmq_vhost = ENV.fetch('RABBITMQ__VHOST')
config.rabbitmq_event_bus_exchange = ENV.fetch('EVENTBUS__EXCHANGE_NAME')
config.rabbitmq_exchange_name = ENV.fetch('RABBITMQ__EXCHANGE_NAME')
end
```

View File

@ -5,8 +5,8 @@ module Outboxable
source_root File.expand_path('../../templates', __dir__)
class_option :orm, type: :string, default: 'activerecord'
def initialize(*)
super(*)
def initialize
super
@orm = options[:orm] || 'activerecord'
%w[activerecord mongoid].include?(@orm) || raise(ArgumentError, 'Invalid ORM. Only ActiveRecord and Mongoid are supported.')

View File

@ -26,7 +26,7 @@ module Outboxable
def instantiate_outbox(routing_key:)
outboxes.new(
routing_key:,
exchange: Outboxable.configuration.rabbitmq_event_bus_exchange,
exchange: Outboxable.configuration.rabbitmq_exchange_name,
payload: as_json
)
end

View File

@ -17,7 +17,7 @@ module Outboxable
:rabbitmq_user,
:rabbitmq_password,
:rabbitmq_vhost,
:rabbitmq_event_bus_exchange,
:rabbitmq_exchange_name,
:message_broker,
:orm

View File

@ -1,5 +1,5 @@
# frozen_string_literal: true
module Outboxable
VERSION = '1.0.5'
VERSION = '1.0.6'
end

View File

@ -32,5 +32,5 @@ Outboxable.configure do |config|
config.rabbitmq_user = ENV.fetch('RABBITMQ__USERNAME')
config.rabbitmq_password = ENV.fetch('RABBITMQ__PASSWORD')
config.rabbitmq_vhost = ENV.fetch('RABBITMQ__VHOST')
config.rabbitmq_event_bus_exchange = ENV.fetch('EVENTBUS__EXCHANGE_NAME')
config.rabbitmq_exchange_name = ENV.fetch('RABBITMQ__EXCHANGE_NAME')
end

View File

@ -32,5 +32,5 @@ Outboxable.configure do |config|
config.rabbitmq_user = ENV.fetch('RABBITMQ__USERNAME')
config.rabbitmq_password = ENV.fetch('RABBITMQ__PASSWORD')
config.rabbitmq_vhost = ENV.fetch('RABBITMQ__VHOST')
config.rabbitmq_event_bus_exchange = ENV.fetch('EVENTBUS__EXCHANGE_NAME')
config.rabbitmq_exchange_name = ENV.fetch('RABBITMQ__EXCHANGE_NAME')
end

View File

@ -31,8 +31,8 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']
spec.add_dependency 'bunny', '>= 2.19.0'
spec.add_dependency 'connection_pool', '~> 2.3.0'
spec.add_dependency 'bunny', '>= 2.22'
spec.add_dependency 'connection_pool', '~> 2.4'
spec.metadata['rubygems_mfa_required'] = 'true'
end