usps_flags 0.6.4 → 0.7.1

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: 79a3d684d778e24b82b3862480bc013ae22b6db3c988a758db88f2bcf584f89f
4
- data.tar.gz: 64789bb99cb5f94ec982d829a0d9373d14077e0302791137301aecc219c2bfa2
3
+ metadata.gz: bcff92040427d784fdff5d2a9b02872290bc540c1532a395379401386fc533d7
4
+ data.tar.gz: f8c046e9d152e5bb7680c58cfb34a99825a503a9096b2ff0bdb5c2c689903cb0
5
5
  SHA512:
6
- metadata.gz: 29ad45351598cab222639f72999b4b52bae6dae07bc1a5c79f8ea0eb249867aaf84e5f65fe9ce78dc8527acdba94ca009402ccf44b29fd8d65905bf1f2385eea
7
- data.tar.gz: b55688e0b3635f12b53edc9d3bb6377520e877bd79550b96e65c0d9955b09cf760fdc6cba5b02e050105d428127f0857f0ee59bb6f4cd953995dee26f812fcbd
6
+ metadata.gz: af07f8e73b5a0ffc44ac8fc781022cf6b905d20cf01e0c009c3cf51307c1c949ed6f71a97ef837152d472fd11f84fd2a545eb04d74f4d7ad02b988cfebabc0ef
7
+ data.tar.gz: 6fa4e85ea72b05ae6660a9514cc86a472803ac4c9a91a4c7ff9938bb6b4bbf8400ca2bc6ad41c5b59a46ee374054d72e81b1851bb2ba935ed96c4c0e4d613a6d
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.4)
4
+ usps_flags (0.7.1)
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)
@@ -20,7 +20,8 @@ GEM
20
20
  rainbow (3.1.1)
21
21
  rake (12.3.3)
22
22
  regexp_parser (2.2.1)
23
- rexml (3.2.5)
23
+ rexml (3.2.8)
24
+ strscan (>= 3.0.9)
24
25
  rspec (3.11.0)
25
26
  rspec-core (~> 3.11.0)
26
27
  rspec-expectations (~> 3.11.0)
@@ -56,10 +57,13 @@ GEM
56
57
  simplecov_json_formatter (~> 0.1)
57
58
  simplecov-html (0.12.3)
58
59
  simplecov_json_formatter (0.1.4)
60
+ strscan (3.1.0)
59
61
  unicode-display_width (1.8.0)
60
62
 
61
63
  PLATFORMS
62
64
  arm64-darwin-21
65
+ arm64-darwin-23
66
+ x86_64-linux
63
67
 
64
68
  DEPENDENCIES
65
69
  rake (~> 12.2, >= 12.2.1)
@@ -70,4 +74,4 @@ DEPENDENCIES
70
74
  usps_flags!
71
75
 
72
76
  BUNDLED WITH
73
- 2.2.31
77
+ 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.4'
6
- s.date = '2023-03-13'
5
+ s.version = '0.7.1'
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.4
4
+ version: 0.7.1
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: 2023-03-13 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
@@ -256,15 +256,15 @@ 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: