From d4e17e5b1bb642794552be22e938aa316dcfc108 Mon Sep 17 00:00:00 2001 From: Fabrizio Destro Date: Wed, 29 Aug 2018 19:45:01 +0200 Subject: [PATCH 1/2] Added support for new travis-ci domain. --- config/services.yaml | 6 ++++++ lib/badger/cli.rb | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/config/services.yaml b/config/services.yaml index 975e84a..4891810 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -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 diff --git a/lib/badger/cli.rb b/lib/badger/cli.rb index 2fa94f0..8e9fb62 100644 --- a/lib/badger/cli.rb +++ b/lib/badger/cli.rb @@ -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 ', '})" @@ -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 From 2cbfd0c2fc418fe2e392b7771871b1239c42c9e9 Mon Sep 17 00:00:00 2001 From: Fabrizio Destro Date: Wed, 29 Aug 2018 19:48:36 +0200 Subject: [PATCH 2/2] Changed option's description. --- lib/badger/cli.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/badger/cli.rb b/lib/badger/cli.rb index 8e9fb62..0a73057 100644 --- a/lib/badger/cli.rb +++ b/lib/badger/cli.rb @@ -14,7 +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 :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 ', '})"