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
@Grab( 'com.bloidonia:groovy-common-extensions:0.5' ) | |
def m = (1..10) .tap { println "original ${it}" } | |
.findAll { it % 2 == 0 } .tap { println "evens ${it}" } | |
.collect { it * it } .tap { println "squares ${it}" } | |
// prints: | |
// original [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | |
// evens [2, 4, 6, 8, 10] | |
// squares [4, 16, 36, 64, 100] |
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
/* | |
* 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" |
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
/* | |
* The MIT License | |
* | |
* Copyright (c) <2012> <Bruno P. Kinoshita> | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |