Technical.Web

Technical.Projects

Jeweler is the GitHub recommended way to generating and maintaining RubyGem projects.

Daywalker is a Ruby library for accessing data about congressional districts and legislators using the Sunlight API.

Technical.Stats

Latest post

Jeweler turns 1.0.0

There’s always a certain amount of stigma, fear, and uncertainty around the doing the big 1.0 release. I finally got over that for Jeweler. So, be hold! Jeweler 1.0.0.

For the uninitiated, Jeweler is a tool for creating and managing RubyGems projects. It lets you quickly go from 0 to released gem. It also simplifies managing your gem after you create it.

There are two main components to jeweler: the generator for creating an initial project, and the rake tasks for managing versioning and releases.

Install it


sudo gem install jeweler

The generator

The simplest incantation of the jeweler is this:


jeweler your-awesome-gem

This creates a local git repository with a basic skeleton for your project. It includes things like a Rakefile, a template to put your gem’s code in, a test helper, a failing test case, and a LICENSE. It also setup to be pushed to GitHub and includes a reasonable gitignore file.

By default, you’ll get Shoulda flavored tests, but you can opt to go with test/unit, minitest, rspec, bacon, or micronaut. For example:


jeweler —micronaut your-awesome-gem

If you want to use cucumber, you can have that too. It’ll be setup for whichever testing framework you choose:


jeweler —micronaut —cucumber your-awesome-gem

You can also choose to have a repository created for you on GitHub, with RubyGem creation enabled:


jeweler —create-repo your-awesome-gem

While originally intended specifically to work with GitHub’s gem support, it eventually was realized that it’d be nice to release to RubyForge too. You can add support to your project:


jeweler —rubyforge your-awesome-gem

If you look at your Rakefile, you’ll notice that a number of tasks were generated for you. Jeweler itself provides a number of tasks, as mentioned, but it also tasks for rdoc, test or spec, and rcov. However, your Rakefile doesn’t depend specifically on jeweler. This means that someone randomly cloning your project, and messing around with patching/testing it, then they don’t need to have jeweler installed.

The tasks

When you are ready to do a release, you first create the version. It is stored in VERSION (formerly VERSION.yml, but both work). This only updates what jeweler thinks the version is, and doesn’t actually release anything. It defaults to 0.0.0, but you can choose to specify your own:


rake version:write
rake version:write MAJOR=1 MINOR=5 PATCH=3

You’d typically release after this initial version created. Releasing involves generating a gemspec based on your version, and pushing it to GitHub, and tagging the release:


rake release

After your initial release, you can bump the version easily. You can choose to do the major, minor, or patch version. For 1.5.3, 1 is the major, 5 is the minor, and 3 is the patch:


rake version:bump:patch
rake version:bump:minor
rake version:bump:major

Version bumping only updates what version jeweler thinks you are using. You’ll need to do a release to actually release:


rake release

If you’ve configured your project for releasing to RubyForge, and you’ve registered your project, you can prepare RubyForge for it:


rake rubyforge:setup

Then you can release the docs and gem:


rake rubyforge:release

More resources

This has been a pretty high level overview and scant on details, so you might want to check out:

Older posts

Tumbling away
April 24, 2009
Ruby stubbing and mocking with rr
April 14, 2009
Debugging Cucumber
March 30, 2009
Escape Ruby Regular Expressions
February 27, 2009
Using method_missing and respond_to? to create dynamic methods
February 17, 2009
Autoloading factory_girl definitions
February 15, 2009
Adding Cucumber to a Ruby project
February 13, 2009
Jeweler, now with support for test/unit, minitest, rspec, and cucumber
February 03, 2009
Craft the perfect gem with Jeweler
January 19, 2009
Test Or Die: Validates Uniqueness Of, Shoulda and Factory Girl Edition
January 09, 2009
Stop Net::HTTP dead in its tracks with fakeweb
January 04, 2009
vimpocalypse
December 21, 2008
Presentation: Rake, The Familiar Stranger
December 13, 2008
SNIF Tag has launched!
November 24, 2008
Implementing a simple logging IRC bot
November 14, 2008
RCov for almost any occasion
October 28, 2008
Introducing FlockUp : Find Similar Users on Twitter
October 23, 2008
helper testing using ActionView::TestCase
October 05, 2008
Shoulda can automatically load custom macros
September 29, 2008
Rails special sauce: Test::Unit setup and teardown
September 28, 2008
Use ActionController::TestCase
September 25, 2008
TextMate Bundle Management
September 23, 2008
Determine if content_for was used
September 17, 2008
shoulda 2.0.0, now with gem power
September 15, 2008
Creating a svn.authorsfile when migrating from subversion to git
September 07, 2008
Making factory_girl even easier on Rails
August 18, 2008
Manage your markup with has_markup
August 02, 2008
Refactoring an ActiveRecord callback
July 03, 2008
A walk through of test-driven development with shoulda
June 23, 2008
Getting back to my vim roots with MacVim
June 17, 2008
Configure git to globally ignore some files
June 13, 2008
Boston Ruby Group Meeting June 2008 Summary
June 11, 2008
Software development practices and lessons seen while moving into a new apartment
June 06, 2008
Embracing your paranoia with acts_as_paranoid
May 31, 2008
Ebuild Protip: Only fetch from SRC_URI
May 31, 2008
My bad, Planet Gentoo
May 29, 2008
Ebuild Protip: Use emerge --debug to figure out what's happening
May 29, 2008
Ebuild Protip: Know when to NOT define your own src_unpack
May 27, 2008
Playing with heroku
May 25, 2008
Managing svn:ignore with impunity
May 23, 2008
Site updates
May 22, 2008
Notes from BarCampBoston3
May 19, 2008
More Gentoo development links than you probably need
May 14, 2008
Better partials with better-partials
May 13, 2008
Using a Gentoo Prefixed shell as your login shell
May 08, 2008
Boston.rb Hackfest 5/07 Post Mortem
May 07, 2008
Managing RubyGems on Gentoo
May 05, 2008
Boston.rb Hackfest 4/29 Post Mortem
April 30, 2008
piston and git for the win
April 23, 2008
Boston.rb Hackfest 4/15 Post Mortem
April 22, 2008
How to raise the bar to contribute to your open source project
April 20, 2008
Dead easy nginx configuration on Gentoo
April 18, 2008
GitHub: Forking versus being a committer
April 16, 2008
GitHub: Requesting your changes be pulled from a fork
April 15, 2008
GitHub: Forking a project
April 14, 2008
BDD with Shoulda talk from MountainWest RubyConf
April 13, 2008
Ensuring you get credit where credit is due with Creative Commons
April 12, 2008
Meet Merb: Ezra's MountainWest RubyConf Talk
April 11, 2008
Tell Hoe what tests to run
April 10, 2008
Shoulda macros allows you to embrace your inner slacker
April 09, 2008
Follow up: Haml no longer be blowing my spot
April 08, 2008
Haml be blowing my spot
April 07, 2008
Shoulda and assert{2.0} make swell bedfellows
April 06, 2008
Hacking on Wikipedia: links for 2008-03-20
March 20, 2008
Meet Merb
February 28, 2008
Meet Merb: Action methods taking arguments
February 28, 2008
Gentoo Prefix as an alternative to MacPorts, Fink
February 21, 2008
Guide to Gentoo Announcements
February 20, 2008
More git: links 2008-02-14
February 14, 2008
Gitosis on Gentoo
January 18, 2008
git: links for 2008-01-05
January 06, 2008
Simple caching of markdown markdown in your model
December 18, 2007
Snowocalypse Boston 12-13-2007
December 13, 2007
Tracking down Oracle constraint violations with a little SQL and Toad
December 11, 2007
Focusing a form field at page load with MochiKit
December 10, 2007
The Big Rewrite is Here
December 09, 2007
It's been quiet here... I blame Halo 3
October 04, 2007
NFJS: Thoughts on "OSGi: A Well Kept Secret"
September 23, 2007
NFJS: Thoughts on "JavaServer Faces: A Whirlwind Tour"
September 23, 2007
Aspect Oriented Programming: Links for 2007-10-19
September 19, 2007
Cover your butt with rcov
September 18, 2007
NFJS: Summary and thoughts on the New England Software Symposium
September 17, 2007
DRY Controllers and Helpers using Forwardable
September 13, 2007
Authentication and authorization: Remembering were you came from
September 12, 2007
RE: dev-ruby/rails: File Collision Free Since September 2007!
September 04, 2007
dev-ruby/rails: File Collision Free Since September 2007!
September 01, 2007
Capistrano 2.0.0 on Gentoo at last
September 01, 2007
Java: Tons Standardized APIs, but not so many standardized practices
August 29, 2007
Geeks In Boston
August 28, 2007
Using Markdown in vim
August 23, 2007
Eating My Own Dogfood: New Site Skin
August 20, 2007
Up and running with Rails and YUI CSS
August 15, 2007
Interviewing Research: Links for 08-08-2007
August 08, 2007
Rails Heavy: Links for 08-07-2007
August 06, 2007
An Experiment: Links for 08-03-2007
August 03, 2007
Our evaluation of Selenium for web testing
August 01, 2007
Pidgin idle time
July 31, 2007
Of Dreams unfulfilled, JMock, and Expectations
July 24, 2007
Philadelphia for the rest of the week
July 18, 2007
Don't Repeat Yourself with with_options
July 17, 2007
Name your routes, and name them well
July 16, 2007
Adding a tag listing
July 16, 2007
Fixing the routes for tags
July 14, 2007
Rails plugin for Google Analytics and artificial inflation
June 26, 2007
DevHouseBoston
June 26, 2007
Technorati
June 23, 2007
ensuring proper RAILS_ENV in production
June 23, 2007
That's a lot of tags!!
June 22, 2007
Annoyances when specifying property values in Spring
June 19, 2007
Switched templating engine to BlueCloth
June 18, 2007
First Post!
June 17, 2007
JRuby on Rails on Gentoo
May 24, 2007
Aiding and abetting the enemy, rails 1.2.2, and #gentoo-ruby
February 16, 2007
Update on Xfce 4.4 unmasking
February 04, 2007
unmask teh Xfce!!!one
February 01, 2007
XFCE all up in your face
January 22, 2007
Dealing with libraries that like breaking their APIs
January 14, 2007
Java gets Groovier
January 11, 2007
Musings of the current state of open source Java
October 20, 2006
Java she wanted, Java she got
October 19, 2006
Summary of Java team meeting
September 10, 2006
Stale /etc/portage/package.unmask
August 03, 2006
JAVA_HOME pointing to generation-1 system vm
August 03, 2006
Java 1.4: Do we still need it?
August 01, 2006
Tomcat 5.5 and Eclipse 3.2
July 04, 2006
Updated Java System and Java 1.5 unmasked
July 01, 2006
Update: The New Java Hotness
June 29, 2006
The New Java Hotness
June 26, 2006
Of Java 1.5 and Gentoo
May 22, 2006
Java ideas for Summer of Code
May 04, 2006
Eclipse 3.1.2
April 19, 2006
Hello World
April 04, 2006