Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for travis-ci.com #82

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ travis:
url_path: travis-ci.org
badge_slug: travis

travis-com:
alt_text: Build Status
scheme: https
url_path: travis-ci.com
badge_slug: travis/com

coveralls:
alt_text: Coverage Status
url_path: coveralls.io/r
Expand Down
4 changes: 3 additions & 1 deletion lib/badger/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def version
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 :travis_com, :type => :boolean, :default => false, :desc => 'Use the new travis-ci domain (travis-ci.com instead of travis-ci.org)'
method_option :size, :type => :boolean, :default => false, :desc => 'Generate repo size badge'
method_option :dci, :type => :boolean, :default => false, :desc => 'Include a Dependency CI badge (experimental)'
method_option :style, :type => :string, :default => 'flat-square', :desc => "Choose a different badge style (currently supported: #{Config.instance.config['valid_styles'].join ', '})"
Expand All @@ -25,7 +26,8 @@ def badge dir = '.'

@badger.style options[:style] if options[:style]

@badger.add 'travis' if Badger.has_travis? dir
@badger.add 'travis' if Badger.has_travis? dir and not options[:travis_com]
@badger.add 'travis-com' if Badger.has_travis? dir and options[:travis_com]
@badger.add 'gemnasium' if Badger.has_gemfile? dir
@badger.dependencyci if options[:dci]
@badger.add 'coveralls' if Badger.has_coveralls? dir
Expand Down