usps_flags 0.6.4 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -1
- data/.ruby-version +1 -1
- data/Gemfile.lock +3 -2
- data/lib/usps_flags/core/trident_specs/header.rb +2 -1
- data/lib/usps_flags/generate/generator_methods.rb +1 -1
- data/lib/usps_flags/helpers.rb +2 -2
- data/spec/usps_flags/config_spec.rb +1 -1
- data/spec/usps_flags/generate_spec.rb +1 -1
- data/usps_flags.gemspec +3 -3
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf8745ba587d9308a5aba2b9ac05c7363412ef6da8af976ecb03669029c05191
|
4
|
+
data.tar.gz: 2dbaa0c93c5c970609caf2dda85cfb736fe08148577e4a801589f88f2fe3b262
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84e1488e3536d9d84ddf5647d991d47645ead7d6714a6eb1df87ffdfe067c2eb4a40cb1a78f77f601b5833abb2e93525fca7ca3e8e3052619644619ce0480f6d
|
7
|
+
data.tar.gz: 74fd557a37a1918e09a788e73f0a5d459fc952323b1b42f789209353077e13c97d6acfee6973c012633f9885b08a722f9afa64814a326327cb8183b2e6c8b2d3
|
data/.rubocop.yml
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
require: rubocop-rspec
|
2
2
|
AllCops:
|
3
|
-
TargetRubyVersion:
|
3
|
+
TargetRubyVersion: 3.0
|
4
4
|
Exclude:
|
5
5
|
- lib/output/*
|
6
6
|
- tmp/**/*
|
7
7
|
- vendor/**/*
|
8
|
+
NewCops: enable
|
8
9
|
|
9
10
|
Layout/FirstHashElementIndentation:
|
10
11
|
EnforcedStyle: consistent
|
@@ -33,6 +34,8 @@ Lint/UnusedMethodArgument:
|
|
33
34
|
Enabled: true
|
34
35
|
Lint/UselessAssignment:
|
35
36
|
Enabled: true
|
37
|
+
Lint/ConstantDefinitionInBlock:
|
38
|
+
Enabled: false
|
36
39
|
|
37
40
|
Metrics/BlockLength:
|
38
41
|
Exclude:
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.0.7
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
usps_flags (0.
|
4
|
+
usps_flags (0.7.0)
|
5
5
|
file_utils (~> 1.1, >= 1.1.2)
|
6
6
|
mini_magick (~> 4.9, >= 4.9.4)
|
7
7
|
rubyzip (~> 1.3, >= 1.3.0)
|
@@ -60,6 +60,7 @@ GEM
|
|
60
60
|
|
61
61
|
PLATFORMS
|
62
62
|
arm64-darwin-21
|
63
|
+
arm64-darwin-23
|
63
64
|
|
64
65
|
DEPENDENCIES
|
65
66
|
rake (~> 12.2, >= 12.2.1)
|
@@ -70,4 +71,4 @@ DEPENDENCIES
|
|
70
71
|
usps_flags!
|
71
72
|
|
72
73
|
BUNDLED WITH
|
73
|
-
2.
|
74
|
+
2.5.10
|
@@ -8,7 +8,8 @@ class USPSFlags
|
|
8
8
|
class Core
|
9
9
|
module TridentSpecs
|
10
10
|
class Header < USPSFlags::Core::TridentSpecs::Base
|
11
|
-
def initialize(options
|
11
|
+
def initialize(**options)
|
12
|
+
super(**options)
|
12
13
|
@fly = options[:fly]
|
13
14
|
@fly_fraction = options[:fly_fraction]
|
14
15
|
@hoist = options[:hoist]
|
@@ -108,7 +108,7 @@ class USPSFlags
|
|
108
108
|
end
|
109
109
|
|
110
110
|
def generate_reduced_size_pngs
|
111
|
-
USPSFlags::Helpers.png_sizes.
|
111
|
+
USPSFlags::Helpers.png_sizes.each_key do |size|
|
112
112
|
size, size_key = USPSFlags::Helpers.size_and_key(size: size, flag: @flag)
|
113
113
|
@sized_png_file = "#{USPSFlags.configuration.flags_dir}/PNG/#{@flag}.#{size_key}.png"
|
114
114
|
@sized_png_ins_file = @sized_png_file.gsub('/PNG/', '/PNG/insignia/')
|
data/lib/usps_flags/helpers.rb
CHANGED
@@ -34,7 +34,7 @@ class USPSFlags
|
|
34
34
|
# @param [String] outfile Path to the output file.
|
35
35
|
# @param [String] size Actual size to output as.
|
36
36
|
# @param [String] size_key Size suffix to attach to the file name.
|
37
|
-
def resize_png(png_file, file: nil, outfile: nil,
|
37
|
+
def resize_png(png_file, size:, file: nil, outfile: nil, size_key: nil)
|
38
38
|
raise USPSFlags::Errors::PNGConversionError if outfile.nil? && file.nil?
|
39
39
|
raise USPSFlags::Errors::PNGConversionError if outfile.nil? && size_key.nil?
|
40
40
|
|
@@ -97,7 +97,7 @@ class USPSFlags
|
|
97
97
|
# @private
|
98
98
|
def log(*messages)
|
99
99
|
::FileUtils.mkdir_p(USPSFlags.configuration.log_path)
|
100
|
-
outputs = [
|
100
|
+
outputs = [$stdout]
|
101
101
|
|
102
102
|
log_file = File.open("#{USPSFlags.configuration.log_path}/flag.log", 'a')
|
103
103
|
outputs << log_file
|
@@ -116,7 +116,7 @@ describe USPSFlags::Generate do
|
|
116
116
|
|
117
117
|
describe 'without an outfile set' do
|
118
118
|
it 'prints SVG data to the console' do
|
119
|
-
expect(
|
119
|
+
expect($stdout).to receive(:puts).with(described_class.svg('Lt', outfile: ''), "\n")
|
120
120
|
described_class.svg('Lt')
|
121
121
|
end
|
122
122
|
end
|
data/usps_flags.gemspec
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'usps_flags'
|
5
|
-
s.version = '0.
|
6
|
-
s.date = '
|
5
|
+
s.version = '0.7.0'
|
6
|
+
s.date = '2024-05-17'
|
7
7
|
s.summary = 'Flag generator for United States Power Squadrons'
|
8
8
|
s.description = 'A flag image (PNG, SVG) generator for United States Power Squadrons.'
|
9
9
|
s.homepage = 'http://rubygems.org/gems/usps_flags'
|
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.files = `git ls-files`.split("\n")
|
15
15
|
s.test_files = `git ls-files -- spec/*`.split("\n")
|
16
16
|
|
17
|
-
s.required_ruby_version = '>=
|
17
|
+
s.required_ruby_version = '>= 3.0'
|
18
18
|
|
19
19
|
s.add_runtime_dependency 'file_utils', '~> 1.1', '>= 1.1.2'
|
20
20
|
s.add_runtime_dependency 'mini_magick', '~> 4.9', '>= 4.9.4'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: usps_flags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julian Fiander
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: file_utils
|
@@ -246,7 +246,7 @@ homepage: http://rubygems.org/gems/usps_flags
|
|
246
246
|
licenses:
|
247
247
|
- GPL-3.0
|
248
248
|
metadata: {}
|
249
|
-
post_install_message:
|
249
|
+
post_install_message:
|
250
250
|
rdoc_options: []
|
251
251
|
require_paths:
|
252
252
|
- lib
|
@@ -256,15 +256,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
256
256
|
requirements:
|
257
257
|
- - ">="
|
258
258
|
- !ruby/object:Gem::Version
|
259
|
-
version: '
|
259
|
+
version: '3.0'
|
260
260
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
261
261
|
requirements:
|
262
262
|
- - ">="
|
263
263
|
- !ruby/object:Gem::Version
|
264
264
|
version: '0'
|
265
265
|
requirements: []
|
266
|
-
rubygems_version: 3.
|
267
|
-
signing_key:
|
266
|
+
rubygems_version: 3.2.33
|
267
|
+
signing_key:
|
268
268
|
specification_version: 4
|
269
269
|
summary: Flag generator for United States Power Squadrons
|
270
270
|
test_files:
|