usps_flags 0.3.11 → 0.3.12
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.rb +33 -2
- 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: d7b9c00b3cf12a17087af158aea2a2c73e5b90ec
|
4
|
+
data.tar.gz: 7ce70404b37e3818c41bbfeb87ecdea2ad556c5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 133aba211b5fba9f52345890bc0eac2534fe07cd37e3b6eabf310c3feeac704adb750fb542db2156f81b1b217ccfe4db16a5b1044bec073af06ee14436259c81
|
7
|
+
data.tar.gz: 00c054d326118ae0a8d330e2456b3f4cb42ba1545ad11957988986a6886f0e98c497a40b63f8a52f8dba7003e75c7cff81aa981f63d1545a08f01dfc9d9f110e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/Gemfile.lock
CHANGED
data/lib/usps_flags.rb
CHANGED
@@ -49,11 +49,42 @@ class USPSFlags
|
|
49
49
|
#
|
50
50
|
# @private
|
51
51
|
def self.ensure_directories
|
52
|
-
|
52
|
+
self.get_dir_configs
|
53
|
+
self.prepare_dir_configs
|
54
|
+
self.prepare_flags_dir
|
55
|
+
::FileUtils.mkdir_p(USPSFlags.configuration.log_path)
|
56
|
+
end
|
57
|
+
|
58
|
+
# Gets all configuration variables that specify a dir.
|
59
|
+
#
|
60
|
+
# @private
|
61
|
+
def self.get_dir_configs
|
62
|
+
@dirs = USPSFlags.configuration.
|
63
|
+
instance_variables.
|
64
|
+
map(&:to_s).
|
65
|
+
map { |v| v.match(/.*?_dir/) }.
|
66
|
+
reject! { |v| v.nil? }.
|
67
|
+
map(&:to_s)
|
68
|
+
end
|
69
|
+
|
70
|
+
# Ensures that directories exist (and are cleared, if configured).
|
71
|
+
#
|
72
|
+
# @private
|
73
|
+
def self.prepare_dir_configs
|
74
|
+
@dirs.each do |dir|
|
75
|
+
dir_path = @configuration.instance_variable_get(dir)
|
76
|
+
::FileUtils.rm_rf(dir_path) if @configuration.clear
|
77
|
+
::FileUtils.mkdir_p(dir_path)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# Ensures that the flags_dir subdirectories exist.
|
82
|
+
#
|
83
|
+
# @private
|
84
|
+
def self.prepare_flags_dir
|
53
85
|
::FileUtils.mkdir_p("#{@configuration.flags_dir}/PNG/insignia")
|
54
86
|
::FileUtils.mkdir_p("#{@configuration.flags_dir}/SVG/insignia")
|
55
87
|
::FileUtils.mkdir_p("#{@configuration.flags_dir}/ZIP")
|
56
|
-
::FileUtils.mkdir_p(USPSFlags.configuration.log_path)
|
57
88
|
end
|
58
89
|
|
59
90
|
# Constructor for individual flags.
|
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.3.
|
4
|
-
s.date = '2017-11-
|
3
|
+
s.version = '0.3.12'
|
4
|
+
s.date = '2017-11-09'
|
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.3.
|
4
|
+
version: 0.3.12
|
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-09 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
|