From c9e8e1739c698291e1b034d19a1b01d75c9e039b Mon Sep 17 00:00:00 2001 From: Justin Tracey Date: Fri, 19 Feb 2021 08:56:14 +0000 Subject: replace all instances of "ends_with?" with "end_with?" (#15745) The "ends_with?" method is just a Rails alias of Ruby's "end_with?" method. Using the latter makes the code less brittle. --- app/lib/webfinger.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/lib') diff --git a/app/lib/webfinger.rb b/app/lib/webfinger.rb index 40795a7aa..e0e022cea 100644 --- a/app/lib/webfinger.rb +++ b/app/lib/webfinger.rb @@ -88,7 +88,7 @@ class Webfinger end def standard_url - if @domain.ends_with? ".onion" + if @domain.end_with? ".onion" "http://#{@domain}/.well-known/webfinger?resource=#{@uri}" else "https://#{@domain}/.well-known/webfinger?resource=#{@uri}" @@ -96,7 +96,7 @@ class Webfinger end def host_meta_url - if @domain.ends_with? ".onion" + if @domain.end_with? ".onion" "http://#{@domain}/.well-known/host-meta" else "https://#{@domain}/.well-known/host-meta" -- cgit