New gem to showcase JRuby

Hi all,

I just released a gem that provides a nice little example of how to
take advantage of JRuby’s ability to use a Java library when it makes
sense. It’s not exactly a masterpiece, but it does demonstrate some
techniques that might be useful to other gem authors who are
interested in taking advantage of the JRuby platform when building
Ruby libraries around Java.

The gem is called yuicompressor. It’s a Ruby wrapper for Yahoo!'s
JavaScript and CSS compression library. The RubyGems page is
yuicompressor | RubyGems.org | your community gem host and the source is on my GitHub
account at GitHub - mjackson/yuicompressor: A YUI JavaScript and CSS compressor wrapper for Ruby and JRuby.

Any feedback would be greatly appreciated. It is my first attempt at
working with JRuby, so you may find something that could be done
better.

Enjoy,

Michael


Michael J.

@mjijackson


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

This would be really sweet as a rake task to add as part of creating a
war
file for deploying to an app server. We use YUI-compressor now in a
Java
only app and really love it. Another cool feature would be able to have
a
rails app automatically serve (and cache) the compressed Javascript and
CSS
in production, but just have the uncompressed served in Dev.

For anyone that uses something like JSMin, we found that YUI compressor
consistently yields higher compression levels and is completely safe. I
don’t think they’ve had to fix a bug in like 2 years.

Joe

Awesome… already created a Cap task to compress for production.
Saves me a step.

On Tue, Aug 3, 2010 at 3:21 PM, Joseph A. [email protected]
wrote:

Joe

interested in taking advantage of the JRuby platform when building

To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

One comment from me: don’t use autoload. It seems like it should work
well, but ultimately it introduces a subtle thread-safety issue into
your library.

The rest looks pretty good at a glance :slight_smile: A nice example of how easy
it is to use Java libs from Ruby!

On Tue, Aug 3, 2010 at 1:09 PM, Michael J. [email protected]
wrote:

JavaScript and CSS compression library. The RubyGems page is


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Thanks for the feedback. I’d never heard of this thread safety issue
before now. Care to elaborate?


Michael J.

@mjijackson

On Tue, Aug 3, 2010 at 11:08 PM, Charles Oliver N.
[email protected] wrote:

I just released a gem that provides a nice little example of how to

http://mjijackson.com


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

This thread talks about it and also in the thread someone mentions the
other big thread on it from ruby-core mailing list:

http://www.ruby-forum.com/topic/172385

-Tom

On Wed, Aug 4, 2010 at 7:01 AM, Michael J. [email protected]
wrote:

On Tue, Aug 3, 2010 at 11:08 PM, Charles Oliver N.

account at GitHub - mjackson/yuicompressor: A YUI JavaScript and CSS compressor wrapper for Ruby and JRuby.
Michael J.

http://xircles.codehaus.org/manage_email


blog: http://blog.enebo.com twitter: tom_enebo
mail: [email protected]


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email