Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apivore.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Gem::Specification.new do |s|
# Hack to support currently suported ruby versions
# TODO: remove and explicitly require ruby 2.2.2 as min version in version 2 of apivore
if RUBY_VERSION >= '2.2.2'
s.add_runtime_dependency 'actionpack', '~> 6'
s.add_development_dependency 'activesupport', '~> 6'
s.add_runtime_dependency 'actionpack', '>= 4'
s.add_development_dependency 'activesupport', '>= 4'
else
s.add_runtime_dependency 'actionpack', '< 5'
s.add_development_dependency 'activesupport', '< 5'
Expand Down
9 changes: 4 additions & 5 deletions lib/apivore/validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ def matches?(swagger_checker)
pre_checks(swagger_checker)

unless has_errors?
args = RailsShim.action_dispatch_request_args(full_path(swagger_checker), params: params['_data'] || {}, headers: params['_headers'] || {})

send(
method,
*RailsShim.action_dispatch_request_args(
full_path(swagger_checker),
params: params['_data'] || {},
headers: params['_headers'] || {}
)
args[0],
**args[1]
)
swagger_checker.response = response
post_checks(swagger_checker)
Expand Down