1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Apply Rubocop Performance/DoubleStartEndWith (#23442)

This commit is contained in:
Nick Schonning 2023-02-07 20:06:48 -05:00 committed by GitHub
parent c92e033cdd
commit ef8988aef2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@ class DeliveryFailureTracker
FAILURE_DAYS_THRESHOLD = 7 FAILURE_DAYS_THRESHOLD = 7
def initialize(url_or_host) def initialize(url_or_host)
@host = url_or_host.start_with?('https://') || url_or_host.start_with?('http://') ? Addressable::URI.parse(url_or_host).normalized_host : url_or_host @host = url_or_host.start_with?('https://', 'http://') ? Addressable::URI.parse(url_or_host).normalized_host : url_or_host
end end
def track_failure! def track_failure!