inukshuk/latex-decode — pull request #5 by blambeau (2012-02-08 09:14:21+00:00)
Title: Conditional inclusion of unicode dependency

Hi!

As discussed previously, you'll find here the simplest way of conditionally including the unicode dependency.

Your releasing workflow is a bit more complex now, and should look like this (as there is no Rakefile in the project, I haven't tried to make the stuff smoother)

rvm use 1.9.2
gem build latex-decode.gemspec # latex-decode-0.0.x.gem
gem push latex-decode-0.0.x.gem

rvm use jruby
gem build latex-decode.gemspec # latex-decode-0.0.x-java.gem
gem push latex-decode-0.0.x-java.gem

People only have to declare a 'latex-decode' dependency (in bibtex-ruby, for instance) and the gem installer (as well as bundler) will automatically find the accurate gem for their platform.

No solution currently exists to build truly conditional gem specs, so releasing multiple times is the way to go for now. Gems such as rake-compiler (https://github.com/luislavena/rake-compiler) tackle the problem more effectively, but that solution seems overkilled here.

Tell me what you think!