badgerbadgerbadger 0.11.2 → 0.12.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: bda40099101531793bb11b4dd352cae00ee3f9ce
4
- data.tar.gz: eb26b737315c9dec31a65f1025be60e6646bd361
3
+ metadata.gz: 61092c7e994274ae8f52f3ba48da74008a58cca5
4
+ data.tar.gz: 6545d17318a9714521d7f6f8d7af940f4be7eb22
5
5
  SHA512:
6
- metadata.gz: b4254cf8270add88255ccf324cf649982f975ac9f94c97b41ba56914aa2e8f6f352877d61e0e8b153d6462d7eca1b52afc2a4004fcb4579bb5ec33b35d0fc172
7
- data.tar.gz: d530e8342c7ef47240a9821f00f3214864cb21c369c98677b0b62534880b82994d2ba17a5deba9f1f7b1468eeb10d7334421b5b6ea16b01ac348c777882a6c4c
6
+ metadata.gz: 5f2922170af81ea8a8e804b91662a36502c9cf84acea6950d8af1ffe52edc29496ebc57573d3ead8e40c6530bc6a251bfbd5bcd480b060e5c5aa64c314259014
7
+ data.tar.gz: d7e098602cc8ad4d7d4f917b8396494f9d1c4bfce3ecb1b374da21d2a084ac3e11d985e90da1062bef39835f798f6f416153dc05f3f63a8ff3d4220de3b916fe
@@ -0,0 +1,12 @@
1
+ Feature: Heroku remote
2
+
3
+ Background:
4
+ Given git remote "heroku" points to "git@heroku.com:doge.git"
5
+
6
+ Scenario: Handle a git repo with only a Heroku remote
7
+ When I run `badger badge /tmp/wow_repo`
8
+ Then the output should contain:
9
+ """
10
+ This repo does not appear to have a github remote
11
+ """
12
+ And the exit status should be 2
@@ -0,0 +1,19 @@
1
+ Feature: Heroku remote
2
+
3
+ Background:
4
+ Given git remote "heroku" points to "git@heroku.com:doge.git"
5
+ And git remote "origin" points to "git@github.com:doge/wow.git"
6
+
7
+ @travis @gemnasium @coveralls @gemspec @mit
8
+ Scenario: One with everything
9
+ When I successfully run `badger badge /tmp/wow_repo`
10
+ Then the output should contain:
11
+ """
12
+ [![Build Status](http://img.shields.io/travis/doge/wow.svg)](https://travis-ci.org/doge/wow)
13
+ [![Dependency Status](http://img.shields.io/gemnasium/doge/wow.svg)](https://gemnasium.com/doge/wow)
14
+ [![Coverage Status](http://img.shields.io/coveralls/doge/wow.svg)](https://coveralls.io/r/doge/wow)
15
+ [![Code Climate](http://img.shields.io/codeclimate/github/doge/wow.svg)](https://codeclimate.com/github/doge/wow)
16
+ [![Gem Version](http://img.shields.io/gem/v/suchgem.svg)](https://rubygems.org/gems/suchgem)
17
+ [![License](http://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org)
18
+ [![Badges](http://img.shields.io/:badges-7/7-ff6799.svg)](https://github.com/badges/badgerbadgerbadger)
19
+ """
@@ -42,7 +42,7 @@ module Badger
42
42
  puts "Invalid style choice '#{style}'"
43
43
  exit 3
44
44
  end
45
-
45
+
46
46
  Config.instance.config['badge_style'] = style
47
47
  end
48
48
 
@@ -10,7 +10,13 @@ module Badger
10
10
 
11
11
  def Badger.git_remote dir
12
12
  begin
13
- remote = is_repo?(dir).remotes.first.url
13
+ remote = nil
14
+ is_repo?(dir).remotes.each do |r|
15
+ if r.url.match /github.com/
16
+ remote = r.url
17
+ end
18
+ end
19
+
14
20
  rescue NoMethodError
15
21
  puts 'This repo does not appear to have a github remote'
16
22
  exit 2
@@ -1,3 +1,3 @@
1
1
  module Badger
2
- VERSION = "0.11.2"
2
+ VERSION = "0.12.0"
3
3
  end
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.11.2
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - pikesley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-02 00:00:00.000000000 Z
11
+ date: 2015-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -216,7 +216,9 @@ files:
216
216
  - config/services.yaml
217
217
  - features/alternative-styles.feature
218
218
  - features/badger.feature
219
+ - features/heroku-only-remote.feature
219
220
  - features/licenses.feature
221
+ - features/multiple-remotes.feature
220
222
  - features/png.feature
221
223
  - features/pulls-and-issues.feature
222
224
  - features/remote-with-different-name.feature
@@ -279,7 +281,9 @@ summary: Badge-Driven Development made easy. Generate a set of Github badges for
279
281
  test_files:
280
282
  - features/alternative-styles.feature
281
283
  - features/badger.feature
284
+ - features/heroku-only-remote.feature
282
285
  - features/licenses.feature
286
+ - features/multiple-remotes.feature
283
287
  - features/png.feature
284
288
  - features/pulls-and-issues.feature
285
289
  - features/remote-with-different-name.feature