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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5fc45adab722623be2c90cbf81eb1d8097b4fb4c
4
- data.tar.gz: 7a69d0970d5da953f230cc2b7a677931617ab136
3
+ metadata.gz: db8d3448bceb806b53ec3b6896c4fa4dec44dfe3
4
+ data.tar.gz: dea1590886403ef90695006c8cb2f41f3c5c29a8
5
5
  SHA512:
6
- metadata.gz: 2aa977353e440479d03213286f1923d6bfdef1023b9da378d1a64bae46d0ce80a87c4a39bc2840272d9a16042c20a49207bc8e1c61ecd8089f2acdb39205454d
7
- data.tar.gz: d7ff3bbf2670cde9fcfa34700179fa2dc57441af84b7af9fe30255aea37a0c5fa7597f1e580eef1f2fadc854a7bfb9608fe1fbea3ecab1ccb592bceca7a9275d
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
@@ -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
+ """
@@ -12,4 +12,4 @@ require 'badger/rubygem'
12
12
  require 'badger/helpers'
13
13
  require 'badger/badge'
14
14
  require 'badger/bonus'
15
-
15
+ require 'badger/dependencyci'
@@ -3,7 +3,7 @@ module Badger
3
3
  badge_url = "%s.%s" % [
4
4
  badge_url,
5
5
  Config.instance.config['badge_type']
6
- ] unless text == 'Repo Size'
6
+ ] unless ['Repo Size', 'Dependency CI'].include? text
7
7
 
8
8
  badge_style = Config.instance.config['badge_style']
9
9
  badge_url = "%s?style=%s" % [
@@ -28,6 +28,10 @@ module Badger
28
28
  self << Rubygem.badge(name)
29
29
  end
30
30
 
31
+ def dependencyci
32
+ self << DependencyCI.badge(github_slug)
33
+ end
34
+
31
35
  def bonus
32
36
  self.uniq!
33
37
  self << Bonus.badge(self)
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Badger
2
- VERSION = "0.14.0"
2
+ VERSION = "0.15.0"
3
3
  end
@@ -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.14.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-01-19 00:00:00.000000000 Z
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