?

Log in

No account? Create an account

Previous Entry | Next Entry

RubyGems doesn't have to be a call to arms

Joss, Wouter, and Gunnar:

In my book, Ruby Phrasebook, I spent some time thinking about how much I hate RubyGems for the same reasons that you all do and--for the chapter on Ruby packaging--I settled on a nice compromise that both makes it easy to package a Ruby module and makes it compatible with RubyGems, as well.

Here is a small sample code snippet from the Packaging chapter:

Packaging Your Module with Hoe
$ sudo gem install hoe
...
$ sow rsssimple
$ mv -f rsssimple.rb rsssimple/lib/
$ cd rsssimple
$ $(EDITOR) README.txt
$ $(EDITOR) Rakefile
$ rake package

The preceding sequence of commands will take you from zero to fully packaged. However, before running the final command you need to do a little house-keeping. Before running rake, modify the Rakefile to resemble the following:

# -*- ruby -*- 

require 'rubygems' 
require 'hoe' 
require './lib/rsssimple.rb' 

Hoe.new('rsssimple', RSSSimple::VERSION) do |p| 
  p.developer('Jason Clinton', 
    'me@jasonclinton.com' ) 
  p.summary = 'Not intended for production.' 
end 

# vim: syntax=Ruby 

The preceding set of actions results in the generation of a pkg directory containing both a tarball and a gem file.

Explore what other commands have been magically created for you by running the following command:

rake -T

Comments

( 1 comment — Leave a comment )
ext_101348
Dec. 10th, 2008 02:32 am (UTC)
I don't hate it
I actually don't hate RubyGems. I'm not saying it is the best system in the world and I know it has it's flaws but it does accomplish some things reasonably well. So not perfect but good enough for me.
( 1 comment — Leave a comment )

Profile

color, uphair, smile
jasondclinton
Jason D. Clinton

Latest Month

September 2011
S M T W T F S
    123
45678910
11121314151617
18192021222324
252627282930 

Tags

Powered by LiveJournal.com
Designed by Tiffany Chow