badgerbadgerbadger 0.14.0 → 0.15.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 +3 -3
- data/config/services.yaml +6 -0
- data/features/dependency-ci.feature +18 -0
- data/lib/badger.rb +1 -1
- data/lib/badger/badge.rb +1 -1
- data/lib/badger/badger.rb +4 -0
- data/lib/badger/cli.rb +2 -0
- data/lib/badger/dependencyci.rb +16 -0
- data/lib/badger/version.rb +1 -1
- data/spec/services_spec.rb +6 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db8d3448bceb806b53ec3b6896c4fa4dec44dfe3
|
4
|
+
data.tar.gz: dea1590886403ef90695006c8cb2f41f3c5c29a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c4ae4e97ba1441485d008c81eed77a2a878bf30bfb2e3aa492c66fe1ca294e842c2a710ab8cf93265dc842b280828fd73aaf9cd317326a5bacbad2a80d5e7e2
|
7
|
+
data.tar.gz: 818d0637ca50ce51757870d6b4dacc7c76f5ef8fbe8e32ec87df666065791cf399779b3e427beba85fd1846d00afcb5b16eeae5c64ce4c7b5a44c08705fa2b28
|
data/README.md
CHANGED
@@ -7,11 +7,11 @@
|
|
7
7
|
[![Gem Version](http://img.shields.io/gem/v/badgerbadgerbadger.svg?style=flat-square)](https://rubygems.org/gems/badgerbadgerbadger)
|
8
8
|
[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org)
|
9
9
|
[![Badges](http://img.shields.io/:badges-9/9-ff6799.svg?style=flat-square)](https://github.com/badges/badgerbadgerbadger)
|
10
|
-
#Badger
|
10
|
+
# Badger
|
11
11
|
|
12
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
|
13
13
|
|
14
|
-
##Usage
|
14
|
+
## Usage
|
15
15
|
|
16
16
|
Install it
|
17
17
|
|
@@ -41,7 +41,7 @@ If you're on a Mac, pipe the output into `pbcopy` to add the stuff directly to y
|
|
41
41
|
|
42
42
|
badger badge | pbcopy
|
43
43
|
|
44
|
-
##Help me make it better
|
44
|
+
## Help me make it better
|
45
45
|
|
46
46
|
git clone https://github.com/pikesley/badger
|
47
47
|
cd badger
|
data/config/services.yaml
CHANGED
@@ -19,6 +19,12 @@ codeclimate:
|
|
19
19
|
url_path: codeclimate.com/github
|
20
20
|
badge_slug: codeclimate/github
|
21
21
|
|
22
|
+
dependencyci:
|
23
|
+
alt_text: Dependency CI
|
24
|
+
service_root: dependencyci.com/github
|
25
|
+
url_path: github/doge
|
26
|
+
suffix: badge
|
27
|
+
|
22
28
|
pulls:
|
23
29
|
alt_text: Pending Pull-Requests
|
24
30
|
service_root: githubbadges.herokuapp.com
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Feature: Dependency CI support
|
2
|
+
|
3
|
+
Background:
|
4
|
+
Given git remote is "https://github.com/doge/wow"
|
5
|
+
|
6
|
+
@travis @gemnasium @coveralls @gemspec @mit
|
7
|
+
Scenario: Get a Dep CI badge
|
8
|
+
When I successfully run `badger badge --dci /tmp/wow_repo`
|
9
|
+
Then the output should contain:
|
10
|
+
"""
|
11
|
+
[![Build Status](http://img.shields.io/travis/doge/wow.svg?style=flat-square)](https://travis-ci.org/doge/wow)
|
12
|
+
[![Dependency Status](http://img.shields.io/gemnasium/doge/wow.svg?style=flat-square)](https://gemnasium.com/doge/wow)
|
13
|
+
[![Dependency CI](http://dependencyci.com/github/doge/wow/badge?style=flat-square)](http://dependencyci.com/github/doge/wow)
|
14
|
+
[![Coverage Status](http://img.shields.io/coveralls/doge/wow.svg?style=flat-square)](https://coveralls.io/r/doge/wow)
|
15
|
+
[![Code Climate](http://img.shields.io/codeclimate/github/doge/wow.svg?style=flat-square)](https://codeclimate.com/github/doge/wow)
|
16
|
+
[![Gem Version](http://img.shields.io/gem/v/suchgem.svg?style=flat-square)](https://rubygems.org/gems/suchgem)
|
17
|
+
[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://doge.mit-license.org)
|
18
|
+
"""
|
data/lib/badger.rb
CHANGED
data/lib/badger/badge.rb
CHANGED
data/lib/badger/badger.rb
CHANGED
data/lib/badger/cli.rb
CHANGED
@@ -15,6 +15,7 @@ module Badger
|
|
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
17
|
method_option :size, :type => :boolean, :default => false, :desc => 'Generate repo size badge'
|
18
|
+
method_option :dci, :type => :boolean, :default => false, :desc => 'Include a Dependency CI badge (experimental)'
|
18
19
|
method_option :style, :type => :string, :default => 'flat-square', :desc => "Choose a different badge style (currently supported: #{Config.instance.config['valid_styles'].join ', '})"
|
19
20
|
|
20
21
|
def badge dir = '.'
|
@@ -26,6 +27,7 @@ module Badger
|
|
26
27
|
|
27
28
|
@badger.add 'travis' if Badger.has_travis? dir
|
28
29
|
@badger.add 'gemnasium' if Badger.has_gemfile? dir
|
30
|
+
@badger.dependencyci if options[:dci]
|
29
31
|
@badger.add 'coveralls' if Badger.has_coveralls? dir
|
30
32
|
@badger.add 'codeclimate' if @badger.any?
|
31
33
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Badger
|
2
|
+
class DependencyCI
|
3
|
+
def self.badge name
|
4
|
+
badge_url = 'http://%s/github/%s/badge' % [
|
5
|
+
'dependencyci.com',
|
6
|
+
name
|
7
|
+
]
|
8
|
+
|
9
|
+
target_url = 'http://dependencyci.com/github/%s' % [
|
10
|
+
name
|
11
|
+
]
|
12
|
+
|
13
|
+
Badger.badge 'Dependency CI', badge_url, target_url
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/badger/version.rb
CHANGED
data/spec/services_spec.rb
CHANGED
@@ -24,6 +24,12 @@ module Badger
|
|
24
24
|
expect(@badger.length).to eq 2
|
25
25
|
end
|
26
26
|
|
27
|
+
it 'has a dependencyci badge' do
|
28
|
+
@badger.dependencyci
|
29
|
+
expect(@badger[0]).to eq "[![Dependency CI](http://dependencyci.com/github/doge/wow/badge)](http://dependencyci.com/github/doge/wow)"
|
30
|
+
expect(@badger.length).to eq 1
|
31
|
+
end
|
32
|
+
|
27
33
|
it 'handles an unknown service gracefully' do
|
28
34
|
@badger.add 'doge-service'
|
29
35
|
expect(@badger.length).to eq 0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: badgerbadgerbadger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pikesley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -216,6 +216,7 @@ files:
|
|
216
216
|
- config/services.yaml
|
217
217
|
- features/alternative-styles.feature
|
218
218
|
- features/badger.feature
|
219
|
+
- features/dependency-ci.feature
|
219
220
|
- features/heroku-only-remote.feature
|
220
221
|
- features/licenses.feature
|
221
222
|
- features/multiple-remotes.feature
|
@@ -243,6 +244,7 @@ files:
|
|
243
244
|
- lib/badger/bonus.rb
|
244
245
|
- lib/badger/cli.rb
|
245
246
|
- lib/badger/config.rb
|
247
|
+
- lib/badger/dependencyci.rb
|
246
248
|
- lib/badger/helpers.rb
|
247
249
|
- lib/badger/license.rb
|
248
250
|
- lib/badger/rubygem.rb
|
@@ -283,6 +285,7 @@ summary: Badge-Driven Development made easy. Generate a set of Github badges for
|
|
283
285
|
test_files:
|
284
286
|
- features/alternative-styles.feature
|
285
287
|
- features/badger.feature
|
288
|
+
- features/dependency-ci.feature
|
286
289
|
- features/heroku-only-remote.feature
|
287
290
|
- features/licenses.feature
|
288
291
|
- features/multiple-remotes.feature
|