zero-rails_openapi 2.1.4 → 2.1.5

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
- SHA1:
3
- metadata.gz: ad9300ef0863756dc8921326f0878ca8afa58e92
4
- data.tar.gz: f242c0646c62e952844c8f11410654e8fcef8e2d
2
+ SHA256:
3
+ metadata.gz: a8d4c7ad77acde6b60064c24b5e9526d8182ee3d9580dd720b4781b67d64b8a9
4
+ data.tar.gz: f0697e6dfe1ce02e4427676f7f604d937685ab1a26876a3d3b2093069d13dc6e
5
5
  SHA512:
6
- metadata.gz: 599d4cb3b53dd2af8d913b5ae5f174961e018cf198cf1c7693da52ee879d9514c9a701bf6bebd6e9185df9c1f9a966d4fec29e8a3c732ad81e88390117e6cedb
7
- data.tar.gz: 4af5ee7a39d25bff3e30e7e44687c152817de79982b698211da87eab78ec2dc2e3df315d94f8f20f2da8d2aa94fe5c48e7b2cd289a135624d9740ecbe0a02b41
6
+ metadata.gz: 0cc748c545feebc6d0888594b99068279e18a17e32cd67297300d1147799319741c7fc8c1bdbefaca73b466f9ecb51b4eec15c0c91b43262e27776393cda0245
7
+ data.tar.gz: f09fa8f370ca5d7a16baa8c9fc7525ba1e2ecb224f7fe97fbf4233813610242e3f74abc083d2c5a80dba08fa86ad5646ffc9ae08cc9035227ca2d8840deab976
@@ -1,8 +1,8 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.4.0
5
- before_install: gem install bundler -v 1.16.0.pre.2
4
+ - 2.7.1
5
+ before_install: gem install bundler -v 2.1.4
6
6
  env:
7
7
  global:
8
8
  - CC_TEST_REPORTER_ID=fd0a238819079b92c19e99f5f4d6dcc8a5b5b2baf087fceb3723837604b5b0e9
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [2.1.5] - 2020/9/20 - [view diff](https://github.com/zhandao/zero-rails_openapi/compare/v2.1.4...v2.1.5)
6
+
7
+ ### Fixed
8
+
9
+ 1. Keyword arguments in Ruby 2.7 [issued by @dandunckelman](https://github.com/zhandao/zero-rails_openapi/issues/66)
10
+
5
11
  ## [2.1.3 - 2.1.4] - 2020/2/10 - [view diff](https://github.com/zhandao/zero-rails_openapi/compare/v2.1.2...v2.1.4)
6
12
 
7
13
  ### Fixed
@@ -18,7 +18,7 @@ module OpenApi
18
18
  end
19
19
 
20
20
  def absorb(media_type, hash)
21
- media_types << MediaTypeObj.new(media_type, hash)
21
+ media_types << MediaTypeObj.new(media_type, **hash)
22
22
  self
23
23
  end
24
24
 
@@ -20,7 +20,7 @@ module OpenApi
20
20
  def absorb(desc, media_type, headers: { }, **media_hash)
21
21
  self.processed[:description] = desc if desc.present?
22
22
  self.headers.merge!(headers)
23
- media_types << MediaTypeObj.new(media_type, media_hash)
23
+ media_types << MediaTypeObj.new(media_type, **media_hash)
24
24
  self
25
25
  end
26
26
 
@@ -31,7 +31,7 @@ module OpenApi
31
31
 
32
32
  def process_schema_input(schema_type, schema, name, model: nil)
33
33
  schema = { type: schema } unless schema.is_a?(Hash)
34
- combined_schema = _combined_schema(schema)
34
+ combined_schema = _combined_schema(**schema)
35
35
  type = schema[:type] ||= schema_type
36
36
  return Tip.param_no_type(name) if type.nil? && combined_schema.nil?
37
37
  combined_schema || SchemaObj.new(type, load_schema(model) || schema)
@@ -46,7 +46,12 @@ module OpenApi
46
46
  def arrow_writing_support
47
47
  proc do |args, executor|
48
48
  args = (args.size == 1 && args.first.is_a?(Hash)) ? args[0].to_a.flatten : args
49
- send(executor, *args)
49
+
50
+ if !executor.in?(%w[ _example _security_scheme _base_auth _bearer_auth ]) && args.last.is_a?(Hash)
51
+ send(executor, *args[0..-2], **args[-1])
52
+ else
53
+ send(executor, *args)
54
+ end
50
55
  end
51
56
  end
52
57
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenApi
4
- VERSION = '2.1.4'
4
+ VERSION = '2.1.5'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zero-rails_openapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.4
4
+ version: 2.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - zhandao
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-09 00:00:00.000000000 Z
11
+ date: 2020-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -188,8 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0'
190
190
  requirements: []
191
- rubyforge_project:
192
- rubygems_version: 2.6.12
191
+ rubygems_version: 3.1.2
193
192
  signing_key:
194
193
  specification_version: 4
195
194
  summary: Concise DSL for generating OpenAPI3 documentation.