inch-badge 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -2
- data/assets/badge.svg.erb +19 -4
- data/lib/inch/badge/config.rb +1 -1
- data/lib/inch/badge/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe66ad4fb08661567d0920e026b1200f90b4129d
|
4
|
+
data.tar.gz: 7867fa1727f8ed5b12047aa79ec837fe01b8e09e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d3969b1e82957507c5a7119d115a3c213ef5d2dfaa63800783c0c84d0b6dd9f03471ec8271b0f1b078a751c19e18b50efc2912ecb986a90588caf43282c993f
|
7
|
+
data.tar.gz: bcc22fcdbb30c8a3885fcf73e59c689cec94b9967b1854a8e2426280087e4d470379f938897dcc81ce7735c1b1de25ab7a8dbac20d1ee67f0b4cc47c162c183b
|
data/README.md
CHANGED
@@ -20,7 +20,7 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
### Shell
|
22
22
|
|
23
|
-
$ inch-badge FILENAME
|
23
|
+
$ inch-badge FILENAME A B C U
|
24
24
|
|
25
25
|
Example:
|
26
26
|
|
@@ -28,6 +28,14 @@ Example:
|
|
28
28
|
|
29
29
|
### Ruby
|
30
30
|
|
31
|
+
Create a PNG badge:
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
Inch::Badge::Image.create("example.png", [300, 21, 12, 316])
|
35
|
+
```
|
36
|
+
|
37
|
+
Create a SVG badge:
|
38
|
+
|
31
39
|
```ruby
|
32
|
-
Inch::Badge::Image.
|
40
|
+
Inch::Badge::Image.create("example.svg", [300, 21, 12, 316])
|
33
41
|
```
|
data/assets/badge.svg.erb
CHANGED
@@ -1,16 +1,31 @@
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" width="77" height="18">
|
2
|
-
<linearGradient id="
|
3
|
-
<stop offset="0" stop-color="#fff" stop-opacity=".7"
|
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"/>
|
4
7
|
</linearGradient>
|
5
8
|
<rect rx="4" width="77" height="18" fill="#555"/>
|
6
9
|
|
7
10
|
<% x = 0 %>
|
8
11
|
<% @grades.each do |grade| %>
|
9
|
-
<
|
12
|
+
<linearGradient id="g<%= grade.name %>" x2="0" y2="100%">
|
13
|
+
<stop offset="0" stop-color="#999" stop-opacity=".3"/>
|
14
|
+
<stop offset=".1" stop-color="<%= grade.color %>" stop-opacity=".9"/>
|
15
|
+
<stop offset=".5" stop-color="<%= grade.color %>" stop-opacity="1"/>
|
16
|
+
<stop offset=".9" stop-color="<%= grade.color %>" stop-opacity=".9"/>
|
17
|
+
<stop offset="1" stop-color="#888" stop-opacity=".3"/>
|
18
|
+
</linearGradient>
|
19
|
+
<rect x="<%= 34+x %>" y="4" width="<%= grade.width %>" height="10" fill="url(#g<%= grade.name %>)"/>
|
10
20
|
<% x += grade.width %>
|
11
21
|
<% end %>
|
12
22
|
|
13
|
-
<rect
|
23
|
+
<rect x="34" y="4" width="1" height="1" fill="#666"/>
|
24
|
+
<rect x="34" y="13" width="1" height="1" fill="#666"/>
|
25
|
+
<rect x="73" y="4" width="1" height="1" fill="#666"/>
|
26
|
+
<rect x="73" y="13" width="1" height="1" fill="#666"/>
|
27
|
+
|
28
|
+
<rect rx="4" width="77" height="18" fill="url(#bg)"/>
|
14
29
|
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
15
30
|
<text x="18.5" y="13" fill="#010101" fill-opacity=".3">docs</text>
|
16
31
|
<text x="18.5" y="12">docs</text>
|
data/lib/inch/badge/config.rb
CHANGED
data/lib/inch/badge/version.rb
CHANGED
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.2.
|
4
|
+
version: 0.2.1
|
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: 2014-03-
|
11
|
+
date: 2014-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chunky_png
|
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
111
|
version: '0'
|
112
112
|
requirements: []
|
113
113
|
rubyforge_project:
|
114
|
-
rubygems_version: 2.2.
|
114
|
+
rubygems_version: 2.2.2
|
115
115
|
signing_key:
|
116
116
|
specification_version: 4
|
117
117
|
summary: Rubygem used to generate badges for Inch
|