faastruby 0.4.11 → 0.4.12
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 +6 -0
- data/Gemfile.lock +2 -2
- data/exe/faastruby-server +1 -1
- data/lib/faastruby/server.rb +4 -0
- data/lib/faastruby/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6368a1d3dad4d02f5e3a24262adaff96cdc7767bbf825691d4e49d65fbcea21b
|
|
4
|
+
data.tar.gz: 02e19e2cb7afb3c0bd3b91ba885a6fae26995ad15445b3e015224bc6344d7e21
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2df07aeae193658b8d1466a84dfb571452e136c706ec0edade1ac8278b9868b9ea41eb60c2bf10266c46eb67196a981005e25d3dda6d9e9570e76b714c38a52f
|
|
7
|
+
data.tar.gz: dadf343fa1946f4750903c37626d81bae076a25098551574a9138327139a814f56a12372432b152c2b92c1133bd5384138c4fb915102bd2ce14c6bd4a90ba6d7
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.12 - Jan 26 2019
|
|
4
|
+
Special thanks to @HellRok for fixing those bugs!
|
|
5
|
+
|
|
6
|
+
- FaaStRuby Server: Respond with css content type (#4)
|
|
7
|
+
- Setup the server to respond to HEAD requests (#3)
|
|
8
|
+
|
|
3
9
|
## 0.4.11 - Jan 19 2019
|
|
4
10
|
- Fix wrong working directory when running functions locally with `faastruby server`
|
|
5
11
|
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
faastruby (0.4.
|
|
4
|
+
faastruby (0.4.11)
|
|
5
5
|
colorize (~> 0.8)
|
|
6
6
|
faastruby-rpc (~> 0.2.1)
|
|
7
7
|
oj (~> 3.6)
|
|
@@ -38,7 +38,7 @@ GEM
|
|
|
38
38
|
mustermann (1.0.3)
|
|
39
39
|
necromancer (0.4.0)
|
|
40
40
|
netrc (0.11.0)
|
|
41
|
-
oj (3.7.
|
|
41
|
+
oj (3.7.7)
|
|
42
42
|
pastel (0.7.2)
|
|
43
43
|
equatable (~> 0.5.0)
|
|
44
44
|
tty-color (~> 0.4.0)
|
data/exe/faastruby-server
CHANGED
|
@@ -22,7 +22,7 @@ set :show_exceptions, true
|
|
|
22
22
|
set :run, true
|
|
23
23
|
|
|
24
24
|
register Sinatra::MultiRoute
|
|
25
|
-
route :get, :post, :put, :patch, :delete, '/:workspace_name/:function_name' do
|
|
25
|
+
route :head, :get, :post, :put, :patch, :delete, '/:workspace_name/:function_name' do
|
|
26
26
|
path = "#{params[:workspace_name]}/#{params[:function_name]}"
|
|
27
27
|
headers = env.select { |key, value| key.include?('HTTP_') || ['CONTENT_TYPE', 'CONTENT_LENGTH', 'REMOTE_ADDR', 'REQUEST_METHOD', 'QUERY_STRING'].include?(key) }
|
|
28
28
|
if headers.has_key?("HTTP_FAASTRUBY_RPC")
|
data/lib/faastruby/server.rb
CHANGED
|
@@ -127,6 +127,7 @@ module FaaStRuby
|
|
|
127
127
|
|
|
128
128
|
def render(
|
|
129
129
|
js: nil,
|
|
130
|
+
css: nil,
|
|
130
131
|
body: nil,
|
|
131
132
|
inline: nil,
|
|
132
133
|
html: nil,
|
|
@@ -167,6 +168,9 @@ module FaaStRuby
|
|
|
167
168
|
when js
|
|
168
169
|
headers["Content-Type"] ||= "text/javascript"
|
|
169
170
|
resp_body = js
|
|
171
|
+
when css
|
|
172
|
+
headers["Content-Type"] ||= "text/css"
|
|
173
|
+
resp_body = css
|
|
170
174
|
when png
|
|
171
175
|
headers["Content-Type"] ||= "image/png"
|
|
172
176
|
resp_body = Base64.urlsafe_encode64(png)
|
data/lib/faastruby/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: faastruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Paulo Arruda
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-01-
|
|
11
|
+
date: 2019-01-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rest-client
|