From 87179669a69732007827a94c8e5eb779737a4c86 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 9 May 2014 11:34:52 +1000 Subject: [PATCH 1/3] Change to new production hostname: openfoodnetwork.org.au --- app/controllers/application_controller.rb | 2 +- app/views/spree/user_mailer/signup_confirmation.text.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 3a4de9aaf6..0d55b82b05 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -40,7 +40,7 @@ class ApplicationController < ActionController::Base # (vic.openfoodnetwork.org) that has the SSL certificate. Redirect all requests to this # domain to avoid showing customers a scary invalid certificate error. def require_certified_hostname - certified_host = "vic.openfoodnetwork.org" + certified_host = "openfoodnetwork.org.au" if Rails.env.production? && request.host != certified_host redirect_to "http://#{certified_host}#{request.fullpath}" diff --git a/app/views/spree/user_mailer/signup_confirmation.text.erb b/app/views/spree/user_mailer/signup_confirmation.text.erb index c6e57efc8a..295b4c9e8f 100644 --- a/app/views/spree/user_mailer/signup_confirmation.text.erb +++ b/app/views/spree/user_mailer/signup_confirmation.text.erb @@ -2,7 +2,7 @@ Hello, Welcome to Australia's Open Food Network! Your login email is <%= @user.email %> -You can go online and start shopping through food hubs and local producers you like at vic.openfoodnetwork.org.au +You can go online and start shopping through food hubs and local producers you like at http://openfoodnetwork.org.au We welcome all your questions and feedback; you can use the Send Feedback button on the site or email us at hello@openfoodnetwork.org From 8bf9921eef43ed02e54258ef78e02249e1861726 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 9 May 2014 14:39:12 +1000 Subject: [PATCH 2/3] Turn off enforce_available_locales, working around performance regression https://github.com/svenfuchs/i18n/issues/230 --- config/application.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index f36691ebb5..45c6e2a540 100644 --- a/config/application.rb +++ b/config/application.rb @@ -63,7 +63,10 @@ module Openfoodnetwork # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] config.i18n.default_locale = 'en' - I18n.config.enforce_available_locales = true + # Setting this to true causes a performance regression in Rails 3.2.17 + # When we're on a version with the fix below, we can set it to true + # https://github.com/svenfuchs/i18n/issues/230 + I18n.config.enforce_available_locales = false # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" From b801480024060ede1e97db1d4048ee6ec2573aca Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 9 May 2014 15:09:00 +1000 Subject: [PATCH 3/3] Increase capybara default_wait_time to 30 s, now we know it's not the primary cause of spec slowdown --- spec/spec_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index fcf898173a..b8b4f8e03b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -45,7 +45,7 @@ Capybara.register_driver :poltergeist do |app| Capybara::Poltergeist::Driver.new(app, options) end -Capybara.default_wait_time = 5 +Capybara.default_wait_time = 30 require "paperclip/matchers"