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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a1af62f4a1307029234a0235262e74173db5dacc16ef87e85f498dee4898a3f
4
- data.tar.gz: 7b7f085b360c55049221d7e2ed0fcb7cc35aa1388feaa2f467720d896e83825d
3
+ metadata.gz: 05ef811705f59246447d5cb9642e13c36407dae0baee020e37c3a7f48c5ff056
4
+ data.tar.gz: 9c06c5ff525ec4cc62fc9d11d0137d0d2b0aaef9c85b67dd4491815c5b8d22eb
5
5
  SHA512:
6
- metadata.gz: faa98be163dfaec298f587e28f81796c13081a6f0e34795e7877f37a4aa6f3719b381d95c91e83a99f777187f6cd1d7acdc62c94fc6093e58619c410174ce040
7
- data.tar.gz: cc038bfa53f5bd03b28587ec89985cc0f28f96e853bec24231cd6638c5dc24dbbb9cac01012dbd79cca0867d799ee95e548b52716129e2e6cfd0da9ad31f1073
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.8)
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.0)
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
@@ -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 burgees.
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
- [:s, :p, :ap, :jn, :n, :sn]
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 - 10
23
+ USPSFlags::Config::GRADE_SPACING * 3 + 10
24
24
  when :n
25
- USPSFlags::Config::GRADE_SPACING * 5 + 25
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.25) translate(0, 150)">
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(50)">
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(50)">
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) + 85
87
+ box_width = USPSFlags::Grades::Grade.width(:n) + 60
88
88
  <<~SVG
89
- <rect x="20" y="-10" width="#{box_width}" height="150" fill=\"none\" stroke-width=\"15\" stroke=\"#{USPSFlags::Config::GOLD}\" />
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>
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'usps_flags-grades'
3
- s.version = '0.0.8'
4
- s.date = '2019-05-30'
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.8
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-05-30 00:00:00.000000000 Z
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
- ZmlhbmRlcjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRM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