Skip to content

Commit

Permalink
Merge pull request #13212 from danielbayley/rubocop-url-trailing-slash
Browse files Browse the repository at this point in the history
Fix Rubocop trailing `/` bug
  • Loading branch information
MikeMcQuaid committed Apr 28, 2022
2 parents dca8214 + 7d145f5 commit 803444b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module Cask
# if it does not have a path component.
class HomepageUrlTrailingSlash < Base
include OnHomepageStanza
include HelperFunctions
extend AutoCorrector

MSG_NO_SLASH = "'%<url>s' must have a slash after the domain."
Expand All @@ -27,7 +28,8 @@ def on_homepage_stanza(stanza)

return unless url&.match?(%r{^.+://[^/]+$})

domain = URI(url_node.str_content).host
domain = URI(string_content(url_node, strip_dynamic: true)).host
return if domain.blank?

# This also takes URLs like 'https://example.org?path'
# and 'https://example.org#path' into account.
Expand Down

0 comments on commit 803444b

Please sign in to comment.