mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-24 19:37:26 +00:00
Bump linzer to 0.7.7 (#35258)
This commit is contained in:
@@ -5,24 +5,14 @@ require 'linzer/message/adapter/http_gem/response'
|
||||
|
||||
module Linzer::Message::Adapter
|
||||
module ActionDispatch
|
||||
class Response < Linzer::Message::Adapter::Abstract
|
||||
def initialize(operation, **_options) # rubocop:disable Lint/MissingSuper
|
||||
@operation = operation
|
||||
end
|
||||
|
||||
def header(name)
|
||||
@operation.headers[name]
|
||||
end
|
||||
|
||||
def attach!(signature)
|
||||
signature.to_h.each { |h, v| @operation.headers[h] = v }
|
||||
end
|
||||
class Response < Linzer::Message::Adapter::Generic::Response
|
||||
private
|
||||
|
||||
# Incomplete, but sufficient for FASP
|
||||
def [](field_name)
|
||||
return @operation.status if field_name == '@status'
|
||||
|
||||
@operation.headers[field_name]
|
||||
def derived(name)
|
||||
case name.value
|
||||
when '@status' then @operation.status
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user