badgerbadgerbadger 0.11.1 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c9af23f129d7fc0d0ff6c2da27abae3da5bc596
4
- data.tar.gz: e08ce50e33fc38845c8131ca2ebbf4d7e3c003a3
3
+ metadata.gz: bda40099101531793bb11b4dd352cae00ee3f9ce
4
+ data.tar.gz: eb26b737315c9dec31a65f1025be60e6646bd361
5
5
  SHA512:
6
- metadata.gz: ec577ef671de98f9030e4127077af545e9c36f5df6cc301bcec5bf2c437b3d1fe37c7d6ed715106655e33002993ba11d0db749926ee173c448c856c5e4ae0c97
7
- data.tar.gz: 9490e09bed7a3a9c27c9b3568026bf9a0e44b3a0e8eb97112638344d64164968bd40a48e5b5b24bcc7b51b85d627c32b2aaa652219291c31e647418bc2c3c936
6
+ metadata.gz: b4254cf8270add88255ccf324cf649982f975ac9f94c97b41ba56914aa2e8f6f352877d61e0e8b153d6462d7eca1b52afc2a4004fcb4579bb5ec33b35d0fc172
7
+ data.tar.gz: d530e8342c7ef47240a9821f00f3214864cb21c369c98677b0b62534880b82994d2ba17a5deba9f1f7b1468eeb10d7334421b5b6ea16b01ac348c777882a6c4c
data/DESC.md CHANGED
@@ -25,5 +25,3 @@ And if a license file is found, a License Badge will be generated. Currently sup
25
25
  * GPL-3
26
26
 
27
27
  The supported license details are in `https://github.com/badges/badgerbadgerbadger/blob/master/config/licenses.yaml`, if you're using a different license, send a PR! And if your gemspec license conflicts with your LICENSE file, you should probably fix that.
28
-
29
- Use the `--pulls` flag to add badges for open Github issues and pull-requests.
data/README.md CHANGED
@@ -1,13 +1,12 @@
1
- [![Build Status](http://img.shields.io/travis/badges/badgerbadgerbadger.svg)](https://travis-ci.org/badges/badgerbadgerbadger)
2
- [![Dependency Status](http://img.shields.io/gemnasium/badges/badgerbadgerbadger.svg)](https://gemnasium.com/badges/badgerbadgerbadger)
3
- [![Coverage Status](http://img.shields.io/coveralls/badges/badgerbadgerbadger.svg)](https://coveralls.io/r/badges/badgerbadgerbadger)
4
- [![Code Climate](http://img.shields.io/codeclimate/github/badges/badgerbadgerbadger.svg)](https://codeclimate.com/github/badges/badgerbadgerbadger)
5
- [![Github Issues](http://githubbadges.herokuapp.com/badges/badgerbadgerbadger/issues.svg)](https://github.com/badges/badgerbadgerbadger/issues)
6
- [![Pending Pull-Requests](http://githubbadges.herokuapp.com/badges/badgerbadgerbadger/pulls.svg)](https://github.com/badges/badgerbadgerbadger/pulls)
7
- [![Gem Version](http://img.shields.io/gem/v/badgerbadgerbadger.svg)](https://rubygems.org/gems/badgerbadgerbadger)
8
- [![License](http://img.shields.io/:license-mit-blue.svg)](http://badges.mit-license.org)
9
- [![Badges](http://img.shields.io/:badges-9/9-ff6799.svg)](https://github.com/badges/badgerbadgerbadger)
10
-
1
+ [![Build Status](http://img.shields.io/travis/badges/badgerbadgerbadger.svg?style=flat-square)](https://travis-ci.org/badges/badgerbadgerbadger)
2
+ [![Dependency Status](http://img.shields.io/gemnasium/badges/badgerbadgerbadger.svg?style=flat-square)](https://gemnasium.com/badges/badgerbadgerbadger)
3
+ [![Coverage Status](http://img.shields.io/coveralls/badges/badgerbadgerbadger.svg?style=flat-square)](https://coveralls.io/r/badges/badgerbadgerbadger)
4
+ [![Code Climate](http://img.shields.io/codeclimate/github/badges/badgerbadgerbadger.svg?style=flat-square)](https://codeclimate.com/github/badges/badgerbadgerbadger)
5
+ [![Github Issues](http://githubbadges.herokuapp.com/badges/badgerbadgerbadger/issues.svg?style=flat-square)](https://github.com/badges/badgerbadgerbadger/issues)
6
+ [![Pending Pull-Requests](http://githubbadges.herokuapp.com/badges/badgerbadgerbadger/pulls.svg?style=flat-square)](https://github.com/badges/badgerbadgerbadger/pulls)
7
+ [![Gem Version](http://img.shields.io/gem/v/badgerbadgerbadger.svg?style=flat-square)](https://rubygems.org/gems/badgerbadgerbadger)
8
+ [![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org)
9
+ [![Badges](http://img.shields.io/:badges-9/9-ff6799.svg?style=flat-square)](https://github.com/badges/badgerbadgerbadger)
11
10
  #Badger
12
11
 
13
12
  Because I grow weary of copy-n-pasting the badge URLs into the README of every project, and the [img.shields.io](http://img.shields.io) API now supports all of the services I use
@@ -2,4 +2,7 @@ badge_service: img.shields.io
2
2
  license_colour: blue
3
3
  bonus_badge_colour: ff6799
4
4
  bonus_badge_link: https://github.com/badges/badgerbadgerbadger
5
- badge_type: svg
5
+ badge_type: svg
6
+ valid_styles:
7
+ - flat
8
+ - flat-square
@@ -1,23 +1,23 @@
1
1
  travis:
2
- alt_text: Build Status
3
- scheme: https
4
- url_path: travis-ci.org
5
- badge_slug: travis
2
+ alt_text: Build Status
3
+ scheme: https
4
+ url_path: travis-ci.org
5
+ badge_slug: travis
6
6
 
7
7
  coveralls:
8
- alt_text: Coverage Status
9
- url_path: coveralls.io/r
10
- badge_slug: coveralls
8
+ alt_text: Coverage Status
9
+ url_path: coveralls.io/r
10
+ badge_slug: coveralls
11
11
 
12
12
  gemnasium:
13
- alt_text: Dependency Status
14
- url_path: gemnasium.com
15
- badge_slug: gemnasium
13
+ alt_text: Dependency Status
14
+ url_path: gemnasium.com
15
+ badge_slug: gemnasium
16
16
 
17
17
  codeclimate:
18
- alt_text: Code Climate
19
- url_path: codeclimate.com/github
20
- badge_slug: codeclimate/github
18
+ alt_text: Code Climate
19
+ url_path: codeclimate.com/github
20
+ badge_slug: codeclimate/github
21
21
 
22
22
  pulls:
23
23
  alt_text: Pending Pull-Requests
@@ -16,3 +16,10 @@ Feature: Alternative styles
16
16
  [![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://doge.mit-license.org)
17
17
  [![Badges](http://img.shields.io/:badges-7/7-ff6799.svg?style=flat-square)](https://github.com/badges/badgerbadgerbadger)
18
18
  """
19
+ Scenario: Invalid style choice
20
+ When I run `badger badge --style fluffy /tmp/wow_repo`
21
+ Then the output should contain:
22
+ """
23
+ Invalid style choice 'fluffy'
24
+ """
25
+ And the exit status should be 3
@@ -38,6 +38,11 @@ module Badger
38
38
  end
39
39
 
40
40
  def style style
41
+ unless Config.instance.config['valid_styles'].include? style
42
+ puts "Invalid style choice '#{style}'"
43
+ exit 3
44
+ end
45
+
41
46
  Config.instance.config['badge_style'] = style
42
47
  end
43
48
 
@@ -14,12 +14,13 @@ module Badger
14
14
  long_desc File.read File.join File.dirname( __FILE__), '..', '..', 'DESC.md'
15
15
  method_option :png, :type => :boolean, :default => false, :desc => 'Generate PNG badges instead of the default SVG (because sometimes Github does caching things)'
16
16
  method_option :pulls, :type => :boolean, :default => false, :desc => 'Generate Github pull-request and issue-count badges'
17
- method_option :style, :type => :string, :default => nil, :desc => "Choose a different badge style (currently supported: 'flat' or 'flat-square')"
17
+ method_option :style, :type => :string, :default => nil, :desc => "Choose a different badge style (currently supported: #{Config.instance.config['valid_styles'].join ', '})"
18
18
 
19
19
  def badge dir = '.'
20
20
  @badger = Badger.new Badger.git_remote dir
21
21
 
22
22
  @badger.badge_type 'png' if options[:png]
23
+
23
24
  @badger.style options[:style] if options[:style]
24
25
 
25
26
  @badger.add 'travis' if Badger.has_travis? dir
@@ -1,3 +1,3 @@
1
1
  module Badger
2
- VERSION = "0.11.1"
2
+ VERSION = "0.11.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: badgerbadgerbadger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - pikesley