File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
lib/react/server_rendering Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ def find_asset(logical_path)
2727 asset_path = manifest . lookup ( logical_path ) . to_s
2828 if asset_path . start_with? ( 'http' )
2929 # Get a file from the webpack-dev-server
30- dev_server_asset = open ( asset_path ) . read
30+ dev_server_asset = URI . open ( asset_path ) . read
3131 # Remove `webpack-dev-server/client/index.js` code which causes ExecJS to 💥
3232 dev_server_asset . sub! ( CLIENT_REQUIRE , '//\0' )
3333 dev_server_asset
@@ -44,7 +44,7 @@ def find_asset(logical_path)
4444 ds = Webpacker . dev_server
4545 # Remove the protocol and host from the asset path. Sometimes webpacker includes this, sometimes it does not
4646 asset_path . slice! ( "#{ ds . protocol } ://#{ ds . host_with_port } " )
47- dev_server_asset = open ( "#{ ds . protocol } ://#{ ds . host_with_port } #{ asset_path } " ) . read
47+ dev_server_asset = URI . open ( "#{ ds . protocol } ://#{ ds . host_with_port } #{ asset_path } " ) . read
4848 dev_server_asset . sub! ( CLIENT_REQUIRE , '//\0' )
4949 dev_server_asset
5050 else
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ def dev_server_running?
101101 return false unless example_asset_path
102102 return false unless example_asset_path . start_with? ( 'http://localhost:8080' )
103103 begin
104- file = open ( 'http://localhost:8080/packs/application.js' )
104+ file = URI . open ( 'http://localhost:8080/packs/application.js' )
105105 rescue StandardError => e
106106 file = nil
107107 end
@@ -134,7 +134,7 @@ def dev_server_running?
134134 example_asset_path = manifest_data . values . first
135135 return false unless example_asset_path
136136 begin
137- file = open ( "#{ ds . protocol } ://#{ ds . host } :#{ ds . port } #{ example_asset_path } " )
137+ file = URI . open ( "#{ ds . protocol } ://#{ ds . host } :#{ ds . port } #{ example_asset_path } " )
138138 rescue StandardError => e
139139 file = nil
140140 end
You can’t perform that action at this time.
0 commit comments