badgerbadgerbadger 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/DESC.md +27 -0
- data/README.md +1 -5
- data/config/services.yaml +4 -4
- data/features/support/env.rb +3 -3
- data/lib/badger.rb +2 -0
- data/lib/badger/bonus.rb +3 -1
- data/lib/badger/cli.rb +1 -30
- data/lib/badger/config.rb +20 -6
- data/lib/badger/helpers.rb +0 -1
- data/lib/badger/service.rb +1 -1
- data/lib/badger/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d98b568c5a24105cbe6fec59d1e1ab3e916a7da
|
4
|
+
data.tar.gz: 9256aaeef8bc403f6248aa7a79967cf70cb55c9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75388f2ffd48248c7bf5db7f99cccdba3e30ccaaa48955811d491b4f90e914865b67bbc1bd0da6342b1a81020d5a64db56c4ce0630ea76ec8838b4ec0f1b3675
|
7
|
+
data.tar.gz: 4ef2985c9a6cddc2b53ccd94fdd1d8c751ac20537582283339876251d31212cd905b5c66c972e23d9bae84e6210c25e66679e1bdf6a6d650e597c90b94b377ba
|
data/DESC.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
Highly-opinionated badge generator for Github READMEs:
|
2
|
+
|
3
|
+
* If it finds a .travis.yml, it generates a Travis-CI Build-Status Badge
|
4
|
+
|
5
|
+
* If it finds a Gemfile or a gemspec, it generates a Gemnasium Dependency Status Badge
|
6
|
+
|
7
|
+
* If it finds 'coveralls' in a Gemfile or gemspec, it generates a Coveralls Coverage Status Badge
|
8
|
+
|
9
|
+
* If it's generated at least one of the above, it generates a Code Climate Status Badge
|
10
|
+
|
11
|
+
In addition, if it finds a gemspec, it will use it to generate:
|
12
|
+
|
13
|
+
* A Rubygems Version Badge
|
14
|
+
|
15
|
+
* A License Badge
|
16
|
+
|
17
|
+
And if a license file is found, a License Badge will be generated. Currently supported licenses are:
|
18
|
+
|
19
|
+
* MIT
|
20
|
+
|
21
|
+
* Apache
|
22
|
+
|
23
|
+
* GPL-2
|
24
|
+
|
25
|
+
* GPL-3
|
26
|
+
|
27
|
+
The supported license details are in `https://github.com/pikesley/badger/blob/master/config/licenses.yaml`, if you're using a different license, send a PR! And if your gemspec license conflicts with your LICENSE file, you should probably fix that.
|
data/README.md
CHANGED
@@ -34,11 +34,7 @@ Then
|
|
34
34
|
|
35
35
|
ready to paste into the top of your README (with the correct URLs for your repo)
|
36
36
|
|
37
|
-
|
38
|
-
|
39
|
-
badger help badge
|
40
|
-
|
41
|
-
to read about Badger's Opinions
|
37
|
+
You can read about Badger's Opinions [here](DESC.md)
|
42
38
|
|
43
39
|
If you're on a Mac, pipe the output into `pbcopy` to add the stuff directly to your clipboard:
|
44
40
|
|
data/config/services.yaml
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
travis:
|
2
2
|
alt_text: Build Status
|
3
|
-
|
3
|
+
url_path: travis-ci.org
|
4
4
|
badge_slug: travis
|
5
5
|
|
6
6
|
coveralls:
|
7
7
|
alt_text: Coverage Status
|
8
|
-
|
8
|
+
url_path: coveralls.io/r
|
9
9
|
badge_slug: coveralls
|
10
10
|
|
11
11
|
gemnasium:
|
12
12
|
alt_text: Dependency Status
|
13
|
-
|
13
|
+
url_path: gemnasium.com
|
14
14
|
badge_slug: gemnasium
|
15
15
|
|
16
16
|
codeclimate:
|
17
17
|
alt_text: Code Climate
|
18
|
-
|
18
|
+
url_path: codeclimate.com/github
|
19
19
|
badge_slug: codeclimate/github
|
data/features/support/env.rb
CHANGED
@@ -2,10 +2,10 @@ require 'aruba/cucumber'
|
|
2
2
|
require 'cucumber/rspec/doubles'
|
3
3
|
require 'git'
|
4
4
|
require 'fileutils'
|
5
|
-
|
6
5
|
require 'coveralls'
|
7
|
-
Coveralls.wear_merged!
|
8
6
|
|
9
7
|
require 'badger/badger'
|
10
8
|
|
11
|
-
$temp_repo = '/tmp/wow_repo'
|
9
|
+
$temp_repo = '/tmp/wow_repo'
|
10
|
+
|
11
|
+
Coveralls.wear_merged!
|
data/lib/badger.rb
CHANGED
data/lib/badger/bonus.rb
CHANGED
@@ -7,7 +7,9 @@ module Badger
|
|
7
7
|
badger.length + 1,
|
8
8
|
Config.instance.config['bonus_badge_colour']
|
9
9
|
]
|
10
|
-
target_url = '%s' %
|
10
|
+
target_url = '%s' % [
|
11
|
+
Config.instance.config['bonus_badge_link']
|
12
|
+
]
|
11
13
|
|
12
14
|
Badger.badge 'Badges', badge_url, target_url
|
13
15
|
end
|
data/lib/badger/cli.rb
CHANGED
@@ -4,36 +4,7 @@ module Badger
|
|
4
4
|
class CLI < Thor
|
5
5
|
|
6
6
|
desc 'badge', 'Generate badge markdown'
|
7
|
-
long_desc
|
8
|
-
Highly-opinionated badge generator for Github READMEs:
|
9
|
-
|
10
|
-
* If it finds a .travis.yml, it generates a Travis-CI Build-Status Badge
|
11
|
-
|
12
|
-
* If it finds a Gemfile or a gemspec, it generates a Gemnasium Dependency Status Badge
|
13
|
-
|
14
|
-
* If it finds 'coveralls' in a Gemfile or gemspec, it generates a Coveralls Coverage Status Badge
|
15
|
-
|
16
|
-
* If it's generated at least one of the above, it generates a Code Climate Status Badge
|
17
|
-
|
18
|
-
In addition, if it finds a gemspec, it will use it to generate:
|
19
|
-
|
20
|
-
* A Rubygems Version Badge
|
21
|
-
|
22
|
-
* A License Badge
|
23
|
-
|
24
|
-
And if a license file is found, a License Badge will be generated. Currently supported licenses are:
|
25
|
-
|
26
|
-
* MIT
|
27
|
-
|
28
|
-
* Apache
|
29
|
-
|
30
|
-
* GPL-2
|
31
|
-
|
32
|
-
* GPL-3
|
33
|
-
|
34
|
-
The supported license details are in https://github.com/pikesley/badger/blob/master/config/licenses.yaml, if you're using a different license, send a PR! And if your gemspec license conflicts with your LICENSE file, you should probably fix that.
|
35
|
-
|
36
|
-
LONGDESC
|
7
|
+
long_desc File.read File.join File.dirname( __FILE__), '..', '..', 'DESC.md'
|
37
8
|
|
38
9
|
def badge dir = '.'
|
39
10
|
@badger = Badger.new Badger.git_remote dir
|
data/lib/badger/config.rb
CHANGED
@@ -1,15 +1,12 @@
|
|
1
|
-
require 'yaml'
|
2
|
-
require 'singleton'
|
3
|
-
|
4
1
|
module Badger
|
5
2
|
class Config
|
6
3
|
|
7
4
|
include Singleton
|
8
5
|
|
9
6
|
def initialize
|
10
|
-
@config =
|
11
|
-
@services =
|
12
|
-
@licenses =
|
7
|
+
@config = fetch_yaml 'config'
|
8
|
+
@services = fetch_yaml 'services'
|
9
|
+
@licenses = fetch_yaml 'licenses'
|
13
10
|
end
|
14
11
|
|
15
12
|
def services
|
@@ -23,5 +20,22 @@ module Badger
|
|
23
20
|
def config
|
24
21
|
@config
|
25
22
|
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def fetch_yaml file
|
27
|
+
YAML.load(
|
28
|
+
File.open(
|
29
|
+
File.join(
|
30
|
+
File.dirname(__FILE__),
|
31
|
+
'..',
|
32
|
+
'..',
|
33
|
+
'config/%s.yaml' % [
|
34
|
+
file
|
35
|
+
]
|
36
|
+
)
|
37
|
+
)
|
38
|
+
)
|
39
|
+
end
|
26
40
|
end
|
27
41
|
end
|
data/lib/badger/helpers.rb
CHANGED
data/lib/badger/service.rb
CHANGED
data/lib/badger/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: badgerbadgerbadger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pikesley
|
@@ -217,6 +217,7 @@ files:
|
|
217
217
|
- ".gitignore"
|
218
218
|
- ".rspec"
|
219
219
|
- ".travis.yml"
|
220
|
+
- DESC.md
|
220
221
|
- Gemfile
|
221
222
|
- Guardfile
|
222
223
|
- LICENSE.md
|