Skip to content

Commit

Permalink
Merge pull request #3 from muhammadnawzad/main
Browse files Browse the repository at this point in the history
Updates the variable rabbitmq_event_bus_exchange's name to rabbitmq_e…
  • Loading branch information
broosk1993 authored Dec 14, 2023
2 parents e486de9 + a8765e1 commit faa35a5
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 57 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
# rspec failure tracking
.rspec_status

*.gem
*.gem
.idea
12 changes: 6 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
94 changes: 55 additions & 39 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
```

Expand Down
4 changes: 2 additions & 2 deletions lib/generators/outboxable/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ class InstallGenerator < Rails::Generators::Base
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.')
Expand Down
2 changes: 1 addition & 1 deletion lib/outboxable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Error < StandardError; end
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
Expand Down
2 changes: 1 addition & 1 deletion lib/outboxable/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Configuration
:rabbitmq_user,
:rabbitmq_password,
:rabbitmq_vhost,
:rabbitmq_event_bus_exchange,
:rabbitmq_exchange_name,
:message_broker,
:orm

Expand Down
2 changes: 1 addition & 1 deletion lib/outboxable/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Outboxable
VERSION = '1.0.5'
VERSION = '1.0.6'
end
2 changes: 1 addition & 1 deletion lib/templates/activerecord_initializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ def to_envelope(resource:)
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
2 changes: 1 addition & 1 deletion lib/templates/mongoid_initializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ def to_envelope(resource:)
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
4 changes: 2 additions & 2 deletions outboxable.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit faa35a5

Please sign in to comment.