gruff 0.12.1 → 0.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +43 -6
- data/.travis.yml +2 -1
- data/CHANGELOG.md +3 -0
- data/gruff.gemspec +2 -2
- data/lib/gruff/pie.rb +1 -1
- data/lib/gruff/renderer/text.rb +8 -1
- data/lib/gruff/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea00c2968e40f335c5505b4ce5461fb9b5ec6488bfe48293829848fd2c57e2fc
|
4
|
+
data.tar.gz: 860569d2e37c2b14aee89671d2bd4e76b409221a8e54712008009000c054a144
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec50aef23be4941687dc0822b02aec8daf083f1986f50054cae56562937c1788c4e6ff4f03bff6689732b3e88787fbbf42ea3bc6324d89f4b47dddfed23bbcb3
|
7
|
+
data.tar.gz: 87d063e7f87081ad123e47610d173dc62e4f3c6200887021af40d389b39892b20b34d73757989eae383447308e34598198e47af33a48d1a184738c4a275361b9
|
data/.rubocop_todo.yml
CHANGED
@@ -1,11 +1,25 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
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
|
-
#
|
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
data/CHANGELOG.md
CHANGED
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.
|
33
|
-
s.add_development_dependency 'rubocop-performance', '~> 1.
|
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
data/lib/gruff/renderer/text.rb
CHANGED
@@ -51,7 +51,14 @@ module Gruff
|
|
51
51
|
|
52
52
|
draw.font_weight = font_weight
|
53
53
|
draw.pointsize = size
|
54
|
-
|
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
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.
|
4
|
+
version: 0.12.2
|
5
5
|
platform: ruby
|
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:
|
12
|
+
date: 2021-04-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rmagick
|
@@ -31,28 +31,28 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 1.
|
34
|
+
version: 1.11.0
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 1.
|
41
|
+
version: 1.11.0
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rubocop-performance
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
48
|
+
version: 1.10.1
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
55
|
+
version: 1.10.1
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: histogram
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|