-
Notifications
You must be signed in to change notification settings - Fork 259
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 Serverless API Template for Ruby Runtimes (3.2 and 3.3) #511
Add Serverless API Template for Ruby Runtimes (3.2 and 3.3) #511
Conversation
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.
Thanks for creating this PR! It looks fine in general, no issues from me with using the Globals
section for all those properties.
Could you add the templates into our testing framework? The logic itself won't be tested since this requires AWS credentials, but we just want to make sure that its included in the CI checks.
There are two locations:
- https://github.com/aws/aws-sam-cli-app-templates/blob/master/tests/integration/unit_test/test_unit_test_ruby3_2.py
- https://github.com/aws/aws-sam-cli-app-templates/blob/master/tests/integration/unit_test/test_unit_test_ruby3_3.py
These two files are pretty much identical. Basically, these two test files will run the Ruby test files inside of the new template file.
While that is happening, I can validate the behaviour of the template itself.
Done in 1e362fd. I wasn’t sure which name to include in the |
Actually, does this mean that Should I remove |
Yup, it looks like |
Removed 👍 |
Hm, I see that test failed because it couldn't find |
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.
Thanks for your contribution.
Could you please also add tests in the files below:
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.
LGTM. Thanks for your contribution!
Description of changes:
Adding Serverless API template for Ruby runtimes (both 3.2 and 3.3).
This template implements the following CRUD functions:
CreateItemFunction
withDynamoDBCrudPolicy
, exposed through thePOST /
endpoint.GetAllItemsFunction
andGetItemByIdFunction
withDynamoDBReadPolicy
, exposed through theGET /
andGET /{id}
endpoints, respectively.UpdateItemFunction
withDynamoDBCrudPolicy
, exposed through thePUT /{id}
endpoint.DeleteItemFunction
withDynamoDBCrudPolicy
, exposed through theDELETE /{id}
endpoint.Each function is tested with
minitest
and includes corresponding JSON events in theevents/
directory for local invocation.P.S. I took the liberty of moving the
Runtime
,Architectures
,MemorySize
, andTimeout
directives to theGlobals
section. Please let me know if you prefer these to be explicitly defined for each function, as they are in thenodejs20.x/web
template.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.