It's all about the answers!

Ask a question

How can I run JRuby scripts using the RTC Java client API?

Nick Edgar (6.5k711) | asked Nov 16 '13, 5:56 a.m.
edited Nov 16 '13, 6:31 a.m.
Is it possible to use JRuby (or other JVM-based scripting languages) to run scripts against RTC, using its Java client API?  Are there any examples showing how?

2 answers

permanent link
Nick Edgar (6.5k711) | answered Nov 16 '13, 6:19 a.m.
edited Nov 16 '13, 6:24 a.m.
Yes.  I've started a wiki topic for this:

"JRuby is an implementation of the Ruby programming language (and libraries), running on top of the Java runtime. It also makes it easy to call existing Java code, in a way that's idiomatic to Ruby. As an interpreted, dynamically typed language, it's easy to try things out and to iterate quickly, with quite concise code."

The examples there are Build-centric at the moment, but the same approach could be used for scripting other components in RTC / Jazz Foundation.

A similar approach could be taken with other JVM-based scripting languages, e.g. Groovy, Jython.
I'm considering switching these scripts to Groovy, since it's more "native" / common in the Java world (even though I personally quite like [J]Ruby).

Nick Edgar commented Nov 16 '13, 6:29 a.m.

I gave a lightning talk on this at Innovate 2013.  The BuildEnginesAndDefinitions.rb script is a slightly tweaked version of the one I walked through then.

permanent link
sam detweiler (12.5k6194201) | answered Nov 16 '13, 8:26 a.m.
very cool.. working to move a couple of my client apps over now. I missed Innovate this year.

Your answer

Register or to post your answer.