usps_flags 0.2.2 → 0.2.3

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: 54f49da83f3bff939197525b7aa49e42f591d711
4
- data.tar.gz: a477f14879786f47d91e435fb70358c1856d9e2a
3
+ metadata.gz: b2914b680d80ec58dd16d063e50dc6adde807de7
4
+ data.tar.gz: e42467fd6b4739d4b5440a3897f698f03063f8b4
5
5
  SHA512:
6
- metadata.gz: 6f961ea169184c81d8a43b49fcd9b20971de500e0774993130a7648d5d7966fa6ba05ecc041edccbff9c7ee99fecd80272b3a55aa4eaa5e0b0a04b8ebe83bff5
7
- data.tar.gz: 8f6243b556c7be2c99bbf04b7e1ea336cef3b5d2751d119741790c702d8c67be4f48917a6f148babb34de93f02f82769912ce3083e4a69ccee97a3386a8744c8
6
+ metadata.gz: 443ab189736f15209dd5cd5e199654153370e4c7e7f6d0d89c764a216e444b8b12417dc93da41439b69658492aabb7ba5cbba11bca28e62130535196a504158b
7
+ data.tar.gz: 6e8577fa46d0ca01a9e2614b5e20eb4d55a493eaa6527cc7f8d9f760601976160583465d26e7d976aeb7ba7a736f5257f85d9e8cb64480f0a6ff252b8ee80db1
checksums.yaml.gz.sig CHANGED
Binary file
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- usps_flags (0.2.1)
4
+ usps_flags (0.2.2)
5
5
  file_utils (~> 1.1, >= 1.1.2)
6
6
  mini_magick (~> 4.8, >= 4.8.0)
7
7
  rubyzip (~> 1.2, >= 1.2.1)
@@ -26,10 +26,9 @@ class USPSFlags::Generate
26
26
  # Convert SVG data into a PNG file.
27
27
  #
28
28
  # @param [String] svg The SVG data.
29
- # @param [String] outfile The path to save the PNG file to. (File is not accessible if this is left blank.)
29
+ # @param [String] outfile The path to save the PNG file to. (Required because the file is not accessible if this is left blank.)
30
30
  # @param [Boolean] trim Whether to trim the generated PNG file of excess transparency.
31
- def png(svg, outfile: nil, trim: false)
32
- outfile = "temp.png" if outfile.nil?
31
+ def png(svg, outfile:, trim: false)
33
32
  temp_svg = ::File.new("temp.svg", "w+")
34
33
  temp_svg.write(svg)
35
34
  temp_svg.flush
@@ -43,7 +42,6 @@ class USPSFlags::Generate
43
42
  end
44
43
  ensure
45
44
  ::File.delete(temp_svg) if ::File.exist?(temp_svg)
46
- ::File.delete("temp.png") if ::File.exist?("temp.png")
47
45
  end
48
46
 
49
47
  # Generate all static SVG and PNG files, and automaticall generates zip archives for download.
data/usps_flags.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'usps_flags'
3
- s.version = '0.2.2'
4
- s.date = '2017-11-04'
3
+ s.version = '0.2.3'
4
+ s.date = '2017-11-05'
5
5
  s.summary = 'Flag generator for United States Power Squadrons'
6
6
  s.description = 'A flag image (PNG, SVG) generator for United States Power Squadrons.'
7
7
  s.homepage = 'http://rubygems.org/gems/usps_flags'
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usps_flags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander
@@ -30,7 +30,7 @@ cert_chain:
30
30
  3YzYAc+kXfD7kkzA2NMvLT6Q1v03qQyIZ8BS8SNk5wLGAdLM+IravFDLEs448fjz
31
31
  lEAU0RHLFVbE+CXW6makIlWGHR0=
32
32
  -----END CERTIFICATE-----
33
- date: 2017-11-04 00:00:00.000000000 Z
33
+ date: 2017-11-05 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: file_utils
metadata.gz.sig CHANGED
Binary file