-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add support for parsing lists of strings/timestamps in headers #176
Conversation
.split(', ') | ||
.map { |s| Time.parse(s) } | ||
.split(',').each_slice(2).map { |v| Time.parse(v[0] + v[1])} |
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.
Header list parser should maybe handle Time case too? It should probably also call methods in TimeHelper
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.
Yeah, move this case to a method in the header list parser since its pretty weird logic.
And used the TimeformatHelper for the other cases.
@@ -109,13 +108,6 @@ apply InputAndOutputWithHeaders @httpRequestTests([ | |||
}, | |||
]) | |||
|
|||
apply InputAndOutputWithHeaders @skipTests([ |
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.
I thought there were two tests for this one, I could be wrong.
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.
I'm guessing that these protocol-test are derived from smithy protocol-tests at some point. Might be worth covering different cases that was not listed below, such as "RestJsonInputAndOutputWithTimestampHeaders"?
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.
You're right - I think we just never ported it over. I'll add it.
parsed | ||
end | ||
|
||
def self.read_value(buffer) |
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.
Should all of these be private?
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.
Yeah - updated. Rubocop had removed the private for those (since private doesn't actually work on def self.method). Moved to class << self style.
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.
Good to know for myself.
Description of changes:
Adds support for parsing lists of strings/timestamps in headers.
Forward port of: aws/aws-sdk-ruby@bc243c4
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.