Skip to content

Commit 35586d8

Browse files
authored
Merge pull request #8 from arikarim/dev
Updates rabbit_carrots to version 1.0.4 and adds 'English' module req…
2 parents a0c5f80 + ac06deb commit 35586d8

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
rabbit_carrots (1.0.3)
4+
rabbit_carrots (1.0.4)
55
bunny (>= 2.22)
66
connection_pool (~> 2.4)
77

lib/puma/plugin/rabbit_carrots.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# rabbit_carrots.rb
2-
32
require 'puma/plugin'
43
require 'rabbit_carrots'
54

@@ -8,7 +7,7 @@
87

98
def start(launcher)
109
@log_writer = launcher.log_writer
11-
@puma_pid = $PROCESS_ID
10+
@puma_pid = $$
1211

1312
@core_service = RabbitCarrots::Core.new(logger: log_writer)
1413

@@ -58,7 +57,7 @@ def monitor(process_dead, message)
5857
loop do
5958
if send(process_dead)
6059
log message
61-
Process.kill('TERM', $PROCESS_ID)
60+
Process.kill('TERM', $$)
6261
break
6362
end
6463
sleep 2

lib/rabbit_carrots/core.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,15 @@ def create_logger_adapter(logger)
125125
def adapter.info(msg)
126126
@logger.write("[INFO] #{msg}\n")
127127
end
128+
128129
def adapter.error(msg)
129130
@logger.write("[ERROR] #{msg}\n")
130131
end
132+
131133
def adapter.warn(msg)
132134
@logger.write("[WARN] #{msg}\n")
133135
end
136+
134137
adapter.instance_variable_set(:@logger, logger)
135138
adapter
136139
end

lib/rabbit_carrots/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module RabbitCarrots
4-
VERSION = '1.0.3'
4+
VERSION = '1.0.4'
55
end

0 commit comments

Comments
 (0)