Skip to content

Commit

Permalink
feat: Support for ruby2.7 (aws#1806)
Browse files Browse the repository at this point in the history
  • Loading branch information
sriram-mv authored Feb 20, 2020
1 parent b791e15 commit 88bc1a3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions samcli/lib/build/workflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def get_workflow_config(runtime, code_dir, project_dir):
"nodejs10.x": BasicWorkflowSelector(NODEJS_NPM_CONFIG),
"nodejs12.x": BasicWorkflowSelector(NODEJS_NPM_CONFIG),
"ruby2.5": BasicWorkflowSelector(RUBY_BUNDLER_CONFIG),
"ruby2.7": BasicWorkflowSelector(RUBY_BUNDLER_CONFIG),
"dotnetcore2.0": BasicWorkflowSelector(DOTNET_CLIPACKAGE_CONFIG),
"dotnetcore2.1": BasicWorkflowSelector(DOTNET_CLIPACKAGE_CONFIG),
"go1.x": BasicWorkflowSelector(GO_MOD_CONFIG),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Resources:
Properties:
CodeUri: hello_world/
Handler: app.lambda_handler
Runtime: ruby2.5
Runtime: {{ cookiecutter.runtime }}
Events:
HelloWorld:
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
Expand Down
6 changes: 4 additions & 2 deletions samcli/local/common/runtime_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
"ruby": [
{
"runtimes": ["ruby2.5"],
"runtimes": ["ruby2.5", "ruby2.7"],
"dependency_manager": "bundler",
"init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-ruby"),
"build": True,
Expand Down Expand Up @@ -74,6 +74,7 @@
"python3.6": ["pip"],
"python2.7": ["pip"],
"ruby2.5": ["bundler"],
"ruby2.7": ["bundler"],
"nodejs12.x": ["npm"],
"nodejs10.x": ["npm"],
"dotnetcore2.1": ["cli-package"],
Expand All @@ -100,7 +101,7 @@
# latest of each runtime version
"nodejs12.x",
"python3.8",
"ruby2.5",
"ruby2.7",
"go1.x",
"java11",
"dotnetcore2.1",
Expand All @@ -111,6 +112,7 @@
"python3.6",
"python2.7",
# older ruby runtimes
"ruby2.5",
# older java runtimes
"java8",
# older dotnetcore runtimes
Expand Down
1 change: 1 addition & 0 deletions samcli/local/docker/lambda_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class Runtime(Enum):
python37 = "python3.7"
python38 = "python3.8"
ruby25 = "ruby2.5"
ruby27 = "ruby2.7"
java8 = "java8"
java11 = "java11"
go1x = "go1.x"
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/buildcmd/test_build_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ class TestBuildCommand_RubyFunctions(BuildIntegBase):
FUNCTION_LOGICAL_ID = "Function"

@pytest.mark.flaky(reruns=3)
@parameterized.expand([("ruby2.5")])
@parameterized.expand([("ruby2.5"), ("ruby2.7")])
def test_building_ruby_in_container(self, runtime):
self._test_with_default_gemfile(runtime, "use_container")

@pytest.mark.flaky(reruns=3)
@parameterized.expand([("ruby2.5")])
@parameterized.expand([("ruby2.5"), ("ruby2.7")])
def test_building_ruby_in_process(self, runtime):
self._test_with_default_gemfile(runtime, False)

Expand Down

0 comments on commit 88bc1a3

Please sign in to comment.