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

Fix NameError from nulldb #34

Merged
merged 2 commits into from
Dec 15, 2023
Merged
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 lib/acts_as_scrubbable/ar_class_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def process(num_of_batches)
end

ActsAsScrubbable.logger.info Term::ANSIColor.blue("#{scrubbed_count} #{ar_class} objects scrubbed")
ActiveRecord::Base.connection.verify! unless ActiveRecord::Base.connection.is_a?(ActiveRecord::ConnectionAdapters::NullDBAdapter)
ActiveRecord::Base.connection.verify! if ActiveRecord::Base.connection.respond_to?(:reconnect)

ActsAsScrubbable.logger.info Term::ANSIColor.white("Scrub Complete!")
end
Expand Down
2 changes: 1 addition & 1 deletion lib/acts_as_scrubbable/task_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def scrub(num_of_batches: nil, skip_before_hooks: false, skip_after_hooks: false
Parallel.each(ar_classes) do |ar_class|
ActsAsScrubbable::ArClassProcessor.new(ar_class).process(num_of_batches)
end
ActiveRecord::Base.connection.verify! unless ActiveRecord::Base.connection.is_a?(ActiveRecord::ConnectionAdapters::NullDBAdapter)
ActiveRecord::Base.connection.verify! if ActiveRecord::Base.connection.respond_to?(:reconnect)

after_hooks unless skip_after_hooks
end
Expand Down
2 changes: 1 addition & 1 deletion lib/acts_as_scrubbable/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ActsAsScrubbable
VERSION = '2.1.2'
VERSION = '2.1.3'
end