apigatewayv2_rack 0.1.2 → 0.1.3

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: 0670d1d3244283b6842ca14f5c85492687f4b1cb99ce40addcdc43c1e7470a4e
4
- data.tar.gz: 941caa3f4df1d593e3d6bf1c0b249ad2318976940606c5fc9878d4ca9134b439
3
+ metadata.gz: b9c5a5dcc23b7a6e524d7a8c847befb580b8771839ae013c977991e35db824ef
4
+ data.tar.gz: e33794f5ffae56ad06cb14f12fcac3b3a41ad5e33f6119a9c262756801d9f3b6
5
5
  SHA512:
6
- metadata.gz: a50fde7a105b2f4c4a5bb3882866b1278ac9ede7fcbe43b1275f0c98702cf6edcb0a8495544f100a511fedaea4803970107445273f247301a26b3824c2edea7f
7
- data.tar.gz: 1c0b407ece9a1952bf2d986c573b2aeef087d38e59ab0ce0263386c58533c16c7b213ee7c08c947f3e1b673bc6720068a229304610e223001945c39f4a97fe59
6
+ metadata.gz: 6a27469fcbc9c1bc754aca949ed94fce1ec83f4e1cd5909fa70bee771267dd480ef12f78d69508205913f88c23bc4082a149279975ec6e5ed8897c0d5e777fbd
7
+ data.tar.gz: 88ff099fa17b319cf2f1cedd08091eeeff14874a7c9fa9eac37430e4ed98b2e51b7e2f1b2bf6146cb215730c637cbc639016ecd1b64e6759e96c26892c541491
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.3] - 2023-03-22
4
+
5
+ - Fixed Errno::EACCES from StringIO when a streaming body (body does not respond to `#each`) is returned
6
+ - Raise error when a response body is nil
7
+
3
8
  ## [0.1.2] - 2023-03-22
4
9
 
5
10
  - Fixed Apigatewayv2Rack.handler_from_rack_config_file didn't work well with Rack 3.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- apigatewayv2_rack (0.1.2)
4
+ apigatewayv2_rack (0.1.3)
5
5
  rack
6
6
 
7
7
  GEM
@@ -33,6 +33,8 @@ module Apigatewayv2Rack
33
33
 
34
34
  private def consume_body
35
35
  case
36
+ when body.nil?
37
+ raise TypeError, "Rack app returned nil body"
36
38
  # FIXME: Rack::CommonLogger uses Rack::BodyProxy, which performs logging when body is closed, is not compatible with #to_ary on Rack 3 specification
37
39
  # when body.respond_to?(:to_ary)
38
40
  # body.to_ary.join
@@ -42,7 +44,7 @@ module Apigatewayv2Rack
42
44
  body.close if body.respond_to?(:close)
43
45
  buf
44
46
  else
45
- stream = StringIO.new('', 'w')
47
+ stream = StringIO.new(String.new, 'w')
46
48
  body.call(stream)
47
49
  stream.string
48
50
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Apigatewayv2Rack
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apigatewayv2_rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sorah Fukumori