From: Tom Hughes Date: Tue, 3 Dec 2013 20:19:52 +0000 (+0000) Subject: Update to rails 4.0.2 X-Git-Tag: live~4566 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/cc4bca22b02043087ebdd39f149ef88013f8f498 Update to rails 4.0.2 --- diff --git a/Gemfile b/Gemfile index 94eb39681..5e7a2c16e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'http://rubygems.org' # Require rails -gem 'rails', '4.0.1' +gem 'rails', '4.0.2' # Require things which have moved to gems in ruby 1.9 gem 'bigdecimal', "~> 1.1.0", :platforms => :ruby_19 diff --git a/Gemfile.lock b/Gemfile.lock index 2065dabdd..33bca9420 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,27 +2,27 @@ GEM remote: http://rubygems.org/ specs: SystemTimer (1.2.3) - actionmailer (4.0.1) - actionpack (= 4.0.1) + actionmailer (4.0.2) + actionpack (= 4.0.2) mail (~> 2.5.4) - actionpack (4.0.1) - activesupport (= 4.0.1) + actionpack (4.0.2) + activesupport (= 4.0.2) builder (~> 3.1.0) erubis (~> 2.7.0) rack (~> 1.5.2) rack-test (~> 0.6.2) actionpack-page_caching (1.0.2) actionpack (>= 4.0.0, < 5) - activemodel (4.0.1) - activesupport (= 4.0.1) + activemodel (4.0.2) + activesupport (= 4.0.2) builder (~> 3.1.0) - activerecord (4.0.1) - activemodel (= 4.0.1) + activerecord (4.0.2) + activemodel (= 4.0.2) activerecord-deprecated_finders (~> 1.0.2) - activesupport (= 4.0.1) + activesupport (= 4.0.2) arel (~> 4.0.0) activerecord-deprecated_finders (1.0.3) - activesupport (4.0.1) + activesupport (4.0.2) i18n (~> 0.6, >= 0.6.4) minitest (~> 4.2) multi_json (~> 1.3) @@ -57,7 +57,7 @@ GEM http_accept_language (2.0.0) httpauth (0.2.0) httpclient (2.3.4.1) - i18n (0.6.5) + i18n (0.6.8) iconv (0.1) jquery-rails (3.0.4) railties (>= 3.0, < 5.0) @@ -116,20 +116,20 @@ GEM ruby-openid (>= 2.1.8) rack-test (0.6.2) rack (>= 1.0) - rails (4.0.1) - actionmailer (= 4.0.1) - actionpack (= 4.0.1) - activerecord (= 4.0.1) - activesupport (= 4.0.1) + rails (4.0.2) + actionmailer (= 4.0.2) + actionpack (= 4.0.2) + activerecord (= 4.0.2) + activesupport (= 4.0.2) bundler (>= 1.3.0, < 2.0) - railties (= 4.0.1) + railties (= 4.0.2) sprockets-rails (~> 2.0.0) rails-i18n (4.0.0) i18n (~> 0.6) rails (~> 4.0.0) - railties (4.0.1) - actionpack (= 4.0.1) - activesupport (= 4.0.1) + railties (4.0.2) + actionpack (= 4.0.2) + activesupport (= 4.0.2) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (10.1.0) @@ -161,7 +161,7 @@ GEM polyglot polyglot (>= 0.3.1) tzinfo (0.3.38) - uglifier (2.3.1) + uglifier (2.3.2) execjs (>= 0.3.0) json (>= 1.8.0) validates_email_format_of (1.5.3) @@ -197,7 +197,7 @@ DEPENDENCIES psych r2 rack-cors - rails (= 4.0.1) + rails (= 4.0.2) rails-i18n (~> 4.0.0) redcarpet rinku (>= 1.2.2) diff --git a/config/initializers/i18n.rb b/config/initializers/i18n.rb index c8bbdcce0..156eea4ec 100644 --- a/config/initializers/i18n.rb +++ b/config/initializers/i18n.rb @@ -42,6 +42,8 @@ I18n::Backend::Simple.include(I18n::Backend::Fallbacks) I18n.fallbacks.map("no" => "nb") +I18n.enforce_available_locales = false + Rails.configuration.after_initialize do |app| I18n.available_locales end diff --git a/lib/rich_text.rb b/lib/rich_text.rb index 87ea58933..533c8fbb4 100644 --- a/lib/rich_text.rb +++ b/lib/rich_text.rb @@ -10,6 +10,7 @@ module RichText class SimpleFormat include ActionView::Helpers::TextHelper + include ActionView::Helpers::OutputSafetyHelper def sanitize(text) Sanitize.clean(text, Sanitize::Config::OSM).html_safe