{"id":14987994,"url":"https://github.com/apache/openwhisk-runtime-ruby","last_synced_at":"2025-07-27T10:33:54.423Z","repository":{"id":38838715,"uuid":"140910582","full_name":"apache/openwhisk-runtime-ruby","owner":"apache","description":"Apache OpenWhisk Runtime Ruby supports Apache OpenWhisk functions written in Ruby","archived":false,"fork":false,"pushed_at":"2024-09-24T14:21:25.000Z","size":193,"stargazers_count":13,"open_issues_count":2,"forks_count":18,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-07-08T02:06:31.555Z","etag":null,"topics":["apache","cloud","docker","faas","functions","functions-as-a-service","openwhisk","openwhisk-runtime","ruby","serverless","serverless-architectures","serverless-functions"],"latest_commit_sha":null,"homepage":"https://openwhisk.apache.org/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-07-14T02:47:21.000Z","updated_at":"2024-09-24T14:21:32.000Z","dependencies_parsed_at":"2024-02-02T17:02:35.336Z","dependency_job_id":"b1f11197-3286-401a-ba92-2523d8dd7063","html_url":"https://github.com/apache/openwhisk-runtime-ruby","commit_stats":{"total_commits":89,"total_committers":16,"mean_commits":5.5625,"dds":0.6292134831460674,"last_synced_commit":"da6484e738c6c7ad9e726136dc678f2b59ffc67b"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/apache/openwhisk-runtime-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-runtime-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-runtime-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-runtime-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-runtime-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/openwhisk-runtime-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-runtime-ruby/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264589191,"owners_count":23633271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache","cloud","docker","faas","functions","functions-as-a-service","openwhisk","openwhisk-runtime","ruby","serverless","serverless-architectures","serverless-functions"],"created_at":"2024-09-24T14:15:55.440Z","updated_at":"2025-07-27T10:33:54.408Z","avatar_url":"https://github.com/apache.png","language":"Ruby","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"\u003c!--\n#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n--\u003e\n\n# Apache OpenWhisk runtimes for Ruby\n[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n[![Continuous Integration](https://github.com/apache/openwhisk-runtime-ruby/actions/workflows/ci.yaml/badge.svg)](https://github.com/apache/openwhisk-runtime-ruby/actions/workflows/ci.yaml)\n\n### Give it a try today\nA very simple `hello world` function would be:\n\n```ruby\ndef main(args)\n  name = args[\"name\"] || \"stranger\"\n  greeting = \"Hello #{name}!\"\n  puts greeting\n  { \"greeting\" =\u003e greeting }\nend\n```\n\nFor the return result, not only support `dictionary` but also support `array`\n\nSo a very simple `hello array` function would be:\n\n```ruby\ndef main(args)\n  nums = Array[\"a\",\"b\"]\n  nums\nend\n```\n\nAnd support array result for sequence action as well, the first action's array result can be used as next action's input parameter.\n\nSo the function can be\n\n```ruby\ndef main(args)\n  args\nend\n```\n\nTo use as a docker action\n```\nwsk action update myAction my_action.rb --docker openwhisk/action-ruby-v2.5\n```\nThis works on any deployment of Apache OpenWhisk\n\n### To use on deployment that contains the runtime as a kind\nTo use as a kind action\n```\nwsk action update myAction my_action.rb --kind ruby:2.5\n```\n\n### Local development\n```\n./gradlew core:ruby2.5Action:distDocker\n```\nThis will produce the image `whisk/action-ruby-v2.5`\n\nBuild and Push image\n```\ndocker login\n./gradlew core:ruby2.5Action:distDocker -PdockerImagePrefix=$prefix-user -PdockerRegistry=docker.io\n```\n\nDeploy OpenWhisk using ansible environment that contains the kind `ruby:2.5`\nAssuming you have OpenWhisk already deploy locally and `OPENWHISK_HOME` pointing to root directory of OpenWhisk core repository.\n\nSet `ROOTDIR` to the root directory of this repository.\n\nRedeploy OpenWhisk\n```\ncd $OPENWHISK_HOME/ansible\nANSIBLE_CMD=\"ansible-playbook -i ${ROOTDIR}/ansible/environments/local\"\n$ANSIBLE_CMD setup.yml\n$ANSIBLE_CMD couchdb.yml\n$ANSIBLE_CMD initdb.yml\n$ANSIBLE_CMD wipe.yml\n$ANSIBLE_CMD openwhisk.yml\n```\n\nOr you can use `wskdev` and create a soft link to the target ansible environment, for example:\n```\nln -s ${ROOTDIR}/ansible/environments/local ${OPENWHISK_HOME}/ansible/environments/local-ruby\nwskdev fresh -t local-ruby\n```\n\nTo use as docker action push to your own dockerhub account\n```\ndocker tag whisk/ruby2.5Action $user_prefix/action-ruby-v2.5\ndocker push $user_prefix/action-ruby-v2.5\n```\nThen create the action using your image from Docker Hub.\n```\nwsk action update myAction my_action.rb --docker $user_prefix/action-ruby-v2.5\n```\nThe `$user_prefix` is usually your dockerhub user id.\n\n### Testing\nInstall dependencies from the root directory on $OPENWHISK_HOME repository\n```\n./gradlew install\n```\n\nUsing gradle to run all tests\n```\n./gradlew :tests:test\n```\nUsing gradle to run some tests\n```\n./gradlew :tests:test --tests *ActionContainerTests*\n```\nUsing IntelliJ:\n- Import project as gradle project.\n- Make sure the working directory is root of the project/repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fopenwhisk-runtime-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fopenwhisk-runtime-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fopenwhisk-runtime-ruby/lists"}