Skip to content

Instantly share code, notes, and snippets.

» expected [ 'BlueFuzion', 'Keynote' ],
got [ 'BlueFuzion', 'Keynote' ] (deepEqual) //
@james-carr
james-carr / gist:1180183
Created August 30, 2011 04:23
form.html
<form action="/leads/4e5c30c533c9bf390b000050/send-application" method="post">
<table>
<tr>
<th><label>Companies</label></th>
<td><select multiple="multiple" size="10" name="application[companies]">
<option>Bluestone</option>
<option>Capitol</option>
<option>CNA Surety</option>
<option>HCC Surety</option>
<option>Lapre Scali</option>
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'eclipse'
repositories {
mavenCentral()
/**
* This would be the following if you use nexus/artifactory internally
* mavenRepo urls: 'http://your/internal/resolver
*/
group: org.jamescarr.examples
version: 1.0.0-SNAPSHOT
rootProject.name = 'module-example'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'eclipse'
repositories {
mavenCentral()
/**
* This would be the following if you use nexus/artifactory internally
* mavenRepo urls: 'http://your/internal/resolver
*/
.classpath
.project
.settings
.gradle
bin
build
package org.jamescarr.example;
import java.util.Collection;
import com.google.common.base.Joiner;
public class Combiner {
public String combine(Collection<String> collection){
return Joiner.on(",").join(collection);
}
task bumpVersion << {
def components = version.split('\\.').collect { Integer.parseInt(it.replace('-SNAPSHOT', ''))}
components[2] += 1
def nextIntegrationVersion = components.join('.')+"-SNAPSHOT"
def newProps = file("gradle.properties").text.replace(version, nextIntegrationVersion)
file("./gradle.properties").text = newProps
}
<?xml version="1.0" encoding="UTF-8"?>
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<New id="dataSource0" class="org.mortbay.jetty.plus.naming.Resource">
<Arg></Arg>
<Arg>java:comp/env/jdbc/a</Arg>
<Arg>
<New class="org.apache.commons.dbcp.BasicDataSource">
<Set name="driverClassName">org.hsqldb.jdbcDriver</Set>
<Set name="url">jdbc:hsqldb:hsql://localhost/test</Set>