It's an important feature for the Sequel ecosystem as, AFAIK, there's no model change trackers at all.
Fixes #28
What changes did you make? (overview)
It supports:
Whole Logidze model API for Sequel::Model
Whole Logidze scope API for Sequel::Dataset
Generators
Database specific top-level manipulations (Logidze.with_responsible, Logidze.without_logging)
Decoupled Logidze internal code from Active Record
Preliminary support means that although Active Record is decoupled already, it's still a hard dependency for the gemspec in order to minimize any possible breaks.
However, there should be no breaking changes for the current users.
Moreover, it removes:
Model method pollution with private Logidze methods
It's hidden now in implementation adapters, only public API is included to models.
ignores_log_data global model pollution
The method was included to all ActiveRecord::Base models; it's included only with has_logidze now.
It's somewhat breaking change but it seems unlikely that someone uses a Logidze method on models without Logidze included.
log_version possible breakage with null log_data (for example, no version at some range)
It returns nil now.
Is there anything you'd like reviewers to focus on?
Fun fact: a really crude version of this code is saved one real world project with Sequel in 2020
(manually applied triggers and Logidze::History).
You know, an application-independent tracker rules! Thank you!
Hi, Vladimir!
What is the purpose of this pull request?
Add Sequel preliminary support.
It's an important feature for the Sequel ecosystem as, AFAIK, there's no model change trackers at all.
Fixes #28
What changes did you make? (overview)
It supports:
Logidze.with_responsible
,Logidze.without_logging
)Preliminary support means that although Active Record is decoupled already, it's still a hard dependency for the gemspec in order to minimize any possible breaks. However, there should be no breaking changes for the current users.
Moreover, it removes:
ignores_log_data
global model pollution The method was included to all ActiveRecord::Base models; it's included only withhas_logidze
now. It's somewhat breaking change but it seems unlikely that someone uses a Logidze method on models without Logidze included.log_version
possible breakage with nulllog_data
(for example, no version at some range) It returnsnil
now.Is there anything you'd like reviewers to focus on?
Fun fact: a really crude version of this code is saved one real world project with Sequel in 2020 (manually applied triggers and Logidze::History).
You know, an application-independent tracker rules! Thank you!
Checklist