Installs ruby-2.0.0-p195 on ubuntu via checkinstall so it's in your package manager and you can remove it.
Quick install:
curl -L https://gist.github.com/ggayan/5637565/raw/5835fe8ae3efb2c96c75c59ada2b1ecbe123bcfb/ruby-2-install-ubuntu.sh | bash -s
| source 'http://rubygems.org' | |
| gem 'nio4r', github: 'celluloid/nio4r', branch: 'master' | |
| gem 'celluloid-io' | |
| gem 'celluloid-redis' |
Installs ruby-2.0.0-p195 on ubuntu via checkinstall so it's in your package manager and you can remove it.
Quick install:
curl -L https://gist.github.com/ggayan/5637565/raw/5835fe8ae3efb2c96c75c59ada2b1ecbe123bcfb/ruby-2-install-ubuntu.sh | bash -s
| //codec must be created inside grails-app/utils named like *Codec.groovy | |
| class UnderscoreCodec { | |
| static encode = {target-> | |
| target.replaceAll(" ", "_") | |
| } | |
| static decode = {target-> | |
| target.replaceAll("_", " ") | |
| } |
| #export GRAILS_VERSION="$(ls -lhr $HOME/.grails | egrep -i '1\.' | head -1 | gawk '{print $9 }')" | |
| export GRAILS_VERSION=`cat $GRAILS_HOME/build.properties | grep "^grails.version=" | awk -F= '{ print $2 }' | tr -d '\r' | tr -d '\n'` | |
| _get_domain_classes(){ | |
| find ./grails-app/domain -iname *.groovy 2> /dev/null | tr \\n ' ' | sed 's/\.groovy//g' | sed 's/\.\/grails-app\/domain\///g' | tr '/' \. | |
| } | |
| _get_tests(){ | |
| find ./test -iname *.groovy 2> /dev/null | sed 's/\.\/test\/integration\///g' | sed 's/\Tests.groovy//g' | tr '/' \. | |
| } |
| //Domain classes... | |
| class Team { | |
| String name | |
| static hasMany = [memberships:Membership] | |
| static constraints = {} | |
| } | |
| class Player { | |
| String name |
| [core] | |
| autocrlf = input | |
| excludesfile = ~/.gitignore_global | |
| editor = e -w | |
| pager = less -FRSX | |
| whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
| [color] | |
| branch = auto | |
| diff = auto |
| def parseEmailsFromString(String emails) { | |
| //adapted from http://www.regular-expressions.info/email.html | |
| return emails?.findAll(/(?i)\b[A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4}\b/) | |
| } | |
| //And a simple test: | |
| void testParseEmailAddressFromString() { | |
| String email1 = '[email protected]' |