faastruby 0.3.7 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/lib/faastruby/version.rb +1 -1
- data/templates/crystal/example/src/handler.cr +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 796d1dc7279aec871854d488ac6ae0a68e7db0df98e1bdb8cd16270b9fc56877
|
|
4
|
+
data.tar.gz: b4d16447eb8b26cb6f6e71aff0f190671edb1046d50677627933ff5e432a5526
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cbcd32fa4e5641c6b5d1f2c4762cac3df3b84ceedcce861db9a17f6bd2334367a69ccfe39528677444f9ac9776528133d932fd53376bbd8fa9810bc312b3b805
|
|
7
|
+
data.tar.gz: 9f07023fc4517556789619220cf882d4ad607b4fed4ed82941ec99759f7adf5c870d90e5dd49c8495f312cc7b339c15df06e8b85fea28f7365f9b69405ff364c
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/faastruby/version.rb
CHANGED
|
@@ -8,7 +8,7 @@ def handler(event : FaaStRuby::Event) : FaaStRuby::Response
|
|
|
8
8
|
# event.headers : Hash(String, String)
|
|
9
9
|
# event.context : String | Nil
|
|
10
10
|
# query_params : Hash(String, String)
|
|
11
|
-
|
|
11
|
+
name = event.body ? JSON.parse(event.body.not_nil!)["name"] : "World"
|
|
12
12
|
# FUNCTION RESPONSE
|
|
13
13
|
#
|
|
14
14
|
# You can render text, json, yaml, html or js. Example:
|
|
@@ -23,5 +23,5 @@ def handler(event : FaaStRuby::Event) : FaaStRuby::Response
|
|
|
23
23
|
# The 'Content-Type' header is automatically set when you use 'render'.
|
|
24
24
|
# You can set custom headers using a Hash(String, String). Example:
|
|
25
25
|
# render text: "It Works!", headers: {"TransactionId" => 23928}
|
|
26
|
-
render text: "Hello, #{
|
|
26
|
+
render text: "Hello, #{name}!\n"
|
|
27
27
|
end
|