Add Ruby 3.0 support (#16046)
* Fix issues with POSIX::Spawn, Terrapin and Ruby 3.0 Also improve the Terrapin monkey-patch for the stderr/stdout issue. * Fix keyword argument handling throughout the codebase * Monkey-patch Paperclip to fix keyword arguments handling in validators * Change validation_extensions to please CodeClimate * Bump microformats from 4.2.1 to 4.3.1 * Allow Ruby 3.0 * Add Ruby 3.0 test target to CircleCI * Add test for admin dashboard warnings * Fix admin dashboard warnings on Ruby 3.0
This commit is contained in:
parent
0a3fa034fc
commit
566fc90913
19 changed files with 178 additions and 75 deletions
|
@ -5,7 +5,7 @@ class Import::RelationshipWorker
|
|||
|
||||
sidekiq_options queue: 'pull', retry: 8, dead: false
|
||||
|
||||
def perform(account_id, target_account_uri, relationship, options = {})
|
||||
def perform(account_id, target_account_uri, relationship, options)
|
||||
from_account = Account.find(account_id)
|
||||
target_domain = domain(target_account_uri)
|
||||
target_account = stoplight_wrap_request(target_domain) { ResolveAccountService.new.call(target_account_uri, { check_delivery_availability: true }) }
|
||||
|
@ -16,7 +16,7 @@ class Import::RelationshipWorker
|
|||
case relationship
|
||||
when 'follow'
|
||||
begin
|
||||
FollowService.new.call(from_account, target_account, options)
|
||||
FollowService.new.call(from_account, target_account, **options)
|
||||
rescue ActiveRecord::RecordInvalid
|
||||
raise if FollowLimitValidator.limit_for_account(from_account) < from_account.following_count
|
||||
end
|
||||
|
@ -27,7 +27,7 @@ class Import::RelationshipWorker
|
|||
when 'unblock'
|
||||
UnblockService.new.call(from_account, target_account)
|
||||
when 'mute'
|
||||
MuteService.new.call(from_account, target_account, options)
|
||||
MuteService.new.call(from_account, target_account, **options)
|
||||
when 'unmute'
|
||||
UnmuteService.new.call(from_account, target_account)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue