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 grails.converters.JSON | |
import grails.converters.XML | |
import org.bson.types.ObjectId | |
import org.springframework.context.MessageSourceResolvable | |
import org.springframework.context.i18n.LocaleContextHolder | |
// The following goes inside the init closure | |
[JSON, XML /*Gson already handles ObjectID*/]*.registerObjectMarshaller(ObjectId) { | |
return it?.toString() |
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.openqa.selenium.JavascriptExecutor; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.support.ui.ExpectedCondition; | |
/** | |
* Licensed under MIT License | |
* Wraps a condition so that it returns only after the document state has settled for a given time, the default being 2 seconds. The | |
* document is considered settled when the "document.readyState" field stays "complete" and the URL in the browser stops changing. | |
*/ | |
public class DocumentSettleCondition<T> implements ExpectedCondition<T> { |
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
export GRAILS_OPTS="-Dgrails.work.dir=${HOME}/cache/grails -Divy.default.ivy.user.dir=${HOME}/cache/ivy" | |
export GRADLE_USER_HOME="${HOME}/cache/gradle/" |
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
/* | |
*= require_tree bower_components | |
*= require main | |
*= require mobile | |
*= require_self | |
*/ |
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
web: java -Dgrails.env=prod -Dserver.port=${PORT:-8080} -Dserver.host=0.0.0.0 ${JAVA_OPTS} -jar pet-store*.jar |
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
task collectResults() { | |
def output = file("build/reports/summary.csv") | |
doLast { | |
file("build/reports").mkdirs() | |
output.text = '"Project","Test","Time","Result","Duration"\r\n' | |
allprojects.each { project2 -> | |
logger.info("Processing project ${project2.name}") | |
def resultFiles = project2.fileTree("build") { include '**/TEST-*.xml' } | |
resultFiles.each { file -> | |
logger.info("Processing report ${file}") |
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 java.io.IOException; | |
import java.net.InetSocketAddress; | |
import java.net.Proxy; | |
import java.net.Proxy.Type; | |
import java.net.ProxySelector; | |
import java.net.SocketAddress; | |
import java.net.URI; | |
import java.util.Collections; | |
import java.util.List; |
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.assets.excludes = ["**/*.less","angularjs/**","animate.css","bootstrap*","jquery/*"] | |
grails.assets.plugin."twitter-bootstrap".excludes = ["**/*.less"] | |
grails.assets.plugin."twitter-bootstrap".includes = ["bootstrap.less"] | |
grails.assets.plugin."font-awesome-resources".excludes = ["font-awesome/**/*.less"] | |
grails.assets.plugin."font-awesome-resources".includes = ["font-awesome/font-awesome.less"] |
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
plugins { | |
compile ':cdn-asset-pipeline:0.4.1' | |
} |
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
def appName = grails.util.Metadata.current.'app.name' | |
def appVersion = grails.util.Metadata.current.'app.version' | |
def cdnAccessKey = System.getenv('CDN_AWS_ACCESS_KEY_ID') | |
def cdnSecretKey = System.getenv('CDN_AWS_SECRET_ACCESS_KEY') | |
if (cdnAccessKey && cdnSecretKey) { | |
grails { | |
assets { | |
cdn { | |
provider = 's3' // Karman provider | |
directory = ‘mybucket’ |