lib/percy/capybara/loaders/native_loader.rb in percy-capybara-2.3.3 vs lib/percy/capybara/loaders/native_loader.rb in percy-capybara-2.3.4

- old
+ new

@@ -75,11 +75,10 @@ resource_urls.each do |url| next if !_should_include_url?(url) response = _fetch_resource_url(url) _absolute_url_to_relative!(url, _current_host_port) next if !response - sha = Digest::SHA256.hexdigest(response.body) resources << Percy::Client::Resource.new( url, mimetype: 'text/css', content: response.body) end resources end @@ -162,11 +161,10 @@ # development server, so it may not be so bad. Re-evaluate if this becomes an issue. response = _fetch_resource_url(resource_url) _absolute_url_to_relative!(resource_url, _current_host_port) next if !response - sha = Digest::SHA256.hexdigest(response.body) resources << Percy::Client::Resource.new( resource_url, mimetype: response.content_type, content: response.body) end resources end @@ -208,13 +206,13 @@ end !!result end - # @priivate + # @private def _current_host_port url_match = URL_REGEX.match(page.current_url) - host_port = url_match[1] + url_match[2] + (url_match[3] || '') + url_match[1] + url_match[2] + (url_match[3] || '') end # @private def _same_server?(url, host_port) url.start_with?(host_port + "/") || url == host_port