apivore 1.6.1 → 1.6.2

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
  SHA1:
3
- metadata.gz: 3ccb1d003dcfde3fd9380e269e68ab8508dc3ea3
4
- data.tar.gz: 129a68adb58d2c2343043209ee6a0890c84467eb
3
+ metadata.gz: df7276fd82f9182dfdce936aadce0e7ecda7a8f1
4
+ data.tar.gz: 128a3b94b70ff30428e2ca2ddd082e003a3ae4b4
5
5
  SHA512:
6
- metadata.gz: 6cf7104fc97eb0d6d49f487ba500a1763220a1a91b4b00d01d635f6042ebab93724fc6923fef3bf17144492a7f1668c22d0b9a13ce9be70bc4cb0147154898a5
7
- data.tar.gz: 6cf05be9baf494126752d8013fa8b9c1da9bca1c2ca1a3567f36c749241939e3d718d3789647c3d706383533f89b53bf25b8cba2f1fcea8d96a36540104646ea
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
@@ -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
- full_path(swagger_checker),
24
- params['_data'] || {},
25
- params['_headers'] || {}
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)
@@ -0,0 +1,3 @@
1
+ module Apivore
2
+ VERSION = "1.6.2"
3
+ end
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.1
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: 2016-02-24 00:00:00.000000000 Z
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: activesupport
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: :development
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: actionpack
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: :runtime
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