Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/webpacker/dev_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def initialize(config)

def running?
if config.dev_server.present?
Socket.tcp(host, port, connect_timeout: connect_timeout).close
Timeout.timeout(connect_timeout) { Socket.tcp(host, port).close }
true
else
false
Expand Down
1 change: 1 addition & 0 deletions lib/webpacker/dev_server_runner.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require "shellwords"
require "socket"
require "timeout"
require "webpacker/configuration"
require "webpacker/dev_server"
require "webpacker/runner"
Expand Down
1 change: 1 addition & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
require "rails"
require "rails/test_help"
require "byebug"
require "ostruct"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this tests were failing with

Error:
CompilerTest#test_freshness_on_compile_success:
NameError: uninitialized constant CompilerTest::OpenStruct

e.g. on https://github.com/rails/webpacker/actions/runs/9956692322/job/27507151674#step:4:83


require_relative "test_app/config/environment"

Expand Down