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 com.netflix.asgard | |
import spock.lang.Specification | |
import spock.lang.Unroll | |
@Unroll | |
class StylerSpec extends Specification { | |
void 'availability zone to style class'() { | |
expect: |
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
gvm install grails 2.3.0.RC2 | |
grails create-app testApp | |
cd testApp | |
cf login [email protected] --password somethingsomethingsomething | |
cf push --buildpack=https://github.com/heroku/heroku-buildpack-grails.git |
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> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<title>Example</title> | |
<script type="text/javascript"> | |
$(document).ready(function () { | |
var ctas = $('#ctas'), | |
ajaxResult = { |
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/ratpack-core/src/test/groovy/org/ratpackframework/block/BlockingSpec.groovy | |
******************************************************************************** | |
class BlockingSpec extends RatpackGroovyDslSpec { | |
def "can perform blocking operations"() { | |
when: | |
def steps = [] | |
app { | |
handlers { | |
get { |
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 output = new File('allTests.txt') | |
output.write('') | |
new File( System.getProperty("user.dir") ).eachDirRecurse{ | |
if( it.name == 'test' ){ | |
it.eachDirRecurse{ testDir -> | |
if( !testDir.absolutePath.contains( 'internal' ) && !testDir.absolutePath.contains('ratpack-test-support') ){ | |
testDir.eachFile{ file -> | |
if( file.name.endsWith('Spec.groovy') ){ |
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
Plano de viagem para : Kalil Lima | |
Plano de viagem para : Sra. Camila Silva | |
Plano de viagem para : Sr. Lucas Salomao | |
Motivo da viagem : . | |
Valor estimado da viagem : 4155.03 BRL | |
Reserva : Y9E44L | |
Código(s) de reserva do voo | |
Amadeus : Y9E44L |
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 com.example.helloworld; | |
import javax.ws.rs.*; | |
import javax.ws.rs.core.MediaType; | |
@Produces(MediaType.APPLICATION_JSON) | |
public class HelloWorldService{ | |
} |
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
Get a free appfog account at http://www.appfog.com | |
Install the gem | |
sudo gem install af | |
Go to your app directory | |
1. Create a war file | |
grails war |
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
role defined previously | |
User.createCriteria().list(){ | |
createAlias( 'userRole', 'ur' ) | |
and{ | |
eq( 'role', 'ur.role' ) | |
eq( 'ur.role', role ) | |
} | |
projections{ | |
property("username") |
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 com.flashsales.utils | |
// maps UI Performance tags to resources plugin tags | |
class ConvertUiPerformanceTagLib { | |
static namespace = 'p' | |
def css = { attrs -> | |
attrs.uri = "/css/${ attrs.remove( 'name' ) }.css" | |
attrs.type = 'css' |