usps_flags 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9e250cab8093d4ec798a71c8e94772c8c3eaef58d9e99554afd11e47ba05d47
4
- data.tar.gz: 2040354a0793574a6006ab8fea71655bc7454bd9b4994a0957363535c7177ed6
3
+ metadata.gz: cd1924100e63785bd74beb28420e134605b9b1dc65d7cdb2fa4d81f3560e04d7
4
+ data.tar.gz: 250334abcb381cde875affe1952e39f8922c02b34d3992410146868155572027
5
5
  SHA512:
6
- metadata.gz: 100f3086b2251325c65e2a5bd36ebdb46c1beaa4c00e0ee87452a31dcc55ba7dbd3158a26053ff7123b3b789dd2da5515228c34a859c30d0843f6f4d19f54509
7
- data.tar.gz: 3b5d5757aefc028f618965f136911ac2b79db7e7f7b415124f23da2a16c1e8f166362b3cfe489f70283d9ba385881442f265e7376aed1b6f205b8d0dfdd8fb9c
6
+ metadata.gz: 36950b9153031c3164ecafd3d0154e4d6c9442cd044a8fdca5dce847b6a92924e4df4d59e35d6185cfc8b8517e2d880f14421f3ccb3323b9a10077cd33e75176
7
+ data.tar.gz: a243733ed9bc80bb510dd7864abfa9cfe8daae72b3e55bdc954ccd15d49d02c62bea493394da05082ef8d967ea315217ad18e5b7ff74c4007b011b6f907dd4d5
data/.rubocop.yml CHANGED
@@ -6,15 +6,15 @@ AllCops:
6
6
  - tmp/**/*
7
7
  - vendor/**/*
8
8
 
9
- Layout/IndentFirstHashElement:
9
+ Layout/FirstHashElementIndentation:
10
10
  EnforcedStyle: consistent
11
11
  Layout/AccessModifierIndentation:
12
12
  EnforcedStyle: outdent
13
13
  Layout/EmptyLinesAroundAccessModifier:
14
14
  Enabled: true
15
- Layout/AlignArray:
15
+ Layout/ArrayAlignment:
16
16
  Enabled: true
17
- Layout/AlignHash:
17
+ Layout/HashAlignment:
18
18
  Enabled: true
19
19
  Layout/EmptyLineAfterGuardClause:
20
20
  Enabled: true
@@ -51,7 +51,7 @@ Metrics/CyclomaticComplexity:
51
51
  Metrics/AbcSize:
52
52
  Enabled: true
53
53
 
54
- Naming/UncommunicativeMethodParamName:
54
+ Naming/MethodParameterName:
55
55
  Enabled: false
56
56
  Naming/AccessorMethodName:
57
57
  Enabled: false
@@ -64,6 +64,8 @@ RSpec/NestedGroups:
64
64
  Enabled: false
65
65
  RSpec/ExampleLength:
66
66
  Enabled: false
67
+ RSpec/LeakyConstantDeclaration:
68
+ Enabled: false
67
69
 
68
70
  Style/Documentation:
69
71
  Enabled: false
data/.travis.yml CHANGED
@@ -8,6 +8,8 @@ notifications:
8
8
  email:
9
9
  on_success: change
10
10
  on_failure: always
11
+ before_install:
12
+ - gem install bundler -v '< 2'
11
13
  before_script:
12
14
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
13
15
  - chmod +x ./cc-test-reporter
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- usps_flags (0.5.5)
4
+ usps_flags (0.5.6)
5
5
  file_utils (~> 1.1, >= 1.1.2)
6
6
  mini_magick (~> 4.9, >= 4.9.4)
7
- rubyzip (~> 1.2, >= 1.2.1)
7
+ rubyzip (~> 1.3, >= 1.3.0)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
@@ -44,7 +44,7 @@ GEM
44
44
  rubocop-rspec (1.33.0)
45
45
  rubocop (>= 0.60.0)
46
46
  ruby-progressbar (1.10.1)
47
- rubyzip (1.2.3)
47
+ rubyzip (1.3.0)
48
48
  simplecov (0.15.1)
49
49
  docile (~> 1.1.0)
50
50
  json (>= 1.8, < 3)
@@ -24,6 +24,7 @@ class USPSFlags
24
24
  @box_right = options[:br]
25
25
  @fly = options[:fly]
26
26
  @unit = options[:unit]
27
+ @barb_label = options[:barb_label]
27
28
  @heading = options[:heading]
28
29
  end
29
30
 
@@ -121,7 +121,8 @@ class USPSFlags
121
121
 
122
122
  Object.const_get("USPSFlags::Core::TridentSpecs::#{type}").new(
123
123
  bt: box_top, bb: box_bottom, bl: box_left, br: box_right,
124
- fly: @fly, unit: @unit, heading: heading(sym), config: @config
124
+ fly: @fly, unit: @unit, heading: heading(sym), config: @config,
125
+ barb_label: @barb_label
125
126
  ).p
126
127
  end
127
128
 
@@ -18,7 +18,7 @@ class USPSFlags
18
18
  <!-- Overlay -->
19
19
  <!-- Main point barb -->
20
20
  #{overlay_lines}
21
- <text x="#{@config[:center_point] + @config[:bar_width] * 9 / 8}" y="#{@box_top + @config[:center_point_height] - @config[:main_point_barb]}" font-family="sans-serif" font-size="#{BF / 100}px" fill="#041E42" text-anchor="left">#{@barb_label}</text>
21
+ <text x="#{@config[:center_point] + @config[:bar_width] * 9 / 8}" y="#{@box_top + @config[:center_point_height] - @config[:main_point_barb]}" font-family="sans-serif" font-size="#{BF / 100}px" fill="#{USPSFlags::Config::OLD_GLORY_BLUE}" text-anchor="left">#{@barb_label}</text>
22
22
  SVG
23
23
  end
24
24
 
@@ -13,7 +13,7 @@ class USPSFlags
13
13
  include USPSFlags::Core::TridentSpecs::Overlay
14
14
 
15
15
  def p
16
- output('Short', 14, :s) do
16
+ output('Short', -14, :s) do
17
17
  <<~SVG
18
18
  #{boundary_box}
19
19
  #{right}
@@ -14,7 +14,7 @@ describe USPSFlags::Core do
14
14
  [
15
15
  'Field', 'Specification Heading Information', 'Short Trident', 'Delta Trident', 'Circle Trident', 'Long Trident'
16
16
  ].each do |section|
17
- it "should contain the #{section} section" do
17
+ it "contains the #{section} section" do
18
18
  expect(described_class.trident_spec).to include("<!-- #{section} -->")
19
19
  end
20
20
  end
@@ -22,7 +22,7 @@ describe USPSFlags::Core do
22
22
 
23
23
  describe 'headers' do
24
24
  ['?xml ', '!DOCTYPE', 'svg ', 'metadata'].each do |tag|
25
- it "should contain the #{tag} tag" do
25
+ it "contains the #{tag} tag" do
26
26
  expect(described_class.headers).to include("<#{tag}")
27
27
  end
28
28
  end
@@ -44,7 +44,7 @@ describe USPSFlags::Generate do
44
44
  PORTCAP FLEETCAP FLT DAIDE DFLT NAIDE NFLT
45
45
  LT 1LT LTC CDR DLT D1LT DLTC DC STFC RC VC CC
46
46
  ].each do |flag|
47
- it "should generate #{flag}" do
47
+ it "generates #{flag}" do
48
48
  expect(described_class.svg(flag, outfile: '')).to include("<title>#{flag}</title>")
49
49
  end
50
50
  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.5.5'
6
- s.date = '2019-07-19'
5
+ s.version = '0.5.6'
6
+ s.date = '2019-12-12'
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'
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
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'
21
- s.add_runtime_dependency 'rubyzip', '~> 1.2', '>= 1.2.1'
21
+ s.add_runtime_dependency 'rubyzip', '~> 1.3', '>= 1.3.0'
22
22
 
23
23
  s.add_development_dependency 'rake', '~> 12.2', '>= 12.2.1'
24
24
  s.add_development_dependency 'rspec', '~> 3.7', '>= 3.7.0'
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.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-19 00:00:00.000000000 Z
11
+ date: 2019-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: file_utils
@@ -56,20 +56,20 @@ dependencies:
56
56
  requirements:
57
57
  - - "~>"
58
58
  - !ruby/object:Gem::Version
59
- version: '1.2'
59
+ version: '1.3'
60
60
  - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: 1.2.1
62
+ version: 1.3.0
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '1.2'
69
+ version: '1.3'
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
- version: 1.2.1
72
+ version: 1.3.0
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: rake
75
75
  requirement: !ruby/object:Gem::Requirement