rubygems-tasks

Description

rubygems-tasks provides agnostic and unobtrusive Rake tasks for building, installing and releasing Ruby Gems.

require 'rubygems/tasks'
Gem::Tasks.new

Philosophy

The Rake tasks which you use to manage a Ruby project should not be coupled to the project generator which you used to create the project. Project generators have nothing to do with the Rake tasks used to build, install and release a Ruby project.

Recently, many Ruby Developers began creating Ruby projects by hand, building/releasing RubyGems using gem build / gem push. Sometimes this resulted in RubyGems being released with uncommitted changes, or the developer forgetting to tag the release. Ruby Developers should have access to agnostic and unobtrusive Rake tasks, to automate the release process.

This is what rubygems-tasks seeks to provide.

Features

Anti-Features

Install

$ gem install rubygems-tasks

Examples

Specifying an alternate Ruby Console to run:

Gem::Tasks.new do |tasks|
  tasks.console.command = 'pry'
end

Enable pushing gems to an in-house Gemcutter server:

Gem::Tasks.new do |tasks|
  tasks.push.host = 'gems.company.com'
end

Disable the push task:

Gem::Tasks.new(:push => false)

Enable building .tar.gz and .zip archives:

Gem::Tasks.new(:build => {:tar => true, :zip => true})

Enable Checksums and PGP signatures for built packages:

Gem::Tasks.new(:sign => {:checksum => true, :pgp => true})

Selectively defining tasks:

Gem::Build::Tar.new
Gem::SCM::Status.new
Gem::SCM::Tag.new(:format => 'REL-%s')
Gem::Sign::Checksum.new
Gem::Console.new

Synopsis

rake build    # Builds all packages
rake console  # Spawns an Interactive Ruby Console
rake install  # Installs all built gem packages
rake release  # Performs a release

Copyright © 2011-2013 Hal Brodigan

See {file:LICENSE.txt} for details.