Skip to content

Commit

Permalink
Added support for Grape 0.15.x, part of ruby-grape#407.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed May 6, 2016
1 parent 586b48b commit 3f682b4
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 17 deletions.
34 changes: 23 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,29 @@ language: ruby

sudo: false

rvm:
- 2.3.1
- 2.2.5
- jruby-9.0.5.0
- rbx-2
allow_failures:
- rvm: ruby-head
- rvm: jruby-head
- rvm: rbx-2

matrix:
allow_failures:
include:
- rvm: 2.3.1
env: GRAPE_VERSION=0.12.0
- rvm: 2.3.1
env: GRAPE_VERSION=0.13.0
- rvm: 2.3.1
env: GRAPE_VERSION=0.14.0
- rvm: 2.3.1
env: GRAPE_VERSION=0.15.0
# - rvm: 2.3.1
# env: GRAPE_VERSION=0.16.0
# - rvm: 2.3.1
# env: GRAPE_VERSION=HEAD
- rvm: 2.3.9
- rvm: 2.2.5
- rvm: rbx-2
env:
- GRAPE_VERSION=0.12.0
- GRAPE_VERSION=0.13.0
- GRAPE_VERSION=0.14.0
# - GRAPE_VERSION=HEAD
- rvm: jruby-19mode
- rvm: ruby-head
- rvm: jruby-head

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* [#406](https://github.com/ruby-grape/grape-swagger/pull/406): Force usage of entities for response definition [issue #385](https://github.com/ruby-grape/grape-swagger/issues/385) - [@LeFnord](https://github.com/LeFnord).
* [#405](https://github.com/ruby-grape/grape-swagger/pull/405), [#403](https://github.com/ruby-grape/grape-swagger/issues/403): Added version support matrix - [@LeFnord](https://github.com/LeFnord).
* [#408](https://github.com/ruby-grape/grape-swagger/pull/408): Added support for `HEAD` endpoints - [@Bugagazavr](https://github.com/Bugagazavr).
* [#407](https://github.com/ruby-grape/grape-swagger/issues/407): Added support for Grape 0.15.x - [@dblock](https://github.com/dblock).
* Your contribution here.

#### Fixes
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source 'http://rubygems.org'

gemspec

case version = ENV['GRAPE_VERSION'] || '<= 0.14.0'
case version = ENV['GRAPE_VERSION'] || '~> 0.15.0'
when 'HEAD'
gem 'grape', github: 'ruby-grape/grape'
else
Expand Down
2 changes: 1 addition & 1 deletion grape-swagger.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Gem::Specification.new do |s|
s.summary = 'A simple way to add auto generated documentation to your Grape API that can be displayed with Swagger.'
s.license = 'MIT'

s.add_runtime_dependency 'grape', ['>= 0.12.0', '<= 0.14.0']
s.add_runtime_dependency 'grape', ['>= 0.12.0', '< 0.16.0']
s.add_runtime_dependency 'grape-entity'
s.add_runtime_dependency 'awesome_print'

Expand Down
4 changes: 0 additions & 4 deletions spec/swagger_v2/api_swagger_v2_type-format_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ class TypeFormatApi < Grape::API
requires :param_date, type: Date
requires :param_date_time, type: DateTime
requires :param_time, type: Time
requires :param_password, type: 'password'
requires :param_email, type: 'email'
optional :param_boolean, type: Boolean
optional :param_file, type: File
optional :param_json, type: JSON
Expand Down Expand Up @@ -92,8 +90,6 @@ def app
{"in"=>"formData", "name"=>"param_date", "required"=>true, "type"=>"string", "format"=>"date"},
{"in"=>"formData", "name"=>"param_date_time", "required"=>true, "type"=>"string", "format"=>"date-time"},
{"in"=>"formData", "name"=>"param_time", "required"=>true, "type"=>"string", "format"=>"date-time"},
{"in"=>"formData", "name"=>"param_password", "required"=>true, "type"=>"string", "format"=>"password"},
{"in"=>"formData", "name"=>"param_email", "required"=>true, "type"=>"string", "format"=>"email"},
{"in"=>"formData", "name"=>"param_boolean", "required"=>false, "type"=>"boolean"},
{"in"=>"formData", "name"=>"param_file", "required"=>false, "type"=>"file"},
{"in"=>"formData", "name"=>"param_json", "required"=>false, "type"=>"json"}
Expand Down

0 comments on commit 3f682b4

Please sign in to comment.