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 +4 -4
- data/features/heroku-only-remote.feature +12 -0
- data/features/multiple-remotes.feature +19 -0
- data/lib/badger/badger.rb +1 -1
- data/lib/badger/helpers.rb +7 -1
- data/lib/badger/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61092c7e994274ae8f52f3ba48da74008a58cca5
|
4
|
+
data.tar.gz: 6545d17318a9714521d7f6f8d7af940f4be7eb22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
+
"""
|
data/lib/badger/badger.rb
CHANGED
data/lib/badger/helpers.rb
CHANGED
@@ -10,7 +10,13 @@ module Badger
|
|
10
10
|
|
11
11
|
def Badger.git_remote dir
|
12
12
|
begin
|
13
|
-
remote =
|
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
|
data/lib/badger/version.rb
CHANGED
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.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-
|
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
|