File: fix-ruby3-compatibility.patch

package info (click to toggle)
ruby-puma-worker-killer 0.3.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 228 kB
  • sloc: ruby: 283; makefile: 4
file content (84 lines) | stat: -rw-r--r-- 4,515 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
From: Daniel Leidert <dleidert@debian.org>
Date: Wed, 1 Dec 2021 08:42:44 +0100
Subject: Run commands with correct Ruby version

---
 test/puma_worker_killer_test.rb | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/test/puma_worker_killer_test.rb b/test/puma_worker_killer_test.rb
index 4f87c08..46571d5 100644
--- a/test/puma_worker_killer_test.rb
+++ b/test/puma_worker_killer_test.rb
@@ -5,7 +5,7 @@ require 'test_helper'
 class PumaWorkerKillerTest < Test::Unit::TestCase
   def test_starts
     port     = 0 # http://stackoverflow.com/questions/200484/how-do-you-find-a-free-tcp-server-port-using-ruby
-    command  = "bundle exec puma #{fixture_path.join("default.ru")} -t 1:1 -w 2 --preload --debug -p #{port}"
+    command  = "#{RbConfig.ruby} /usr/bin/puma #{fixture_path.join("default.ru")} -t 1:1 -w 2 --preload --debug -p #{port}"
     options  = { wait_for: 'booted', timeout: 5, env: { 'PUMA_FREQUENCY' => 1 } }
 
     WaitForIt.new(command, options) do |spawn|
@@ -15,7 +15,7 @@ class PumaWorkerKillerTest < Test::Unit::TestCase
 
   def test_without_preload
     port     = 0 # http://stackoverflow.com/questions/200484/how-do-you-find-a-free-tcp-server-port-using-ruby
-    command  = "bundle exec puma #{fixture_path.join("default.ru")} -t 1:1 -w 2 --debug -p #{port} -C #{fixture_path.join("config/puma_worker_killer_start.rb")}"
+    command  = "#{RbConfig.ruby} /usr/bin/puma #{fixture_path.join("default.ru")} -t 1:1 -w 2 --debug -p #{port} -C #{fixture_path.join("config/puma_worker_killer_start.rb")}"
     options  = { wait_for: 'booted', timeout: 10, env: { 'PUMA_FREQUENCY' => 1 } }
 
     WaitForIt.new(command, options) do |spawn|
@@ -26,7 +26,7 @@ class PumaWorkerKillerTest < Test::Unit::TestCase
   def test_kills_large_app
     file     = fixture_path.join('big.ru')
     port     = 0
-    command  = "bundle exec puma #{file} -t 1:1 -w 2 --preload --debug -p #{port}"
+    command  = "#{RbConfig.ruby} /usr/bin/puma #{file} -t 1:1 -w 2 --preload --debug -p #{port}"
     options  = { wait_for: 'booted', timeout: 5, env: { 'PUMA_FREQUENCY' => 1, 'PUMA_RAM' => 1 } }
 
     WaitForIt.new(command, options) do |spawn|
@@ -37,7 +37,7 @@ class PumaWorkerKillerTest < Test::Unit::TestCase
   def test_pre_term
     file     = fixture_path.join('pre_term.ru')
     port     = 0
-    command  = "bundle exec puma #{file} -t 1:1 -w 2 --preload --debug -p #{port}"
+    command  = "#{RbConfig.ruby} /usr/bin/puma #{file} -t 1:1 -w 2 --preload --debug -p #{port}"
     options  = { wait_for: 'booted', timeout: 5, env: { 'PUMA_FREQUENCY' => 1, 'PUMA_RAM' => 1 } }
 
     WaitForIt.new(command, options) do |spawn|
@@ -49,7 +49,7 @@ class PumaWorkerKillerTest < Test::Unit::TestCase
   def test_on_calculation
     file     = fixture_path.join('on_calculation.ru')
     port     = 0
-    command  = "bundle exec puma #{file} -t 1:1 -w 2 --preload --debug -p #{port}"
+    command  = "#{RbConfig.ruby} /usr/bin/puma #{file} -t 1:1 -w 2 --preload --debug -p #{port}"
     options  = { wait_for: 'booted', timeout: 5, env: { 'PUMA_FREQUENCY' => 1, 'PUMA_RAM' => 1 } }
 
     WaitForIt.new(command, options) do |spawn|
@@ -65,7 +65,7 @@ class PumaWorkerKillerTest < Test::Unit::TestCase
   def test_rolling_restart
     file     = fixture_path.join('rolling_restart.ru')
     port     = 0
-    command  = "bundle exec puma #{file} -t 1:1 -w 2 --preload --debug -p #{port}"
+    command  = "#{RbConfig.ruby} /usr/bin/puma #{file} -t 1:1 -w 2 --preload --debug -p #{port}"
     puts command.inspect
     options = { wait_for: 'booted', timeout: 15, env: {} }
 
@@ -77,7 +77,7 @@ class PumaWorkerKillerTest < Test::Unit::TestCase
   def test_rolling_restart_worker_kill_check
     file     = fixture_path.join('rolling_restart.ru')
     port     = 0
-    command  = "bundle exec puma #{file} -t 1:1 -w 1 --preload --debug -p #{port}"
+    command  = "#{RbConfig.ruby} /usr/bin/puma #{file} -t 1:1 -w 1 --preload --debug -p #{port}"
     puts command.inspect
     options = { wait_for: 'booted', timeout: 120, env: {} }
 
@@ -92,7 +92,7 @@ class PumaWorkerKillerTest < Test::Unit::TestCase
   def test_rolling_pre_term
     file     = fixture_path.join('rolling_pre_term.ru')
     port     = 0
-    command  = "bundle exec puma #{file} -t 1:1 -w 2 --preload --debug -p #{port}"
+    command  = "#{RbConfig.ruby} /usr/bin/puma #{file} -t 1:1 -w 2 --preload --debug -p #{port}"
     puts command.inspect
     options = { wait_for: 'booted', timeout: 15, env: {} }