swagalicious 0.4.7 → 0.5.0

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: 356ef7d1c57b5d2c0887ef48741926c1d15799b0dee6ec2f44c447ccad909c56
4
- data.tar.gz: 3daa87a8d3b13e7b35d688b6620bf050f07eb208938a1fd257613a8bca259714
3
+ metadata.gz: 9390b8f1cc7a642960bf7034d19cfced2473bcc8fae6c7c8d2f496f90a3021d8
4
+ data.tar.gz: 5a2fcf532d9a334ee083998d0df6477c0c106bc651447a88df9c0a649c569bf1
5
5
  SHA512:
6
- metadata.gz: 3a9e321d4f883d71c12a05212ae97b7d55b1c403d69820c8c58236382e5abf4d1f869e3aba13dba3fe3a8134d06264145f6523b89a27f7cc4a18bb4539bb86a1
7
- data.tar.gz: 80d3b8950565c86d82f4437eac5d9ed022913f0b3df4c8f2e32d1edc3ce57ea41be2925d3b1f829952e6fb93dcc9de63685d88a24c1d327a0a3228bd715dc420
6
+ metadata.gz: 913d388442cb821df24ed4cba9624f3196b4503ba07b6b1a071ca7de44ad98495f3fcfe6356250d011a4da131d7a780e664f8932223f901a520c6c203c099c9a
7
+ data.tar.gz: 69a467ca5f92f3ec1794121b1caca3a0a82eff0d953f7eec082776999f754579ab4033144589b252c6867130001de611ab40bc50152b762afc599493eb193c80
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- swagalicious (0.4.6)
4
+ swagalicious (0.4.7)
5
5
  faraday (~> 2.0)
6
6
  faraday-rack
7
7
  json-schema
@@ -25,10 +25,10 @@ GEM
25
25
  diff-lcs (1.5.0)
26
26
  factory_bot (6.1.0)
27
27
  activesupport (>= 5.0.0)
28
- faraday (2.3.0)
28
+ faraday (2.4.0)
29
29
  faraday-net_http (~> 2.0)
30
30
  ruby2_keywords (>= 0.0.4)
31
- faraday-net_http (2.0.3)
31
+ faraday-net_http (2.1.0)
32
32
  faraday-rack (2.0.0)
33
33
  faraday (~> 2.0)
34
34
  i18n (1.10.0)
@@ -39,8 +39,9 @@ class Swagalicious
39
39
  schemes = security_version(scheme_names, swagger_doc)
40
40
 
41
41
  schemes.map do |scheme|
42
- param = (scheme[:type] == :apiKey) ? scheme.slice(:name, :in) : { name: "Authorization", in: :header }
43
- param.merge(type: :string, required: requirements.one?)
42
+ param = (scheme[:type] == :apiKey) ? scheme.slice(:name, :in, :required) : { name: "Authorization", in: :header }
43
+ param.merge(required: requirements.one?) unless param.has_key?(:required)
44
+ param.merge(type: :string)
44
45
  end
45
46
  end
46
47
 
@@ -1,3 +1,3 @@
1
1
  class Swagalicious
2
- VERSION = "0.4.7"
2
+ VERSION = "0.5.0"
3
3
  end
data/lib/swagalicious.rb CHANGED
@@ -4,7 +4,8 @@ require_relative "./swagalicious/version"
4
4
 
5
5
  begin
6
6
  require "rspec/rails"
7
- rescue nil
7
+ rescue LoadError
8
+ nil
8
9
  end
9
10
 
10
11
  class Swagalicious
data/swagalicious.gemspec CHANGED
@@ -27,10 +27,10 @@ Gem::Specification.new do |spec|
27
27
  spec.add_dependency "faraday", "~> 2.0"
28
28
  spec.add_dependency "faraday-rack"
29
29
  spec.add_dependency "json-schema"
30
- spec.add_dependency "oj", "~> 3.11.0"
30
+ spec.add_dependency "oj", "~> 3.11.0"
31
+ spec.add_dependency "rack-test", "~> 1.1.0"
31
32
  spec.add_dependency "rspec", "~> 3"
32
33
 
33
34
  spec.add_development_dependency "factory_bot", "~> 6.1.0"
34
35
  spec.add_development_dependency "pry-byebug", "~> 3.9.0"
35
- spec.add_development_dependency "rack-test", "~> 1.1.0"
36
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swagalicious
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugene Howe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-21 00:00:00.000000000 Z
11
+ date: 2022-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -67,61 +67,61 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: 3.11.0
69
69
  - !ruby/object:Gem::Dependency
70
- name: rspec
70
+ name: rack-test
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '3'
75
+ version: 1.1.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '3'
82
+ version: 1.1.0
83
83
  - !ruby/object:Gem::Dependency
84
- name: factory_bot
84
+ name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 6.1.0
90
- type: :development
89
+ version: '3'
90
+ type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 6.1.0
96
+ version: '3'
97
97
  - !ruby/object:Gem::Dependency
98
- name: pry-byebug
98
+ name: factory_bot
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 3.9.0
103
+ version: 6.1.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 3.9.0
110
+ version: 6.1.0
111
111
  - !ruby/object:Gem::Dependency
112
- name: rack-test
112
+ name: pry-byebug
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 1.1.0
117
+ version: 3.9.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 1.1.0
124
+ version: 3.9.0
125
125
  description: This gem is almost a straight copy and paste of https://github.com/rswag/rswag/tree/master/rswag-specs
126
126
  with the Rails specific code stripped out so it can be used in Rack applications
127
127
  that don't use Rails.
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  - !ruby/object:Gem::Version
176
176
  version: '0'
177
177
  requirements: []
178
- rubygems_version: 3.0.8
178
+ rubygems_version: 3.0.3.1
179
179
  signing_key:
180
180
  specification_version: 4
181
181
  summary: RSwag without Rails