Simple Rake tasks for managing and releasing Ruby projects.
MIT License
rubygems-tasks provides agnostic and unobtrusive Rake tasks for building, installing and releasing Ruby Gems.
require 'rubygems/tasks'
Gem::Tasks.new
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.
.gemspec
file..gemspec
files..tar.gz
and .zip
archives.
build:tar
build:zip
sign
tasks for package integrity:
sign:checksum
sign:pgp
console
task, for jumping right into your code.$ gem install rubygems-tasks
Specifying an alternate Ruby Console to run:
Gem::Tasks.new do |tasks|
tasks.console.command = 'pry'
end
Enable pushing gems to an in-house gem 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::Tasks::Build::Tar.new
Gem::Tasks::SCM::Status.new
Gem::Tasks::SCM::Tag.new(format: 'REL-%s')
Gem::Tasks::Sign::Checksum.new
Gem::Tasks::Console.new
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 (c) 2011-2020 Hal Brodigan
See {file:LICENSE.txt} for details.