Skip to content
Merged
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
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ env:
- "RAILS_VERSION=5.0.7.2"
- "RAILS_VERSION=5.1.7"
- "RAILS_VERSION=5.2.3"
# - "RAILS_VERSION=6.0.0.beta1"
- "RAILS_VERSION=6.0.0"
# - "RAILS_VERSION=master"
rvm:
- 2.3.8
Expand All @@ -19,5 +19,9 @@ matrix:
exclude:
- rvm: 2.6.4
env: "RAILS_VERSION=4.2.11"
- rvm: 2.3.8
env: "RAILS_VERSION=6.0.0"
- rvm: 2.4.7
env: "RAILS_VERSION=6.0.0"
before_install:
- gem install bundler --version 1.17.3
- gem install bundler --version 1.17.3
14 changes: 9 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,26 @@ source 'https://rubygems.org'

gemspec

platforms :ruby do
gem 'sqlite3', '1.3.10'
end

platforms :jruby do
gem 'activerecord-jdbcsqlite3-adapter'
end

version = ENV['RAILS_VERSION'] || 'default'

platforms :ruby do
if version.start_with?('4.2', '5.0')
gem 'sqlite3', '~> 1.3.13'
else
gem 'sqlite3', '~> 1.4'
end
end

case version
when 'master'
gem 'railties', { git: 'https://github.com/rails/rails.git' }
gem 'arel', { git: 'https://github.com/rails/arel.git' }
when 'default'
gem 'railties', '>= 5.0'
gem 'railties', '>= 6.0'
else
gem 'railties', "~> #{version}"
end
3 changes: 2 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,8 @@ class ActionDispatch::IntegrationTest
fixtures :all

def assert_jsonapi_response(expected_status, msg = nil)
assert_equal JSONAPI::MEDIA_TYPE, response.content_type
media_type = Rails::VERSION::MAJOR >= 6 ? response.media_type : response.content_type
assert_equal JSONAPI::MEDIA_TYPE, media_type
if status != expected_status && status >= 400
pp json_response rescue nil
end
Expand Down