ningyougang commented on PR #72:
URL:
https://github.com/apache/openwhisk-runtime-ruby/pull/72#issuecomment-1193939227
sequence action also supports by default(includes 2.5 and 2.6), test steps
as below
* Write split.rb and sort.rb
```ruby
[root@nccddev130026 ~]# cat split.rb
def main(args)
payload = args["payload"] || "aaa\nbbb\ncccc"
separator = args["separator"] || "\n"
result=payload.split(separator)
puts result
result
end
[root@nccddev130026 ~]# cat sort.rb
def main(args)
newResult = args.reverse
puts newResult
newResult
end
```
* Create sequence action and invoke it (I tested ruby:2.5/2.6, worked well
both)
```shell
wsk -i action create /whisk.system/utils/split-ruby --kind ruby:2.5
~/split.rb
wsk -i action create /whisk.system/utils/sort-ruby --kind ruby:2.5 ~/sort.rb
wsk -i action create mySequence-ruby --sequence
/whisk.system/utils/split-ruby,/whisk.system/utils/sort-ruby
wsk -i action invoke --result mySequence-ruby --param payload
"dddd\nbbbb\ncccc\nfffffff\nggggggggg" -r -v
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]