about summary refs log tree commit diff
path: root/app/services/fetch_remote_status_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-15 16:56:29 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-15 16:56:29 +0100
commitfdc17bea58f210f62ac0d9e836b68e84c6dbd15c (patch)
tree491613c94695ba867e81d50124e7e3eb73a0eff5 /app/services/fetch_remote_status_service.rb
parenta91c3ef6cef0fe5a1645c043e7d4a5ef96e82c4f (diff)
Fix rubocop issues, introduce usage of frozen literal to improve performance
Diffstat (limited to 'app/services/fetch_remote_status_service.rb')
-rw-r--r--app/services/fetch_remote_status_service.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/services/fetch_remote_status_service.rb b/app/services/fetch_remote_status_service.rb
index e4537d61f..7063231e4 100644
--- a/app/services/fetch_remote_status_service.rb
+++ b/app/services/fetch_remote_status_service.rb
@@ -1,9 +1,11 @@
+# frozen_string_literal: true
+
 class FetchRemoteStatusService < BaseService
   def call(url)
     atom_url, body = FetchAtomService.new.call(url)
 
     return nil if atom_url.nil?
-    return process_atom(atom_url, body)
+    process_atom(atom_url, body)
   end
 
   private
@@ -20,7 +22,7 @@ class FetchRemoteStatusService < BaseService
 
     statuses = ProcessFeedService.new.call(body, account)
 
-    return statuses.first
+    statuses.first
   end
 
   def extract_author(url, xml)
@@ -34,7 +36,7 @@ class FetchRemoteStatusService < BaseService
 
     return FollowRemoteAccountService.new.call("#{username}@#{domain}")
   rescue Nokogiri::XML::XPath::SyntaxError
-    Rails.logger.debug "Invalid XML or missing namespace"
+    Rails.logger.debug 'Invalid XML or missing namespace'
     nil
   end
 end