openapi_first 1.3.5 → 1.3.6

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: 631b8fea22128020990af7edb3605d0e842d04b0f876affb4277b3f81b571921
4
- data.tar.gz: 3fc61f1ca41bb0d380c188681bad5477c36c6cbeeeec5fabf1700d468987aae5
3
+ metadata.gz: 221362a78a788c449a8c11af9c40fc91bf307c82ee79d0931c94f39bb22901bc
4
+ data.tar.gz: d9b806ed56371199552b4081d2b6b220279b925b9fdbdaa90ce47623c86e4bff
5
5
  SHA512:
6
- metadata.gz: e2b1210a029a62742928ebf2e285a58d9d48d2a809373cce1652a13f8b538675b37be361c99625d6e0bb6cf70ea58ebbaba7486f8ac73896cf5989b74257cd06
7
- data.tar.gz: 0e5d4798b159fd71af8da50703644f71a16cc276bfdafcaff3cf64777042d6ed9b78ac62ba1dfe07cbd1026cf8d359b77124a5abe39d239030c5d5f5b967b12c
6
+ metadata.gz: 5c5ceac8c85f7d074983e5d237febe8ecf9ec3414a5ecb1a5bd8af43259eb2c83621ac867ca9b1d5420a3dda7518e131ed2ac1f08b86d71fa6fdfccbf76e1885
7
+ data.tar.gz: 92c44316bf96d31841a959898efcd20e08bc223f233e26af253cc3575dbf29680b13e27ab628eb9bb9544371c08c0d7aea42b5aaf8bef75d369299067e6eb0ca
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 1.3.6
6
+
7
+ - Fix Rack 2 / Rails 6 compatibility ([#246](https://github.com/ahx/openapi_first/issues/246)
8
+
5
9
  ## 1.3.5
6
10
 
7
11
  - Added support for `/some/{kebab-cased}` path parameters ([#245](https://github.com/ahx/openapi_first/issues/245))
@@ -24,13 +24,21 @@ module OpenapiFirst
24
24
  def call(env)
25
25
  request = find_request(env)
26
26
  status, headers, body = @app.call(env)
27
- body = body.to_ary if body.respond_to?(:to_ary)
27
+ body = read_body(body)
28
28
  request.validate_response(Rack::Response[status, headers, body], raise_error: true)
29
29
  [status, headers, body]
30
30
  end
31
31
 
32
32
  private
33
33
 
34
+ def read_body(body)
35
+ return body.to_ary if body.respond_to?(:to_ary)
36
+
37
+ result = []
38
+ body.each { |part| result << part }
39
+ result
40
+ end
41
+
34
42
  def find_request(env)
35
43
  env[REQUEST] ||= @definition.request(Rack::Request.new(env))
36
44
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenapiFirst
4
- VERSION = '1.3.5'
4
+ VERSION = '1.3.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openapi_first
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Haller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-19 00:00:00.000000000 Z
11
+ date: 2024-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hana