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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e9c4ebfe0705c085953b285f9da898433417c2cd719a6646d1953142d22d52be
4
- data.tar.gz: 64bcfd70098d3a91bc752a6be8745083344703266b999f6755c89393aaf82355
3
+ metadata.gz: 796d1dc7279aec871854d488ac6ae0a68e7db0df98e1bdb8cd16270b9fc56877
4
+ data.tar.gz: b4d16447eb8b26cb6f6e71aff0f190671edb1046d50677627933ff5e432a5526
5
5
  SHA512:
6
- metadata.gz: ef06c3ccfee9ab9020b40ae0c795e1303215ef0e41e36ea1a88c39c2d7ee79e7c97925f8d551a8b96117a72c752e47960f9f5e6d4811dd02fe012cdb072eb764
7
- data.tar.gz: 1ca711328493bfb729be489ce5daa6a86850066a1d749cac74ab6a74a2a2f440874f89a3fcfd87c75afa6a9640880d4071046c3a9f459a4cecd6e3491192aaa4
6
+ metadata.gz: cbcd32fa4e5641c6b5d1f2c4762cac3df3b84ceedcce861db9a17f6bd2334367a69ccfe39528677444f9ac9776528133d932fd53376bbd8fa9810bc312b3b805
7
+ data.tar.gz: 9f07023fc4517556789619220cf882d4ad607b4fed4ed82941ec99759f7adf5c870d90e5dd49c8495f312cc7b339c15df06e8b85fea28f7365f9b69405ff364c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.8 - Dec 29 2018
4
+ - Crystal template runs a lot faster.
5
+
3
6
  ## 0.3.7 - Dec 29 2018
4
7
  - Error when unsupported runtimes are passed to `new`
5
8
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- faastruby (0.3.6)
4
+ faastruby (0.3.7)
5
5
  colorize (~> 0.8)
6
6
  faastruby-rpc (~> 0.1.3)
7
7
  oj (~> 3.6)
@@ -1,3 +1,3 @@
1
1
  module FaaStRuby
2
- VERSION = '0.3.7'
2
+ VERSION = '0.3.8'
3
3
  end
@@ -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
- data = JSON.parse(event.body.not_nil!) rescue {} of String => String
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, #{data["name"]? || "World"}!\n"
26
+ render text: "Hello, #{name}!\n"
27
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faastruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paulo Arruda