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.project.class.dir = "target/classes" | |
grails.project.test.class.dir = "target/test-classes" | |
grails.project.test.reports.dir = "target/test-reports" | |
grails.project.dependency.resolution = { | |
inherits "global" // inherit Grails' default dependencies | |
log "verbose" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose' | |
repositories { | |
grailsPlugins() |
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
/** | |
* Libify version 1.0 | |
* | |
* Copyright (C) 2012 Viaboxx Systems GmbH | |
* | |
* This is a copy of our base _Events.groovy script that serves in all our Grails plugins/projects. | |
* | |
* It goes into the "scripts" folder of a Grails project. | |
* | |
* NOTE: It requires a maven-ant-tasks-2.1.3.jar in your project, in a folder called "build-lib". |
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
First, check in a file on OSX: | |
➜ ~/projects/agnes/[master]>touch fæøå.txt tfnico@thomas-ferris-nicolaisens-imac [12:34:38] | |
➜ ~/projects/agnes/[master]✗>ls tfnico@thomas-ferris-nicolaisens-imac [12:34:56] | |
agnes.iml build.xml funky fæøå.txt macroman.txt pom.xml readme.txt src target | |
➜ ~/projects/agnes/[master]✗>git st tfnico@thomas-ferris-nicolaisens-imac [12:34:58] | |
# On branch master | |
# Untracked files: | |
# |
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
#! | |
cd /tmp | |
mkdir stuff | |
cd stuff | |
echo "Chapter one: it was a cold and stormful night" > essay.txt | |
cp essay.txt essay.new.txt | |
echo "Chapter two: The Commitments" >> essay.new.txt | |
cp essay.new.txt essay.txt.bob | |
echo "Chapter three: And then along came the butler" >> essay.txt.bob | |
cp essay.new.txt essay-2011.10.12.txt |
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: 'maven' | |
apply plugin: 'java' | |
repositories { | |
maven { | |
url "http://repo1.maven.org/maven2" | |
} | |
} | |
dependencies { |
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 | |
dir="/opt/flurfunk/camelbot" | |
user="jenkins" | |
cmd="sh /opt/flurfunk/camelbot/flurfunk-camelbot-1.0-SNAPSHOT/bin/camelbot" | |
name=`basename $0` | |
pid_file="/var/run/$name.pid" | |
stdout_log="/var/log/$name.log" |
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 release << { | |
println "Releasing version ${version}" | |
} | |
task buildBranch << { | |
println "Building branch ${branch}" | |
} | |
task tagBuildRepo(type: Exec) { | |
commandLine 'git', 'tag', "${tag}" |
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
@Test | |
public void validName() { | |
String name = "Thomas"; | |
assertTrue(findInvalidChars(name, WhitelistCharacters.VALID_NAME_CHAR_SET).isEmpty()); | |
} | |
@Test | |
public void invalidName() { | |
assertThat(findInvalidChars("<Thomas>", VALID_NAME_CHAR_SET), hasItems('<', '>')); | |
} |
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
public static ImmutableSet<Character> findInvalidChars(String name, ImmutableSet<Character> validCharSet) { | |
return Sets.difference(stringToCharSet(name), validCharSet).immutableCopy(); | |
} |
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
Your overall score for this assignment is 8.74 out of 10.00 | |
The code you submitted did not pass all of our tests: your submission achieved a score of | |
6.74 out of 8.00 in our tests. | |
In order to find bugs in your code, we advise to perform the following steps: | |
- Take a close look at the test output that you can find below: it should point you to | |
the part of your code that has bugs. | |
- Run the tests that we provide with the handout on your code. | |
- The tests we provide do not test your code in depth: they are very incomplete. In order |