usps_flags-grades 0.1.3 → 0.1.5

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: e5b29e032d36c2e094226089b60fc675ac25662bac54061d433d9abafba6d269
4
- data.tar.gz: bf840fc3210cf647306af73b8201a31f93d66aa05352736bb454cae9a7e67057
3
+ metadata.gz: cefac45cc5531db3f4f992a90e1b527a7e743aaf982a6266d6b6fb30d2256e17
4
+ data.tar.gz: 732876a050800e686568512f63274b38ad6a296ceab6f0b777bb4085b6de07a8
5
5
  SHA512:
6
- metadata.gz: 95d4577e2000535d87a816164438891f8327e8dc6cf8e53ffbe0ce445dc814a2fad4ad54f007d35f76e4f1cfb07911f5bec9ebc6e7c0db51e89e27ff7737bdb8
7
- data.tar.gz: a980729539a271ac48282b77f4dcb64c37715911968b0573b94c2ec6af5ca03dc711c1acc6518f8993747b75ea1eb5e5f3f2a95b2d300d465c174c86c3c6effa
6
+ metadata.gz: db74e2ca7a56c73a99f1cdc90bbaaade93598c7c44fd662af77c0586d98c58a93c19cf41bb802a1f8225e5610d03df24f78e95e922c909a328e41521b0620bdc
7
+ data.tar.gz: b70066bc684b2c02de5b54c010955b3a9cc1efdcb32b85e44c9fa83a928a39e1989ec1b661370680425bfed860c60bf0cf76bc37cbd5d5e848f6b6523bc29a3a
@@ -0,0 +1 @@
1
+ 2.5.1
@@ -8,6 +8,8 @@ notifications:
8
8
  email:
9
9
  on_success: change
10
10
  on_failure: always
11
+ before_install:
12
+ - gem install bundler -v '< 2'
11
13
  script:
12
14
  - bundle exec rubocop
13
15
  - bundle exec rspec
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- usps_flags-grades (0.1.3)
4
+ usps_flags-grades (0.1.5)
5
5
  usps_flags (~> 0.5, >= 0.5.5)
6
6
 
7
7
  GEM
@@ -12,13 +12,13 @@ GEM
12
12
  docile (1.1.5)
13
13
  file_utils (1.1.2)
14
14
  jaro_winkler (1.5.2)
15
- json (2.1.0)
16
- mini_magick (4.9.5)
15
+ json (2.3.1)
16
+ mini_magick (4.10.1)
17
17
  parallel (1.17.0)
18
18
  parser (2.6.3.0)
19
19
  ast (~> 2.4.0)
20
20
  rainbow (3.0.0)
21
- rake (12.2.1)
21
+ rake (12.3.3)
22
22
  rspec (3.7.0)
23
23
  rspec-core (~> 3.7.0)
24
24
  rspec-expectations (~> 3.7.0)
@@ -42,17 +42,17 @@ GEM
42
42
  rubocop-rspec (1.33.0)
43
43
  rubocop (>= 0.60.0)
44
44
  ruby-progressbar (1.10.1)
45
- rubyzip (1.2.3)
45
+ rubyzip (1.3.0)
46
46
  simplecov (0.15.1)
47
47
  docile (~> 1.1.0)
48
48
  json (>= 1.8, < 3)
49
49
  simplecov-html (~> 0.10.0)
50
50
  simplecov-html (0.10.2)
51
51
  unicode-display_width (1.6.0)
52
- usps_flags (0.5.5)
52
+ usps_flags (0.6.1)
53
53
  file_utils (~> 1.1, >= 1.1.2)
54
54
  mini_magick (~> 4.9, >= 4.9.4)
55
- rubyzip (~> 1.2, >= 1.2.1)
55
+ rubyzip (~> 1.3, >= 1.3.0)
56
56
 
57
57
  PLATFORMS
58
58
  ruby
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![Maintainability](https://api.codeclimate.com/v1/badges/760b824f0edac3316a11/maintainability)](https://codeclimate.com/github/jfiander/usps-flags_grades/maintainability)
7
7
 
8
8
  An extension for [USPSFlags](https://github.com/jfiander/usps-flags) to generate
9
- regrade insignia.
9
+ grade insignia.
10
10
 
11
11
  ## Usage
12
12
 
@@ -66,6 +66,14 @@ class USPSFlags
66
66
  USPSFlags::Helpers.output(@svg, outfile: @outfile)
67
67
  end
68
68
 
69
+ # Generates the constructed file as PNG.
70
+ #
71
+ # @return [String] Returns the PNG file output path.
72
+ def png(outfile: nil)
73
+ USPSFlags::Generate.png(svg, outfile: outfile)
74
+ outfile
75
+ end
76
+
69
77
  # Generates the descriptive title for the SVG.
70
78
  #
71
79
  # @return [String] Returns the descriptive title.
@@ -35,7 +35,7 @@ class USPSFlags
35
35
  def life_bar
36
36
  <<~SVG
37
37
  <polyline points="145,240 275,240 275,260 145,260 145,240" fill="#{USPSFlags::Config::GOLD}" />
38
- <polyline points="400,240 610,240 610,260 475,260 475,240" fill="#{USPSFlags::Config::GOLD}" />
38
+ <polyline points="475,240 610,240 610,260 475,260 475,240" fill="#{USPSFlags::Config::GOLD}" />
39
39
  SVG
40
40
  end
41
41
 
@@ -318,4 +318,10 @@ describe USPSFlags::Grades do
318
318
  USPSFlags::Errors::InvalidInsignia, 'EdPro is only valid for grades AP, JN, N'
319
319
  )
320
320
  end
321
+
322
+ it 'does not raise an error from png' do
323
+ expect { described_class.new { |g| g.membership = :life }.png(outfile: './life.png') }.not_to(raise_error)
324
+ ensure
325
+ File.delete('./life.png')
326
+ end
321
327
  end
@@ -2,8 +2,8 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'usps_flags-grades'
5
- s.version = '0.1.3'
6
- s.date = '2019-07-19'
5
+ s.version = '0.1.5'
6
+ s.date = '2020-08-03'
7
7
  s.summary = 'Insignia generator for United States Power Squadrons'
8
8
  s.description = 'An extension to the flag image generator for United States Power Squadrons to generate insignia.'
9
9
  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.1.3
4
+ version: 0.1.5
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-07-19 00:00:00.000000000 Z
11
+ date: 2020-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: usps_flags
@@ -140,6 +140,7 @@ files:
140
140
  - ".gitignore"
141
141
  - ".rspec"
142
142
  - ".rubocop.yml"
143
+ - ".ruby-version"
143
144
  - ".travis.yml"
144
145
  - ".yardopts"
145
146
  - CONTRIBUTING.md
@@ -178,8 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
179
  - !ruby/object:Gem::Version
179
180
  version: '0'
180
181
  requirements: []
181
- rubyforge_project:
182
- rubygems_version: 2.7.6
182
+ rubygems_version: 3.1.4
183
183
  signing_key:
184
184
  specification_version: 4
185
185
  summary: Insignia generator for United States Power Squadrons