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 groovy.transform.* | |
import org.junit.* | |
import org.openqa.selenium.* | |
import org.openqa.selenium.support.ui.* | |
import org.openqa.selenium.firefox.* | |
import static org.junit.Assert.* | |
import static org.hamcrest.Matchers.* | |
class AutocompleteTests { | |
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
class GreetingController { | |
def index = { | |
[message: message(code: "greeting.message", args: [params.name])] | |
} | |
} |
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
#! /bin/sh | |
VERSION=$1 | |
GRAILS_DIR=/opt/grails-$VERSION | |
GRAILS_SYMLINK=/opt/grails | |
if [[ ! -d $GRAILS_DIR ]]; then | |
echo "Error: $GRAILS_DIR does not exist" | |
exit 1 | |
fi | |
if [[ -e $GRAILS_SYMLINK ]]; then |
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
<!doctype html> | |
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]--> | |
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]--> | |
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]--> | |
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]--> | |
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]--> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Centered column with fixed footer</title> | |
<meta name="author" content="Rob Fletcher"> |
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.plugin.spock.IntegrationSpec | |
import java.sql.Connection | |
import javax.sql.DataSource | |
import spock.lang.* | |
class DatabaseSchemaSpec extends IntegrationSpec { | |
@Shared def dataSource | |
@Shared List<String> tableNames |
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
void next() { | |
nextButton.click() | |
waitForAnimationComplete() | |
} | |
private void waitForAnimationComplete() { | |
waitFor { | |
js.exec(this.firstElement(), "return \$(arguments[0]).find(':animated').length == 0") | |
} | |
} |
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 co.freeside.spock.vertx | |
import org.spockframework.runtime.extension.ExtensionAnnotation | |
import java.lang.annotation.* | |
/** | |
* Add this annotation to any specification fields that should be registered as Vert.x event bus handlers during test | |
* execution. The field will be registered on the event bus before each feature method and unregistered afterwards. If | |
* the field is `@Shared` it will be registered and unregistered at the start and end of the spec. | |
* |
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
apply plugin: 'groovy' | |
repositories { | |
mavenCentral() | |
// vertxHome must be defined in gradle.properties | |
flatDir { dirs "${vertxHome}/lib/jars" } | |
} | |
dependencies { | |
groovy 'org.codehaus.groovy:groovy:1.8.6' |
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
eventCfUpdateStart = { | |
metadata.'cf.last.deployed' = new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") | |
metadata.persist() | |
} |
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
UserRole.withCriteria { | |
createAlias 'user', 'u' | |
projections { | |
property 'u.username' | |
} | |
eq 'role', role | |
} |