This file contains 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
#!/usr/bin/env bash | |
# bin/compile <build-dir> <cache-dir> | |
# fail fast | |
set -e | |
BIN_DIR=$(cd $(dirname $0); pwd) # absolute path | |
# parse args | |
BUILD_DIR=$1 | |
CACHE_DIR=$2 |
This file contains 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 org.vertx.groovy.core.Vertx | |
class BootStrap { | |
def init = { servletContext -> | |
def vertx = Vertx.newVertx() | |
def httpServer = vertx.createHttpServer() | |
vertx.createSockJSServer(httpServer).installApp(prefix: '/events') { sock -> | |
sock.dataHandler { buff -> | |
sock << buff |
This file contains 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 org.grails.common.ApprovalStatus | |
import static org.grails.common.ApprovalStatus.* | |
class CommonTagLib { | |
static namespace = "common" | |
static final STATUS_TO_CSS_CLASS = [ | |
(PENDING): "warning", | |
(REJECTED): "important", | |
(APPROVED): "success" ].asImmutable() |
This file contains 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
// ... rest of Config.groovy content goes above this line to ensure that | |
// the JSON overrides existing settings. | |
ConfigLoader.addEntries(loadJson(fetchJson()), this) | |
def fetchJson() { return System.getenv("GRAILS_APP_CONFIG") } | |
def loadJson(content) { return content ? grails.converters.JSON.parse(content) : [:] } |
This file contains 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
package todosample | |
import grails.events.Listener | |
class DebugService { | |
@Listener | |
def packageWarStart() { | |
println "[DebugService] Packaging started" | |
} |
This file contains 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
package org.example.config; | |
import org.springframework.cache.concurrent.ConcurrentMapCacheManager | |
@Configuration | |
public class ApplicationConfig { | |
@Bean public ConcurrentMapCacheManager cacheManager() { | |
return new ConcurrentMapCacheManager(); | |
} | |
} |
This file contains 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.project.class.dir = "target/classes" | |
grails.project.test.class.dir = "target/test-classes" | |
grails.project.test.reports.dir = "target/test-reports" | |
//grails.project.war.file = "target/${appName}-${appVersion}.war" | |
grails.project.dependency.resolution = { | |
// inherit Grails' default dependencies | |
inherits("global") { | |
// uncomment to disable ehcache | |
// excludes 'ehcache' | |
} |
This file contains 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 2.0.4 | |
grails.project.dependency.resolution = { | |
// inherit Grails' default dependencies | |
inherits("global") { | |
// uncomment to disable ehcache | |
// excludes 'ehcache' | |
} | |
log "error" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose' | |
checksums true // Whether to verify checksums on resolve |
This file contains 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
dependencies { | |
build "org.apache.maven.wagon:wagon-http:2.4" | |
} | |
plugins { | |
build ":release:2.2.0", ":rest-client-builder:1.0.3", { | |
export = false | |
exclude "wagon-http-lightweight" | |
} | |
} |
This file contains 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
ratpack { | |
... | |
handlers { | |
get { | |
... | |
} | |
prefix("blog") { | |
handler { | |
redirect 303, "http://blog.cacoethes.co.uk/${get(PathBinding).pastBinding}" |
OlderNewer