about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorJustin Tracey <j2tracey@gmail.com>2021-02-19 08:56:14 +0000
committerGitHub <noreply@github.com>2021-02-19 09:56:14 +0100
commitc9e8e1739c698291e1b034d19a1b01d75c9e039b (patch)
tree4d1aa255c0d76e2f518f611582dae2d09f84af02 /app/lib
parentfc145de23865ebc957cde50f66844bcfad475e47 (diff)
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.
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/webfinger.rb4
1 files changed, 2 insertions, 2 deletions
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"