Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…ing console or shell
  • Loading branch information...
commit 78892f5d149c5c1deb327a9df3a8a70c5b008071 1 parent ba30cba
Burt Beckwith authored July 02, 2011
2  scripts/Console.groovy
@@ -31,7 +31,7 @@ import org.codehaus.groovy.grails.support.*
31 31
 includeTargets << grailsScript("_GrailsBootstrap")
32 32
 
33 33
 target ('default': "Load the Grails interactive Swing console") {
34  
-    depends(checkVersion, configureProxy, packageApp, classpath, console)
  34
+    depends(checkVersion, configureProxy, enableExpandoMetaClass, packageApp, classpath, console)
35 35
 }
36 36
 
37 37
 target(console:"The console implementation target") {
7  scripts/Shell.groovy
@@ -30,14 +30,11 @@ import org.codehaus.groovy.tools.shell.IO
30 30
 includeTargets << grailsScript("_GrailsBootstrap")
31 31
 
32 32
 target ('default': "Load the Grails interactive shell") {
33  
-    depends(configureProxy, packageApp, classpath)
34  
-    shell()
  33
+    depends(configureProxy, enableExpandoMetaClass, packageApp, classpath, shell)
35 34
 }
36 35
 
37 36
 target(shell:"The shell implementation target") {
38  
-
39  
-    loadApp()
40  
-    configureApp()
  37
+    depends(loadApp, configureApp)
41 38
 
42 39
     def b = new Binding(ctx: appCtx, grailsApplication: grailsApp)
43 40
 
8  scripts/_GrailsBootstrap.groovy
@@ -129,9 +129,13 @@ target(bootstrap: "Loads and configures a Grails instance") {
129 129
 }
130 130
 
131 131
 target(bootstrapOnce:"Loads and configures a Grails instance only if it is not already loaded and configured") {
  132
+    depends(enableExpandoMetaClass)
132 133
     if (!binding.variables.applicationLoaded) {
133  
-        ExpandoMetaClass.enableGlobally()
134 134
         loadApp()
135 135
         configureApp()
136 136
     }
137  
-}
  137
+}
  138
+
  139
+target(enableExpandoMetaClass: "Calls ExpandoMetaClass.enableGlobally()") {
  140
+    ExpandoMetaClass.enableGlobally()
  141
+}

0 notes on commit 78892f5

Please sign in to comment.
Something went wrong with that request. Please try again.