This is an automated email from the ASF dual-hosted git repository. pdesai pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-wskdeploy.git
The following commit(s) were added to refs/heads/master by this push: new 97fe8c3 add ruby to specifications file (#1012) 97fe8c3 is described below commit 97fe8c31cff07bcfdf250270e1cae88ebfebae93 Author: TPei <4004343+t...@users.noreply.github.com> AuthorDate: Mon Nov 26 19:57:47 2018 +0100 add ruby to specifications file (#1012) --- runtimes/runtimes_test.go | 1 + specification/html/spec_actions.md | 6 ++++ tests/src/integration/runtimetests/manifest.yaml | 39 ++++++++++++++++++++++++ tests/src/integration/runtimetests/src/hello.rb | 9 ++++++ 4 files changed, 55 insertions(+) diff --git a/runtimes/runtimes_test.go b/runtimes/runtimes_test.go index 2f2ade0..3ea307f 100644 --- a/runtimes/runtimes_test.go +++ b/runtimes/runtimes_test.go @@ -36,6 +36,7 @@ func TestParseOpenWhisk(t *testing.T) { assert.Equal(t, 2, len(converted["php"]), "not expected length") assert.Equal(t, 1, len(converted["java"]), "not expected length") assert.Equal(t, 6, len(converted["python"]), "not expected length") + assert.Equal(t, 1, len(converted["ruby"]), "not expected length") assert.Equal(t, 2, len(converted["swift"]), "not expected length") // cannot pass this test until it is deployed in OpenWhisk //assert.Equal(t, 2, len(converted["go"]), "not expected length") diff --git a/specification/html/spec_actions.md b/specification/html/spec_actions.md index 0521675..13ee895 100644 --- a/specification/html/spec_actions.md +++ b/specification/html/spec_actions.md @@ -142,6 +142,7 @@ These packages may vary by OpenWhisk release; examples of supported runtimes as | php, php@7.1 | php:7.1 | openwhisk/action-php-v7.1:latest | Latest PHP (7.1) language runtime | | python@3 | python:3 | openwhisk/python3action:latest | Latest Python 3 language runtime | | python, python@2 | python:2 | openwhisk/python2action:latest | Latest Python 2 language runtime |s +| ruby | ruby:2.5 | openwhisk/action-ruby-v2.5:latest | Latest Ruby 2.5 language runtime | | swift@4.1 | swift | openwhisk/action-swift-v4.1:latest | Latest Swift 4.1 language runtime | | swift@3.1.1 | swift | openwhisk/action-swift-v3.1.1:latest | Latest Swift 3.1.1 language runtime | | language:default | N/A | N/A | Permit the OpenWhisk platform to select the correct default language runtime. | @@ -186,6 +187,11 @@ following file extensions are recognized and will be run on the latest version o <td>php</td> <td>Latest PHP language runtime.</td> </tr> + <tr> + <td>.rb</td> + <td>ruby</td> + <td>Latest Ruby language runtime.</td> + </tr> </table> </html> diff --git a/tests/src/integration/runtimetests/manifest.yaml b/tests/src/integration/runtimetests/manifest.yaml index 04539e1..32bebf2 100644 --- a/tests/src/integration/runtimetests/manifest.yaml +++ b/tests/src/integration/runtimetests/manifest.yaml @@ -76,6 +76,16 @@ packages: place: string outputs: payload: string + greetingruby25-with-explicit-runtime: + web-export: true + version: 1.0 + function: src/hello.rb + runtime: ruby:2.5 + inputs: + name: string + place: string + outputs: + payload: string greetingswift311-with-explicit-runtime: web-export: true version: 1.0 @@ -127,6 +137,15 @@ packages: place: string outputs: payload: string + greetingruby-without-explicit-runtime: + web-export: true + version: 1.0 + function: src/hello.rb + inputs: + name: string + place: string + outputs: + payload: string greetingswift-without-explicit-runtime: web-export: true version: 1.0 @@ -201,6 +220,26 @@ packages: place: string outputs: payload: string + greetingruby-with-php-explicit-runtime: + web-export: true + version: 1.0 + function: src/hello.rb + runtime: php + inputs: + name: string + place: string + outputs: + payload: string + greetingruby-with-random-explicit-runtime: + web-export: true + version: 1.0 + function: src/hello.rb + runtime: random + inputs: + name: string + place: string + outputs: + payload: string greetingswift-with-nodejs-explicit-runtime: web-export: true version: 1.0 diff --git a/tests/src/integration/runtimetests/src/hello.rb b/tests/src/integration/runtimetests/src/hello.rb new file mode 100644 index 0000000..26694b5 --- /dev/null +++ b/tests/src/integration/runtimetests/src/hello.rb @@ -0,0 +1,9 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more contributor +# license agreements; and to You under the Apache License, Version 2.0. + +def main(args) + name = args['name'] || 'stranger' + greeting = "Hello #{name}" + puts(greeting) + { greeting: greeting } +end