0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Easily create Rake tasks that mechanize Gem development workflow: Git integration, automatic semantic versioning, gem building and publishing.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10.4
~> 4.2
~> 3.4
>= 0.11.1, ~> 0.11

Runtime

~> 0.1
>= 1.4.1, ~> 1.4
 Project Readme

gem_polisher

Gem Version GitHub issues GitHub license Downloads

Description

This Gem provides Rake tasks to assist Ruby Gem development workflow.

Utilization

  require_relative 'lib/my/gem/with_long_name/version'
  Gem::Specification.new do |s|
    s.version = ::My::Gem::WithLongName::VERSION
    s.add_development_dependency 'rake', '~>10.4' # Change to latest available version!
    s.add_development_dependency 'gem_polisher', '~>0.4' # Change to latest available version!
  end
  • Create the version file accordingly. Eg:
  class My
    class Gem
      class WithLongName
        VERSION = '0.0.0'
      end
    end
  end
  • Add this to your Rakefile:
require 'bundler'
Bundler.require

require 'gem_polisher'
GemPolisher.new
  • Create your Gemfile and Gemfile.lock using Bundler.

At this point, you have at your disposal some Rake tasks:

$ rake -T
rake gem:release[type]  # Update bundle, run tests, increment version, build and publish Gem; type can be major, minor or patch
rake test               # Run all tests

That you can use to generate new releases. The gem:release[type] task will:

  • Make sure you are at master, with everything commited.
  • Update your bundle (Gemfile.lock).
  • Execute Rake task test.
    • Tip: You can define your own test tasks tied to this. Eg:
    desc "Run RSpec"
    task :rspec do
      sh 'bundle exec rspec'
    end
    task test: [:rspec]

Documentation

Documentation is provided via RDoc. The easiest way to read it:

gem install --rdoc gem_polisher
gem install bdoc
bdoc

You can read it with ri also, of course.