Skip to content

Commit

Permalink
Build running against Rails5
Browse files Browse the repository at this point in the history
  • Loading branch information
Siva Gollapalli committed Jul 15, 2016
1 parent 74d9710 commit 113d24e
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,19 @@ gemfile:
- gemfiles/rails4.gemfile
- gemfiles/rails41.gemfile
- gemfiles/rails42.gemfile
- gemfiles/rails5.gemfile
matrix:
exclude:
- rvm: 1.9.2
gemfile: gemfiles/mongoid3.gemfile
- rvm: 1.9.2
gemfile: gemfiles/rails4.gemfile
- rvm: 1.9.3
gemfile: gemfiles/rails5.gemfile
- rvm: 2.0.0
gemfile: gemfiles/rails5.gemfile
- rvm: 2.1.8
gemfile: gemfiles/rails5.gemfile
notifications:
recipients:
- [email protected]
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ group :development do
gem 'guard'
gem 'guard-rspec'
gem 'guard-rails'
end
end
8 changes: 6 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ task :spec => :prepare_test_env
desc "Prepare money-rails engine test environment"
task :prepare_test_env do
Rake.application['app:db:drop:all'].invoke
Rake.application['app:db:create'].invoke if Rails::VERSION::MAJOR >= 5
Rake.application['app:db:migrate'].invoke
Rake.application['app:db:test:prepare'].invoke
end
Expand All @@ -48,6 +49,9 @@ namespace :spec do
desc "Run Tests against mongoid (version 2)"
task(:mongoid2) { run_with_gemfile 'gemfiles/mongoid2.gemfile' }

desc "Run Tests against rails 5.0"
task(:rails50) { run_with_gemfile 'gemfiles/rails50.gemfile' }

desc "Run Tests against rails 4.2"
task(:rails42) { run_with_gemfile 'gemfiles/rails42.gemfile' }

Expand All @@ -63,8 +67,8 @@ namespace :spec do
desc "Run Tests against mongoid 2 & 3 & 4"
task :mongoid => [:mongoid2, :mongoid3, :mongoid4]

desc "Run Tests against rails 3 & 4 & 4.1 & 4.2"
task :rails => [:rails3, :rails4, :rails41, :rails42]
desc "Run Tests against rails 3 & 4 & 4.1 & 4.2 & 5.0"
task :rails => [:rails3, :rails4, :rails41, :rails42, :rails5]

desc "Run Tests against all ORMs"
task :all => [:rails, :mongoid]
Expand Down
15 changes: 15 additions & 0 deletions gemfiles/rails5.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
source 'https://rubygems.org'

gem 'rails', '~> 5.0.0'

platforms :jruby do
gem "activerecord-jdbc-adapter"
gem "activerecord-jdbcsqlite3-adapter"
gem "jruby-openssl"
end

platforms :ruby do
gem "sqlite3"
end

gemspec :path => '../'
2 changes: 1 addition & 1 deletion spec/dummy/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
unless Rails::VERSION::MAJOR == 4
unless Rails::VERSION::MAJOR >= 4
require "active_resource/railtie"
end
require "sprockets/railtie"
Expand Down
1 change: 0 additions & 1 deletion spec/dummy/db/schema.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
Expand Down

0 comments on commit 113d24e

Please sign in to comment.