diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-06-05 12:42:27 +0100 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-06-05 12:42:27 +0100 |
commit | 5310c55e01d42cebbe7ede9e9a42e8f4dacc90d9 (patch) | |
tree | b77413f0f0b18dd68a0bb1a242b1ca9693ec12f7 | |
parent | 505fdbf99ee322aab2c753dc3215a263171c9463 (diff) | |
parent | 0b10c9002481d80d4a70ca224fc49aa5970c6294 (diff) |
Merge branch 'wdtk' into develop
-rw-r--r-- | app/controllers/admin_general_controller.rb | 7 | ||||
-rw-r--r-- | app/controllers/application_controller.rb | 3 | ||||
-rw-r--r-- | app/views/request_mailer/new_response_reminder_alert.rhtml | 2 | ||||
-rw-r--r-- | config/initializers/theme_loader.rb | 6 | ||||
-rw-r--r-- | config/routes.rb | 4 |
5 files changed, 13 insertions, 9 deletions
diff --git a/app/controllers/admin_general_controller.rb b/app/controllers/admin_general_controller.rb index c83ae0f37..2c961dfc5 100644 --- a/app/controllers/admin_general_controller.rb +++ b/app/controllers/admin_general_controller.rb @@ -79,11 +79,12 @@ class AdminGeneralController < AdminController end def debug + @http_auth_user = admin_http_auth_user @current_commit = `git log -1 --format="%H"` - @current_branch = `git branch | grep "\*" | awk '{print $2}'` + @current_branch = `git branch | perl -ne 'print $1 if /^\\* (.*)/'` @current_version = `git describe --always --tags` - repo = `git remote show origin -n | grep Fetch | awk '{print $3}' | sed -re 's/.*:(.*).git/\\1/'` - @github_origin = "https://github.com/#{repo.strip}/tree/" + repo = `git remote show origin -n | perl -ne 'print $1 if m{Fetch URL: .*github\\.com[:/](.*)\\.git}'` + @github_origin = "https://github.com/#{repo}/tree/" @request_env = request.env end end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 82884f6c3..41adf1848 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -345,9 +345,6 @@ class ApplicationController < ActionController::Base return "*unknown*"; end end - def assign_http_auth_user - @http_auth_user = admin_http_auth_user - end # Convert URL name for sort by order, to Xapian query def order_to_sort_by(sortby) diff --git a/app/views/request_mailer/new_response_reminder_alert.rhtml b/app/views/request_mailer/new_response_reminder_alert.rhtml index 5f07e8559..86fc71de7 100644 --- a/app/views/request_mailer/new_response_reminder_alert.rhtml +++ b/app/views/request_mailer/new_response_reminder_alert.rhtml @@ -1,4 +1,4 @@ -<%=_('To let us know, follow this link and then select the appropriate box.')%> +<%=_('To let everyone know, follow this link and then select the appropriate box.')%> <%=@url%> diff --git a/config/initializers/theme_loader.rb b/config/initializers/theme_loader.rb index 4ddce6910..8908dc07e 100644 --- a/config/initializers/theme_loader.rb +++ b/config/initializers/theme_loader.rb @@ -1,5 +1,9 @@ +# This is a global array of route extensions. Alaveteli modules may add to it. +# It is used by our config/routes.rb to decide which route extension files to load. +$alaveteli_route_extensions = [] + theme_urls = MySociety::Config.get("THEME_URLS", []) -if ENV["RAILS_ENV"] != "test" # Don't let the theme interfere with Alaveteli specs +if ENV["RAILS_ENV"] != "test" # Don't let the themes interfere with Alaveteli specs for url in theme_urls.reverse theme_name = url.sub(/.*\/(.*).git/, "\\1") theme_main_include = File.expand_path "../../../vendor/plugins/#{theme_name}/lib/alavetelitheme.rb", __FILE__ diff --git a/config/routes.rb b/config/routes.rb index c0d65042c..814deb760 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -7,7 +7,9 @@ # $Id: routes.rb,v 1.92 2009-10-14 22:01:27 francis Exp $ # Allow easy extension from themes. Note these will have the highest priority. -load File.join('config', 'custom-routes.rb') +$alaveteli_route_extensions.each do |f| + load File.join('config', f) +end ActionController::Routing::Routes.draw do |map| |