From 0e3411611bfd498cb7eb2aeedea3a632ebc2f303 Mon Sep 17 00:00:00 2001 From: Gerard Caulfield Date: Thu, 5 May 2016 17:35:00 +1000 Subject: [PATCH] Fix Travis mime-types dependency issue Before this fix some of our Travis builds failed with: Gem::InstallError: mime-types-data requires Ruby version >= 2.0. Idea for the fix was found here: https://github.com/sgruhier/foundation_rails_helper/pull/116 Although we could not use the same method as I only want to lock down the version of mime-type where necessary. Also trying to lock the version to 2.6.2 would break our Rails-3.2 Appraisal path. --- Appraisals | 12 ++++++++++++ gemfiles/rails_4.0.gemfile | 1 + gemfiles/rails_4.1.gemfile | 1 + gemfiles/rails_4.2.gemfile | 1 + 4 files changed, 15 insertions(+) diff --git a/Appraisals b/Appraisals index 7024697..17dcf10 100644 --- a/Appraisals +++ b/Appraisals @@ -4,14 +4,26 @@ end appraise 'rails-4.0' do gem 'rails', '~> 4.0.0' + + # The last version that doesn't need Ruby 2.0 and works with version 4.0 of + # Rails. This addresses a build problem with Travis for version 1.9.3 of Ruby + gem 'mime-types', '2.6.2', :platforms => :ruby_19 end appraise 'rails-4.1' do gem 'rails', '~> 4.1.0' + + # The last version that doesn't need Ruby 2.0 and works with version 4.1 of + # Rails. This addresses a build problem with Travis for version 1.9.3 of Ruby + gem 'mime-types', '2.6.2', :platforms => :ruby_19 end appraise 'rails-4.2' do gem 'rails', '~> 4.2.0' + + # The last version that doesn't need Ruby 2.0 and works with version 4.2 of + # Rails. This addresses a build problem with Travis for version 1.9.3 of Ruby + gem 'mime-types', '2.6.2', :platforms => :ruby_19 end appraise 'mongoid-3.0' do diff --git a/gemfiles/rails_4.0.gemfile b/gemfiles/rails_4.0.gemfile index c6d0a1f..f0da331 100644 --- a/gemfiles/rails_4.0.gemfile +++ b/gemfiles/rails_4.0.gemfile @@ -3,5 +3,6 @@ source "https://rubygems.org" gem "rails", "~> 4.0.0" +gem "mime-types", "2.6.2", :platforms => :ruby_19 gemspec :path => "../" diff --git a/gemfiles/rails_4.1.gemfile b/gemfiles/rails_4.1.gemfile index f95005c..3ae2735 100644 --- a/gemfiles/rails_4.1.gemfile +++ b/gemfiles/rails_4.1.gemfile @@ -3,5 +3,6 @@ source "https://rubygems.org" gem "rails", "~> 4.1.0" +gem "mime-types", "2.6.2", :platforms => :ruby_19 gemspec :path => "../" diff --git a/gemfiles/rails_4.2.gemfile b/gemfiles/rails_4.2.gemfile index cd8b45b..2fb73f1 100644 --- a/gemfiles/rails_4.2.gemfile +++ b/gemfiles/rails_4.2.gemfile @@ -3,5 +3,6 @@ source "https://rubygems.org" gem "rails", "~> 4.2.0" +gem "mime-types", "2.6.2", :platforms => :ruby_19 gemspec :path => "../"