apivore 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/apivore/rails_shim.rb +13 -0
- data/lib/apivore/validator.rb +6 -3
- data/lib/apivore/version.rb +3 -0
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df7276fd82f9182dfdce936aadce0e7ecda7a8f1
|
4
|
+
data.tar.gz: 128a3b94b70ff30428e2ca2ddd082e003a3ae4b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e118f56e5b6dbfed0746657ea26d0ba9301516eeabf9aa06d64d7c178d2a8cccafcefbbd9feb03a42d902c09a054fbadb598401bb4b75cf0b99aecce66432a5
|
7
|
+
data.tar.gz: 5c866ee6a995cb8480a72749f56f3e35d33386025c200945bba08a2fe9d9245aaaa773f93321de1eb366dba1fde2ae9c489be1d06b896ba45ad975e9c9d87429
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Apivore
|
2
|
+
class RailsShim
|
3
|
+
class << self
|
4
|
+
def action_dispatch_request_args(path, params: {}, headers: {})
|
5
|
+
if ActionPack::VERSION::MAJOR >= 5
|
6
|
+
[path, params: params, headers: headers]
|
7
|
+
else
|
8
|
+
[path, params, headers]
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/apivore/validator.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'action_controller'
|
2
2
|
require 'action_dispatch'
|
3
|
+
require 'apivore/rails_shim'
|
3
4
|
|
4
5
|
module Apivore
|
5
6
|
class Validator
|
@@ -20,9 +21,11 @@ module Apivore
|
|
20
21
|
unless has_errors?
|
21
22
|
send(
|
22
23
|
method,
|
23
|
-
|
24
|
-
|
25
|
-
|
24
|
+
*RailsShim.action_dispatch_request_args(
|
25
|
+
full_path(swagger_checker),
|
26
|
+
params: params['_data'] || {},
|
27
|
+
headers: params['_headers'] || {}
|
28
|
+
)
|
26
29
|
)
|
27
30
|
swagger_checker.response = response
|
28
31
|
post_checks(swagger_checker)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apivore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charles Horn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json-schema
|
@@ -123,7 +123,7 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '3'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: actionpack
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - ">="
|
@@ -132,7 +132,7 @@ dependencies:
|
|
132
132
|
- - "<"
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: '6'
|
135
|
-
type: :
|
135
|
+
type: :runtime
|
136
136
|
prerelease: false
|
137
137
|
version_requirements: !ruby/object:Gem::Requirement
|
138
138
|
requirements:
|
@@ -143,7 +143,7 @@ dependencies:
|
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '6'
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
|
-
name:
|
146
|
+
name: activesupport
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
149
|
- - ">="
|
@@ -152,7 +152,7 @@ dependencies:
|
|
152
152
|
- - "<"
|
153
153
|
- !ruby/object:Gem::Version
|
154
154
|
version: '6'
|
155
|
-
type: :
|
155
|
+
type: :development
|
156
156
|
prerelease: false
|
157
157
|
version_requirements: !ruby/object:Gem::Requirement
|
158
158
|
requirements:
|
@@ -190,11 +190,13 @@ files:
|
|
190
190
|
- lib/apivore/all_routes_tested_validator.rb
|
191
191
|
- lib/apivore/custom_schema_validator.rb
|
192
192
|
- lib/apivore/fragment.rb
|
193
|
+
- lib/apivore/rails_shim.rb
|
193
194
|
- lib/apivore/rspec_helpers.rb
|
194
195
|
- lib/apivore/rspec_matchers.rb
|
195
196
|
- lib/apivore/swagger.rb
|
196
197
|
- lib/apivore/swagger_checker.rb
|
197
198
|
- lib/apivore/validator.rb
|
199
|
+
- lib/apivore/version.rb
|
198
200
|
homepage: http://github.com/westfieldlabs/apivore
|
199
201
|
licenses:
|
200
202
|
- Apache 2.0
|