I hereby claim:
- I am robfletcher on github.
- I am robfletcher (https://keybase.io/robfletcher) on keybase.
- I have a public key whose fingerprint is B0DA 4426 D1D5 1AF0 2D93 F480 9376 AE14 4362 B58E
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import groovy.transform.* | |
@CompileStatic | |
class A { | |
private final String name | |
A(String name) { | |
this.name = name | |
} | |
} |
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath "com.github.jruby-gradle:jruby-gradle-plugin:0.1.3+" | |
} | |
} |
def "subscriber receives message"() { | |
given: "An async event bus" | |
def eventBus = new AsyncEventBus(Executors.newCachedThreadPool()) | |
and: "A Fake Service" | |
def vars = new BlockingVariables() | |
def fakeService = Stub(FictionalService) { | |
process(_) >> { PersonMessage message -> vars.message = message } | |
} |
import groovy.transform.* | |
//@CompileStatic | |
class Person { | |
String name | |
private List<Person> friends | |
String friendNames() { | |
friends.collect { it.name }.join(", ") | |
} |
JobParameters fromMap(Map<String, String> parameters) { | |
parameters.inject(new JobParametersBuilder()) { JobParametersBuilder builder, entry -> | |
builder.addParameter(entry.key, new JobParameter(entry.value)) | |
} toJobParameters() | |
} |
@Grab("io.reactivex:rxjava:1.0.8") | |
import rx.* | |
import static java.util.concurrent.TimeUnit.* | |
import static java.time.LocalTime.* | |
def sub = Observable.interval(1, SECONDS) | |
.doOnNext { tick-> | |
println "tick $tick at ${now()}" | |
} | |
.subscribe { tick -> |
import groovy.xml.dom.DOMCategory | |
includeTargets << grailsScript("_GrailsInit") | |
includeTargets << grailsScript("_GrailsPlugins") | |
def getAvailablePluginVersions = { | |
def plugins = [:] | |
eachRepository {repo, url -> | |
use(DOMCategory) { | |
pluginsList.'plugin'.each {plugin -> |
includeTargets << grailsScript("_GrailsInit") | |
includeTargets << grailsScript("_PluginDependencies") | |
target('default': "Prepares development environment") { | |
depends(installPlugins, installDependencies) | |
event("StatusFinal", ["Done"]) | |
} | |
target(installPlugins: "Installs all plugins") { | |
depends(resolveDependencies) |