From 9ae945c5e145968f4750ec843492934a6e005bf9 Mon Sep 17 00:00:00 2001 From: John Naegle Date: Fri, 29 Aug 2014 13:14:59 -0500 Subject: [PATCH 1/3] use an unrealized version of rails-deprecated_sanitizer to get passed Rails 4.2.0.beta1 issue --- Gemfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Gemfile b/Gemfile index ff356a8a5..76174e225 100644 --- a/Gemfile +++ b/Gemfile @@ -18,6 +18,12 @@ group :test do gem 'rspec', '>= 3' gem 'rubocop', '>= 0.25' gem 'simplecov', '>= 0.9' + + if ENV['RAILS_VERSION'] == '4.2.0.beta1' + # see https://github.com/rails/rails-deprecated_sanitizer/pull/1 + gem 'rails-deprecated_sanitizer', github: 'rails/rails-deprecated_sanitizer' + end + end gemspec From 2fa693df74764ebad7208479d850bb7a3fe4cdd4 Mon Sep 17 00:00:00 2001 From: John Naegle Date: Fri, 29 Aug 2014 13:43:42 -0500 Subject: [PATCH 2/3] Use hash rockets --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 76174e225..adcd84473 100644 --- a/Gemfile +++ b/Gemfile @@ -21,7 +21,7 @@ group :test do if ENV['RAILS_VERSION'] == '4.2.0.beta1' # see https://github.com/rails/rails-deprecated_sanitizer/pull/1 - gem 'rails-deprecated_sanitizer', github: 'rails/rails-deprecated_sanitizer' + gem 'rails-deprecated_sanitizer', :github => 'rails/rails-deprecated_sanitizer' end end From 5863129032abd3c4645e6cf3d3632714c8c7c210 Mon Sep 17 00:00:00 2001 From: John Naegle Date: Fri, 29 Aug 2014 14:01:30 -0500 Subject: [PATCH 3/3] fix conditional include of rails-deprecated_sanitizer when the RAILS_VERSION is "4.2.0.beta1" or as it is in travis: "~> 4.2.0.beta1" --- Gemfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index adcd84473..c161ecb69 100644 --- a/Gemfile +++ b/Gemfile @@ -19,7 +19,8 @@ group :test do gem 'rubocop', '>= 0.25' gem 'simplecov', '>= 0.9' - if ENV['RAILS_VERSION'] == '4.2.0.beta1' + version = Gem::Requirement.parse(ENV['RAILS_VERSION']).last.version rescue nil + if version == '4.2.0.beta1' # see https://github.com/rails/rails-deprecated_sanitizer/pull/1 gem 'rails-deprecated_sanitizer', :github => 'rails/rails-deprecated_sanitizer' end