Permalink
Browse files

ensuring that ExpandoMetaClass.enableGlobally() gets called when runn…

…ing console or shell
  • Loading branch information...
1 parent ba30cba commit 78892f5d149c5c1deb327a9df3a8a70c5b008071 @burtbeckwith burtbeckwith committed Jul 2, 2011
Showing with 9 additions and 8 deletions.
  1. +1 −1 scripts/Console.groovy
  2. +2 −5 scripts/Shell.groovy
  3. +6 −2 scripts/_GrailsBootstrap.groovy
View
2 scripts/Console.groovy
@@ -31,7 +31,7 @@ import org.codehaus.groovy.grails.support.*
includeTargets << grailsScript("_GrailsBootstrap")
target ('default': "Load the Grails interactive Swing console") {
- depends(checkVersion, configureProxy, packageApp, classpath, console)
+ depends(checkVersion, configureProxy, enableExpandoMetaClass, packageApp, classpath, console)
}
target(console:"The console implementation target") {
View
7 scripts/Shell.groovy
@@ -30,14 +30,11 @@ import org.codehaus.groovy.tools.shell.IO
includeTargets << grailsScript("_GrailsBootstrap")
target ('default': "Load the Grails interactive shell") {
- depends(configureProxy, packageApp, classpath)
- shell()
+ depends(configureProxy, enableExpandoMetaClass, packageApp, classpath, shell)
}
target(shell:"The shell implementation target") {
-
- loadApp()
- configureApp()
+ depends(loadApp, configureApp)
def b = new Binding(ctx: appCtx, grailsApplication: grailsApp)
View
8 scripts/_GrailsBootstrap.groovy
@@ -129,9 +129,13 @@ target(bootstrap: "Loads and configures a Grails instance") {
}
target(bootstrapOnce:"Loads and configures a Grails instance only if it is not already loaded and configured") {
+ depends(enableExpandoMetaClass)
if (!binding.variables.applicationLoaded) {
- ExpandoMetaClass.enableGlobally()
loadApp()
configureApp()
}
-}
+}
+
+target(enableExpandoMetaClass: "Calls ExpandoMetaClass.enableGlobally()") {
+ ExpandoMetaClass.enableGlobally()
+}

0 comments on commit 78892f5

Please sign in to comment.