usps_flags 0.6.3 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1fce1ce11314457a3e98a2ab0fcdb8027622afe1b1236403e966e903da0ff68
4
- data.tar.gz: 31ca874c27dc4ea1874798a4bbd0071ec704915e9534470f6b5d3f318d9f3cfc
3
+ metadata.gz: bf8745ba587d9308a5aba2b9ac05c7363412ef6da8af976ecb03669029c05191
4
+ data.tar.gz: 2dbaa0c93c5c970609caf2dda85cfb736fe08148577e4a801589f88f2fe3b262
5
5
  SHA512:
6
- metadata.gz: 95f901e036ee037531a550b074f111693958380e77e855b3f9e2d851a7407c96fec5fd77c9f9af0798d28edeece9adf2c21f3640eb635a512d9404a32d8cb0ec
7
- data.tar.gz: 12cd8344933826262a3bbac4fa3e8d648d04d668d0d4d39937ff15e99645eed83516809e613838708b20f80120f1a3126cf93c9212c0af8772f838a65f8e97cb
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: 2.5
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
- 2.7.4
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.6.3)
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)
@@ -13,7 +13,7 @@ GEM
13
13
  diff-lcs (1.5.0)
14
14
  docile (1.4.0)
15
15
  file_utils (1.1.2)
16
- mini_magick (4.11.0)
16
+ mini_magick (4.12.0)
17
17
  parallel (1.21.0)
18
18
  parser (3.1.1.0)
19
19
  ast (~> 2.4.1)
@@ -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.2.31
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.keys.each do |size|
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/')
@@ -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, size:, size_key: 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 = [STDOUT]
100
+ outputs = [$stdout]
101
101
 
102
102
  log_file = File.open("#{USPSFlags.configuration.log_path}/flag.log", 'a')
103
103
  outputs << log_file
@@ -9,7 +9,7 @@ describe USPSFlags::Config do
9
9
  end
10
10
 
11
11
  it 'returns the current log directory' do
12
- default_log_path = $tmp_flags_dir + '/log'
12
+ default_log_path = "#{$tmp_flags_dir}/log"
13
13
  expect(USPSFlags.configuration.log_path).to eql(default_log_path)
14
14
  end
15
15
 
@@ -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(STDOUT).to receive(:puts).with(described_class.svg('Lt', outfile: ''), "\n")
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.3'
6
- s.date = '2022-03-10'
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 = '~> 2.5'
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.6.3
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: 2022-03-10 00:00:00.000000000 Z
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
@@ -254,17 +254,17 @@ require_paths:
254
254
  - doc
255
255
  required_ruby_version: !ruby/object:Gem::Requirement
256
256
  requirements:
257
- - - "~>"
257
+ - - ">="
258
258
  - !ruby/object:Gem::Version
259
- version: '2.5'
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.1.6
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: