From a28e633aa2b91d9ddbbbb02ac7366671ddf33952 Mon Sep 17 00:00:00 2001 From: Kenta Suzuki Date: Thu, 6 Apr 2017 17:20:14 +0900 Subject: [PATCH 1/6] test against ruby2.3, 2.4 rails4.2, rails5.0, rails5.1 --- .travis.yml | 5 +++++ gemfiles/Gemfile-rails.4.2.x | 20 ++++++++++++++++++++ gemfiles/Gemfile-rails.5.0.x | 20 ++++++++++++++++++++ gemfiles/Gemfile-rails.5.1.x | 20 ++++++++++++++++++++ 4 files changed, 65 insertions(+) create mode 100644 gemfiles/Gemfile-rails.4.2.x create mode 100644 gemfiles/Gemfile-rails.5.0.x create mode 100644 gemfiles/Gemfile-rails.5.1.x diff --git a/.travis.yml b/.travis.yml index d00ec13..05d588e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ language: ruby sudo: false rvm: + - 2.4.1 + - 2.3.4 - 2.2.0 - 2.1.0 - 2.0.0 @@ -10,6 +12,9 @@ gemfile: - gemfiles/Gemfile-rails.3.2.x - gemfiles/Gemfile-rails.4.0.x - gemfiles/Gemfile-rails.4.1.x + - gemfiles/Gemfile-rails.4.2.x + - gemfiles/Gemfile-rails.5.0.x + - gemfiles/Gemfile-rails.5.1.x before_script: - "cd test/dummy; rake db:migrate; rake db:test:prepare; cd ../.." notifications: diff --git a/gemfiles/Gemfile-rails.4.2.x b/gemfiles/Gemfile-rails.4.2.x new file mode 100644 index 0000000..6c71a53 --- /dev/null +++ b/gemfiles/Gemfile-rails.4.2.x @@ -0,0 +1,20 @@ +source "https://rubygems.org" + +gem "gretel", :path => ".." + +gem "rails", "~> 4.2.0" +gem "sqlite3" + +# jquery-rails is used by the dummy application +gem "jquery-rails" + +# Declare any dependencies that are still in development here instead of in +# your gemspec. These might include edge Rails or gems from your path or +# Git. Remember to move these dependencies to your gemspec before releasing +# your gem to rubygems.org. + +# To use debugger +# gem 'debugger' + +gem 'test-unit', '~> 3.0' if RUBY_VERSION >= "2.2" + diff --git a/gemfiles/Gemfile-rails.5.0.x b/gemfiles/Gemfile-rails.5.0.x new file mode 100644 index 0000000..f383163 --- /dev/null +++ b/gemfiles/Gemfile-rails.5.0.x @@ -0,0 +1,20 @@ +source "https://rubygems.org" + +gem "gretel", :path => ".." + +gem "rails", "~> 5.0.0" +gem "sqlite3" + +# jquery-rails is used by the dummy application +gem "jquery-rails" + +# Declare any dependencies that are still in development here instead of in +# your gemspec. These might include edge Rails or gems from your path or +# Git. Remember to move these dependencies to your gemspec before releasing +# your gem to rubygems.org. + +# To use debugger +# gem 'debugger' + +gem 'test-unit', '~> 3.0' if RUBY_VERSION >= "2.2" + diff --git a/gemfiles/Gemfile-rails.5.1.x b/gemfiles/Gemfile-rails.5.1.x new file mode 100644 index 0000000..57c7d98 --- /dev/null +++ b/gemfiles/Gemfile-rails.5.1.x @@ -0,0 +1,20 @@ +source "https://rubygems.org" + +gem "gretel", :path => ".." + +gem "rails", github: "rails/rails", branch: "5-1-stable" +gem "sqlite3" + +# jquery-rails is used by the dummy application +gem "jquery-rails" + +# Declare any dependencies that are still in development here instead of in +# your gemspec. These might include edge Rails or gems from your path or +# Git. Remember to move these dependencies to your gemspec before releasing +# your gem to rubygems.org. + +# To use debugger +# gem 'debugger' + +gem 'test-unit', '~> 3.0' if RUBY_VERSION >= "2.2" + From 12473e35a0df8004131be8f925cd94fa5fb95150 Mon Sep 17 00:00:00 2001 From: Kenta Suzuki Date: Thu, 6 Apr 2017 17:20:49 +0900 Subject: [PATCH 2/6] drop support for eol versions --- .travis.yml | 8 +------- gemfiles/Gemfile-rails.3.1.x | 19 ------------------- gemfiles/Gemfile-rails.3.2.x | 19 ------------------- gemfiles/Gemfile-rails.4.0.x | 19 ------------------- 4 files changed, 1 insertion(+), 64 deletions(-) delete mode 100644 gemfiles/Gemfile-rails.3.1.x delete mode 100644 gemfiles/Gemfile-rails.3.2.x delete mode 100644 gemfiles/Gemfile-rails.4.0.x diff --git a/.travis.yml b/.travis.yml index 05d588e..5aa3233 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,14 +3,8 @@ sudo: false rvm: - 2.4.1 - 2.3.4 - - 2.2.0 - - 2.1.0 - - 2.0.0 - - 1.9.3 + - 2.2.2 gemfile: - - gemfiles/Gemfile-rails.3.1.x - - gemfiles/Gemfile-rails.3.2.x - - gemfiles/Gemfile-rails.4.0.x - gemfiles/Gemfile-rails.4.1.x - gemfiles/Gemfile-rails.4.2.x - gemfiles/Gemfile-rails.5.0.x diff --git a/gemfiles/Gemfile-rails.3.1.x b/gemfiles/Gemfile-rails.3.1.x deleted file mode 100644 index 76b4678..0000000 --- a/gemfiles/Gemfile-rails.3.1.x +++ /dev/null @@ -1,19 +0,0 @@ -source "https://rubygems.org" - -gem "gretel", :path => ".." - -gem "rails", "~> 3.1.0" -gem "sqlite3" - -# jquery-rails is used by the dummy application -gem "jquery-rails" - -# Declare any dependencies that are still in development here instead of in -# your gemspec. These might include edge Rails or gems from your path or -# Git. Remember to move these dependencies to your gemspec before releasing -# your gem to rubygems.org. - -# To use debugger -# gem 'debugger' - -gem 'test-unit', '~> 3.0' if RUBY_VERSION >= "2.2" diff --git a/gemfiles/Gemfile-rails.3.2.x b/gemfiles/Gemfile-rails.3.2.x deleted file mode 100644 index a3076cf..0000000 --- a/gemfiles/Gemfile-rails.3.2.x +++ /dev/null @@ -1,19 +0,0 @@ -source "https://rubygems.org" - -gem "gretel", :path => ".." - -gem "rails", "~> 3.2.0" -gem "sqlite3" - -# jquery-rails is used by the dummy application -gem "jquery-rails" - -# Declare any dependencies that are still in development here instead of in -# your gemspec. These might include edge Rails or gems from your path or -# Git. Remember to move these dependencies to your gemspec before releasing -# your gem to rubygems.org. - -# To use debugger -# gem 'debugger' - -gem 'test-unit', '~> 3.0' if RUBY_VERSION >= "2.2" \ No newline at end of file diff --git a/gemfiles/Gemfile-rails.4.0.x b/gemfiles/Gemfile-rails.4.0.x deleted file mode 100644 index 6e4bc06..0000000 --- a/gemfiles/Gemfile-rails.4.0.x +++ /dev/null @@ -1,19 +0,0 @@ -source "https://rubygems.org" - -gem "gretel", :path => ".." - -gem "rails", "~> 4.0.0" -gem "sqlite3" - -# jquery-rails is used by the dummy application -gem "jquery-rails" - -# Declare any dependencies that are still in development here instead of in -# your gemspec. These might include edge Rails or gems from your path or -# Git. Remember to move these dependencies to your gemspec before releasing -# your gem to rubygems.org. - -# To use debugger -# gem 'debugger' - -gem 'test-unit', '~> 3.0' if RUBY_VERSION >= "2.2" From 673f04db56f3fcfbe78701de46d00d496ad35eeb Mon Sep 17 00:00:00 2001 From: Kenta Suzuki Date: Thu, 6 Apr 2017 18:44:06 +0900 Subject: [PATCH 3/6] update gemspecs --- gretel.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gretel.gemspec b/gretel.gemspec index 0896c09..8a647d9 100644 --- a/gretel.gemspec +++ b/gretel.gemspec @@ -17,6 +17,6 @@ Gem::Specification.new do |gem| gem.test_files = gem.files.grep(%r{^test/}) gem.require_paths = ["lib"] - gem.add_dependency "rails", ">= 3.1.0" + gem.add_dependency "rails", ">= 4.1.0", "<= 5.1.0rc1" gem.add_development_dependency "sqlite3" end From 0aaf23d0160bbcf8d90a133bddbb751771d19ca4 Mon Sep 17 00:00:00 2001 From: Kenta Suzuki Date: Thu, 6 Apr 2017 18:57:24 +0900 Subject: [PATCH 4/6] use bundle exec --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5aa3233..78a9a8e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,6 @@ gemfile: - gemfiles/Gemfile-rails.5.0.x - gemfiles/Gemfile-rails.5.1.x before_script: - - "cd test/dummy; rake db:migrate; rake db:test:prepare; cd ../.." + - "cd test/dummy; bundle exec rake db:migrate; bundle exec rake db:test:prepare; cd ../.." notifications: email: false From 5df7bbb5b140f17c4a30a4c81cd4218c1480026a Mon Sep 17 00:00:00 2001 From: Kenta Suzuki Date: Thu, 6 Apr 2017 19:07:36 +0900 Subject: [PATCH 5/6] add travis matrix to exclude ruby2.4.1 and rails4.1 test pattern --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 78a9a8e..0cc9fb7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,3 +13,7 @@ before_script: - "cd test/dummy; bundle exec rake db:migrate; bundle exec rake db:test:prepare; cd ../.." notifications: email: false +matrix: + exclude: + - rvm: 2.4.1 + gemfile: gemfiles/Gemfile-rails.4.1.x From 81f0d3cd0735a3fec780db11bd003d84dc51d872 Mon Sep 17 00:00:00 2001 From: Kenta Suzuki Date: Fri, 7 Apr 2017 10:28:11 +0900 Subject: [PATCH 6/6] specify migration versions --- test/dummy/db/migrate/20130122163007_create_projects.rb | 2 +- test/dummy/db/migrate/20130122163051_create_issues.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/dummy/db/migrate/20130122163007_create_projects.rb b/test/dummy/db/migrate/20130122163007_create_projects.rb index 3c79c31..17f883e 100644 --- a/test/dummy/db/migrate/20130122163007_create_projects.rb +++ b/test/dummy/db/migrate/20130122163007_create_projects.rb @@ -1,4 +1,4 @@ -class CreateProjects < ActiveRecord::Migration +class CreateProjects < ActiveRecord::Migration[4.1] def change create_table :projects do |t| t.string :name diff --git a/test/dummy/db/migrate/20130122163051_create_issues.rb b/test/dummy/db/migrate/20130122163051_create_issues.rb index e3d0e11..ae48622 100644 --- a/test/dummy/db/migrate/20130122163051_create_issues.rb +++ b/test/dummy/db/migrate/20130122163051_create_issues.rb @@ -1,4 +1,4 @@ -class CreateIssues < ActiveRecord::Migration +class CreateIssues < ActiveRecord::Migration[4.1] def change create_table :issues do |t| t.string :title