serverless-rack 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d054df889e1a091b14b03de69cd43fba9186fd0b7c126f036e32a7c581f230da
4
- data.tar.gz: f03682869870aafd564e76ad6d8ff54a88eeec164152dd6e1e0584348c57d518
3
+ metadata.gz: 608b6797822f34511d85d16879a2162849824d8fecd9be3b58d3cf6edf6fe2f0
4
+ data.tar.gz: e2a981df1ac80fc775cf379405f84158a3f5b409b71db9459abeede0b7b0a75c
5
5
  SHA512:
6
- metadata.gz: ffa6d4107b258984e244d5fee0a0a2b870faee2d4b72fd3fd97cb2347ed40fba687426bfbcf106e5ce6cd9045e67842f1d5ffac2ef830b2ab4279c9f67d601e4
7
- data.tar.gz: 10e61fa0152cdbc561e9dfb09de252377228af59d1df691c2783ad9ba1a320f84843b616651dce5485be5079d85b518e202ef4375e82fff42111367ae0f3b11c
6
+ metadata.gz: f5d701de917f422e78cb9a31e7f2c507ec15cd4bb7b214b20d1d2f099176f2c2ca3e613fbfbc8cb926d2ab8f020c97083383cd7f312d887f94aa3937bdfb7eda
7
+ data.tar.gz: 133efab6c97a7e5ef83df340ecd4a7156698fbd5b78fe17736d33c48e55da6e09a2fafd442e5628e3ff2630906fb8db6bf36efd27fb41cafa12b2e3f49e320b7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ # 1.0.8
2
+
3
+ - Add types to command arguments to avoid deprecation warnings (#25)
4
+
5
+ _Dave Nicolson_
6
+
7
+ - Properly close Rack response body (#26)
8
+
9
+ _Zac Bristow_
10
+
11
+ - Spawn commands correctly on Windows (#29)
12
+
13
+ _Shalvah_
14
+
15
+ - Add missing stringio requirement (#31)
16
+
17
+ _Hirohisa Mitsuishi_
18
+
19
+ - Add user flag to docker option (#32)
20
+
21
+ _Hirohisa Mitsuishi_
22
+
1
23
  # 1.0.7
2
24
 
3
25
  - Improved error handling for Docker processes (#20 and #21)
data/README.md CHANGED
@@ -84,7 +84,7 @@ functions:
84
84
  handler: rack_adapter.handler
85
85
  events:
86
86
  - http: ANY /
87
- - http: ANY {proxy+}
87
+ - http: ANY /{proxy+}
88
88
  ```
89
89
 
90
90
  ### Gemfile
@@ -6,6 +6,7 @@
6
6
 
7
7
  require 'rack'
8
8
  require 'base64'
9
+ require 'stringio'
9
10
 
10
11
  TEXT_MIME_TYPES = [
11
12
  'application/json',
@@ -44,9 +45,11 @@ end
44
45
 
45
46
  def parse_query_string(event)
46
47
  if event.include? 'multiValueQueryStringParameters'
47
- Rack::Utils.build_query(event['multiValueQueryStringParameters'] || {})
48
+ Rack::Utils.unescape(
49
+ Rack::Utils.build_query(event['multiValueQueryStringParameters'] || {})
50
+ )
48
51
  else
49
- Rack::Utils.build_query(event['queryStringParameters'] || {})
52
+ Rack::Utils.unescape(Rack::Utils.build_query(event['queryStringParameters'] || {}))
50
53
  end
51
54
  end
52
55
 
@@ -129,7 +132,11 @@ end
129
132
 
130
133
  def format_body(body:, headers:, text_mime_types:)
131
134
  response_data = ''
132
- body.each { |part| response_data += part }
135
+ begin
136
+ body.each { |part| response_data += part }
137
+ ensure
138
+ body.close if body.respond_to?(:close)
139
+ end
133
140
 
134
141
  return {} if response_data.empty?
135
142
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'serverless-rack'
5
- s.version = '1.0.7'
5
+ s.version = '1.0.8'
6
6
  s.summary =
7
7
  'Serverless plugin to deploy Ruby Rack applications (Sinatra/Padrino/Cuba etc.) '\
8
8
  'and bundle gems'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serverless-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Logan Raarup
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-25 00:00:00.000000000 Z
11
+ date: 2022-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -42,7 +42,7 @@ homepage: https://github.com/logandk/serverless-rack
42
42
  licenses:
43
43
  - MIT
44
44
  metadata: {}
45
- post_install_message:
45
+ post_install_message:
46
46
  rdoc_options: []
47
47
  require_paths:
48
48
  - lib
@@ -57,8 +57,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  - !ruby/object:Gem::Version
58
58
  version: '0'
59
59
  requirements: []
60
- rubygems_version: 3.1.2
61
- signing_key:
60
+ rubygems_version: 3.2.32
61
+ signing_key:
62
62
  specification_version: 4
63
63
  summary: Serverless plugin to deploy Ruby Rack applications (Sinatra/Padrino/Cuba
64
64
  etc.) and bundle gems