diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-04-28 16:01:18 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-04-28 16:01:18 +0200 |
commit | 2515f43a1294ebb0f23683183cd1ab23b6d42e31 (patch) | |
tree | 3e36e30783c691969ae0033fbb47434a557c2cc3 /sonar-server/src/main | |
parent | 401dafe8e8b72c2de067168fe282b2df01d48f12 (diff) | |
download | sonarqube-2515f43a1294ebb0f23683183cd1ab23b6d42e31.tar.gz sonarqube-2515f43a1294ebb0f23683183cd1ab23b6d42e31.zip |
SONAR-5111 Create a handler to create java stub ws controllers for rails ws
Diffstat (limited to 'sonar-server/src/main')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/lib/java_ws_routing.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/java_ws_routing.rb b/sonar-server/src/main/webapp/WEB-INF/lib/java_ws_routing.rb index a7e8f61999e..ac54ba5ce65 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/java_ws_routing.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/java_ws_routing.rb @@ -26,14 +26,16 @@ module ActionController deprecated_web_services = Java::OrgSonarServerUi::JRubyFacade.new.getRubyRailsWebservices() deprecated_web_services.each do |ws| eval(ws.getTemplate()) - prepend_route("api/plugins/#{ws.getId()}/:action/:id", {:controller => "api/#{ws.getId()}", :requirements => { :id => /.*/ }}) + prepend_route("api/plugins/#{ws.getId()}/:action/:id", {:controller => "api/#{ws.getId()}", :requirements => {:id => /.*/}}) end # Full Java web services ws_engine = Java::OrgSonarServerPlatform::Platform.component(Java::OrgSonarServerWs::WebServiceEngine.java_class) ws_engine.controllers().each do |controller| controller.actions.each do |action| - prepend_route("#{controller.path()}/#{action.key()}/:id", {:controller => 'api/java_ws', :action => 'index', :wsaction => action.key(), :wspath => controller.path()}) + if (!action.handler().java_kind_of?(Java::OrgSonarApiServerWs::RailsHandler)) + prepend_route("#{controller.path()}/#{action.key()}/:id", {:controller => 'api/java_ws', :action => 'index', :wsaction => action.key(), :wspath => controller.path()}) + end end end end |