Class: PoiseBoiler::Helpers::Rake::Badges

Inherits:
Halite::HelperBase
  • Object
show all
Defined in:
lib/poise_boiler/helpers/rake/badges.rb

Overview

Helper for a Rakefile to add a ‘badges` command. This command will print out README badges suitable for use on GitHub.

Examples:

Installing tasks

require 'poise_boiler/helpers/rake/badges'
PoiseBoiler::Helpers::Rake::Badges.install

Creating badges

$ rake badges >> README.md

Since:

  • 1.0.0

Instance Method Summary collapse

Instance Method Details

#installvoid

This method returns an undefined value.

Install the ‘badges` rake task.

Since:

  • 1.0.0



40
41
42
43
44
45
46
47
48
49
# File 'lib/poise_boiler/helpers/rake/badges.rb', line 40

def install
  return if options[:no_gem]
  # Delayed so that Rake doesn't need to be loaded to run this file.
  extend ::Rake::DSL

  desc "Generate README badges for #{gemspec.name}"
  task 'badges' do
    shell.say(generate_badges)
  end
end