diff --git a/CHANGELOG.md b/CHANGELOG.md index 798cb1c..a0c97ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Support Rails 8.1 scaffolding which disables system tests by default. #585 @flavorjones * Puma plugin now has experimental support for Rails engines. #567 @bopm +* Puma plugin uses Puma 7's `after_stopped` callback, quashing a deprecation warning. #578 @rono23 ## v4.3.0 / 2025-07-06 diff --git a/lib/puma/plugin/tailwindcss.rb b/lib/puma/plugin/tailwindcss.rb index 3cf777b..29b5b62 100644 --- a/lib/puma/plugin/tailwindcss.rb +++ b/lib/puma/plugin/tailwindcss.rb @@ -20,7 +20,11 @@ def start(launcher) end end - launcher.events.on_stopped { stop_tailwind } + if Gem::Version.new(Puma::Const::PUMA_VERSION) >= Gem::Version.new("7") + launcher.events.after_stopped { stop_tailwind } + else + launcher.events.on_stopped { stop_tailwind } + end in_background do monitor_tailwind