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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/Gemfile.lock +1 -1
- data/lib/usps_flags/generate.rb +2 -4
- data/usps_flags.gemspec +2 -2
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2914b680d80ec58dd16d063e50dc6adde807de7
|
4
|
+
data.tar.gz: e42467fd6b4739d4b5440a3897f698f03063f8b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 443ab189736f15209dd5cd5e199654153370e4c7e7f6d0d89c764a216e444b8b12417dc93da41439b69658492aabb7ba5cbba11bca28e62130535196a504158b
|
7
|
+
data.tar.gz: 6e8577fa46d0ca01a9e2614b5e20eb4d55a493eaa6527cc7f8d9f760601976160583465d26e7d976aeb7ba7a736f5257f85d9e8cb64480f0a6ff252b8ee80db1
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/Gemfile.lock
CHANGED
data/lib/usps_flags/generate.rb
CHANGED
@@ -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. (
|
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
|
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.
|
4
|
-
s.date = '2017-11-
|
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.
|
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-
|
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
|