Skip to content

Commit

Permalink
Added support for new travis-ci domain.
Browse files Browse the repository at this point in the history
  • Loading branch information
dexpota committed Aug 29, 2018
1 parent 9fe8c1a commit d4e17e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
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 => 'Description'
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

0 comments on commit d4e17e5

Please sign in to comment.