From 4c64d521a3088cfd06855d1b73f6714d662f7a79 Mon Sep 17 00:00:00 2001 From: jgrau Date: Tue, 28 Mar 2017 22:41:58 +0200 Subject: [PATCH 1/6] Lock nokogiri to 1.6.x From nokogiri 1.7.0 ruby <= 2.0.0 are no longer supported. In order to support those version we must lock ourselves to 1.6.x --- impressionist.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impressionist.gemspec b/impressionist.gemspec index cd7867f..3fd6809 100644 --- a/impressionist.gemspec +++ b/impressionist.gemspec @@ -18,6 +18,6 @@ Gem::Specification.new do |s| s.require_path = 'lib' s.required_rubygems_version = Gem::Requirement.new('>= 1.3.6') if s.respond_to? :required_rubygems_version= - s.add_dependency 'nokogiri', '~> 1.6' + s.add_dependency 'nokogiri', RUBY_VERSION < '2.1.0' ? '~> 1.6.0' : '~> 1' s.add_development_dependency 'bundler', '~> 1.0' end From 89458144be0801d441011fcec0ac4444747db896 Mon Sep 17 00:00:00 2001 From: jgrau Date: Tue, 28 Mar 2017 22:44:19 +0200 Subject: [PATCH 2/6] Lock rake to a version pre 11.0 Rake version 11.0 removed the `last_comment` method which is used by `rspec 2.14.x` which we use in this test app. --- gemfiles/rails32.gemfile | 2 +- gemfiles/rails40.gemfile | 2 +- tests/test_app/Gemfile | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gemfiles/rails32.gemfile b/gemfiles/rails32.gemfile index 35d20f1..7b6a349 100644 --- a/gemfiles/rails32.gemfile +++ b/gemfiles/rails32.gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -gem 'rake', '>= 0.9' +gem 'rake', '>= 0.9', '< 11.0' gem 'rdoc', '>= 2.4.2' platforms :jruby do diff --git a/gemfiles/rails40.gemfile b/gemfiles/rails40.gemfile index 18557d2..4d5be8a 100644 --- a/gemfiles/rails40.gemfile +++ b/gemfiles/rails40.gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -gem 'rake', '>= 0.9' +gem 'rake', '>= 0.9', '< 11.0' gem 'rdoc', '>= 2.4.2' platforms :jruby do diff --git a/tests/test_app/Gemfile b/tests/test_app/Gemfile index 7a93eb0..1b93b78 100644 --- a/tests/test_app/Gemfile +++ b/tests/test_app/Gemfile @@ -1,6 +1,7 @@ source 'https://rubygems.org' gem 'rails', '~> 3.2' +gem 'rake', '< 11.0' gem 'impressionist', :path => '../../' From 595aa46de523c4821407b27f787c94219430f811 Mon Sep 17 00:00:00 2001 From: jgrau Date: Tue, 28 Mar 2017 22:45:43 +0200 Subject: [PATCH 3/6] Lock public_suffix to pre 1.5.0 The 1.5.0 version of public_suffix drops support for ruby version < 2.0 which we still support. --- gemfiles/rails32.gemfile | 1 + gemfiles/rails40.gemfile | 1 + tests/test_app/Gemfile | 1 + 3 files changed, 3 insertions(+) diff --git a/gemfiles/rails32.gemfile b/gemfiles/rails32.gemfile index 7b6a349..7b74c3a 100644 --- a/gemfiles/rails32.gemfile +++ b/gemfiles/rails32.gemfile @@ -14,6 +14,7 @@ platforms :ruby, :mswin, :mingw do end group :test do + gem 'public_suffix', '< 1.5.0' gem 'capybara', '>= 2.0.3' gem 'minitest' gem 'minitest-rails' diff --git a/gemfiles/rails40.gemfile b/gemfiles/rails40.gemfile index 4d5be8a..465746e 100644 --- a/gemfiles/rails40.gemfile +++ b/gemfiles/rails40.gemfile @@ -14,6 +14,7 @@ platforms :ruby, :mswin, :mingw do end group :test do + gem 'public_suffix', '< 1.5.0' gem 'capybara', '>= 2.0.3' gem 'minitest' gem 'minitest-rails' diff --git a/tests/test_app/Gemfile b/tests/test_app/Gemfile index 1b93b78..06433ab 100644 --- a/tests/test_app/Gemfile +++ b/tests/test_app/Gemfile @@ -2,6 +2,7 @@ source 'https://rubygems.org' gem 'rails', '~> 3.2' gem 'rake', '< 11.0' +gem 'public_suffix', '< 1.5.0' gem 'impressionist', :path => '../../' From 6fd0cfcb64410a3872e1e5dd71e3f0f39191825c Mon Sep 17 00:00:00 2001 From: jgrau Date: Tue, 28 Mar 2017 23:18:51 +0200 Subject: [PATCH 4/6] Update the bundler version on Travis CI --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index afc0fb3..1788f3d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ language: ruby +before_install: + - gem install bundler before_script: - cd tests/test_app - bundle exec rails g impressionist -f From 061eccf42247c8d8c3855204a2b3793fd9cf60d5 Mon Sep 17 00:00:00 2001 From: jgrau Date: Tue, 28 Mar 2017 23:22:51 +0200 Subject: [PATCH 5/6] Add new ruby versions to travis test matrix --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1788f3d..15ff245 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,9 @@ before_script: rvm: - 1.9.3 - 2.0.0 + - 2.1.0 + - 2.2.0 + - 2.3.0 - jruby-head - rbx - ruby-head From 987cb57aab823bda26cfccdde054cb65234062e1 Mon Sep 17 00:00:00 2001 From: jgrau Date: Tue, 28 Mar 2017 23:38:35 +0200 Subject: [PATCH 6/6] Specify the build command Travis defaults to just running `rake` but on newer ruby versions on Travis, rake v. 12 is already installed which results in ``` Gem::LoadError: You have already activated rake 12.0.0, but your Gemfile requires rake 10.5.0. Prepending `bundle exec` to your command may solve this. ``` --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 15ff245..1166067 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,8 @@ before_script: - bundle exec rails g impressionist -f - bundle exec rake db:create db:migrate RAILS_ENV=test - cd .. +script: + - bundle exec rake rvm: - 1.9.3 - 2.0.0