From: Tom Hughes Date: Fri, 26 Jun 2015 18:33:39 +0000 (+0100) Subject: Update to rails 4.2.3 X-Git-Tag: live~4097 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/c4cb8286ba7202effaf9e9e4f83b6e6553203d32 Update to rails 4.2.3 --- diff --git a/Gemfile b/Gemfile index 0d31318b8..be26c13b5 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" # Require rails -gem "rails", "4.2.2" +gem "rails", "4.2.3" # Sprockets 3 seems to be buggy, so stick with 2 for now gem "sprockets", "~> 2.12.3" diff --git a/Gemfile.lock b/Gemfile.lock index a19d2e7fa..3473ee532 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,38 +2,38 @@ GEM remote: https://rubygems.org/ specs: SystemTimer (1.2.3) - actionmailer (4.2.2) - actionpack (= 4.2.2) - actionview (= 4.2.2) - activejob (= 4.2.2) + actionmailer (4.2.3) + actionpack (= 4.2.3) + actionview (= 4.2.3) + activejob (= 4.2.3) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.2) - actionview (= 4.2.2) - activesupport (= 4.2.2) + actionpack (4.2.3) + actionview (= 4.2.3) + activesupport (= 4.2.3) rack (~> 1.6) rack-test (~> 0.6.2) rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) + rails-html-sanitizer (~> 1.0, >= 1.0.2) actionpack-page_caching (1.0.2) actionpack (>= 4.0.0, < 5) - actionview (4.2.2) - activesupport (= 4.2.2) + actionview (4.2.3) + activesupport (= 4.2.3) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) - activejob (4.2.2) - activesupport (= 4.2.2) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + activejob (4.2.3) + activesupport (= 4.2.3) globalid (>= 0.3.0) - activemodel (4.2.2) - activesupport (= 4.2.2) + activemodel (4.2.3) + activesupport (= 4.2.3) builder (~> 3.1) - activerecord (4.2.2) - activemodel (= 4.2.2) - activesupport (= 4.2.2) + activerecord (4.2.3) + activemodel (= 4.2.3) + activesupport (= 4.2.3) arel (~> 6.0) - activesupport (4.2.2) + activesupport (4.2.3) i18n (~> 0.7) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) @@ -43,7 +43,7 @@ GEM ast (2.0.0) astrolabe (1.3.0) parser (>= 2.2.0.pre.3, < 3.0) - autoprefixer-rails (5.2.0) + autoprefixer-rails (5.2.1) execjs json bigdecimal (1.1.0) @@ -69,7 +69,7 @@ GEM colorize (0.7.7) composite_primary_keys (8.1.0) activerecord (~> 4.2.0) - coveralls (0.8.1) + coveralls (0.8.2) json (~> 1.8) rest-client (>= 1.6.8, < 2) simplecov (~> 0.10.0) @@ -96,7 +96,7 @@ GEM http_accept_language (2.0.5) httpclient (2.6.0.1) i18n (0.7.0) - i18n-js (3.0.0.rc10) + i18n-js (3.0.0.rc11) i18n (~> 0.6) jquery-rails (4.0.4) rails-dom-testing (~> 1.0) @@ -112,7 +112,7 @@ GEM jsonify-rails (0.3.2) actionpack jsonify (< 0.4.0) - jwt (1.5.0) + jwt (1.5.1) kgio (2.9.3) konacha (3.5.1) actionpack (>= 3.1, < 5) @@ -128,6 +128,7 @@ GEM mail (2.6.3) mime-types (>= 1.16, < 3) mime-types (2.6.1) + mimemagic (0.3.0) mini_portile (0.6.2) minitest (5.7.0) multi_json (1.11.1) @@ -155,7 +156,7 @@ GEM rack (~> 1.0) omniauth-facebook (2.0.1) omniauth-oauth2 (~> 1.2) - omniauth-oauth2 (1.3.0) + omniauth-oauth2 (1.3.1) oauth2 (~> 1.0) omniauth (~> 1.2) omniauth-openid (1.0.1) @@ -169,12 +170,13 @@ GEM multi_json (~> 1.3) omniauth (>= 1.1.1) omniauth-oauth2 (>= 1.1.1) - paperclip (4.2.2) - activemodel (>= 3.0.0) - activesupport (>= 3.0.0) - cocaine (~> 0.5.3) + paperclip (4.3.0) + activemodel (>= 3.2.0) + activesupport (>= 3.2.0) + cocaine (~> 0.5.5) mime-types - parser (2.2.2.5) + mimemagic (= 0.3.0) + parser (2.3.0.pre.2) ast (>= 1.1, < 3.0) pg (0.18.2) poltergeist (1.6.0) @@ -185,23 +187,23 @@ GEM powerpack (0.1.1) psych (2.0.13) r2 (0.2.5) - rack (1.6.2) + rack (1.6.4) rack-cors (0.4.0) rack-openid (1.3.1) rack (>= 1.1.0) ruby-openid (>= 2.1.8) rack-test (0.6.3) rack (>= 1.0) - rails (4.2.2) - actionmailer (= 4.2.2) - actionpack (= 4.2.2) - actionview (= 4.2.2) - activejob (= 4.2.2) - activemodel (= 4.2.2) - activerecord (= 4.2.2) - activesupport (= 4.2.2) + rails (4.2.3) + actionmailer (= 4.2.3) + actionpack (= 4.2.3) + actionview (= 4.2.3) + activejob (= 4.2.3) + activemodel (= 4.2.3) + activerecord (= 4.2.3) + activesupport (= 4.2.3) bundler (>= 1.3.0, < 2.0) - railties (= 4.2.2) + railties (= 4.2.3) sprockets-rails rails-deprecated_sanitizer (1.0.3) activesupport (>= 4.2.0.alpha) @@ -214,21 +216,21 @@ GEM rails-i18n (4.0.4) i18n (~> 0.6) railties (~> 4.0) - railties (4.2.2) - actionpack (= 4.2.2) - activesupport (= 4.2.2) + railties (4.2.3) + actionpack (= 4.2.3) + activesupport (= 4.2.3) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (2.0.0) rake (10.4.2) - redcarpet (3.3.1) + redcarpet (3.3.2) ref (1.0.5) rest-client (1.8.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 3.0) netrc (~> 0.7) rinku (1.7.3) - rubocop (0.32.0) + rubocop (0.32.1) astrolabe (~> 1.3) parser (>= 2.2.2.5, < 3.0) powerpack (~> 0.1) @@ -240,7 +242,7 @@ GEM crass (~> 1.0.2) nokogiri (>= 1.4.4) nokogumbo (= 1.4.1) - sass (3.4.14) + sass (3.4.15) sass-rails (5.0.3) railties (>= 4.0.0, < 5.0) sass (~> 3.1) @@ -253,16 +255,16 @@ GEM simplecov-html (~> 0.10.0) simplecov-html (0.10.0) soap4r-ruby1.9 (2.0.5) - sprockets (2.12.3) + sprockets (2.12.4) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.3.1) + sprockets-rails (2.3.2) actionpack (>= 3.0) activesupport (>= 3.0) sprockets (>= 2.8, < 4.0) - term-ansicolor (1.3.0) + term-ansicolor (1.3.2) tins (~> 1.0) therubyracer (0.12.2) libv8 (~> 3.16.14.0) @@ -271,7 +273,7 @@ GEM thread_safe (0.3.5) tilt (1.4.1) timecop (0.7.4) - tins (1.5.2) + tins (1.5.4) tzinfo (1.2.2) thread_safe (~> 0.1) uglifier (2.7.1) @@ -328,7 +330,7 @@ DEPENDENCIES psych r2 rack-cors - rails (= 4.2.2) + rails (= 4.2.3) rails-i18n (~> 4.0.0) redcarpet rinku (>= 1.2.2) diff --git a/config/initializers/action_dispatch.rb b/config/initializers/action_dispatch.rb index 687ce3fb1..af446fc1d 100644 --- a/config/initializers/action_dispatch.rb +++ b/config/initializers/action_dispatch.rb @@ -1,2 +1,17 @@ # Stop rails from automatically parsing XML in request bodies Rails.configuration.middleware.delete ActionDispatch::ParamsParser + +# https://github.com/rails/rails/issues/20710 +module ActionDispatch + module Assertions + def html_document_with_rss + @html_document ||= if @response.content_type == Mime::RSS + Nokogiri::XML::Document.parse(@response.body) + else + html_document_without_rss + end + end + + alias_method_chain :html_document, :rss + end +end