diff options
-rw-r--r-- | app/helpers/webpack_helper.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/app/helpers/webpack_helper.rb b/app/helpers/webpack_helper.rb index eda0a9a8f9d..6bacda9fe75 100644 --- a/app/helpers/webpack_helper.rb +++ b/app/helpers/webpack_helper.rb @@ -15,12 +15,10 @@ module WebpackHelper end # include full webpack-dev-server url for rspec tests running locally - if Rails.env.test? && ::Rails.configuration.webpack.dev_server.enabled - port = ::Rails.configuration.webpack.dev_server.port - protocol = ::Rails.configuration.webpack.dev_server.https ? 'https' : 'http' - - host = ::Rails.configuration.webpack.dev_server.host - host = instance_eval(&host) if host.respond_to?(:call) + if Rails.env.test? && Rails.configuration.webpack.dev_server.enabled + host = Rails.configuration.webpack.dev_server.host + port = Rails.configuration.webpack.dev_server.port + protocol = Rails.configuration.webpack.dev_server.https ? 'https' : 'http' paths.map! do |p| "#{protocol}://#{host}:#{port}#{p}" |