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
def twitterService | |
(...) | |
def updateTwitterStatus = { | |
twitterService.setStatus "My new status..." //probably would be something like params.newStatus | |
redirect action: index //or your usual action | |
} |
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 Pessoa { | |
String nome | |
String cpf | |
static constraints = { | |
nome() | |
cpf(cpf:true) | |
} | |
} |
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 Pessoa { | |
String nome | |
String cpf | |
static constraints = { | |
nome() | |
cpf(cpf:[formatted:true]) | |
} | |
} |
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 Empresa { | |
String razaoSocial | |
String cnpj | |
static constraints = { | |
razaoSocial() | |
cnpj(cnpj:true) | |
} | |
} |
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 Empresa { | |
String razaoSocial | |
String cnpj | |
static constraints = { | |
razaoSocial() | |
cnpj(cnpj:[formatted:true]) | |
} | |
} |
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 Pessoa { | |
String nome | |
String nit | |
static constraints = { | |
nome() | |
nit(nit:[formatted:true]) | |
} | |
} |
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 Pessoa { | |
String nome | |
String nit | |
static constraints = { | |
nome() | |
nit(nit:true) | |
} | |
} |
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
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative" |
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 java.util.zip.* | |
import org.tmatesoft.svn.core.internal.io.dav.* | |
import org.tmatesoft.svn.core.wc.* | |
import org.tmatesoft.svn.core.* | |
@Grab(group='com.svnkit', module='svnkit', version='1.1.0') | |
def setup(projectName) { | |
File.metaClass.plus = { String c -> new File(delegate, c) } |
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
private buildObjectList(List assets, S3Service s3) { | |
def objs = [] | |
assets.each {a -> | |
S3Object obj = new S3Object() | |
if (a.localPath) { | |
File f = new File(a.localPath) | |
obj.setDataInputFile(f) | |
obj.setContentLength(f.size()) | |
} | |
//TODO support completely custom acls, need to persist xml or some kind of model |
OlderNewer