lib/badger/cli.rb in badgerbadgerbadger-0.10.2 vs lib/badger/cli.rb in badgerbadgerbadger-0.11.1
- old
+ new
@@ -12,14 +12,16 @@
desc 'badge', 'Generate badge markdown'
long_desc File.read File.join File.dirname( __FILE__), '..', '..', 'DESC.md'
method_option :png, :type => :boolean, :default => false, :desc => 'Generate PNG badges instead of the default SVG (because sometimes Github does caching things)'
method_option :pulls, :type => :boolean, :default => false, :desc => 'Generate Github pull-request and issue-count badges'
+ method_option :style, :type => :string, :default => nil, :desc => "Choose a different badge style (currently supported: 'flat' or 'flat-square')"
def badge dir = '.'
@badger = Badger.new Badger.git_remote dir
@badger.badge_type 'png' if options[:png]
+ @badger.style options[:style] if options[:style]
@badger.add 'travis' if Badger.has_travis? dir
@badger.add 'gemnasium' if Badger.has_gemfile? dir
@badger.add 'coveralls' if Badger.has_coveralls? dir
@badger.add 'codeclimate' if @badger.any?