Yesterday I had no money to go out and the weather sucked. So I decided to pick up one of my side projects and hack for a while.
For that project I need to fundamental components, a way of extracting keywords in a text and a wrapper for the public rss feeds of delicious.com. So I created webtagger and deliruby (this morning I thought to rename it to “delirious”, which is cooler, but, well, nevermind) and released them as opensource gems for whomever wants to to hack them and use them. I think it’s cool to be able to release something easy to use for others (using
gem install instead of downloading the source, extracting it, installing it and all that fuzz).
So, how do you create a gem?
Rakefileto add the description and dependencies
test/dir or start coding in the
bin/dir and declare it in the Rakefile with
gem.executables << your-bin-name
rake version:bump:minor(more on major-minor-patch versioning here )
rake buildto create the gemspec (
your-gem.gemspec) and the gem itself (will be created in a
pkgand simply run
.gemfile for the version you’re releasing and you’re done!
Keep in mind that you need to be subscribed to rubygems.org -don’t worry, it’s free- and have a version of rubygem greater or equal to 1.3.7