From 15c1d4e26ad825e7c020d3f1977cd8fa488262e5 Mon Sep 17 00:00:00 2001 From: Jeremy Leng Date: Mon, 7 Mar 2016 17:59:47 -0800 Subject: [PATCH] Added support for domain class string field values that should not be interpreted --- SeedMeGrailsPlugin.groovy | 2 +- grails-app/conf/BuildConfig.groovy | 4 ++-- grails-app/services/seedme/SeedService.groovy | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/SeedMeGrailsPlugin.groovy b/SeedMeGrailsPlugin.groovy index 573e75f..0a97fdf 100644 --- a/SeedMeGrailsPlugin.groovy +++ b/SeedMeGrailsPlugin.groovy @@ -1,6 +1,6 @@ class SeedMeGrailsPlugin { - def version = "0.7.1" + def version = "0.7.2" def grailsVersion = "2.0 > *" def pluginExcludes = [ "src/seed/*", diff --git a/grails-app/conf/BuildConfig.groovy b/grails-app/conf/BuildConfig.groovy index e29ebbd..9b79e25 100644 --- a/grails-app/conf/BuildConfig.groovy +++ b/grails-app/conf/BuildConfig.groovy @@ -18,11 +18,11 @@ grails.project.dependency.resolution = { build ':release:2.2.1', ':rest-client-builder:1.0.3', { export = false } - +/* test(":build-test-data:2.0.6") { export = false } - +*/ compile(":hibernate:$grailsVersion") { // hibernate only for integration tests export = false // don't make this available to the client app } diff --git a/grails-app/services/seedme/SeedService.groovy b/grails-app/services/seedme/SeedService.groovy index e4292b4..44eb443 100644 --- a/grails-app/services/seedme/SeedService.groovy +++ b/grails-app/services/seedme/SeedService.groovy @@ -269,6 +269,8 @@ class SeedService { if(seedObject) { data[key] = seedObject } + } else if (value instanceof Map && value._literal == true) { + data[key] = value.value } else if(value instanceof CharSequence && value.toString().indexOf('$') >= 0) { data[key] = new GStringTemplateEngine().createTemplate(value.toString()).make(getDomainBindingsForGString()).toString() } else if(value instanceof Closure) {