From 61ce3b2a01090381b0ebb4cd68e34c377eef897d Mon Sep 17 00:00:00 2001 From: Musaed Albrikan <32995191+mabrikan@users.noreply.github.com> Date: Wed, 27 Mar 2024 02:45:04 +0300 Subject: [PATCH 1/2] Add Passenger server to auto register list --- lib/yabeda/rails/railtie.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/yabeda/rails/railtie.rb b/lib/yabeda/rails/railtie.rb index 6563965..92a9a38 100644 --- a/lib/yabeda/rails/railtie.rb +++ b/lib/yabeda/rails/railtie.rb @@ -18,9 +18,13 @@ def puma_server? def unicorn_server? ::Rails.const_defined?("Unicorn::Launcher") end + + def passenger_server? + ::Rails.const_defined?("PhusionPassenger") + end initializer "yabeda-rails.metrics" do - ::Yabeda::Rails.install! if rails_server? || puma_server? || unicorn_server? + ::Yabeda::Rails.install! if rails_server? || puma_server? || unicorn_server? || passenger_server? end end end From 062936a5d521d4a92b041380953a83c990643fdf Mon Sep 17 00:00:00 2001 From: Musaed Albrikan Date: Tue, 9 Apr 2024 09:35:09 +0300 Subject: [PATCH 2/2] Remove trailing whitespaces --- lib/yabeda/rails/railtie.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/yabeda/rails/railtie.rb b/lib/yabeda/rails/railtie.rb index 92a9a38..7ee998e 100644 --- a/lib/yabeda/rails/railtie.rb +++ b/lib/yabeda/rails/railtie.rb @@ -18,7 +18,7 @@ def puma_server? def unicorn_server? ::Rails.const_defined?("Unicorn::Launcher") end - + def passenger_server? ::Rails.const_defined?("PhusionPassenger") end