Update gem dependencies, refactor minor code patterns, and adjust Rubocop configuration.

This commit is contained in:
Muhammad Nawzad
2026-01-18 09:50:02 +03:00
parent b526ef58ad
commit c6e22d8cd1
8 changed files with 81 additions and 70 deletions

View File

@@ -1,4 +1,5 @@
# rabbit_carrots.rb
require 'English'
require 'puma/plugin'
require 'rabbit_carrots'
@@ -7,7 +8,7 @@ Puma::Plugin.create do
def start(launcher)
@log_writer = launcher.log_writer
@puma_pid = $$
@puma_pid = $PROCESS_ID
@core_service = RabbitCarrots::Core.new(logger: log_writer)
@@ -57,7 +58,7 @@ Puma::Plugin.create do
loop do
if send(process_dead)
log message
Process.kill('TERM', $$)
Process.kill('TERM', $PROCESS_ID)
break
end
sleep 2

View File

@@ -24,8 +24,6 @@ module RabbitCarrots
@orm ||= :activerecord
end
def orm=(value)
@orm = value
end
attr_writer :orm
end
end

View File

@@ -3,6 +3,7 @@ require 'singleton'
module RabbitCarrots
class Connection
include ::Singleton
attr_reader :connection
def initialize

View File

@@ -1,5 +1,5 @@
module RabbitCarrots
class Core
class Core # rubocop:disable Metrics/ClassLength
attr_reader :logger
@database_agnostic_not_null_violation = nil