gruff 0.12.1-java → 0.12.2-java

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: 7da96b4a4ea19a79c7d682e5e00ac2d484263d7255753f9fc4d37e2826f8cce9
4
- data.tar.gz: 83e691df978a8c4fd13996ace0dcf902d02431275ef7f24a964f7c12a9c0e3c1
3
+ metadata.gz: 48aea7b38e287c7020e9c5accef465de355ea7604e88234cc3eeacb97a76247d
4
+ data.tar.gz: 52f15904875b6ebfa35b98da41a919ad400fdb7faf50ea6c61f1b43dc3011380
5
5
  SHA512:
6
- metadata.gz: ed38238b3a3489b4ddc488dfa4984fcba6cc852e7f993b669fffb006d49110e0d6b4e707993d576add2cfa69e8fb57fd30f50df7b6b84e8a5b3a70edcf857fb5
7
- data.tar.gz: beb3bc3db5b76436722ecef5b17d42dba67516eabcb39f53d66cceda9b7f2d9e56070f33f0b7e1f7a457ab246dacb7c549fa18bc65e15f83d80c1466ff125372
6
+ metadata.gz: 76395c1016e0af0df78eb4960381c955be484b3448f19d46f08aa12613a3e0a6b2ef8b3449e4a881cded7600fb3178ecd6e23eb89fc016a83fae36912361963b
7
+ data.tar.gz: f5c52f1b2270cbe9907d4ef0eea38582f5babcf9b81dcac4548ce6a17f6fc79d0067a9f11aadcb1c9c6deca4b9e9edf161b9d439db9af3e6c01d1422e229f978
data/.rubocop_todo.yml CHANGED
@@ -1,11 +1,25 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2020-10-17 05:39:30 UTC using RuboCop version 0.93.1.
3
+ # on 2021-03-07 06:12:58 UTC using RuboCop version 1.11.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
+ # Offense count: 1
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: Include.
12
+ # Include: **/*.gemspec
13
+ Gemspec/DateAssignment:
14
+ Exclude:
15
+ - 'gruff.gemspec'
16
+
17
+ # Offense count: 1
18
+ # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
19
+ Lint/DuplicateBranch:
20
+ Exclude:
21
+ - 'test/gruff_test_case.rb'
22
+
9
23
  # Offense count: 1
10
24
  Lint/DuplicateMethods:
11
25
  Exclude:
@@ -36,13 +50,13 @@ Lint/Void:
36
50
  - 'lib/gruff/patch/rmagick.rb'
37
51
 
38
52
  # Offense count: 54
39
- # Configuration parameters: IgnoredMethods.
53
+ # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
40
54
  Metrics/AbcSize:
41
55
  Max: 82
42
56
 
43
57
  # Offense count: 1
44
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
45
- # ExcludedMethods: refine
58
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
59
+ # IgnoredMethods: refine
46
60
  Metrics/BlockLength:
47
61
  Max: 29
48
62
 
@@ -57,12 +71,12 @@ Metrics/CyclomaticComplexity:
57
71
  Max: 21
58
72
 
59
73
  # Offense count: 121
60
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
74
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
61
75
  Metrics/MethodLength:
62
76
  Max: 81
63
77
 
64
78
  # Offense count: 3
65
- # Configuration parameters: CountKeywordArgs.
79
+ # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
66
80
  Metrics/ParameterLists:
67
81
  Max: 7
68
82
 
@@ -88,6 +102,16 @@ Naming/MethodParameterName:
88
102
  - 'lib/gruff/pie.rb'
89
103
  - 'lib/gruff/renderer/text.rb'
90
104
 
105
+ # Offense count: 6
106
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers.
107
+ # SupportedStyles: snake_case, normalcase, non_integer
108
+ # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
109
+ Naming/VariableNumber:
110
+ Exclude:
111
+ - 'test/test_bar.rb'
112
+ - 'test/test_bezier.rb'
113
+ - 'test/test_line.rb'
114
+
91
115
  # Offense count: 1
92
116
  # Configuration parameters: MinSize.
93
117
  Performance/CollectionLiteralInLoop:
@@ -122,12 +146,18 @@ Style/CombinableLoops:
122
146
  Exclude:
123
147
  - 'test/test_line.rb'
124
148
 
149
+ # Offense count: 3
150
+ Style/DocumentDynamicEvalDefinition:
151
+ Exclude:
152
+ - 'test/gruff_test_case.rb'
153
+
125
154
  # Offense count: 132
126
155
  # Configuration parameters: RequireForNonPublicMethods.
127
156
  Style/DocumentationMethod:
128
157
  Enabled: false
129
158
 
130
159
  # Offense count: 3
160
+ # Cop supports --auto-correct.
131
161
  Style/EvalWithLocation:
132
162
  Exclude:
133
163
  - 'test/gruff_test_case.rb'
@@ -151,3 +181,10 @@ Style/StringConcatenation:
151
181
  - 'lib/gruff/photo_bar.rb'
152
182
  - 'test/gruff_test_case.rb'
153
183
 
184
+ # Offense count: 2
185
+ # Configuration parameters: EnforcedStyle.
186
+ # SupportedStyles: forbid_mixed_logical_operators, forbid_logical_operators
187
+ Style/UnlessLogicalOperators:
188
+ Exclude:
189
+ - 'lib/gruff/bar.rb'
190
+ - 'lib/gruff/scatter.rb'
data/.travis.yml CHANGED
@@ -7,7 +7,8 @@ rvm:
7
7
  - 2.5
8
8
  - 2.6
9
9
  - 2.7
10
- - jruby-9.2.13.0
10
+ - 3.0
11
+ - jruby-9.2.14.0
11
12
 
12
13
  jobs:
13
14
  include:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.12.2
4
+ - Avoid SEGV caused with '%S' in Draw#get_type_metrics by old ImageMagick (6.9.9 or below) (#490)
5
+
3
6
  ## 0.12.0
4
7
  - Mark Gruff::Base#to_blob as deprecated (#473)
5
8
  - Add Gruff::Base#to_image method (#472)
data/gruff.gemspec CHANGED
@@ -29,8 +29,8 @@ Gem::Specification.new do |s|
29
29
  s.add_dependency 'rmagick4j'
30
30
  else
31
31
  s.add_dependency 'rmagick'
32
- s.add_development_dependency 'rubocop', '~> 1.0.0'
33
- s.add_development_dependency 'rubocop-performance', '~> 1.8'
32
+ s.add_development_dependency 'rubocop', '~> 1.11.0'
33
+ s.add_development_dependency 'rubocop-performance', '~> 1.10.1'
34
34
  end
35
35
  s.add_dependency 'histogram'
36
36
  s.required_ruby_version = '>= 2.4.0'
data/lib/gruff/pie.rb CHANGED
@@ -77,7 +77,7 @@ private
77
77
 
78
78
  slices.sort_by(&:value) if @sort
79
79
 
80
- total = slices.map(&:value).sum.to_f
80
+ total = slices.sum(&:value).to_f
81
81
  slices.each { |slice| slice.total = total }
82
82
  end
83
83
  end
@@ -51,7 +51,14 @@ module Gruff
51
51
 
52
52
  draw.font_weight = font_weight
53
53
  draw.pointsize = size
54
- draw.get_type_metrics(image, text.to_s)
54
+
55
+ # The old ImageMagick causes SEGV with string which has '%' + alphabet (eg. '%S').
56
+ # This format is used to embed value into a string using image properties.
57
+ # However, gruff use plain image as canvas which does not have any property.
58
+ # So, in here, it just escape % in order to avoid SEGV.
59
+ text = text.to_s.gsub(/(%+)/) { ('%' * Regexp.last_match(1).size * 2).to_s }
60
+
61
+ draw.get_type_metrics(image, text)
55
62
  end
56
63
  end
57
64
  end
data/lib/gruff/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gruff
4
- VERSION = '0.12.1'
4
+ VERSION = '0.12.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gruff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.12.2
5
5
  platform: java
6
6
  authors:
7
7
  - Geoffrey Grosenbach
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-10-31 00:00:00.000000000 Z
12
+ date: 2021-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement