inch-badge 0.3.6 → 0.4.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: f4f76d06f2e51d74a72933c3053f8f600654a30f
4
- data.tar.gz: 85d04e777e95af164c18059aec7de198b59a4e35
3
+ metadata.gz: 3f98bc6cff08dd6ec1e65361697773d859d1ae63
4
+ data.tar.gz: d76a3edb50337c14bb7a64b0d15e2f6069821a3d
5
5
  SHA512:
6
- metadata.gz: 88146faa90b97c46f155634ead003e2efaacff6d21920f926d9d9bf150491937a5289ada0b2baacd8e1c6a364c4723c28703beef95a3c2ee993b297b1005aba6
7
- data.tar.gz: 130a8acb0860f8e3522bd522d5f1ccc35432152519d39b208b65815a64fa84776d9728da56dc23a855ebde56286eba855ef37d431de11710989987228c9d9da7
6
+ metadata.gz: fb23d40397cf9a3dab723d73dc1eddbe5768f06c1a0e782b8111bdf457790e04c89027627c560fd826889a20beca3cf2d50c622f9b4a2fff7e7ccd68b6d0221b
7
+ data.tar.gz: 2c69a08d13e02f942ddbe477951de20b5a7979648c2ac7692c4a10324f91c7a6bb2ae9163b7123cda11325acd2b13e6b8947209ef09cfe96b289da56efc33f43
@@ -1,40 +1,36 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="80" height="18">
2
- <linearGradient id="bg" x2="0" y2="100%">
3
- <stop offset="0" stop-color="#fff" stop-opacity=".7"/>
4
- <stop offset=".1" stop-color="#aaa" stop-opacity=".1"/>
5
- <stop offset=".9" stop-opacity=".3"/>
6
- <stop offset="1" stop-opacity=".5"/>
7
- </linearGradient>
8
- <rect rx="4" width="80" height="18" fill="#555"/>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="80" height="20">
2
+ <linearGradient id="a" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient>
3
+ <rect rx="3" width="80" height="20" fill="#555"/>
4
+ <rect rx="3" width="80" height="20" fill="url(#a)"/>
9
5
 
10
- <linearGradient id="gradA" x2="0" y2="100%">
11
- <stop offset="0" stop-color="#66cc40" />
12
- <stop offset=".1" stop-color="#49c41a" />
13
- <stop offset=".5" stop-color="#46b01e" />
14
- <stop offset=".9" stop-color="#359710" />
15
- <stop offset="1" stop-color="#2c840b" />
16
- </linearGradient>
17
- <linearGradient id="gradB" x2="0" y2="100%">
18
- <stop offset="0" stop-color="#a5cb34" />
19
- <stop offset=".1" stop-color="#95c30c" />
20
- <stop offset=".5" stop-color="#87ae10" />
21
- <stop offset=".9" stop-color="#719604" />
22
- <stop offset="1" stop-color="#618200" />
23
- </linearGradient>
24
- <linearGradient id="gradC" x2="0" y2="100%">
25
- <stop offset="0" stop-color="#db7966" />
26
- <stop offset=".1" stop-color="#d75f49" />
27
- <stop offset=".5" stop-color="#c05946" />
28
- <stop offset=".9" stop-color="#a64735" />
29
- <stop offset="1" stop-color="#903b2c" />
30
- </linearGradient>
31
- <linearGradient id="gradU" x2="0" y2="100%">
32
- <stop offset="0" stop-color="#8f7eb4" />
33
- <stop offset=".1" stop-color="#8771b3" />
34
- <stop offset=".5" stop-color="#7a67a0" />
35
- <stop offset=".9" stop-color="#6a598d" />
36
- <stop offset="1" stop-color="#5f4f7d" />
37
- </linearGradient>
6
+ <linearGradient id="gradA" x2="0" y2="100%">
7
+ <stop offset="0" stop-color="#46b01e" />
8
+ <stop offset=".1" stop-color="#46b01e" />
9
+ <stop offset=".5" stop-color="#46b01e" />
10
+ <stop offset=".9" stop-color="#46b01e" />
11
+ <stop offset="1" stop-color="#46b01e" />
12
+ </linearGradient>
13
+ <linearGradient id="gradB" x2="0" y2="100%">
14
+ <stop offset="0" stop-color="#87ae10" />
15
+ <stop offset=".1" stop-color="#87ae10" />
16
+ <stop offset=".5" stop-color="#87ae10" />
17
+ <stop offset=".9" stop-color="#87ae10" />
18
+ <stop offset="1" stop-color="#87ae10" />
19
+ </linearGradient>
20
+ <linearGradient id="gradC" x2="0" y2="100%">
21
+ <stop offset="0" stop-color="#c05946" />
22
+ <stop offset=".1" stop-color="#c05946" />
23
+ <stop offset=".5" stop-color="#c05946" />
24
+ <stop offset=".9" stop-color="#c05946" />
25
+ <stop offset="1" stop-color="#c05946" />
26
+ </linearGradient>
27
+ <linearGradient id="gradU" x2="0" y2="100%">
28
+ <stop offset="0" stop-color="#7a67a0" />
29
+ <stop offset=".1" stop-color="#7a67a0" />
30
+ <stop offset=".5" stop-color="#7a67a0" />
31
+ <stop offset=".9" stop-color="#7a67a0" />
32
+ <stop offset="1" stop-color="#7a67a0" />
33
+ </linearGradient>
38
34
  <linearGradient id="gradN" x2="0" y2="100%">
39
35
  <stop offset="0" stop-color="#9B9B9B" />
40
36
  <stop offset=".1" stop-color="#9B9B9B" />
@@ -44,23 +40,21 @@
44
40
  </linearGradient>
45
41
 
46
42
  <%
47
- bar_x = 34 + 3
48
- bar_x2 = 73 + 3
43
+ bar_x = 33 + 3
44
+ bar_x2 = 72 + 3
49
45
  x = 0
50
46
  %>
51
47
  <% @grades.each do |grade| %>
52
- <rect x="<%= bar_x+x %>" y="4" width="<%= grade.width %>" height="10" fill="url(#grad<%= grade.name %>)"/>
48
+ <rect x="<%= bar_x+x %>" y="4" width="<%= grade.width %>" height="12" fill="url(#grad<%= grade.name %>)"/>
53
49
  <% x += grade.width %>
54
50
  <% end %>
55
51
 
56
52
  <rect x="<%= bar_x %>" y="4" width="1" height="1" fill="#666"/>
57
- <rect x="<%= bar_x %>" y="13" width="1" height="1" fill="#666"/>
53
+ <rect x="<%= bar_x %>" y="15" width="1" height="1" fill="#666"/>
58
54
  <rect x="<%= bar_x2 %>" y="4" width="1" height="1" fill="#666"/>
59
- <rect x="<%= bar_x2 %>" y="13" width="1" height="1" fill="#666"/>
55
+ <rect x="<%= bar_x2 %>" y="15" width="1" height="1" fill="#666"/>
60
56
 
61
- <rect rx="4" width="80" height="18" fill="url(#bg)"/>
62
57
  <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
63
- <text x="18.5" y="14" fill="#010101" fill-opacity=".3">docs</text>
64
- <text x="18.5" y="13">docs</text>
58
+ <text x="18.5" y="14">docs</text>
65
59
  </g>
66
60
  </svg>
@@ -0,0 +1,66 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="80" height="18">
2
+ <linearGradient id="bg" x2="0" y2="100%">
3
+ <stop offset="0" stop-color="#fff" stop-opacity=".7"/>
4
+ <stop offset=".1" stop-color="#aaa" stop-opacity=".1"/>
5
+ <stop offset=".9" stop-opacity=".3"/>
6
+ <stop offset="1" stop-opacity=".5"/>
7
+ </linearGradient>
8
+ <rect rx="4" width="80" height="18" fill="#555"/>
9
+
10
+ <linearGradient id="gradA" x2="0" y2="100%">
11
+ <stop offset="0" stop-color="#66cc40" />
12
+ <stop offset=".1" stop-color="#49c41a" />
13
+ <stop offset=".5" stop-color="#46b01e" />
14
+ <stop offset=".9" stop-color="#359710" />
15
+ <stop offset="1" stop-color="#2c840b" />
16
+ </linearGradient>
17
+ <linearGradient id="gradB" x2="0" y2="100%">
18
+ <stop offset="0" stop-color="#a5cb34" />
19
+ <stop offset=".1" stop-color="#95c30c" />
20
+ <stop offset=".5" stop-color="#87ae10" />
21
+ <stop offset=".9" stop-color="#719604" />
22
+ <stop offset="1" stop-color="#618200" />
23
+ </linearGradient>
24
+ <linearGradient id="gradC" x2="0" y2="100%">
25
+ <stop offset="0" stop-color="#db7966" />
26
+ <stop offset=".1" stop-color="#d75f49" />
27
+ <stop offset=".5" stop-color="#c05946" />
28
+ <stop offset=".9" stop-color="#a64735" />
29
+ <stop offset="1" stop-color="#903b2c" />
30
+ </linearGradient>
31
+ <linearGradient id="gradU" x2="0" y2="100%">
32
+ <stop offset="0" stop-color="#8f7eb4" />
33
+ <stop offset=".1" stop-color="#8771b3" />
34
+ <stop offset=".5" stop-color="#7a67a0" />
35
+ <stop offset=".9" stop-color="#6a598d" />
36
+ <stop offset="1" stop-color="#5f4f7d" />
37
+ </linearGradient>
38
+ <linearGradient id="gradN" x2="0" y2="100%">
39
+ <stop offset="0" stop-color="#9B9B9B" />
40
+ <stop offset=".1" stop-color="#9B9B9B" />
41
+ <stop offset=".5" stop-color="#9B9B9B" />
42
+ <stop offset=".9" stop-color="#9B9B9B" />
43
+ <stop offset="1" stop-color="#9B9B9B" />
44
+ </linearGradient>
45
+
46
+ <%
47
+ bar_x = 34 + 3
48
+ bar_x2 = 73 + 3
49
+ x = 0
50
+ %>
51
+ <% @grades.each do |grade| %>
52
+ <rect x="<%= bar_x+x %>" y="4" width="<%= grade.width %>" height="10" fill="url(#grad<%= grade.name %>)"/>
53
+ <% x += grade.width %>
54
+ <% end %>
55
+
56
+ <rect x="<%= bar_x %>" y="4" width="1" height="1" fill="#666"/>
57
+ <rect x="<%= bar_x %>" y="13" width="1" height="1" fill="#666"/>
58
+ <rect x="<%= bar_x2 %>" y="4" width="1" height="1" fill="#666"/>
59
+ <rect x="<%= bar_x2 %>" y="13" width="1" height="1" fill="#666"/>
60
+
61
+ <rect rx="4" width="80" height="18" fill="url(#bg)"/>
62
+ <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
63
+ <text x="18.5" y="14" fill="#010101" fill-opacity=".3">docs</text>
64
+ <text x="18.5" y="13">docs</text>
65
+ </g>
66
+ </svg>
data/bin/inch-badge CHANGED
@@ -14,7 +14,9 @@ $LOAD_PATH.unshift(find_lib_path)
14
14
  require 'inch/badge'
15
15
 
16
16
  style = 'default'
17
- if ARGV.delete('--flat')
17
+ if ARGV.delete('--shields')
18
+ style = 'shields'
19
+ elsif ARGV.delete('--flat')
18
20
  style = 'flat'
19
21
  elsif ARGV.delete('--flat-square')
20
22
  style = 'flat-square'
@@ -1,5 +1,5 @@
1
1
  module Inch
2
2
  module Badge
3
- VERSION = "0.3.6"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inch-badge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - René Föhring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-11 00:00:00.000000000 Z
11
+ date: 2015-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chunky_png
@@ -70,6 +70,7 @@ files:
70
70
  - assets/badge-default.svg.erb
71
71
  - assets/badge-flat-square.svg.erb
72
72
  - assets/badge-flat.svg.erb
73
+ - assets/badge-shields.svg.erb
73
74
  - assets/bg.png
74
75
  - assets/grade-A-begin.png
75
76
  - assets/grade-A-body.png
@@ -113,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
114
  version: '0'
114
115
  requirements: []
115
116
  rubyforge_project:
116
- rubygems_version: 2.4.3
117
+ rubygems_version: 2.2.0
117
118
  signing_key:
118
119
  specification_version: 4
119
120
  summary: Rubygem used to generate badges for Inch