-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#4, refactor: add Rack env builder #6
base: main
Are you sure you want to change the base?
#4, refactor: add Rack env builder #6
Conversation
f8c89e7
to
0979521
Compare
@requiemformemories please rebase |
0979521
to
b009e1d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please specify the correct types.
b009e1d
to
a767ce5
Compare
Thanks for the review. I made up for the RBS types and I also used another way to transform the headers. |
::Hanami::Lambda::LAMBDA_EVENT => event, | ||
::Hanami::Lambda::LAMBDA_CONTEXT => context | ||
}.tap do |env| | ||
content_type = headers.delete("Content-Type") || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To get "content-type" with different keys because all values are possibly received from Lambda event. We should not change it.
sig/hanami/lambda/env.rbs
Outdated
# | ||
# @return [Hash] the hash of Rack environment | ||
# | ||
def to_h: () -> ::Hash[String, untyped] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to use "allowlist" to list all possible hash value instead "untyped"
Currently I am facing some difficulties with type checking.
(1)
(2) In the source code we have
(3) |
(1)
|
Description
The Rack env build method is too large that hard to extend new behaviors. Add Hanami::Lambda::Env to improve it.
Related Issues