From 76c42069a92e233f7ffe5bd049b5592cd75919fd Mon Sep 17 00:00:00 2001 From: Anthony O Date: Wed, 5 Oct 2016 15:09:10 +0200 Subject: [PATCH] Fixing TRANSREL-134 without breaking functional tests and explaining it into the url mappings file. --- grails-app/conf/UrlMappings.groovy | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/grails-app/conf/UrlMappings.groovy b/grails-app/conf/UrlMappings.groovy index 59ef67d..da0415c 100644 --- a/grails-app/conf/UrlMappings.groovy +++ b/grails-app/conf/UrlMappings.groovy @@ -1,7 +1,21 @@ class UrlMappings { - /* This empty mappings file seems to be required when inlining core-db - * plugins. Otherwise we get: - * Class not found loading Grails application: UrlMappings (https://travis-ci.org/transmart/SmartR/builds/163942859) - * Inspired by https://github.com/transmart/transmart-rest-api/blob/v1.2.4/grails-app/conf/UrlMappings.groovy */ - static mappings = { } + /** + * This mappings file seems to be required when inlining core-db plugins + * (as stated here https://github.com/transmart/transmart-rest-api/blob/v1.2.4/grails-app/conf/UrlMappings.groovy). + * Without it, we get "Class not found loading Grails application: UrlMappings" + * (https://travis-ci.org/transmart/SmartR/builds/163942859) + */ + + static mappings = { + // Following block seems to be required by functional tests (BaseAPITestCase.groovy) + "/$controller/$action?/$id?(.${format})?"{ + constraints { + // apply constraints here + } + } + + // Removed the two following lines in order to not interfere with transmartApp url mappings - TRANSREL-134 + //"/"(view:"/index") + //"500"(view:'/error') + } }