Greets,
I've been digging into various Ruby build and packaging tools today, trying to
grok what they do and how they work. My goal is to install a series of gems
manually -- no "gem install foo", no automatic downloading -- and come away
with a sophisticated enough understanding of the Ruby gem ecosystem to build
and publish my own gems reliably.
Step 1: Find the gem and download it from rubygems.org. Easy enough.
Step 2: "gem unpack foo.gem". This took me a while to figure out a long
time ago, but I know it now. I also finally tracked down
documentation of the .gem format today (try "tar -xf foo.gem" --
the format is similar to
<http://en.wikipedia.org/wiki/Deb_%28file_format%29>).
Step 3: Discover and install dependencies.
Step 4: Build.
Step 5: Run tests.
Step 6: Install.
It seems to me that steps 4, 5, and 6 would be dependent on the gem's chosen
build system. Looks like Rake is extremely common, but perhaps setup.rb is
another option? Are there others?
Assume Rake for the present. Once the dependencies are installed, then
building, testing and installing ought to be straightforward, so long has the
author has defined all the relevant build targets.
rake
rake test
[sudo] rake install
But then, how do I list the dependencies for a gem? It seems as if I ought to
be able to do this:
gem list_dependencies foo.gem
However, when I do "gem help commands", I don't see anything that does exactly
what I want. There's "specification"...
gem specification foo.gem
... but that dumps the whole durn YAML spec.
Ideas?
Marvin Humphrey
--
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby