mirror of
https://github.com/ditkrg/outboxable.git
synced 2026-01-22 22:06:47 +00:00
commit
8a64179e38
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -14,7 +14,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
ruby:
|
ruby:
|
||||||
- '3.1.2'
|
- "4.0.1"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
require: rubocop-rails
|
plugins:
|
||||||
|
- rubocop-rails
|
||||||
|
|
||||||
AllCops:
|
AllCops:
|
||||||
NewCops: enable
|
NewCops: enable
|
||||||
|
|||||||
12
Gemfile
12
Gemfile
@ -5,12 +5,12 @@ source 'https://rubygems.org'
|
|||||||
# Specify your gem's dependencies in outboxable.gemspec
|
# Specify your gem's dependencies in outboxable.gemspec
|
||||||
gemspec
|
gemspec
|
||||||
|
|
||||||
gem 'rake', '~> 13.1'
|
gem 'rake', '~> 13.3.1'
|
||||||
gem 'rspec', '~> 3.12'
|
gem 'rspec', '~> 3.13.2'
|
||||||
gem 'rubocop-rails', '~> 2.22'
|
gem 'rubocop-rails', '~> 2.34.3'
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
gem 'activesupport', '~> 7.1'
|
gem 'activesupport', '~> 8.1.2'
|
||||||
gem 'sidekiq', '~> 7.2'
|
gem 'sidekiq', '~> 8.1.0'
|
||||||
gem 'sidekiq-cron', '~> 1.11'
|
gem 'sidekiq-cron', '~> 2.3.1'
|
||||||
end
|
end
|
||||||
|
|||||||
154
Gemfile.lock
154
Gemfile.lock
@ -3,121 +3,137 @@ PATH
|
|||||||
specs:
|
specs:
|
||||||
outboxable (1.0.6)
|
outboxable (1.0.6)
|
||||||
bunny (>= 2.22)
|
bunny (>= 2.22)
|
||||||
connection_pool (~> 2.4)
|
connection_pool (>= 2.4)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
activesupport (7.1.2)
|
activesupport (8.1.2)
|
||||||
base64
|
base64
|
||||||
bigdecimal
|
bigdecimal
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
||||||
connection_pool (>= 2.2.5)
|
connection_pool (>= 2.2.5)
|
||||||
drb
|
drb
|
||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
|
json
|
||||||
|
logger (>= 1.4.2)
|
||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
mutex_m
|
securerandom (>= 0.3)
|
||||||
tzinfo (~> 2.0)
|
tzinfo (~> 2.0, >= 2.0.5)
|
||||||
|
uri (>= 0.13.1)
|
||||||
amq-protocol (2.3.2)
|
amq-protocol (2.3.2)
|
||||||
ast (2.4.2)
|
ast (2.4.3)
|
||||||
base64 (0.2.0)
|
base64 (0.3.0)
|
||||||
bigdecimal (3.1.4)
|
bigdecimal (4.0.1)
|
||||||
bunny (2.22.0)
|
bunny (2.22.0)
|
||||||
amq-protocol (~> 2.3, >= 2.3.1)
|
amq-protocol (~> 2.3, >= 2.3.1)
|
||||||
sorted_set (~> 1, >= 1.0.2)
|
sorted_set (~> 1, >= 1.0.2)
|
||||||
concurrent-ruby (1.2.2)
|
concurrent-ruby (1.3.6)
|
||||||
connection_pool (2.4.1)
|
connection_pool (3.0.2)
|
||||||
diff-lcs (1.5.0)
|
cronex (0.15.0)
|
||||||
drb (2.2.0)
|
|
||||||
ruby2_keywords
|
|
||||||
et-orbi (1.2.7)
|
|
||||||
tzinfo
|
tzinfo
|
||||||
fugit (1.9.0)
|
unicode (>= 0.4.4.5)
|
||||||
et-orbi (~> 1, >= 1.2.7)
|
diff-lcs (1.6.2)
|
||||||
|
drb (2.2.3)
|
||||||
|
et-orbi (1.4.0)
|
||||||
|
tzinfo
|
||||||
|
fugit (1.12.1)
|
||||||
|
et-orbi (~> 1.4)
|
||||||
raabro (~> 1.4)
|
raabro (~> 1.4)
|
||||||
globalid (1.2.1)
|
globalid (1.3.0)
|
||||||
activesupport (>= 6.1)
|
activesupport (>= 6.1)
|
||||||
i18n (1.14.1)
|
i18n (1.14.8)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
json (2.7.1)
|
json (2.18.0)
|
||||||
language_server-protocol (3.17.0.3)
|
language_server-protocol (3.17.0.5)
|
||||||
minitest (5.20.0)
|
lint_roller (1.1.0)
|
||||||
mutex_m (0.2.0)
|
logger (1.7.0)
|
||||||
parallel (1.23.0)
|
minitest (6.0.1)
|
||||||
parser (3.2.2.4)
|
prism (~> 1.5)
|
||||||
|
parallel (1.27.0)
|
||||||
|
parser (3.3.10.1)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
racc
|
racc
|
||||||
|
prism (1.8.0)
|
||||||
raabro (1.4.0)
|
raabro (1.4.0)
|
||||||
racc (1.7.3)
|
racc (1.8.1)
|
||||||
rack (3.0.8)
|
rack (3.2.4)
|
||||||
rainbow (3.1.1)
|
rainbow (3.1.1)
|
||||||
rake (13.1.0)
|
rake (13.3.1)
|
||||||
rbtree (0.4.6)
|
rbtree (0.4.6)
|
||||||
redis-client (0.18.0)
|
redis-client (0.26.3)
|
||||||
connection_pool
|
connection_pool
|
||||||
regexp_parser (2.8.3)
|
regexp_parser (2.11.3)
|
||||||
rexml (3.2.6)
|
rspec (3.13.2)
|
||||||
rspec (3.12.0)
|
rspec-core (~> 3.13.0)
|
||||||
rspec-core (~> 3.12.0)
|
rspec-expectations (~> 3.13.0)
|
||||||
rspec-expectations (~> 3.12.0)
|
rspec-mocks (~> 3.13.0)
|
||||||
rspec-mocks (~> 3.12.0)
|
rspec-core (3.13.6)
|
||||||
rspec-core (3.12.2)
|
rspec-support (~> 3.13.0)
|
||||||
rspec-support (~> 3.12.0)
|
rspec-expectations (3.13.5)
|
||||||
rspec-expectations (3.12.3)
|
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.12.0)
|
rspec-support (~> 3.13.0)
|
||||||
rspec-mocks (3.12.6)
|
rspec-mocks (3.13.7)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.12.0)
|
rspec-support (~> 3.13.0)
|
||||||
rspec-support (3.12.1)
|
rspec-support (3.13.6)
|
||||||
rubocop (1.58.0)
|
rubocop (1.82.1)
|
||||||
json (~> 2.3)
|
json (~> 2.3)
|
||||||
language_server-protocol (>= 3.17.0)
|
language_server-protocol (~> 3.17.0.2)
|
||||||
|
lint_roller (~> 1.1.0)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 3.2.2.4)
|
parser (>= 3.3.0.2)
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
regexp_parser (>= 1.8, < 3.0)
|
regexp_parser (>= 2.9.3, < 3.0)
|
||||||
rexml (>= 3.2.5, < 4.0)
|
rubocop-ast (>= 1.48.0, < 2.0)
|
||||||
rubocop-ast (>= 1.30.0, < 2.0)
|
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 2.4.0, < 3.0)
|
unicode-display_width (>= 2.4.0, < 4.0)
|
||||||
rubocop-ast (1.30.0)
|
rubocop-ast (1.49.0)
|
||||||
parser (>= 3.2.1.0)
|
parser (>= 3.3.7.2)
|
||||||
rubocop-rails (2.22.2)
|
prism (~> 1.7)
|
||||||
|
rubocop-rails (2.34.3)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
|
lint_roller (~> 1.1)
|
||||||
rack (>= 1.1)
|
rack (>= 1.1)
|
||||||
rubocop (>= 1.33.0, < 2.0)
|
rubocop (>= 1.75.0, < 2.0)
|
||||||
rubocop-ast (>= 1.30.0, < 2.0)
|
rubocop-ast (>= 1.44.0, < 2.0)
|
||||||
ruby-progressbar (1.13.0)
|
ruby-progressbar (1.13.0)
|
||||||
ruby2_keywords (0.0.5)
|
securerandom (0.4.1)
|
||||||
set (1.0.3)
|
set (1.0.3)
|
||||||
sidekiq (7.2.0)
|
sidekiq (8.1.0)
|
||||||
concurrent-ruby (< 2)
|
connection_pool (>= 3.0.0)
|
||||||
connection_pool (>= 2.3.0)
|
json (>= 2.16.0)
|
||||||
rack (>= 2.2.4)
|
logger (>= 1.7.0)
|
||||||
redis-client (>= 0.14.0)
|
rack (>= 3.2.0)
|
||||||
sidekiq-cron (1.11.0)
|
redis-client (>= 0.26.0)
|
||||||
fugit (~> 1.8)
|
sidekiq-cron (2.3.1)
|
||||||
|
cronex (>= 0.13.0)
|
||||||
|
fugit (~> 1.8, >= 1.11.1)
|
||||||
globalid (>= 1.0.1)
|
globalid (>= 1.0.1)
|
||||||
sidekiq (>= 6)
|
sidekiq (>= 6.5.0)
|
||||||
sorted_set (1.0.3)
|
sorted_set (1.0.3)
|
||||||
rbtree
|
rbtree
|
||||||
set (~> 1.0)
|
set (~> 1.0)
|
||||||
tzinfo (2.0.6)
|
tzinfo (2.0.6)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
unicode-display_width (2.5.0)
|
unicode (0.4.4.5)
|
||||||
|
unicode-display_width (3.2.0)
|
||||||
|
unicode-emoji (~> 4.1)
|
||||||
|
unicode-emoji (4.2.0)
|
||||||
|
uri (1.1.1)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
|
arm64-darwin-25
|
||||||
x86_64-linux
|
x86_64-linux
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
activesupport (~> 7.1)
|
activesupport (~> 8.1.2)
|
||||||
outboxable!
|
outboxable!
|
||||||
rake (~> 13.1)
|
rake (~> 13.3.1)
|
||||||
rspec (~> 3.12)
|
rspec (~> 3.13.2)
|
||||||
rubocop-rails (~> 2.22)
|
rubocop-rails (~> 2.34.3)
|
||||||
sidekiq (~> 7.2)
|
sidekiq (~> 8.1.0)
|
||||||
sidekiq-cron (~> 1.11)
|
sidekiq-cron (~> 2.3.1)
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.4.17
|
2.4.17
|
||||||
|
|||||||
@ -6,7 +6,7 @@ module Outboxable
|
|||||||
class_option :orm, type: :string, default: 'activerecord'
|
class_option :orm, type: :string, default: 'activerecord'
|
||||||
|
|
||||||
def initialize(*args)
|
def initialize(*args)
|
||||||
super(*args)
|
super(*args) # rubocop:disable Style/SuperArguments
|
||||||
|
|
||||||
@orm = options[:orm] || 'activerecord'
|
@orm = options[:orm] || 'activerecord'
|
||||||
%w[activerecord mongoid].include?(@orm) || raise(ArgumentError, 'Invalid ORM. Only ActiveRecord and Mongoid are supported.')
|
%w[activerecord mongoid].include?(@orm) || raise(ArgumentError, 'Invalid ORM. Only ActiveRecord and Mongoid are supported.')
|
||||||
|
|||||||
@ -3,6 +3,7 @@ require 'singleton'
|
|||||||
module Outboxable
|
module Outboxable
|
||||||
class Connection
|
class Connection
|
||||||
include ::Singleton
|
include ::Singleton
|
||||||
|
|
||||||
attr_reader :connection
|
attr_reader :connection
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
|
|||||||
@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
|
|||||||
spec.require_paths = ['lib']
|
spec.require_paths = ['lib']
|
||||||
|
|
||||||
spec.add_dependency 'bunny', '>= 2.22'
|
spec.add_dependency 'bunny', '>= 2.22'
|
||||||
spec.add_dependency 'connection_pool', '~> 2.4'
|
spec.add_dependency 'connection_pool', '>= 2.4'
|
||||||
|
|
||||||
spec.metadata['rubygems_mfa_required'] = 'true'
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user