Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added custom version for handlers #87

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3"]
ruby: ["3.1", "3.2", "3.3"]

name: ${{ matrix.ruby }}

Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ inherit_gem:
rubocop-config-umbrellio: lib/rubocop.yml

AllCops:
TargetRubyVersion: 3.0
TargetRubyVersion: 3.1
Include:
- bin/*
- lib/**/*.rb
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# Changelog
All notable changes to this project will be documented in this file.

## [6.6.0] - 2024-12-06
### Added
- Add custom version attributes
- Set table_name and schema_name as required for TableSync::Publishing::Raw

### Changed
- `rabbit_messaging` gem version is locked on `~> 1.1.0` in order to provide a way to keep "up-to-date"
the actual rabbit_messaging gem version on our projects with table_sync update;

### Removed
- Remove ruby 3.0 from ci workflow

## [6.5.0] - 2024-03-19
### Added
- Add ruby 3.3 to ci workflow
Expand Down
185 changes: 96 additions & 89 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,105 +1,109 @@
PATH
remote: .
specs:
table_sync (6.5.1)
table_sync (6.6.0)
memery
rabbit_messaging (>= 0.13)
rabbit_messaging (>= 1.1.0)
rails
self_data

GEM
remote: https://rubygems.org/
specs:
actioncable (7.1.4.1)
actionpack (= 7.1.4.1)
activesupport (= 7.1.4.1)
actioncable (7.1.5.1)
actionpack (= 7.1.5.1)
activesupport (= 7.1.5.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.4.1)
actionpack (= 7.1.4.1)
activejob (= 7.1.4.1)
activerecord (= 7.1.4.1)
activestorage (= 7.1.4.1)
activesupport (= 7.1.4.1)
actionmailbox (7.1.5.1)
actionpack (= 7.1.5.1)
activejob (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.4.1)
actionpack (= 7.1.4.1)
actionview (= 7.1.4.1)
activejob (= 7.1.4.1)
activesupport (= 7.1.4.1)
actionmailer (7.1.5.1)
actionpack (= 7.1.5.1)
actionview (= 7.1.5.1)
activejob (= 7.1.5.1)
activesupport (= 7.1.5.1)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.1.4.1)
actionview (= 7.1.4.1)
activesupport (= 7.1.4.1)
actionpack (7.1.5.1)
actionview (= 7.1.5.1)
activesupport (= 7.1.5.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.4.1)
actionpack (= 7.1.4.1)
activerecord (= 7.1.4.1)
activestorage (= 7.1.4.1)
activesupport (= 7.1.4.1)
actiontext (7.1.5.1)
actionpack (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.4.1)
activesupport (= 7.1.4.1)
actionview (7.1.5.1)
activesupport (= 7.1.5.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.4.1)
activesupport (= 7.1.4.1)
activejob (7.1.5.1)
activesupport (= 7.1.5.1)
globalid (>= 0.3.6)
activemodel (7.1.4.1)
activesupport (= 7.1.4.1)
activerecord (7.1.4.1)
activemodel (= 7.1.4.1)
activesupport (= 7.1.4.1)
activemodel (7.1.5.1)
activesupport (= 7.1.5.1)
activerecord (7.1.5.1)
activemodel (= 7.1.5.1)
activesupport (= 7.1.5.1)
timeout (>= 0.4.0)
activestorage (7.1.4.1)
actionpack (= 7.1.4.1)
activejob (= 7.1.4.1)
activerecord (= 7.1.4.1)
activesupport (= 7.1.4.1)
activestorage (7.1.5.1)
actionpack (= 7.1.5.1)
activejob (= 7.1.5.1)
activerecord (= 7.1.5.1)
activesupport (= 7.1.5.1)
marcel (~> 1.0)
activesupport (7.1.4.1)
activesupport (7.1.5.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
securerandom (>= 0.3)
tzinfo (~> 2.0)
amq-protocol (2.3.2)
ast (2.4.2)
base64 (0.2.0)
benchmark (0.4.0)
bigdecimal (3.1.8)
builder (3.3.0)
bundler-audit (0.9.1)
bundler (>= 1.2.0, < 3)
thor (~> 1.0)
bunny (2.22.0)
bunny (2.23.0)
amq-protocol (~> 2.3, >= 2.3.1)
sorted_set (~> 1, >= 1.0.2)
coderay (1.1.3)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
crass (1.0.6)
date (3.3.4)
date (3.4.1)
diff-lcs (1.5.0)
docile (1.4.0)
drb (2.2.1)
Expand All @@ -108,14 +112,21 @@ GEM
activesupport (>= 6.1)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
io-console (0.7.2)
irb (1.14.1)
io-console (0.8.0)
irb (1.14.2)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.6.3)
lamian (1.7.0)
kicks (3.1.1)
bunny (~> 2.19)
concurrent-ruby (~> 1.0)
rake (>= 12.3, < 14.0)
serverengine (~> 2.1)
thor
lamian (1.10.0)
rails (>= 4.2)
loofah (2.22.0)
logger (1.6.3)
loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
Expand All @@ -128,10 +139,10 @@ GEM
ruby2_keywords (~> 0.0.2)
method_source (1.1.0)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.25.1)
mutex_m (0.2.0)
net-imap (0.4.17)
mini_portile2 (2.8.8)
minitest (5.25.4)
mutex_m (0.3.0)
net-imap (0.5.2)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -140,8 +151,8 @@ GEM
timeout
net-smtp (0.5.0)
net-protocol
nio4r (2.7.3)
nokogiri (1.16.7)
nio4r (2.7.4)
nokogiri (1.17.2)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
parallel (1.23.0)
Expand All @@ -152,47 +163,47 @@ GEM
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
psych (5.1.2)
psych (5.2.1)
date
stringio
rabbit_messaging (0.13.0)
rabbit_messaging (1.1.0)
bunny (~> 2.0)
kicks (~> 3)
lamian
rails (>= 5.2)
sneakers (~> 2.0)
rails (>= 6.1)
tainbox
racc (1.8.1)
rack (3.1.8)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3)
rackup (2.1.0)
rackup (2.2.1)
rack (>= 3)
webrick (~> 1.8)
rails (7.1.4.1)
actioncable (= 7.1.4.1)
actionmailbox (= 7.1.4.1)
actionmailer (= 7.1.4.1)
actionpack (= 7.1.4.1)
actiontext (= 7.1.4.1)
actionview (= 7.1.4.1)
activejob (= 7.1.4.1)
activemodel (= 7.1.4.1)
activerecord (= 7.1.4.1)
activestorage (= 7.1.4.1)
activesupport (= 7.1.4.1)
rails (7.1.5.1)
actioncable (= 7.1.5.1)
actionmailbox (= 7.1.5.1)
actionmailer (= 7.1.5.1)
actionpack (= 7.1.5.1)
actiontext (= 7.1.5.1)
actionview (= 7.1.5.1)
activejob (= 7.1.5.1)
activemodel (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
bundler (>= 1.15.0)
railties (= 7.1.4.1)
railties (= 7.1.5.1)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
rails-html-sanitizer (1.6.2)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.1.4.1)
actionpack (= 7.1.4.1)
activesupport (= 7.1.4.1)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
railties (7.1.5.1)
actionpack (= 7.1.5.1)
activesupport (= 7.1.5.1)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
Expand All @@ -201,12 +212,12 @@ GEM
rainbow (3.1.1)
rake (13.2.1)
rbtree (0.4.6)
rdoc (6.7.0)
rdoc (6.9.1)
psych (>= 4.0.0)
regexp_parser (2.8.1)
reline (0.5.10)
reline (0.6.0)
io-console (~> 0.5)
rexml (3.3.8)
rexml (3.3.9)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
Expand Down Expand Up @@ -257,11 +268,14 @@ GEM
rubocop (~> 1.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
securerandom (0.4.1)
self_data (1.3.0)
sequel (5.71.0)
serverengine (2.0.7)
serverengine (2.4.0)
base64 (~> 0.1)
logger (~> 1.4)
sigdump (~> 0.2.2)
set (1.0.3)
set (1.1.1)
sigdump (0.2.5)
simplecov (0.22.0)
docile (~> 1.1)
Expand All @@ -270,25 +284,18 @@ GEM
simplecov-html (0.12.3)
simplecov-lcov (0.8.0)
simplecov_json_formatter (0.1.4)
sneakers (2.11.0)
bunny (~> 2.12)
concurrent-ruby (~> 1.0)
rake
serverengine (~> 2.0.5)
thor
sorted_set (1.0.3)
rbtree
set (~> 1.0)
stringio (3.1.1)
stringio (3.1.2)
tainbox (2.1.2)
activesupport
thor (1.3.2)
timecop (0.9.7)
timeout (0.4.1)
timeout (0.4.3)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)
webrick (1.8.2)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand Down
2 changes: 1 addition & 1 deletion lib/table_sync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class << self

def sync(object_class, **options)
setup.new(
object_class: object_class,
object_class:,
on: options[:on],
if_condition: options[:if],
unless_condition: options[:unless],
Expand Down
6 changes: 3 additions & 3 deletions lib/table_sync/instrument_adapter/active_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ module ActiveSupport

def notify(table:, schema:, event:, direction:, count: 1)
::ActiveSupport::Notifications.instrument "tablesync.#{direction}.#{event}",
count: count,
count:,
table: table.to_s,
schema: schema.to_s,
event: event,
direction: direction
event:,
direction:
end
end
end
Loading
Loading