Skip to content

Instantly share code, notes, and snippets.

View kinow's full-sized avatar
💭
😬

Bruno P. Kinoshita kinow

💭
😬
View GitHub Profile
@kinow
kinow / gist:3753698
Created September 20, 2012 02:57
new CollectionTransformer
public class CollectionTransformer<E> implements UnaryFunction<Generator<? extends E>, Collection<? super E>> {
// instance methods
//---------------------------------------------------
/**
* {@inheritDoc}
*/
public Collection<? super E> evaluate(Generator<? extends E> generator) {
final List<? super E> list = new ArrayList<E>();
generator.run(new UnaryProcedure<E>() {
public static void main(String[] args) throws Exception {
TestLinkAPI api = new TestLinkAPI(new URL("http://localhost/testlink-1.9.4/lib/api/xmlrpc.php"), "f3230e0850876097abdfef4e3cd01145");
Boolean b = api.checkDevKey("f3230e0850876097abdfef4e3cd01145");
System.out.println(b);
}
POST /testlink-1.9.4/lib/api/xmlrpc.php HTTP/1.1
Content-Type: text/xml
User-Agent: Apache XML RPC 3.1.3 (Sun HTTP Transport)
Cache-Control: no-cache
Pragma: no-cache
Host: localhost
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-Length: 310
Started by user anonymous
[test-nutch] $ ant runtime
Buildfile: /home/kinow/java/workspace/test-nutch/build.xml
Intercepted: property
Intercepted: property
Intercepted: property
Intercepted: property
Intercepted: property
Intercepted: property
Intercepted: property
@kinow
kinow / get_past_test_status.groovy
Created October 17, 2012 15:29
get_past_test_status.groovy
/*
* Tis ugly, but you can get the gist from this
*/
println "Getting past test status from Jenkins"
/* Depth */
depth = 2
/* Project Name */
projectName = "junit-and-tap"
O] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Google Cloud Messsaging Notification Plugin 0.9-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ gcm ---
[INFO] Deleting /home/kinow/java/jenkins-workspace/gcm-notification-plugin/target
[INFO]
[INFO] >>> maven-hpi-plugin:1.90:run (default-cli) @ gcm >>>
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Google Cloud Messsaging Notification Plugin 0.9-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ gcm ---
[INFO] Deleting /home/kinow/java/jenkins-workspace/gcm-notification-plugin/target
[INFO]
[INFO] >>> maven-hpi-plugin:1.74:run (default-cli) @ gcm >>>
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Google Cloud Messsaging Notification Plugin 0.9-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ gcm ---
[INFO] Deleting /home/kinow/java/jenkins-workspace/gcm-notification-plugin/target
[INFO]
[INFO] >>> maven-hpi-plugin:1.74:run (default-cli) @ gcm >>>
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Google Cloud Messsaging Notification Plugin 0.9-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ gcm ---
[INFO] Deleting /home/kinow/java/jenkins-workspace/gcm-notification-plugin/target
[INFO]
[INFO] >>> maven-hpi-plugin:1.71:run (default-cli) @ gcm >>>
@kinow
kinow / gist:4106355
Created November 18, 2012 17:24
JENKINS-15791 tap
1..63
ok 1 Create Search results copies simple attributes
ok 2 Create Search results creates empty product list for no results
ok 3 Create Search results creates 1 product list for one results
ok 4 Create Search results creates multiple product list for more than one result
ok 5 serviceUrlFor should prepend current site
ok 6 fullUrlFor should prepend current site
ok 7 config should return config for supplied site
ok 8 Middleware should add current site to res locals
ok 9 Middleware should set locale for i18n correctly