aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/admin_general_controller.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-06-12 09:20:43 +0100
committerSeb Bacon <seb.bacon@gmail.com>2012-06-12 09:20:43 +0100
commit54fc48b9b66ce29f660064fbea3e71ea15b61d58 (patch)
tree85269b9ef4f62bce2393134981edf30adf370b05 /app/controllers/admin_general_controller.rb
parentdc14834a5d85032645f3a410faae68089fb5fe1a (diff)
parent04653b52f2233c9b4fea6b690d16a825b974d36d (diff)
Merge branch 'release/0.6' of github.com:sebbacon/alaveteli into release/0.6
Diffstat (limited to 'app/controllers/admin_general_controller.rb')
-rw-r--r--app/controllers/admin_general_controller.rb7
1 files changed, 4 insertions, 3 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