Skip to content

Commit

Permalink
Update build matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
mshibuya committed May 3, 2018
1 parent e4c657f commit d81dd95
Show file tree
Hide file tree
Showing 15 changed files with 64 additions and 50 deletions.
44 changes: 21 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
- JRUBY_OPTS="$JRUBY_OPTS --debug"

rvm:
- 2.3.6
- 2.3.7

gemfile:
- gemfiles/rails_4.0.gemfile
Expand All @@ -44,54 +44,52 @@ matrix:
- rvm: 2.1.10
env: CI_ORM=active_record CI_DB_ADAPTER=sqlite3
gemfile: gemfiles/rails_4.2.gemfile
- rvm: 2.2.9
- rvm: 2.2.10
env: CI_ORM=mongoid
gemfile: gemfiles/rails_5.1.gemfile
- rvm: 2.2.9
gemfile: gemfiles/rails_5.2.gemfile
- rvm: 2.2.10
env: CI_ORM=active_record CI_DB_ADAPTER=sqlite3
gemfile: gemfiles/rails_5.1.gemfile
- rvm: 2.3.6
gemfile: gemfiles/rails_5.2.gemfile
- rvm: 2.3.7
env: CI_ORM=active_record CI_DB_ADAPTER=mysql2
gemfile: gemfiles/rails_5.1.gemfile
- rvm: 2.3.6
gemfile: gemfiles/rails_5.2.gemfile
- rvm: 2.3.7
env: CI_ORM=active_record CI_DB_ADAPTER=postgresql CI_DB_USERNAME=postgres
gemfile: gemfiles/rails_5.1.gemfile
- rvm: 2.4.3
gemfile: gemfiles/rails_5.2.gemfile
- rvm: 2.4.4
env: CI_ORM=mongoid
gemfile: gemfiles/rails_5.1.gemfile
- rvm: 2.4.3
gemfile: gemfiles/rails_5.2.gemfile
- rvm: 2.4.4
env: CI_ORM=active_record CI_DB_ADAPTER=sqlite3
gemfile: gemfiles/rails_5.1.gemfile
- rvm: 2.5.0
gemfile: gemfiles/rails_5.2.gemfile
- rvm: 2.5.1
env: CI_ORM=mongoid
gemfile: gemfiles/rails_5.1.gemfile
- rvm: 2.5.0
gemfile: gemfiles/rails_5.2.gemfile
- rvm: 2.5.1
env: CI_ORM=active_record CI_DB_ADAPTER=sqlite3
gemfile: gemfiles/rails_5.1.gemfile
gemfile: gemfiles/rails_5.2.gemfile
- rvm: ruby-head
env: CI_ORM=mongoid
gemfile: gemfiles/rails_5.1.gemfile
gemfile: gemfiles/rails_5.2.gemfile
- rvm: ruby-head
env: CI_ORM=active_record CI_DB_ADAPTER=sqlite3
gemfile: gemfiles/rails_5.1.gemfile
gemfile: gemfiles/rails_5.2.gemfile
- rvm: rbx-2.2.7
env: CI_ORM=active_record CI_DB_ADAPTER=sqlite3
gemfile: gemfiles/rails_4.2.gemfile
- rvm: jruby-9.1.9.0
env: CI_ORM=mongoid
gemfile: gemfiles/rails_5.0.gemfile
gemfile: gemfiles/rails_5.1.gemfile
- rvm: jruby-9.1.9.0
env: CI_ORM=active_record CI_DB_ADAPTER=sqlite3
gemfile: gemfiles/rails_5.0.gemfile
gemfile: gemfiles/rails_5.1.gemfile
- rvm: jruby-head
env: CI_ORM=active_record CI_DB_ADAPTER=sqlite3
gemfile: gemfiles/rails_5.1.gemfile
allow_failures:
- rvm: 2.4.3
- rvm: ruby-head
- rvm: rbx-2.2.7
- rvm: jruby-head
- gemfile: gemfiles/rails_5.2.gemfile
fast_finish: true

notifications:
Expand Down
17 changes: 12 additions & 5 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,14 @@ appraise "rails-5.1" do
gem 'devise', '~> 4.0'

group :active_record do
gem 'pg', '~> 0.14'
gem 'pg', '~> 0.14', platforms: :ruby
gem 'paper_trail', '>= 5.0'

platforms :jruby do
gem 'activerecord-jdbcmysql-adapter', '~> 51.0'
gem 'activerecord-jdbcpostgresql-adapter', github: "jruby/activerecord-jdbc-adapter"
gem 'activerecord-jdbcsqlite3-adapter', '~> 51.0'
end
end

group :mongoid do
Expand All @@ -131,17 +137,18 @@ appraise "rails-5.1" do
end

appraise "rails-5.2" do
gem 'rails', '~> 5.2.0.rc1'
gem 'rails', '~> 5.2.0'
gem 'sass-rails', '~> 5.0'
gem 'devise', github: 'plataformatec/devise'
gem 'devise', '~> 4.4'

group :active_record do
gem 'pg', '>= 1.0.0'
gem 'pg', '>= 1.0.0', platforms: :ruby
gem 'cancancan', '~> 1.12', github: 'mshibuya/cancancan', branch: 'topic-backport-rails-5-2-support-to-1-x'
gem 'paper_trail', '>= 5.0'
end

group :mongoid do
gem 'mongoid', '>= 7.0.0.beta'
gem 'mongoid', '~> 6.4'
gem 'kaminari-mongoid'
gem 'mongoid-paperclip', '>= 0.0.8', require: 'mongoid_paperclip'
gem 'carrierwave-mongoid', '>= 0.6.3', require: 'carrierwave/mongoid'
Expand Down
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ group :active_record do
gem 'paper_trail'

platforms :ruby, :mswin, :mingw do
gem 'mysql2', '~> 0.3.14'
gem 'mysql2', '>= 0.3.14'
gem 'sqlite3', '>= 1.3'
end
end
Expand All @@ -20,7 +20,6 @@ end

group :test do
gem 'cancan', '>= 1.6'
gem 'cancancan', '~> 1.12.0'
gem 'carrierwave', '>= 0.8'
gem 'coveralls'
gem 'database_cleaner', ['>= 1.2', '!= 1.4.0', '!= 1.5.0']
Expand Down
3 changes: 1 addition & 2 deletions gemfiles/rails_4.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ group :active_record do
gem "paper_trail", "~> 5.0"

platforms :ruby, :mswin, :mingw do
gem "mysql2", "~> 0.3.14"
gem "mysql2", ">= 0.3.14"
gem "sqlite3", ">= 1.3"
end

Expand All @@ -32,7 +32,6 @@ end

group :test do
gem "cancan", ">= 1.6"
gem "cancancan", "~> 1.12.0"
gem "carrierwave", ">= 0.8"
gem "coveralls"
gem "database_cleaner", [">= 1.2", "!= 1.4.0", "!= 1.5.0"]
Expand Down
3 changes: 1 addition & 2 deletions gemfiles/rails_4.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ group :active_record do
gem "paper_trail", ">= 5.0"

platforms :ruby, :mswin, :mingw do
gem "mysql2", "~> 0.3.14"
gem "mysql2", ">= 0.3.14"
gem "sqlite3", ">= 1.3"
end

Expand All @@ -29,7 +29,6 @@ end

group :test do
gem "cancan", ">= 1.6"
gem "cancancan", "~> 1.12.0"
gem "carrierwave", ">= 0.8"
gem "coveralls"
gem "database_cleaner", [">= 1.2", "!= 1.4.0", "!= 1.5.0"]
Expand Down
3 changes: 1 addition & 2 deletions gemfiles/rails_4.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ group :active_record do
gem "paper_trail", ">= 5.0"

platforms :ruby, :mswin, :mingw do
gem "mysql2", "~> 0.3.14"
gem "mysql2", ">= 0.3.14"
gem "sqlite3", ">= 1.3"
end

Expand All @@ -30,7 +30,6 @@ end

group :test do
gem "cancan", ">= 1.6"
gem "cancancan", "~> 1.12.0"
gem "carrierwave", ">= 0.8"
gem "coveralls"
gem "database_cleaner", [">= 1.2", "!= 1.4.0", "!= 1.5.0"]
Expand Down
3 changes: 1 addition & 2 deletions gemfiles/rails_5.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ group :active_record do
gem "paper_trail", ">= 5.0"

platforms :ruby, :mswin, :mingw do
gem "mysql2", "~> 0.3.14"
gem "mysql2", ">= 0.3.14"
gem "sqlite3", ">= 1.3"
end

Expand All @@ -29,7 +29,6 @@ end

group :test do
gem "cancan", ">= 1.6"
gem "cancancan", "~> 1.12.0"
gem "carrierwave", ">= 0.8"
gem "coveralls"
gem "database_cleaner", [">= 1.2", "!= 1.4.0", "!= 1.5.0"]
Expand Down
11 changes: 8 additions & 3 deletions gemfiles/rails_5.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ gem "sass-rails", "~> 5.0"

group :active_record do
gem "paper_trail", ">= 5.0"
gem "pg", "~> 0.14"
gem "pg", "~> 0.14", platforms: :ruby

platforms :ruby, :mswin, :mingw do
gem "mysql2", "~> 0.3.14"
gem "mysql2", ">= 0.3.14"
gem "sqlite3", ">= 1.3"
end

platforms :jruby do
gem "activerecord-jdbcmysql-adapter", "~> 51.0"
gem "activerecord-jdbcpostgresql-adapter", github: "jruby/activerecord-jdbc-adapter"
gem "activerecord-jdbcsqlite3-adapter", "~> 51.0"
end
end

group :development, :test do
Expand All @@ -24,7 +30,6 @@ end

group :test do
gem "cancan", ">= 1.6"
gem "cancancan", "~> 1.12.0"
gem "carrierwave", ">= 0.8"
gem "coveralls"
gem "database_cleaner", [">= 1.2", "!= 1.4.0", "!= 1.5.0"]
Expand Down
12 changes: 6 additions & 6 deletions gemfiles/rails_5.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
source "https://rubygems.org"

gem "appraisal", ">= 2.0"
gem "rails", "~> 5.2.0.rc1"
gem "rails", "~> 5.2.0"
gem "haml"
gem "devise", github: "plataformatec/devise"
gem "devise", "~> 4.4"
gem "sass-rails", "~> 5.0"

group :active_record do
gem "paper_trail", ">= 5.0"
gem "pg", ">= 1.0.0"
gem "pg", ">= 1.0.0", platforms: :ruby
gem "cancancan", "~> 1.12", github: "mshibuya/cancancan", branch: "topic-backport-rails-5-2-support-to-1-x"

platforms :ruby, :mswin, :mingw do
gem "mysql2", "~> 0.3.14"
gem "mysql2", ">= 0.3.14"
gem "sqlite3", ">= 1.3"
end
end
Expand All @@ -24,7 +25,6 @@ end

group :test do
gem "cancan", ">= 1.6"
gem "cancancan", "~> 1.12.0"
gem "carrierwave", ">= 0.8"
gem "coveralls"
gem "database_cleaner", [">= 1.2", "!= 1.4.0", "!= 1.5.0"]
Expand All @@ -48,7 +48,7 @@ group :test do
end

group :mongoid do
gem "mongoid", ">= 7.0.0.beta"
gem "mongoid", "~> 6.4"
gem "kaminari-mongoid"
gem "mongoid-paperclip", ">= 0.0.8", require: "mongoid_paperclip"
gem "carrierwave-mongoid", ">= 0.6.3", require: "carrierwave/mongoid"
Expand Down
1 change: 1 addition & 0 deletions rails_admin.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'remotipart', '~> 1.3'
spec.add_dependency 'sass-rails', ['>= 4.0', '< 6']
spec.add_development_dependency 'bundler', '~> 1.0'
spec.add_development_dependency 'cancancan', '~> 1.12'
spec.authors = ['Erik Michaels-Ober', 'Bogdan Gaza', 'Petteri Kaapa', 'Benoit Benezech', 'Mitsuhiro Shibuya']
spec.description = 'RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data.'
spec.email = ['sferik@gmail.com', 'bogdan@cadmio.org', 'petteri.kaapa@gmail.com']
Expand Down
1 change: 1 addition & 0 deletions spec/dummy_app/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ class Application < Rails::Application
config.i18n.load_path += Dir[Rails.root.join('app', 'locales', '*.{rb,yml}').to_s]
config.active_record.raise_in_transactional_callbacks = true if Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR == 2 && CI_ORM == :active_record
config.active_record.time_zone_aware_types = [:datetime, :time] if Rails::VERSION::MAJOR >= 5 && CI_ORM == :active_record
config.active_record.sqlite3.represent_boolean_as_integer = true if CI_ORM == :active_record && config.active_record.sqlite3.respond_to?(:represent_boolean_as_integer=)
end
end
1 change: 1 addition & 0 deletions spec/integration/authorization/cancan_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def initialize(user)
subject { page }

before do
skip "CanCan does not work with ActiveRecord >= 5.2" if CI_ORM == :active_record && ActiveRecord::VERSION::STRING >= '5.2'
RailsAdmin.config do |c|
c.authorize_with(:cancan)
c.authenticate_with { warden.authenticate! scope: :user }
Expand Down
1 change: 1 addition & 0 deletions spec/integration/history/rails_admin_paper_trail_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

describe 'RailsAdmin PaperTrail history', active_record: true do
before(:each) do
skip 'Requires Ruby >= 2.3' if Rails::VERSION::STRING >= '5.2' && RUBY_VERSION =~ /^2\.2/
RailsAdmin.config do |config|
config.audit_with :paper_trail, 'User', 'PaperTrail::Version'
end
Expand Down
10 changes: 7 additions & 3 deletions spec/orm/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,20 @@ def silence_stream(stream)

class Tableless < ActiveRecord::Base
class <<self
def load_schema
# do nothing
end

def columns
@columns ||= []
end

def column(name, sql_type = nil, default = nil, null = true)
define_attribute(name.to_s,
connection.lookup_cast_type(sql_type.to_s)) if ActiveRecord::VERSION::MAJOR >= 5
connection.send(:lookup_cast_type, sql_type.to_s)) if ActiveRecord::VERSION::MAJOR >= 5
columns <<
if connection.respond_to?(:lookup_cast_type)
ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, connection.lookup_cast_type(sql_type.to_s), sql_type.to_s, null)
if connection.respond_to?(:lookup_cast_type, true)
ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, connection.send(:lookup_cast_type, sql_type.to_s), sql_type.to_s, null)
else
ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, sql_type.to_s, null)
end
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def password_digest(password)

require 'capybara/poltergeist'
Capybara.javascript_driver = :poltergeist
Capybara.server = :webrick

RSpec.configure do |config|
config.expect_with :rspec do |c|
Expand Down

0 comments on commit d81dd95

Please sign in to comment.