usps_flags 0.3.9 → 0.3.10
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/lib/usps_flags/config.rb +10 -1
- data/spec/usps_flags/config_spec.rb +9 -9
- data/usps_flags.gemspec +1 -1
- data.tar.gz.sig +2 -4
- metadata +1 -1
- 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: 4d85ccc10a610da7a9847f5543e7d907ff15fd5e
|
4
|
+
data.tar.gz: c7affbfa94639f5b621ed8c753a8d4f2a48ec8c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6524af08c48876941a3f3600ec93551d937e7fa45eaccf14efca7cc2122652db3c5fde7749b2fca2e478e881cfed8e9f88017bfa6abafb42212ab5ed80121ae
|
7
|
+
data.tar.gz: 83dca9e5580e3405a92940525ed21cc33b26b59a3b41101b700d8b63f0ab32e8b96b18a5908a994255f015629f3bc81d1ad46c7cc3b1704cacdfdb4c55bbc91b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/usps_flags/config.rb
CHANGED
@@ -10,6 +10,7 @@ class USPSFlags::Config
|
|
10
10
|
|
11
11
|
@@flags_dir = "#{File.dirname(__dir__)}/output"
|
12
12
|
@@use_larger_tridents = true
|
13
|
+
@@reset = false
|
13
14
|
|
14
15
|
# Configuration constructor
|
15
16
|
#
|
@@ -113,16 +114,24 @@ class USPSFlags::Config
|
|
113
114
|
@@use_larger_tridents
|
114
115
|
end
|
115
116
|
|
117
|
+
# Accessor for the boolean of whether to clear the flags_dir.
|
118
|
+
#
|
119
|
+
# @return [Boolean] Returns the current setting.
|
120
|
+
def self.reset
|
121
|
+
@@reset
|
122
|
+
end
|
123
|
+
|
116
124
|
private
|
117
125
|
def load_init_variables
|
118
126
|
@flags_dir = @@flags_dir
|
119
127
|
@use_larger_tridents = @@use_larger_tridents
|
120
|
-
@reset =
|
128
|
+
@reset = @@reset
|
121
129
|
end
|
122
130
|
|
123
131
|
def set_class_variables
|
124
132
|
@@flags_dir = @flags_dir
|
125
133
|
@@use_larger_tridents = @use_larger_tridents
|
134
|
+
@@reset = @reset
|
126
135
|
end
|
127
136
|
|
128
137
|
def set_flags_dir(reset: false)
|
@@ -1,17 +1,23 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe USPSFlags::Config do
|
4
|
-
describe "
|
4
|
+
describe "class variable accessors" do
|
5
5
|
it "should return the current flags directory" do
|
6
6
|
expect(USPSFlags::Config.flags_dir).to eql($tmp_flags_dir)
|
7
7
|
end
|
8
|
-
end
|
9
8
|
|
10
|
-
describe "log_path" do
|
11
9
|
it "should return the current flags directory" do
|
12
10
|
default_log_path = $tmp_flags_dir + "/log"
|
13
11
|
expect(USPSFlags::Config.log_path).to eql(default_log_path)
|
14
12
|
end
|
13
|
+
|
14
|
+
it "should return a Boolean from use_larger_tridents" do
|
15
|
+
expect([true, false]).to include(USPSFlags::Config.use_larger_tridents)
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should return a Boolean from reset" do
|
19
|
+
expect([true, false]).to include(USPSFlags::Config.reset)
|
20
|
+
end
|
15
21
|
end
|
16
22
|
|
17
23
|
describe "trident" do
|
@@ -20,12 +26,6 @@ describe USPSFlags::Config do
|
|
20
26
|
end
|
21
27
|
end
|
22
28
|
|
23
|
-
describe "use_larger_tridents" do
|
24
|
-
it "should return a Boolean from use_larger_tridents" do
|
25
|
-
expect([true, false]).to include(USPSFlags::Config.use_larger_tridents)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
29
|
describe "configuration constructor" do
|
30
30
|
it "should return a properly constructed configuration" do
|
31
31
|
@config = USPSFlags::Config.new do |config|
|
data/usps_flags.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'usps_flags'
|
3
|
-
s.version = '0.3.
|
3
|
+
s.version = '0.3.10'
|
4
4
|
s.date = '2017-11-08'
|
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.'
|
data.tar.gz.sig
CHANGED
@@ -1,4 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
�eU�=M��U��|/��Z��zMP�E���h��{���!ӄ�c�k-e��$���R�$[3�V�
|
4
|
-
+�k�.r����*Կˁ�P����v�
|
1
|
+
D�a3#Égl�aGwu�c6�F *vev�b�ʈ�����I1+�r�ϡ�{�Ud8��^�����
|
2
|
+
y�{��'�$i�־�>K8 � E���� ����_;����u�R�1����.�?9D�B& x�H�srT'�$!����%�H(�\�Lu6�����k�)��jU���wԧ!vdMK�I�J���vOS��$#���n�|���r��L�m>.�
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|