diff --git a/lib/puma.rb b/lib/puma.rb index 7e16b22935..de96068f7d 100644 --- a/lib/puma.rb +++ b/lib/puma.rb @@ -1,7 +1,6 @@ # Standard libraries require 'socket' require 'tempfile' -require 'yaml' require 'time' require 'etc' require 'uri' diff --git a/lib/puma/launcher.rb b/lib/puma/launcher.rb index 1e58654f84..b8d7b02681 100644 --- a/lib/puma/launcher.rb +++ b/lib/puma/launcher.rb @@ -7,7 +7,6 @@ require 'puma/const' require 'puma/binder' -require 'puma/state_file' module Puma # Puma::Launcher is the single entry point for starting a Puma server based on user @@ -105,6 +104,8 @@ def write_state path = @options[:state] return unless path + require 'puma/state_file' + sf = StateFile.new sf.pid = Process.pid sf.control_url = @options[:control_url] diff --git a/test/test_cli.rb b/test/test_cli.rb index 4e1acc0c71..603f85d3cc 100644 --- a/test/test_cli.rb +++ b/test/test_cli.rb @@ -2,6 +2,7 @@ require 'test/unit' require 'puma/cli' require 'tempfile' +require 'yaml' class TestCLI < Test::Unit::TestCase def setup