lib/poise_boiler/helpers/rake/badges.rb
# Generate badges as a string.
#
# @return [String]
Generate badges as a string.
Generate badges as a string .
def generate_badges
          ''.tap do |badges|
            github = options[:github] || detect_github
            badges << badge('Build Status', "travis/#{github}", "https://travis-ci.org/#{github}") if github
            badges << badge('Gem Version', "gem/v/#{gemspec.name}", "https://rubygems.org/gems/#{gemspec.name}")
            badges << badge('Cookbook Version', "cookbook/v/#{cookbook.cookbook_name}", "https://supermarket.chef.io/cookbooks/#{cookbook.cookbook_name}") if cookbook.is_halite_cookbook?
            badges << badge('Code Climate', "codeclimate/github/#{github}", "https://codeclimate.com/github/#{github}") if github
            badges << badge('Coverage', "codecov/c/github/#{github}", "https://codecov.io/github/#{github}") if github
            badges << badge('Gemnasium', "gemnasium/#{github}", "https://gemnasium.com/#{github}") if github
            badges << badge('License', 'badge/license-Apache_2-blue', 'https://www.apache.org/licenses/LICENSE-2.0')
          end
        end
def generate_badges '' . tap do | badges | github = options [ :github ] || detect_github badges << badge ( 'Build Status' , "travis/#{github}" , "https://travis-ci.org/#{github}" ) if github badges << badge ( 'Gem Version' , "gem/v/#{gemspec.name}" , "https://rubygems.org/gems/#{gemspec.name}" ) badges << badge ( 'Cookbook Version' , "cookbook/v/#{cookbook.cookbook_name}" , "https://supermarket.chef.io/cookbooks/#{cookbook.cookbook_name}" ) if cookbook . is_halite_cookbook? badges << badge ( 'Code Climate' , "codeclimate/github/#{github}" , "https://codeclimate.com/github/#{github}" ) if github badges << badge ( 'Coverage' , "codecov/c/github/#{github}" , "https://codecov.io/github/#{github}" ) if github badges << badge ( 'Gemnasium' , "gemnasium/#{github}" , "https://gemnasium.com/#{github}" ) if github badges << badge ( 'License' , 'badge/license-Apache_2-blue' , 'https://www.apache.org/licenses/LICENSE-2.0' ) end end
Generate badges as a string.
Generate badges as a string .
# Example badges # [![Build Status](https://img.shields.io/travis/poise/poise.svg)](https://travis-ci.org/poise/poise) # [![Gem Version](https://img.shields.io/gem/v/poise.svg)](https://rubygems.org/gems/poise) # [![Cookbook Version](https://img.shields.io/cookbook/v/poise.svg)](https://supermarket.chef.io/cookbooks/poise) # [![Code Climate](https://img.shields.io/codeclimate/github/poise/poise.svg)](https://codeclimate.com/github/poise/poise) # [![Coverage](https://img.shields.io/codecov/c/github/poise/poise.svg)](https://codecov.io/github/poise/poise) # [![Gemnasium](https://img.shields.io/gemnasium/poise/poise.svg)](https://gemnasium.com/poise/poise) # [![License](https://img.shields.io/badge/license-Apache_2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
None
String