This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| consoleImports(controller: 'console', action: '*') { | |
| before = { | |
| String importStatements = """ | |
| // Groovy Code here | |
| // Implicit variables include: | |
| // ctx: the Spring application context | |
| // grailsApplication: the Grails application | |
| // config: the Grails configuration | |
| // request: the HTTP request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apply plugin: 'groovy' | |
| apply plugin: 'idea' | |
| apply plugin: 'eclipse' | |
| repositories{ | |
| mavenCentral() | |
| } | |
| dependencies{ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Foo{ | |
| static String getBar( String self ){ | |
| "${self} is foobar." | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| moduleName = FooExtensions | |
| moduleVersion = 0.1 | |
| extensionClasses = Foo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import spock.lang.Specification | |
| class FooSpec extends Specification { | |
| def 'Test foo'(){ | |
| expect: | |
| "Bryan".bar == "Bryan is foobar." | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| grails { | |
| mail { | |
| host = "smtp.gmail.com" | |
| port = 465 | |
| username = "[email protected]" | |
| password = "password" | |
| props = ["mail.smtp.auth":"true", | |
| "mail.smtp.socketFactory.port":"465", | |
| "mail.smtp.socketFactory.class":"javax.net.ssl.SSLSocketFactory", | |
| "mail.smtp.socketFactory.fallback":"false"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias grails='~/.gvm/grails/` [ -e application.properties ] && grep app.grails.version application.properties | sed s/app.grails.version=// || echo current `/bin/grails' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| modules = { | |
| favicon{ | |
| resource id: 'favicon', url: [file: 'favicon.ico'], disposition: 'head' | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Grapes( | |
| @Grab(group='org.codehaus.groovy', module='http-builder', version='0.4.1') | |
| ) | |
| import groovyx.net.http.* | |
| import static groovyx.net.http.ContentType.* | |
| import static groovyx.net.http.Method.* | |
| import org.apache.http.auth.* | |
| def http = new HTTPBuilder( 'http://www.ipchicken.com' ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import groovy.time.TimeCategory | |
| Date getMaxDate(){ | |
| Date maxDate | |
| use( TimeCategory ){ | |
| maxDate = new Date() + 18.years | |
| } | |
OlderNewer