diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin_general_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/application_controller.rb | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/admin_general_controller.rb b/app/controllers/admin_general_controller.rb index ae51e0923..0b7e9bec0 100644 --- a/app/controllers/admin_general_controller.rb +++ b/app/controllers/admin_general_controller.rb @@ -78,6 +78,10 @@ class AdminGeneralController < AdminController end def debug + @current_commit = `git log -1 --format="%H"` + @current_branch = `git branch | grep "\*" | awk '{print $2}'` + repo = `git remote show origin -n | grep Fetch | awk '{print $3}' | sed -re 's/.*:(.*).git/\\1/'` + @github_origin = "https://github.com/#{repo.strip}/tree/" @request_env = request.env end end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 73ba74f30..c38ab594d 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -180,7 +180,10 @@ class ApplicationController < ActionController::Base path = foi_fragment_cache_part_path(param) path = "/views" + path foi_cache_path = File.join(File.dirname(__FILE__), '../../cache') - return File.join(foi_cache_path, path) + max_file_length = 255 - 35 # we subtract 35 because tempfile + # adds on a variable number of + # characters + return File.join(foi_cache_path, path)[0...max_file_length] end def foi_fragment_cache_all_for_request(info_request) # return stub path so admin can expire it |