From 96e1665c01b7add06459d22b3e3491fe4e8e536b Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 11 Sep 2014 20:03:43 +0100 Subject: [PATCH 1/1] Update to rails 4.1.6 --- Gemfile | 4 +- Gemfile.lock | 94 +++++++++---------- app/controllers/application_controller.rb | 2 +- app/controllers/site_controller.rb | 4 +- config/initializers/composite_primary_keys.rb | 11 +++ 5 files changed, 61 insertions(+), 54 deletions(-) create mode 100644 config/initializers/composite_primary_keys.rb diff --git a/Gemfile b/Gemfile index 82d9b5e9e..76f1d3274 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' # Require rails -gem 'rails', '4.1.5' +gem 'rails', '4.1.6' # Require things which have moved to gems in ruby 1.9 gem 'bigdecimal', "~> 1.1.0", :platforms => :ruby_19 @@ -44,7 +44,7 @@ gem 'rinku', '>= 1.2.2', :require => 'rails_rinku' gem 'oauth-plugin', '>= 0.5.1' gem 'open_id_authentication', '>= 1.1.0' gem 'validates_email_format_of', '>= 1.5.1' -gem 'composite_primary_keys', '~> 7.0.3' +gem 'composite_primary_keys', '~> 7.0.10' gem 'http_accept_language', '~> 2.0.0' gem 'paperclip', '~> 4.0' gem 'deadlock_retry', '>= 1.2.0' diff --git a/Gemfile.lock b/Gemfile.lock index b9055e34b..9861294bd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,40 +2,40 @@ GEM remote: https://rubygems.org/ specs: SystemTimer (1.2.3) - actionmailer (4.1.5) - actionpack (= 4.1.5) - actionview (= 4.1.5) - mail (~> 2.5.4) - actionpack (4.1.5) - actionview (= 4.1.5) - activesupport (= 4.1.5) + actionmailer (4.1.6) + actionpack (= 4.1.6) + actionview (= 4.1.6) + mail (~> 2.5, >= 2.5.4) + actionpack (4.1.6) + actionview (= 4.1.6) + activesupport (= 4.1.6) rack (~> 1.5.2) rack-test (~> 0.6.2) actionpack-page_caching (1.0.2) actionpack (>= 4.0.0, < 5) - actionview (4.1.5) - activesupport (= 4.1.5) + actionview (4.1.6) + activesupport (= 4.1.6) builder (~> 3.1) erubis (~> 2.7.0) - activemodel (4.1.5) - activesupport (= 4.1.5) + activemodel (4.1.6) + activesupport (= 4.1.6) builder (~> 3.1) - activerecord (4.1.5) - activemodel (= 4.1.5) - activesupport (= 4.1.5) + activerecord (4.1.6) + activemodel (= 4.1.6) + activesupport (= 4.1.6) arel (~> 5.0.0) - activesupport (4.1.5) + activesupport (4.1.6) i18n (~> 0.6, >= 0.6.9) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.1) tzinfo (~> 1.1) arel (5.0.1.20140414130214) - autoprefixer-rails (2.2.0.20140804) + autoprefixer-rails (3.1.0.20140911) execjs bigdecimal (1.1.0) builder (3.2.2) - capybara (2.4.1) + capybara (2.4.3) mime-types (>= 1.16) nokogiri (>= 1.3.3) rack (>= 1.0.0) @@ -52,7 +52,7 @@ GEM coffee-script (2.3.0) coffee-script-source execjs - coffee-script-source (1.7.1) + coffee-script-source (1.8.0) colorize (0.7.3) composite_primary_keys (7.0.10) activerecord (~> 4.1.4) @@ -70,7 +70,7 @@ GEM httpclient (2.4.0) i18n (0.6.11) iconv (0.1) - jquery-rails (3.1.1) + jquery-rails (3.1.2) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) json (1.8.1) @@ -88,18 +88,17 @@ GEM railties (>= 3.1, < 5) sprockets libxml-ruby (2.7.0) - mail (2.5.4) - mime-types (~> 1.16) - treetop (~> 1.4.8) - mime-types (1.25.1) + mail (2.6.1) + mime-types (>= 1.16, < 3) + mime-types (2.3) mini_portile (0.6.0) - minitest (5.4.0) + minitest (5.4.2) multi_json (1.10.1) multi_xml (0.5.5) multipart-post (2.0.0) nokogiri (1.6.3.1) mini_portile (= 0.6.0) - nokogumbo (1.1.9) + nokogumbo (1.1.12) nokogiri oauth (0.4.7) oauth-plugin (0.5.1) @@ -128,8 +127,7 @@ GEM cliver (~> 0.3.1) multi_json (~> 1.0) websocket-driver (>= 0.2.0) - polyglot (0.3.5) - psych (2.0.5) + psych (2.0.6) r2 (0.2.5) rack (1.5.2) rack-cors (0.2.9) @@ -138,32 +136,32 @@ GEM ruby-openid (>= 2.1.8) rack-test (0.6.2) rack (>= 1.0) - rails (4.1.5) - actionmailer (= 4.1.5) - actionpack (= 4.1.5) - actionview (= 4.1.5) - activemodel (= 4.1.5) - activerecord (= 4.1.5) - activesupport (= 4.1.5) + rails (4.1.6) + actionmailer (= 4.1.6) + actionpack (= 4.1.6) + actionview (= 4.1.6) + activemodel (= 4.1.6) + activerecord (= 4.1.6) + activesupport (= 4.1.6) bundler (>= 1.3.0, < 2.0) - railties (= 4.1.5) + railties (= 4.1.6) sprockets-rails (~> 2.0) - rails-i18n (4.0.2) + rails-i18n (4.0.3) i18n (~> 0.6) - rails (>= 4.0) - railties (4.1.5) - actionpack (= 4.1.5) - activesupport (= 4.1.5) + railties (~> 4.0) + railties (4.1.6) + actionpack (= 4.1.6) + activesupport (= 4.1.6) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (10.3.2) redcarpet (3.1.2) rinku (1.7.3) ruby-openid (2.5.0) - sanitize (3.0.0) + sanitize (3.0.2) crass (~> 0.2.0) nokogiri (>= 1.4.4) - nokogumbo (= 1.1.9) + nokogumbo (= 1.1.12) sass (3.2.19) sass-rails (4.0.3) railties (>= 4.0.0, < 5.0) @@ -176,7 +174,7 @@ GEM multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.1.3) + sprockets-rails (2.1.4) actionpack (>= 3.0) activesupport (>= 3.0) sprockets (~> 2.8) @@ -184,15 +182,13 @@ GEM thread_safe (0.3.4) tilt (1.4.1) timecop (0.7.1) - treetop (1.4.15) - polyglot - polyglot (>= 0.3.1) tzinfo (1.2.2) thread_safe (~> 0.1) uglifier (2.5.3) execjs (>= 0.3.0) json (>= 1.8.0) - validates_email_format_of (1.5.3) + validates_email_format_of (1.6.1) + i18n vendorer (0.1.16) websocket-driver (0.3.4) xpath (2.0.0) @@ -207,7 +203,7 @@ DEPENDENCIES autoprefixer-rails bigdecimal (~> 1.1.0) coffee-rails (~> 4.0.0) - composite_primary_keys (~> 7.0.3) + composite_primary_keys (~> 7.0.10) dalli deadlock_retry (>= 1.2.0) dynamic_form @@ -231,7 +227,7 @@ DEPENDENCIES psych r2 rack-cors - rails (= 4.1.5) + rails (= 4.1.6) rails-i18n (~> 4.0.0) redcarpet rinku (>= 1.2.2) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 3830df88b..90a967276 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -73,7 +73,7 @@ class ApplicationController < ActionController::Base if request.cookies["_osm_session"].to_s == "" if params[:cookie_test].nil? session[:cookie_test] = true - redirect_to params.merge(:cookie_test => "true") + redirect_to Hash[params].merge(:cookie_test => "true") return false else flash.now[:warning] = t 'application.require_cookies.cookies_needed' diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index df11a275a..e76ee97f6 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -52,7 +52,7 @@ class SiteController < ApplicationController new_params[:anchor] += "&layers=#{params[:layers]}" end - redirect_to new_params + redirect_to Hash[new_params] end def key @@ -151,7 +151,7 @@ class SiteController < ApplicationController end if anchor.present? - redirect_to params.merge(:anchor => anchor.join('&')) + redirect_to Hash[params].merge(:anchor => anchor.join('&')) end end end diff --git a/config/initializers/composite_primary_keys.rb b/config/initializers/composite_primary_keys.rb new file mode 100644 index 000000000..37200c51b --- /dev/null +++ b/config/initializers/composite_primary_keys.rb @@ -0,0 +1,11 @@ +# Monkey patch id_was into CPK pending upstream integration +# https://github.com/composite-primary-keys/composite_primary_keys/pull/236 +module ActiveRecord + class Base + module CompositeInstanceMethods + def id_was + attribute_was("id") + end + end + end +end -- 2.43.2