[ARVADOS] updated: 4893194033b3d1765be13f9bf21058ebc91cf42e

git at public.curoverse.com git at public.curoverse.com
Tue Feb 11 17:43:26 EST 2014


Summary of changes:
 services/api/app/controllers/static_controller.rb |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

       via  4893194033b3d1765be13f9bf21058ebc91cf42e (commit)
       via  0baacafa11d24c91e4e493809c06f7c58a3fdfc7 (commit)
      from  fbd62569bca926fc12917eb60eada82a6d8a83b0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 4893194033b3d1765be13f9bf21058ebc91cf42e
Merge: 0baacaf fbd6256
Author: Ward Vandewege <ward at curoverse.com>
Date:   Tue Feb 11 17:43:21 2014 -0500

    Merge branch 'master' of git.curoverse.com:arvados


commit 0baacafa11d24c91e4e493809c06f7c58a3fdfc7
Author: Ward Vandewege <ward at curoverse.com>
Date:   Tue Feb 11 17:42:44 2014 -0500

    Handle the situation where config.workbench_address is unset more
    gracefully: do not try to redirect and blow up, instead send a
    json-encoded error message.

diff --git a/services/api/app/controllers/static_controller.rb b/services/api/app/controllers/static_controller.rb
index ba69b84..fda0880 100644
--- a/services/api/app/controllers/static_controller.rb
+++ b/services/api/app/controllers/static_controller.rb
@@ -6,7 +6,13 @@ class StaticController < ApplicationController
   skip_before_filter :require_auth_scope_all, :only => [ :home, :login_failure ]
 
   def home
-    redirect_to Rails.configuration.workbench_address
+    if Rails.configuration.respond_to? :workbench_address
+      redirect_to Rails.configuration.workbench_address
+    else
+      render json: {
+        error: ('This is the API server; you probably want to be at the workbench for this installation. Unfortunately, config.workbench_address is not set so I can not redirect you there automatically')
+      }
+    end
   end
 
 end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list