usps_flags-grades 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +0 -17
- data/lib/usps_flags/grades.rb +2 -2
- data/lib/usps_flags/grades/grade.rb +9 -9
- data/usps_flags-grades.gemspec +2 -2
- metadata +2 -3
- data/certs/jfiander.pem +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05ef811705f59246447d5cb9642e13c36407dae0baee020e37c3a7f48c5ff056
|
4
|
+
data.tar.gz: 9c06c5ff525ec4cc62fc9d11d0137d0d2b0aaef9c85b67dd4491815c5b8d22eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77387cba6b6e2927cd2c683d45ef396b0d534fedf150d52a34efd5dc9d3169ab6745ceb94c5e64e33a738d75886f8d08b6e5f3fbe15e0ffd496f7d252aa7460d
|
7
|
+
data.tar.gz: 5e9423feff3fd75ce60a61691dd5fa673bc951eb7c1f2b7827d9477e50bd9ff616376b4433193a05c534dffff47fc8c08bf60d41d4a49848b1821a33f99c2658
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
usps_flags-grades (0.0.
|
4
|
+
usps_flags-grades (0.0.9)
|
5
5
|
usps_flags (~> 0.4, >= 0.4.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -32,7 +32,7 @@ GEM
|
|
32
32
|
json (>= 1.8, < 3)
|
33
33
|
simplecov-html (~> 0.10.0)
|
34
34
|
simplecov-html (0.10.2)
|
35
|
-
usps_flags (0.4.
|
35
|
+
usps_flags (0.4.1)
|
36
36
|
file_utils (~> 1.1, >= 1.1.2)
|
37
37
|
mini_magick (~> 4.8, >= 4.8.0)
|
38
38
|
rubyzip (~> 1.2, >= 1.2.1)
|
data/README.md
CHANGED
@@ -21,23 +21,6 @@ end
|
|
21
21
|
insignia.svg #=> Generates SVG file at "/path/to/svg/output.svg"
|
22
22
|
```
|
23
23
|
|
24
|
-
## Security
|
25
|
-
|
26
|
-
This gem is cryptographically signed. To be sure the gem code hasn’t been
|
27
|
-
tampered with:
|
28
|
-
|
29
|
-
Add my public key as a trusted certificate:
|
30
|
-
|
31
|
-
```sh
|
32
|
-
gem cert --add <(curl -Ls https://raw.github.com/jfiander/usps-flags_grades/master/certs/jfiander.pem)
|
33
|
-
```
|
34
|
-
|
35
|
-
Then install the gem securely:
|
36
|
-
|
37
|
-
```sh
|
38
|
-
gem install usps_flags-grades -P HighSecurity
|
39
|
-
```
|
40
|
-
|
41
24
|
## License
|
42
25
|
|
43
26
|
Actual images generated are
|
data/lib/usps_flags/grades.rb
CHANGED
@@ -2,7 +2,7 @@ require 'usps_flags'
|
|
2
2
|
require 'usps_flags/grades/config'
|
3
3
|
require 'usps_flags/grades/errors'
|
4
4
|
|
5
|
-
# Main class for generating
|
5
|
+
# Main class for generating grade and other insignia.
|
6
6
|
class USPSFlags::Grades
|
7
7
|
require 'usps_flags/grades/grade'
|
8
8
|
require 'usps_flags/grades/membership'
|
@@ -42,7 +42,7 @@ class USPSFlags::Grades
|
|
42
42
|
def svg
|
43
43
|
validate
|
44
44
|
@svg = <<~SVG
|
45
|
-
#{USPSFlags::Core.headers(title: title)}
|
45
|
+
#{USPSFlags::Core.headers(title: title).gsub('0 0 3072 2048', '0 0 1024 682')}
|
46
46
|
<g transform="translate(0, 50)">
|
47
47
|
#{USPSFlags::Grades::Grade.get(@grade)}
|
48
48
|
#{USPSFlags::Grades::EdPro.get(@grade) if @edpro && USPSFlags::Grades::EdPro.for_grade(@grade)}
|
@@ -12,7 +12,7 @@ class USPSFlags::Grades::Grade
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def valid_grades
|
15
|
-
[
|
15
|
+
%i[s p ap jn n sn]
|
16
16
|
end
|
17
17
|
|
18
18
|
def width(grade)
|
@@ -20,14 +20,14 @@ class USPSFlags::Grades::Grade
|
|
20
20
|
when :ap
|
21
21
|
USPSFlags::Config::GRADE_SPACING * 2.25 + 100
|
22
22
|
when :jn
|
23
|
-
USPSFlags::Config::GRADE_SPACING * 3
|
23
|
+
USPSFlags::Config::GRADE_SPACING * 3 + 10
|
24
24
|
when :n
|
25
|
-
USPSFlags::Config::GRADE_SPACING * 5 +
|
25
|
+
USPSFlags::Config::GRADE_SPACING * 5 + 45
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
29
|
private
|
30
|
-
|
30
|
+
|
31
31
|
def bar
|
32
32
|
<<~SVG
|
33
33
|
<rect x="0" y="0" width="100" height="35" fill="#{USPSFlags::Config::GOLD}" />
|
@@ -36,7 +36,7 @@ class USPSFlags::Grades::Grade
|
|
36
36
|
|
37
37
|
def star
|
38
38
|
<<~SVG
|
39
|
-
<g transform="scale(0.
|
39
|
+
<g transform="scale(0.33) translate(0, 150)">
|
40
40
|
#{USPSFlags::Core::Icons::Star.new.svg.gsub('fill="#FFFFFF"', "fill=\"#{USPSFlags::Config::GOLD}\"")}
|
41
41
|
</g>
|
42
42
|
SVG
|
@@ -63,7 +63,7 @@ class USPSFlags::Grades::Grade
|
|
63
63
|
|
64
64
|
def jn
|
65
65
|
<<~SVG
|
66
|
-
<g transform="translate(
|
66
|
+
<g transform="translate(60)">
|
67
67
|
#{star}
|
68
68
|
<g transform="translate(#{USPSFlags::Config::GRADE_SPACING / 2 + 25})">#{bar}</g>
|
69
69
|
<g transform="translate(#{USPSFlags::Config::GRADE_SPACING * 2 + 20})">#{star}</g>
|
@@ -73,7 +73,7 @@ class USPSFlags::Grades::Grade
|
|
73
73
|
|
74
74
|
def n
|
75
75
|
<<~SVG
|
76
|
-
<g transform="translate(
|
76
|
+
<g transform="translate(60)">
|
77
77
|
#{star}
|
78
78
|
<g transform="translate(#{USPSFlags::Config::GRADE_SPACING / 2 + 25})">#{bar}</g>
|
79
79
|
<g transform="translate(#{USPSFlags::Config::GRADE_SPACING * 2 + 20})">#{star}</g>
|
@@ -84,9 +84,9 @@ class USPSFlags::Grades::Grade
|
|
84
84
|
end
|
85
85
|
|
86
86
|
def sn
|
87
|
-
box_width = USPSFlags::Grades::Grade.width(:n) +
|
87
|
+
box_width = USPSFlags::Grades::Grade.width(:n) + 60
|
88
88
|
<<~SVG
|
89
|
-
<rect x="20" y="-10" width="#{box_width}" height="
|
89
|
+
<rect x="20" y="-10" width="#{box_width}" height="155" fill=\"none\" stroke-width=\"20\" stroke=\"#{USPSFlags::Config::GOLD}\" />
|
90
90
|
<g transform="translate(50, 50)">
|
91
91
|
#{n}
|
92
92
|
</g>
|
data/usps_flags-grades.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'usps_flags-grades'
|
3
|
-
s.version = '0.0.
|
4
|
-
s.date = '2019-
|
3
|
+
s.version = '0.0.9'
|
4
|
+
s.date = '2019-06-01'
|
5
5
|
s.summary = 'Insignia generator for United States Power Squadrons'
|
6
6
|
s.description = 'An extension to the flag image (PNG, SVG) generator for United States Power Squadrons to generate grade insignia.'
|
7
7
|
s.homepage = 'http://rubygems.org/gems/usps_flags-grades'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: usps_flags-grades
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julian Fiander
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: usps_flags
|
@@ -107,7 +107,6 @@ files:
|
|
107
107
|
- LICENSE
|
108
108
|
- README.md
|
109
109
|
- Rakefile
|
110
|
-
- certs/jfiander.pem
|
111
110
|
- lib/usps_flags/grades.rb
|
112
111
|
- lib/usps_flags/grades/config.rb
|
113
112
|
- lib/usps_flags/grades/edpro.rb
|
data/certs/jfiander.pem
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
-----BEGIN CERTIFICATE-----
|
2
|
-
MIIEdDCCAtygAwIBAgIBATANBgkqhkiG9w0BAQsFADBAMRIwEAYDVQQDDAlqc2Zp
|
3
|
-
YW5kZXIxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
|
4
|
-
bTAeFw0xOTAxMjMxNzM4MjVaFw0yMDAxMjMxNzM4MjVaMEAxEjAQBgNVBAMMCWpz
|
5
|
-
ZmlhbmRlcjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYD
|
6
|
-
Y29tMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEA1wNuP8liL/6u1CPf
|
7
|
-
mDHh3pQVrmjhoXrahUnCYpFNuxLtLr5uguhHYGK2pnUXmaJ5yECuMkYyNpdw5Cr0
|
8
|
-
DQXyQU3xLbZRvxBSYqzADxVsH/QYoxUkpSJCIY24eOa/5ri5VripMyB05C9J6xdM
|
9
|
-
Useylp5mkEwpw/0yHaniE93Bh3NOpQfN3leW6ipffavcExEI6/YSv6biqO7ksz+J
|
10
|
-
wlY8N96vldmd5f/Ha+R/Gu4o/u/8XsrJ9wGZHixHOMJVSweXEhUg+wnYC/r6vAqy
|
11
|
-
C8kxqqT47phSiODnuWMdC9JAgIXseXEvRAMMvipMjtewgrIvPd98qBlR41nlQKby
|
12
|
-
9Do4tnrECb9qXqVNJ7RHC6/D4OZJtvgjCuEGLdJWMv4J7Wl+fKjXOqQXlNlGmwXh
|
13
|
-
CVlVuGw7dFGy3PjhAjyU81i5oXE3HzvizOrQBU+yby0pZlM4WEQdEfLnh4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