Skip to content

Commit

Permalink
feat: add ruby3.3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
hawflau committed Mar 20, 2024
1 parent fc14891 commit deeb7f9
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 0 deletions.
28 changes: 28 additions & 0 deletions manifest-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -1267,6 +1267,24 @@
"useCaseName": "Multi-step workflow"
}
],
"ruby3.3": [
{
"directory": "ruby/hello",
"displayName": "Hello World Example",
"dependencyManager": "bundler",
"appTemplate": "hello-world",
"packageType": "Zip",
"useCaseName": "Hello World Example"
},
{
"directory": "ruby/step-func",
"displayName": "Step Functions Sample App (Stock Trader)",
"dependencyManager": "bundler",
"appTemplate": "step-functions-sample-app",
"packageType": "Zip",
"useCaseName": "Multi-step workflow"
}
],
"rust (provided.al2)": [
{
"directory": "al2/rust/hello",
Expand Down Expand Up @@ -1499,6 +1517,16 @@
"useCaseName": "Hello World Example"
}
],
"amazon/ruby3.3-base": [
{
"directory": "ruby/hello-img",
"displayName": "Hello World Lambda Image Example",
"dependencyManager": "bundler",
"appTemplate": "hello-world-lambda-image",
"packageType": "Image",
"useCaseName": "Hello World Example"
}
],
"amazon/go-provided.al2-base": [
{
"directory": "al2/go/hello-img",
Expand Down
31 changes: 31 additions & 0 deletions tests/integration/build_invoke/ruby/test_ruby_3_3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from unittest import skip
from tests.integration.build_invoke.build_invoke_base import BuildInvokeBase

"""
For each template, it will test the following sam commands:
1. sam init
2. sam build --use-container (if self.use_container is False, --use-container will be omitted)
3. (if there are event jsons), for each event json, check `sam local invoke` response is a valid json
"""

class BuildInvoke_ruby3_3_cookiecutter_aws_sam_hello_ruby(BuildInvokeBase.HelloWorldExclamationBuildInvokeBase):
runtime = "ruby3.3"
directory = "ruby/hello"
# TODO(hawflau): remove the line below when cfn-lint supports ruby3.3
should_test_lint = False


class BuildInvoke_ruby3_3_cookiecutter_aws_sam_step_functions_sample_app(BuildInvokeBase.BuildInvokeBase):
runtime = "ruby3.3"
directory = "ruby/step-func"
# TODO(hawflau): remove the line below when cfn-lint supports ruby3.3
should_test_lint = False


class BuildInvoke_image_ruby3_3_cookiecutter_aws_sam_hello_ruby_lambda_image(
BuildInvokeBase.HelloWorldExclamationBuildInvokeBase
):
runtime = "ruby3.3"
directory = "ruby/hello-img"
# TODO(hawflau): remove the line below when cfn-lint supports ruby3.3
should_test_lint = False
21 changes: 21 additions & 0 deletions tests/integration/unit_test/test_unit_test_ruby3_3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from tests.integration.unit_test.unit_test_base import UnitTestBase


class UnitTest_ruby3_3_cookiecutter_aws_sam_hello_ruby(UnitTestBase.RubyUnitTestBase):
runtime = "ruby3.3"
directory = "ruby/hello"
code_directories = ["tests/unit/test_handler.rb"]
# TODO(hawflau): remove the line below when cfn-lint supports ruby3.3
should_test_lint = False


class UnitTest_ruby3_3_cookiecutter_aws_sam_step_functions_sample_app(UnitTestBase.RubyUnitTestBase):
runtime = "ruby3.3"
directory = "ruby/step-func"
code_directories = [
"tests/unit/test_stock_buyer.rb",
"tests/unit/test_stock_checker.rb",
"tests/unit/test_stock_seller.rb",
]
# TODO(hawflau): remove the line below when cfn-lint supports ruby3.3
should_test_lint = False

0 comments on commit deeb7f9

Please sign in to comment.