Fix rubocop warning (#14288)
* Fix rubocop warning * use limit variable * use ContextCreatingMethods option
This commit is contained in:
@ -45,7 +45,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
||||
|
||||
RedisLock.acquire(lock_options) do |lock|
|
||||
if lock.acquired?
|
||||
return if delete_arrived_first?(object_uri) || poll_vote?
|
||||
return if delete_arrived_first?(object_uri) || poll_vote? # rubocop:disable Lint/NonLocalExitFromIterator
|
||||
|
||||
@status = find_existing_status
|
||||
|
||||
|
@ -55,7 +55,7 @@ class ProofProvider::Keybase::ConfigSerializer < ActiveModel::Serializer
|
||||
end
|
||||
|
||||
def profile_url
|
||||
CGI.unescape(short_account_url('%{username}')) # rubocop:disable Style/FormatStringToken
|
||||
CGI.unescape(short_account_url('%{username}'))
|
||||
end
|
||||
|
||||
def check_url
|
||||
|
@ -231,6 +231,7 @@ class Request
|
||||
begin
|
||||
sock.connect_nonblock(addr_by_socket[sock])
|
||||
rescue Errno::EISCONN
|
||||
# Do nothing
|
||||
rescue => e
|
||||
sock.close
|
||||
outer_e = e
|
||||
|
@ -11,7 +11,7 @@ module Settings
|
||||
@object = object
|
||||
end
|
||||
|
||||
# rubocop:disable Style/MethodMissing
|
||||
# rubocop:disable Style/MethodMissingSuper
|
||||
def method_missing(method, *args)
|
||||
method_name = method.to_s
|
||||
# set a value for a variable
|
||||
@ -24,7 +24,7 @@ module Settings
|
||||
self[method_name]
|
||||
end
|
||||
end
|
||||
# rubocop:enable Style/MethodMissing
|
||||
# rubocop:enable Style/MethodMissingSuper
|
||||
|
||||
def respond_to_missing?(*)
|
||||
true
|
||||
@ -48,7 +48,6 @@ module Settings
|
||||
record.update!(value: value)
|
||||
|
||||
Rails.cache.write(Setting.cache_key(key, @object), value)
|
||||
value
|
||||
end
|
||||
|
||||
def [](key)
|
||||
|
Reference in New Issue
Block a user