Drop support for ruby 3.1 (#32363)
This commit is contained in:
parent
a20ac20302
commit
b231c3c1bf
18 changed files with 38 additions and 43 deletions
|
@ -20,9 +20,9 @@ class ActivityPub::Activity
|
|||
end
|
||||
|
||||
class << self
|
||||
def factory(json, account, **options)
|
||||
def factory(json, account, **)
|
||||
@json = json
|
||||
klass&.new(json, account, **options)
|
||||
klass&.new(json, account, **)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class RSS::Element
|
||||
def self.with(*args, &block)
|
||||
new(*args).tap(&block).to_element
|
||||
def self.with(*, &block)
|
||||
new(*).tap(&block).to_element
|
||||
end
|
||||
|
||||
def create_element(name, content = nil)
|
||||
|
|
|
@ -42,8 +42,8 @@ class TranslationService::DeepL < TranslationService
|
|||
subtags.join('-')
|
||||
end
|
||||
|
||||
def request(verb, path, **options)
|
||||
req = Request.new(verb, "#{base_url}#{path}", **options)
|
||||
def request(verb, path, **)
|
||||
req = Request.new(verb, "#{base_url}#{path}", **)
|
||||
req.add_headers(Authorization: "DeepL-Auth-Key #{@api_key}")
|
||||
req.perform do |res|
|
||||
case res.code
|
||||
|
|
|
@ -27,8 +27,8 @@ class TranslationService::LibreTranslate < TranslationService
|
|||
|
||||
private
|
||||
|
||||
def request(verb, path, **options)
|
||||
req = Request.new(verb, "#{@base_url}#{path}", allow_local: true, **options)
|
||||
def request(verb, path, **)
|
||||
req = Request.new(verb, "#{@base_url}#{path}", allow_local: true, **)
|
||||
req.add_headers('Content-Type': 'application/json')
|
||||
req.perform do |res|
|
||||
case res.code
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue