badgerbadgerbadger 0.6.3 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -9
- data/config/config.yaml +3 -2
- data/features/badger.feature +1 -0
- data/lib/badger/badger.rb +12 -0
- data/lib/badger/cli.rb +1 -0
- data/lib/badger/version.rb +1 -1
- data/spec/badger_spec.rb +9 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90d42e75b8b3f5058a3cafb3355c81e87bb25964
|
4
|
+
data.tar.gz: 8a1e5247cb53af991270dc8f203864c0f2df640c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25168a2eef1b3218a42fbb2f19e2dc93fc150b845cb9cd329ea7fa2c9f6c3e19e487ffe0df8a993805aaa4ffcdbffa181051620488d75e4d7001b489b30acb19
|
7
|
+
data.tar.gz: 82748014fca61117b36b919b0d61bf63437c15c126cced68b6d3cc2fb0bed9076e03dddc64c98c1f20d37718e7bc398902b5e47d662e226c4fdce2f0d1b3f3ec
|
data/README.md
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
[![Build Status](http://img.shields.io/travis/pikesley/badger.svg)](https://travis-ci.org/pikesley/badger)
|
2
|
-
[![Coverage Status](http://img.shields.io/coveralls/pikesley/badger.svg)](https://coveralls.io/r/pikesley/badger)
|
3
2
|
[![Dependency Status](http://img.shields.io/gemnasium/pikesley/badger.svg)](https://gemnasium.com/pikesley/badger)
|
3
|
+
[![Coverage Status](http://img.shields.io/coveralls/pikesley/badger.svg)](https://coveralls.io/r/pikesley/badger)
|
4
4
|
[![Code Climate](http://img.shields.io/codeclimate/github/pikesley/badger.svg)](https://codeclimate.com/github/pikesley/badger)
|
5
5
|
[![Gem Version](http://img.shields.io/gem/v/badgerbadgerbadger.svg)](https://rubygems.org/gems/badgerbadgerbadger)
|
6
6
|
[![License](http://img.shields.io/:license-mit-blue.svg)](http://pikesley.mit-license.org)
|
7
|
+
[![Badges](http://img.shields.io/:badges-7/7-ff6799.svg)](http://img.shields.io)
|
7
8
|
|
8
9
|
#Badger
|
9
10
|
|
@@ -23,14 +24,15 @@ or add it to your Gemfile
|
|
23
24
|
Then
|
24
25
|
|
25
26
|
badger badge
|
26
|
-
[![Build Status](http://img.shields.io/travis/
|
27
|
-
[![
|
28
|
-
[![
|
29
|
-
[![Code Climate](http://img.shields.io/codeclimate/github/
|
30
|
-
[![Gem Version](http://img.shields.io/gem/v/
|
31
|
-
[![License](http://img.shields.io/:license-mit-blue.svg)](http://
|
32
|
-
|
33
|
-
|
27
|
+
[![Build Status](http://img.shields.io/travis/doge/wow.svg)](https://travis-ci.org/doge/wow)
|
28
|
+
[![Dependency Status](http://img.shields.io/gemnasium/doge/wow.svg)](https://gemnasium.com/doge/wow)
|
29
|
+
[![Coverage Status](http://img.shields.io/coveralls/doge/wow.svg)](https://coveralls.io/r/doge/wow)
|
30
|
+
[![Code Climate](http://img.shields.io/codeclimate/github/doge/wow.svg)](https://codeclimate.com/github/doge/wow)
|
31
|
+
[![Gem Version](http://img.shields.io/gem/v/suchgem.svg)](https://rubygems.org/gems/suchgem)
|
32
|
+
[![License](http://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org)
|
33
|
+
[![Badges](http://img.shields.io/:badges-7/7-ff6799.svg)](http://img.shields.io)
|
34
|
+
|
35
|
+
ready to paste into the top of your README (with the correct URLs for your repo)
|
34
36
|
|
35
37
|
Try
|
36
38
|
|
data/config/config.yaml
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
badge_service:
|
2
|
-
license_colour:
|
1
|
+
badge_service: img.shields.io
|
2
|
+
license_colour: blue
|
3
|
+
bonus_badge_colour: ff6799
|
data/features/badger.feature
CHANGED
@@ -14,6 +14,7 @@ Feature: Badge robot
|
|
14
14
|
[![Code Climate](http://img.shields.io/codeclimate/github/doge/wow.svg)](https://codeclimate.com/github/doge/wow)
|
15
15
|
[![Gem Version](http://img.shields.io/gem/v/suchgem.svg)](https://rubygems.org/gems/suchgem)
|
16
16
|
[![License](http://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org)
|
17
|
+
[![Badges](http://img.shields.io/:badges-7/7-ff6799.svg)](http://img.shields.io)
|
17
18
|
"""
|
18
19
|
And the output should not contain:
|
19
20
|
"""
|
data/lib/badger/badger.rb
CHANGED
@@ -28,6 +28,18 @@ module Badger
|
|
28
28
|
self << Rubygem.badge(name)
|
29
29
|
end
|
30
30
|
|
31
|
+
def bonus
|
32
|
+
self.uniq!
|
33
|
+
|
34
|
+
badge_url = 'http://img.shields.io/:badges-%d/%d-%s.svg' % [
|
35
|
+
self.length + 1,
|
36
|
+
self.length + 1,
|
37
|
+
Config.instance.config['bonus_badge_colour']
|
38
|
+
]
|
39
|
+
target_url = 'http://img.shields.io'
|
40
|
+
self << Badger.badge('Badges', badge_url, target_url)
|
41
|
+
end
|
42
|
+
|
31
43
|
def to_s
|
32
44
|
self.uniq!
|
33
45
|
|
data/lib/badger/cli.rb
CHANGED
data/lib/badger/version.rb
CHANGED
data/spec/badger_spec.rb
CHANGED
@@ -83,6 +83,15 @@ module Badger
|
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
|
+
context 'bonus badge' do
|
87
|
+
it 'should have a badges badge' do
|
88
|
+
@badger.add 'travis'
|
89
|
+
@badger.add 'coveralls'
|
90
|
+
@badger.bonus
|
91
|
+
@badger[2].should == "[![Badges](http://img.shields.io/:badges-3/3-ff6799.svg)](http://img.shields.io)"
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
86
95
|
context 'output' do
|
87
96
|
it 'should produce some lines of text' do
|
88
97
|
@badger.add 'travis'
|