This upgrades the gem to support the new ruby3.2 runtime of which AWS says:
Ruby 3.2 adds many features and performance improvements, including anonymous arguments passing improvements, ‘endless’ methods, Regexp improvements, a new Data class, support for pattern-matching in Time and MatchData, and support for ‘find pattern’ in pattern matching.
Existing Lambda customers using the Ruby 2.7 runtime should migrate to the Ruby 3.2 runtime as soon as possible. Even though community support for Ruby 2.7 has ended, Lambda has extended support for the Ruby 2.7 runtime until December 7, 2023 to provide existing Ruby customers with time to transition to Ruby 3.2. Functions using Ruby 2.7 continue to be eligible for technical support and Lambda will continue to apply OS security updates to the runtime until this date.
This also changes the docker image used to build the package dependencies from the lambci/lambda:* images to the amazon/aws-lambda-ruby:* images provided and maintained by AWS. These images are the exact images used by lambda functions using a ruby runtime. They unfortunately don't have all the build dependencies present in the lambci images. Thus a wrapper script is provided around the gem packaging in a docker container that ensures the necessary packages are installed
Finally, I removed support for ruby2.5 as it is no longer an available runtime for AWS lambda.
yarn test output
PASS __tests__/index.test.js
✓ captures the serverless configuration (1ms)
✓ captures the options (1ms)
✓ hooks in before packaging deployment artifacts
✓ hooks in before packaging an individual function
✓ disables 'Excluding development dependencies', which only applies to node projects (427ms)
✓ forces whitelisting files to package by excluding all files by default (467ms)
✓ include the bundler standalone files (392ms)
✓ preserve the includes specified in serverless configuration (425ms)
✓ include files for each gem needed by default bundler group - excluding .git/test files (426ms)
Test Suites: 1 passed, 1 total
Tests: 9 passed, 9 total
Snapshots: 0 total
Time: 2.707s, estimated 3s
Ran all test suites.
This upgrades the gem to support the new
ruby3.2
runtime of which AWS says:This also changes the docker image used to build the package dependencies from the
lambci/lambda:*
images to theamazon/aws-lambda-ruby:*
images provided and maintained by AWS. These images are the exact images used by lambda functions using a ruby runtime. They unfortunately don't have all the build dependencies present in the lambci images. Thus a wrapper script is provided around the gem packaging in a docker container that ensures the necessary packages are installedFinally, I removed support for
ruby2.5
as it is no longer an available runtime for AWS lambda.yarn test
outputintegration-test.sh
output