Autofix Rails/EagerEvaluationLogMessage (#23429)
* Autofix Rails/EagerEvaluationLogMessage * Update spec for debug block syntax
This commit is contained in:
parent
6a71bb23c2
commit
ed570050c6
17 changed files with 21 additions and 19 deletions
|
@ -53,7 +53,7 @@ class ActivityPub::FetchFeaturedCollectionService < BaseService
|
|||
|
||||
status.id
|
||||
rescue ActiveRecord::RecordInvalid => e
|
||||
Rails.logger.debug "Invalid pinned status #{uri}: #{e.message}"
|
||||
Rails.logger.debug { "Invalid pinned status #{uri}: #{e.message}" }
|
||||
nil
|
||||
end
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ class ActivityPub::FetchRemoteAccountService < ActivityPub::FetchRemoteActorServ
|
|||
actor = super
|
||||
return actor if actor.nil? || actor.is_a?(Account)
|
||||
|
||||
Rails.logger.debug "Fetching account #{uri} failed: Expected Account, got #{actor.class.name}"
|
||||
Rails.logger.debug { "Fetching account #{uri} failed: Expected Account, got #{actor.class.name}" }
|
||||
raise Error, "Expected Account, got #{actor.class.name}" unless suppress_errors
|
||||
end
|
||||
end
|
||||
|
|
|
@ -38,7 +38,7 @@ class ActivityPub::FetchRemoteActorService < BaseService
|
|||
|
||||
ActivityPub::ProcessAccountService.new.call(@username, @domain, @json, only_key: only_key, verified_webfinger: !only_key, request_id: request_id)
|
||||
rescue Error => e
|
||||
Rails.logger.debug "Fetching actor #{uri} failed: #{e.message}"
|
||||
Rails.logger.debug { "Fetching actor #{uri} failed: #{e.message}" }
|
||||
raise unless suppress_errors
|
||||
end
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ class ActivityPub::FetchRemoteKeyService < BaseService
|
|||
|
||||
find_actor(owner_uri, @owner, suppress_errors)
|
||||
rescue Error => e
|
||||
Rails.logger.debug "Fetching key #{uri} failed: #{e.message}"
|
||||
Rails.logger.debug { "Fetching key #{uri} failed: #{e.message}" }
|
||||
raise unless suppress_errors
|
||||
end
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ class ActivityPub::ProcessCollectionService < BaseService
|
|||
begin
|
||||
@json = compact(@json) if @json['signature'].is_a?(Hash)
|
||||
rescue JSON::LD::JsonLdError => e
|
||||
Rails.logger.debug "Error when compacting JSON-LD document for #{value_or_id(@json['actor'])}: #{e.message}"
|
||||
Rails.logger.debug { "Error when compacting JSON-LD document for #{value_or_id(@json['actor'])}: #{e.message}" }
|
||||
@json = original_json.without('signature')
|
||||
end
|
||||
|
||||
|
@ -72,7 +72,7 @@ class ActivityPub::ProcessCollectionService < BaseService
|
|||
@account = nil unless @account.is_a?(Account)
|
||||
@account
|
||||
rescue JSON::LD::JsonLdError, RDF::WriterError => e
|
||||
Rails.logger.debug "Could not verify LD-Signature for #{value_or_id(@json['actor'])}: #{e.message}"
|
||||
Rails.logger.debug { "Could not verify LD-Signature for #{value_or_id(@json['actor'])}: #{e.message}" }
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
|
|
@ -94,7 +94,7 @@ class ActivityPub::ProcessStatusUpdateService < BaseService
|
|||
|
||||
@next_media_attachments << media_attachment
|
||||
rescue Addressable::URI::InvalidURIError => e
|
||||
Rails.logger.debug "Invalid URL in attachment: #{e}"
|
||||
Rails.logger.debug { "Invalid URL in attachment: #{e}" }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue