Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #278 from yuki24/test-against-rails-51-and-edge
Test against Rails 5.1 and edge
  • Loading branch information
Craig McNamara committed Apr 27, 2018
2 parents 3a1cf00 + 1b0676f commit 3aab6e3
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -12,6 +12,8 @@ gemfile:
- gemfiles/rails40.gemfile
- gemfiles/rails42.gemfile
- gemfiles/rails50.gemfile
- gemfiles/rails51.gemfile
- gemfiles/rails_edge.gemfile
matrix:
exclude:
- rvm: 2.4.0
Expand All @@ -30,3 +32,4 @@ matrix:
allow_failures:
- rvm: ruby-head
- rvm: jruby-head
- gemfile: gemfiles/rails_edge.gemfile
15 changes: 15 additions & 0 deletions Appraisals
Expand Up @@ -27,3 +27,18 @@ appraise "rails50" do
gem "sprockets", "< 4.0"
gem "sass-rails", "~> 5.0"
end

appraise "rails51" do
gem "rails", "~> 5.1.0"
gem "sprockets", "< 4.0"
gem "sass-rails", "~> 5.0"
end

appraise "rails_edge" do
git 'git://github.com/rails/rails.git' do
gem "rails"
end

gem "sprockets", "< 4.0"
gem "sass-rails", "~> 5.0"
end
19 changes: 19 additions & 0 deletions gemfiles/rails51.gemfile
@@ -0,0 +1,19 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "rb-fsevent", require: false
gem "ruby_gntp", require: false
gem "guard"
gem "guard-test"
gem "rails", "~> 5.1.0"
gem "sprockets", "< 4.0"
gem "sass-rails", "~> 5.0"

group :test do
gem "mocha"
gem "appraisal"
gem "minitest"
end

gemspec path: "../"
22 changes: 22 additions & 0 deletions gemfiles/rails_edge.gemfile
@@ -0,0 +1,22 @@
# This file was generated by Appraisal

source "https://rubygems.org"

git "git://github.com/rails/rails.git" do
gem "rails"
end

gem "rb-fsevent", require: false
gem "ruby_gntp", require: false
gem "guard"
gem "guard-test"
gem "sprockets", "< 4.0"
gem "sass-rails", "~> 5.0"

group :test do
gem "mocha"
gem "appraisal"
gem "minitest"
end

gemspec path: "../"
6 changes: 6 additions & 0 deletions test/helpers/rails_helper.rb
Expand Up @@ -4,6 +4,8 @@ module RailsHelpers
include FileHelper
include DebugHelper
include CommandHelper
RAILS_5_2 = "5.2"
RAILS_5_1 = "5.1"
RAILS_5_0 = "5.0"
RAILS_4_2 = "4.2"
RAILS_4_0 = "4.0"
Expand All @@ -13,6 +15,8 @@ module RailsHelpers
WORKING_DIR = File.join(ROOT_PATH, 'rails-temp')

VERSION_LOOKUP = {
RAILS_5_2 => %r{^5\.2\.},
RAILS_5_1 => %r{^5\.1\.},
RAILS_5_0 => %r{^5\.0\.},
RAILS_4_2 => %r{^4\.2\.},
RAILS_4_0 => %r{^4\.0\.},
Expand All @@ -21,6 +25,8 @@ module RailsHelpers
}

GEMFILES = {
RAILS_5_2 => GEMFILES_DIR.join("rails_edge.gemfile").to_s,
RAILS_5_1 => GEMFILES_DIR.join("rails51.gemfile").to_s,
RAILS_5_0 => GEMFILES_DIR.join("rails50.gemfile").to_s,
RAILS_4_2 => GEMFILES_DIR.join("rails42.gemfile").to_s,
RAILS_4_0 => GEMFILES_DIR.join("rails40.gemfile").to_s,
Expand Down

0 comments on commit 3aab6e3

Please sign in to comment.