Skip to content

Run CI against Rails 6 #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 12, 2020
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
33 changes: 22 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,28 @@ language: ruby
branches:
only:
- master
rvm:
- 2.3
gemfile:
- gemfiles/rails_4_2_pundit_1.gemfile
- gemfiles/rails_5_0_pundit_1.gemfile
- gemfiles/rails_5_1_pundit_1.gemfile
- gemfiles/rails_5_2_pundit_1.gemfile
- gemfiles/rails_4_2_pundit_2.gemfile
- gemfiles/rails_5_0_pundit_2.gemfile
- gemfiles/rails_5_1_pundit_2.gemfile
- gemfiles/rails_5_2_pundit_2.gemfile
jobs:
include:
- rvm: 2.3
gemfile: gemfiles/rails_4_2_pundit_1.gemfile
- rvm: 2.3
gemfile: gemfiles/rails_4_2_pundit_2.gemfile
- rvm: 2.5
gemfile: gemfiles/rails_5_0_pundit_1.gemfile
- rvm: 2.5
gemfile: gemfiles/rails_5_0_pundit_2.gemfile
- rvm: 2.5
gemfile: gemfiles/rails_5_1_pundit_1.gemfile
- rvm: 2.5
gemfile: gemfiles/rails_5_1_pundit_2.gemfile
- rvm: 2.5
gemfile: gemfiles/rails_5_2_pundit_1.gemfile
- rvm: 2.5
gemfile: gemfiles/rails_5_2_pundit_2.gemfile
- rvm: 2.5
gemfile: gemfiles/rails_6_0_pundit_1.gemfile
- rvm: 2.5
gemfile: gemfiles/rails_6_0_pundit_2.gemfile
before_install:
- gem install bundler -v '< 2'
notifications:
Expand Down
42 changes: 42 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,88 @@ appraise 'rails-4-2 pundit-1' do
gem 'rails', '4.2.0'
gem 'jsonapi-resources', '~> 0.9.0'
gem 'pundit', '~> 1.0'
group :development, :test do
gem 'sqlite3', '~> 1.3.13'
end
end

appraise 'rails-5-0 pundit-1' do
gem 'rails', '5.0.0'
gem 'jsonapi-resources', '~> 0.9.0'
gem 'pundit', '~> 1.0'
group :development, :test do
gem 'sqlite3', '~> 1.3.13'
end
end

appraise 'rails-5-1 pundit-1' do
gem "rails", "5.1.0"
gem 'jsonapi-resources', '~> 0.9.0'
gem 'pundit', '~> 1.0'
group :development, :test do
gem 'sqlite3', '~> 1.3.13'
end
end

appraise 'rails-5-2 pundit-1' do
gem 'rails', '5.2.0'
gem 'jsonapi-resources', '~> 0.9.0'
gem 'pundit', '~> 1.0'
group :development, :test do
gem 'sqlite3', '~> 1.3.13'
end
end

appraise 'rails-6-0 pundit-1' do
gem 'rails', '~> 6.0.0'
gem 'jsonapi-resources', '~> 0.9.0'
gem 'pundit', '~> 1.0'
group :development, :test do
gem 'sqlite3', '~> 1.4.1'
end
end

appraise 'rails-4-2 pundit-2' do
gem 'rails', '4.2.0'
gem 'jsonapi-resources', '~> 0.9.0'
gem 'pundit', '~> 2.0'
group :development, :test do
gem 'sqlite3', '~> 1.3.13'
end
end

appraise 'rails-5-0 pundit-2' do
gem 'rails', '5.0.0'
gem 'jsonapi-resources', '~> 0.9.0'
gem 'pundit', '~> 2.0'
group :development, :test do
gem 'sqlite3', '~> 1.3.13'
end
end

appraise 'rails-5-1 pundit-2' do
gem 'rails', '5.1.0'
gem 'jsonapi-resources', '~> 0.9.0'
gem 'pundit', '~> 2.0'
group :development, :test do
gem 'sqlite3', '~> 1.3.13'
end
end

appraise 'rails-5-2 pundit-2' do
gem 'rails', '5.2.0'
gem 'jsonapi-resources', '~> 0.9.0'
gem 'pundit', '~> 2.0'
group :development, :test do
gem 'sqlite3', '~> 1.3.13'
end
end

appraise 'rails-6-0 pundit-2' do
gem 'rails', '~> 6.0.0'
gem 'jsonapi-resources', '~> 0.9.0'
gem 'pundit', '~> 2.0'
group :development, :test do
gem 'sqlite3', '~> 1.4.1'
end
end
4 changes: 4 additions & 0 deletions gemfiles/rails_4_2_pundit_1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ gem "rails", "4.2.0"
gem "jsonapi-resources", "~> 0.9.0"
gem "pundit", "~> 1.0"

group :development, :test do
gem "sqlite3", "~> 1.3.13"
end

gemspec path: "../"
4 changes: 4 additions & 0 deletions gemfiles/rails_4_2_pundit_2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ gem "rails", "4.2.0"
gem "jsonapi-resources", "~> 0.9.0"
gem "pundit", "~> 2.0"

group :development, :test do
gem "sqlite3", "~> 1.3.13"
end

gemspec path: "../"
4 changes: 4 additions & 0 deletions gemfiles/rails_5_0_pundit_1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ gem "rails", "5.0.0"
gem "jsonapi-resources", "~> 0.9.0"
gem "pundit", "~> 1.0"

group :development, :test do
gem "sqlite3", "~> 1.3.13"
end

gemspec path: "../"
4 changes: 4 additions & 0 deletions gemfiles/rails_5_0_pundit_2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ gem "rails", "5.0.0"
gem "jsonapi-resources", "~> 0.9.0"
gem "pundit", "~> 2.0"

group :development, :test do
gem "sqlite3", "~> 1.3.13"
end

gemspec path: "../"
4 changes: 4 additions & 0 deletions gemfiles/rails_5_1_pundit_1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ gem "rails", "5.1.0"
gem "jsonapi-resources", "~> 0.9.0"
gem "pundit", "~> 1.0"

group :development, :test do
gem "sqlite3", "~> 1.3.13"
end

gemspec path: "../"
4 changes: 4 additions & 0 deletions gemfiles/rails_5_1_pundit_2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ gem "rails", "5.1.0"
gem "jsonapi-resources", "~> 0.9.0"
gem "pundit", "~> 2.0"

group :development, :test do
gem "sqlite3", "~> 1.3.13"
end

gemspec path: "../"
4 changes: 4 additions & 0 deletions gemfiles/rails_5_2_pundit_1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ gem "rails", "5.2.0"
gem "jsonapi-resources", "~> 0.9.0"
gem "pundit", "~> 1.0"

group :development, :test do
gem "sqlite3", "~> 1.3.13"
end

gemspec path: "../"
4 changes: 4 additions & 0 deletions gemfiles/rails_5_2_pundit_2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ gem "rails", "5.2.0"
gem "jsonapi-resources", "~> 0.9.0"
gem "pundit", "~> 2.0"

group :development, :test do
gem "sqlite3", "~> 1.3.13"
end

gemspec path: "../"
13 changes: 13 additions & 0 deletions gemfiles/rails_6_0_pundit_1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "rails", "~> 6.0.0"
gem "jsonapi-resources", "~> 0.9.0"
gem "pundit", "~> 1.0"

group :development, :test do
gem "sqlite3", "~> 1.4.1"
end

gemspec path: "../"
13 changes: 13 additions & 0 deletions gemfiles/rails_6_0_pundit_2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "rails", "~> 6.0.0"
gem "jsonapi-resources", "~> 0.9.0"
gem "pundit", "~> 2.0"

group :development, :test do
gem "sqlite3", "~> 1.4.1"
end

gemspec path: "../"
2 changes: 1 addition & 1 deletion jsonapi-authorization.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "pry-rails"
spec.add_development_dependency "rubocop", "~> 0.36.0"
spec.add_development_dependency "phare", "~> 0.7.1"
spec.add_development_dependency "sqlite3", "~> 1.3.6"
spec.add_development_dependency "sqlite3", "~> 1.3"
end
Empty file.
2 changes: 2 additions & 0 deletions spec/dummy/app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class ApplicationController < ActionController::Base
end
2 changes: 1 addition & 1 deletion spec/dummy/app/controllers/articles_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class ArticlesController < ActionController::Base
class ArticlesController < ApplicationController
include JSONAPI::ActsAsResourceController
rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized

Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/app/controllers/comments_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CommentsController < ActionController::Base
class CommentsController < ApplicationController
include JSONAPI::ActsAsResourceController
rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized

Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/app/controllers/tags_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class TagsController < ActionController::Base
class TagsController < ApplicationController
include JSONAPI::ActsAsResourceController
rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized

Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class UsersController < ActionController::Base
class UsersController < ApplicationController
include JSONAPI::ActsAsResourceController
rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized

Expand Down