Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A compile command for macgem
Ruby

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
.rvmrc
Gemfile
LICENSE.txt
README.rdoc
Rakefile
rubygems-compile.gemspec

README.rdoc

rubygems-compile

A post-install hook for `macgem` to automatically compile gems when you install them.

All you need to do is:

gem install rubygems-compile

And then you're off to the races! When you install gems you should get a bunch of output about files being compiled.

TODO

Right now, all you need to do is install the gem and it will be used every time you install a new gem (or reinstall an existing gem).

In the future, there are a few different ways this plugin could operate:

  • A gem command

    • gem compile nokogiri

    • gem compile –remove-original-files nokogiri

      • I can't remove the original *.rb files and leave *.rbo files by default because of how rubygems identifies gems (unless I modify gemspec files)

  • A gem install option

    • gem install –compile nokogiri

I'm not sure which is best, perhaps all of them will get implemented.

Caveats

  • Large gems will take a long time to compile, but these are the gems that will benefit the most from being compiled

  • This has only been tested on a few gems, but should not break existing gems since we leave the original files around

  • Some gems specifically require a file with the .rb extension, defeating the purpose of having a compiled version of the gem

Copyright

Copyright © 2011 Mark Rada. See LICENSE.txt for further details.

Something went wrong with that request. Please try again.