aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-06-04 22:33:49 +0100
committerRobin Houston <robin.houston@gmail.com>2012-06-04 22:33:49 +0100
commit5d48a55fffd1a75d6e8240bfea9982a43b103741 (patch)
tree693dd70be76f84fbed84a34d2d2eaa299585b6b2 /app
parent4ec7f6edbf2c00abc8464eafc889047f43533f90 (diff)
Fix admin debug method
> 10) admin debug (https://secure.mysociety.org/admin/foi/debug) - "you > are" - sentence that isn't finished > > 11) admin debug (https://secure.mysociety.org/admin/foi/debug) - > versioning incorrect & URLs to github malformed: > Alaveteli version: 0.5.2-297-g4ec7f6e > Alaveteli branch: (no > Alaveteli commit: 4ec7f6edbf2c00abc8464eafc889047f43533f90
Diffstat (limited to 'app')
-rw-r--r--app/controllers/admin_general_controller.rb7
-rw-r--r--app/controllers/application_controller.rb3
2 files changed, 4 insertions, 6 deletions
diff --git a/app/controllers/admin_general_controller.rb b/app/controllers/admin_general_controller.rb
index c83ae0f37..cbe92a5ad 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)