gruff 0.8.0-java → 0.9.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE.md +18 -0
  3. data/.gitignore +3 -0
  4. data/.rubocop.yml +93 -0
  5. data/.rubocop_todo.yml +23 -810
  6. data/.travis.yml +4 -4
  7. data/.yardopts +1 -0
  8. data/CHANGELOG.md +22 -0
  9. data/Gemfile +3 -1
  10. data/README.md +44 -21
  11. data/Rakefile +2 -206
  12. data/docker/Dockerfile +14 -0
  13. data/docker/build.sh +4 -0
  14. data/docker/launch.sh +4 -0
  15. data/gruff.gemspec +11 -8
  16. data/init.rb +2 -0
  17. data/lib/gruff.rb +23 -0
  18. data/lib/gruff/accumulator_bar.rb +6 -6
  19. data/lib/gruff/area.rb +13 -17
  20. data/lib/gruff/bar.rb +58 -41
  21. data/lib/gruff/base.rb +243 -566
  22. data/lib/gruff/bezier.rb +12 -14
  23. data/lib/gruff/bullet.rb +39 -57
  24. data/lib/gruff/dot.rb +25 -59
  25. data/lib/gruff/{bar_conversion.rb → helper/bar_conversion.rb} +13 -12
  26. data/lib/gruff/helper/bar_value_label_mixin.rb +30 -0
  27. data/lib/gruff/{stacked_mixin.rb → helper/stacked_mixin.rb} +7 -6
  28. data/lib/gruff/line.rb +95 -177
  29. data/lib/gruff/mini/bar.rb +6 -7
  30. data/lib/gruff/mini/legend.rb +16 -32
  31. data/lib/gruff/mini/pie.rb +6 -7
  32. data/lib/gruff/mini/side_bar.rb +4 -5
  33. data/lib/gruff/net.rb +37 -65
  34. data/lib/gruff/patch/rmagick.rb +33 -0
  35. data/lib/gruff/patch/string.rb +8 -0
  36. data/lib/gruff/photo_bar.rb +19 -19
  37. data/lib/gruff/pie.rb +22 -73
  38. data/lib/gruff/renderer/bezier.rb +21 -0
  39. data/lib/gruff/renderer/circle.rb +21 -0
  40. data/lib/gruff/renderer/dash_line.rb +22 -0
  41. data/lib/gruff/renderer/dot.rb +39 -0
  42. data/lib/gruff/renderer/ellipse.rb +21 -0
  43. data/lib/gruff/renderer/line.rb +34 -0
  44. data/lib/gruff/renderer/polygon.rb +23 -0
  45. data/lib/gruff/renderer/polyline.rb +21 -0
  46. data/lib/gruff/renderer/rectangle.rb +19 -0
  47. data/lib/gruff/renderer/renderer.rb +127 -0
  48. data/lib/gruff/renderer/text.rb +42 -0
  49. data/lib/gruff/scatter.rb +85 -156
  50. data/lib/gruff/scene.rb +22 -30
  51. data/lib/gruff/side_bar.rb +62 -58
  52. data/lib/gruff/side_stacked_bar.rb +47 -43
  53. data/lib/gruff/spider.rb +19 -36
  54. data/lib/gruff/stacked_area.rb +17 -21
  55. data/lib/gruff/stacked_bar.rb +50 -24
  56. data/lib/gruff/store/base_data.rb +34 -0
  57. data/lib/gruff/store/custom_data.rb +34 -0
  58. data/lib/gruff/store/store.rb +80 -0
  59. data/lib/gruff/store/xy_data.rb +55 -0
  60. data/lib/gruff/themes.rb +3 -3
  61. data/lib/gruff/version.rb +3 -1
  62. metadata +41 -30
  63. data/Manifest.txt +0 -81
  64. data/assets/bubble.png +0 -0
  65. data/assets/city_scene/background/0000.png +0 -0
  66. data/assets/city_scene/background/0600.png +0 -0
  67. data/assets/city_scene/background/2000.png +0 -0
  68. data/assets/city_scene/clouds/cloudy.png +0 -0
  69. data/assets/city_scene/clouds/partly_cloudy.png +0 -0
  70. data/assets/city_scene/clouds/stormy.png +0 -0
  71. data/assets/city_scene/grass/default.png +0 -0
  72. data/assets/city_scene/haze/true.png +0 -0
  73. data/assets/city_scene/number_sample/1.png +0 -0
  74. data/assets/city_scene/number_sample/2.png +0 -0
  75. data/assets/city_scene/number_sample/default.png +0 -0
  76. data/assets/city_scene/sky/0000.png +0 -0
  77. data/assets/city_scene/sky/0200.png +0 -0
  78. data/assets/city_scene/sky/0400.png +0 -0
  79. data/assets/city_scene/sky/0600.png +0 -0
  80. data/assets/city_scene/sky/0800.png +0 -0
  81. data/assets/city_scene/sky/1000.png +0 -0
  82. data/assets/city_scene/sky/1200.png +0 -0
  83. data/assets/city_scene/sky/1400.png +0 -0
  84. data/assets/city_scene/sky/1500.png +0 -0
  85. data/assets/city_scene/sky/1700.png +0 -0
  86. data/assets/city_scene/sky/2000.png +0 -0
  87. data/assets/pc306715.jpg +0 -0
  88. data/lib/gruff/deprecated.rb +0 -38
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bbbc49eb031c8cdd848d3e918270924e0d4ff0b83916e86043afaf99815d05f0
4
- data.tar.gz: 55056008d6cc5ce9f6b841a002f7de4f306a73bb2a3e967abd4423199340aaf6
3
+ metadata.gz: 4391afb55e326b855c066f1f7e3479fec91aa004366d44d5b5d987eceb1ad797
4
+ data.tar.gz: b3ff057010d8a3b335072597655b07806fd999f25a6fef4a549a82afaabffea1
5
5
  SHA512:
6
- metadata.gz: 1ba185c4fbfda584f288850995a74e65fef7dd131ef70ac075ecbf5efeddab1b7ddec5566105e632854a56740277ccef9643fd91920cdf4e397f1eaa3a17fed6
7
- data.tar.gz: 67e6e484156f7113cce883636e18295dc6d46699e5764bc47f591d4bc096da16ca35ea082d850bbdb58e863a205e3e67c8bb8cbc27d5384457c1cb0e009a6d20
6
+ metadata.gz: 4aecf3c51d0e1043ead7952711839053a7455a62d87f74f536dede1bdf40d30f16136d41286b27754eab14a7d3284c992d42339eec31ac39fd607b0e0cc9cf6c
7
+ data.tar.gz: 0a2e2e8db08f48ae2da36432894e96b95cd736be2b7f6a398009fb0e6b7f77de4466b64e0aac105cd5ce7557cb672a483b84b82b18bc8875c50a6f13e5dbf693
@@ -0,0 +1,18 @@
1
+ ### Description
2
+ <!-- A description of the bug or feature -->
3
+
4
+ ### Steps to Reproduce
5
+ <!-- List of steps, sample code, failing test or link to a project that reproduces the behavior.
6
+ Make sure you place a stack trace inside a code (```) block to avoid linking unrelated issues -->
7
+
8
+ ### System Configuration
9
+ <!-- Tell us about the environment where you are experiencing the bug -->
10
+
11
+ - ImageMagick version:
12
+ - RMagick version:
13
+ - Gruff version:
14
+ - Ruby version:
15
+ - Environment (Operating system, version and so on):
16
+ - Additional information:
17
+
18
+ <!-- Thanks for reporting the issue to Gruff! -->
data/.gitignore CHANGED
@@ -1,6 +1,9 @@
1
1
  *~
2
2
  /.idea/
3
3
  /pkg/
4
+ /vendor/
5
+ /test/output/
6
+ /test/output_java/
4
7
  .DS_Store
5
8
  .bundle
6
9
  .yardoc
@@ -6,11 +6,104 @@ AllCops:
6
6
  - 'vendor/bundle/**/*'
7
7
  - 'rails_generators/gruff/**/*'
8
8
 
9
+ Gemspec/OrderedDependencies:
10
+ Enabled: false
11
+
12
+ Gemspec/RequiredRubyVersion:
13
+ Enabled: false
14
+
9
15
  Layout/AccessModifierIndentation:
10
16
  EnforcedStyle: outdent
11
17
 
18
+ Layout/ClassStructure:
19
+ Enabled: false
20
+
21
+ Layout/CommentIndentation:
22
+ Enabled: false
23
+
24
+ Layout/FirstMethodArgumentLineBreak:
25
+ Enabled: false
26
+
27
+ Layout/LeadingCommentSpace:
28
+ Enabled: false
29
+
30
+ Layout/MultilineMethodArgumentLineBreaks:
31
+ Enabled: false
32
+
12
33
  Layout/MultilineAssignmentLayout:
13
34
  EnforcedStyle: same_line
14
35
 
36
+ Lint/AssignmentInCondition:
37
+ Enabled: false
38
+
39
+ Lint/NumberConversion:
40
+ Enabled: false
41
+
42
+ Style/ConditionalAssignment:
43
+ Enabled: false
44
+
45
+ Style/ConstantVisibility:
46
+ Enabled: false
47
+
48
+ Style/Copyright:
49
+ Enabled: false
50
+
51
+ Style/Encoding:
52
+ Enabled: false
53
+
54
+ Style/FormatString:
55
+ EnforcedStyle: sprintf
56
+
57
+ Style/FormatStringToken:
58
+ Enabled: false
59
+
60
+ Style/GuardClause:
61
+ Enabled: false
62
+
15
63
  Style/HashSyntax:
16
64
  EnforcedStyle: ruby19_no_mixed_keys
65
+
66
+ Style/IfUnlessModifier:
67
+ Enabled: false
68
+
69
+ Style/InlineComment:
70
+ Enabled: false
71
+
72
+ Style/ImplicitRuntimeError:
73
+ Enabled: false
74
+
75
+ Style/MethodCallWithArgsParentheses:
76
+ Enabled: false
77
+
78
+ Style/MissingElse:
79
+ Enabled: false
80
+
81
+ Style/MutableConstant:
82
+ Enabled: false
83
+
84
+ Style/Next:
85
+ Enabled: false
86
+
87
+ Style/NumericLiterals:
88
+ Enabled: false
89
+
90
+ Style/NumericPredicate:
91
+ Enabled: false
92
+
93
+ Style/OptionHash:
94
+ Enabled: false
95
+
96
+ Style/SingleLineBlockParams:
97
+ Enabled: false
98
+
99
+ Style/SpecialGlobalVars:
100
+ Enabled: false
101
+
102
+ Style/StructInheritance:
103
+ Enabled: false
104
+
105
+ Style/SymbolArray:
106
+ Enabled: false
107
+
108
+ Style/TernaryParentheses:
109
+ Enabled: false
@@ -1,220 +1,21 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2020-04-04 18:29:37 +0900 using RuboCop version 0.81.0.
3
+ # on 2020-05-24 08:35:04 +0000 using RuboCop version 0.81.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: TreatCommentsAsGroupSeparators, Include.
12
- # Include: **/*.gemspec
13
- Gemspec/OrderedDependencies:
14
- Exclude:
15
- - 'gruff.gemspec'
16
-
17
- # Offense count: 1
18
- # Configuration parameters: Include.
19
- # Include: **/*.gemspec
20
- Gemspec/RequiredRubyVersion:
21
- Exclude:
22
- - 'gruff.gemspec'
23
-
24
- # Offense count: 2
25
- # Cop supports --auto-correct.
26
- # Configuration parameters: Categories, ExpectedOrder.
27
- # ExpectedOrder: module_inclusion, constants, public_class_methods, initializer, public_methods, protected_methods, private_methods
28
- Layout/ClassStructure:
29
- Exclude:
30
- - 'lib/gruff/line.rb'
31
- - 'lib/gruff/spider.rb'
32
-
33
- # Offense count: 13
34
- # Cop supports --auto-correct.
35
- Layout/CommentIndentation:
36
- Exclude:
37
- - 'lib/gruff/bar_conversion.rb'
38
- - 'lib/gruff/base.rb'
39
- - 'lib/gruff/photo_bar.rb'
40
- - 'lib/gruff/scatter.rb'
41
- - 'test/test_line.rb'
42
- - 'test/test_photo.rb'
43
- - 'test/test_pie.rb'
44
- - 'test/test_spider.rb'
45
-
46
- # Offense count: 1
47
- # Cop supports --auto-correct.
48
- Layout/EmptyLineAfterMagicComment:
49
- Exclude:
50
- - 'gruff.gemspec'
51
-
52
- # Offense count: 82
53
- # Cop supports --auto-correct.
54
- # Configuration parameters: EnforcedStyle.
55
- # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
56
- Layout/EmptyLinesAroundClassBody:
57
- Enabled: false
58
-
59
- # Offense count: 15
60
- # Cop supports --auto-correct.
61
- # Configuration parameters: EnforcedStyle.
62
- # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
63
- Layout/EmptyLinesAroundModuleBody:
64
- Exclude:
65
- - 'lib/gruff/base.rb'
66
- - 'lib/gruff/deprecated.rb'
67
- - 'lib/gruff/mini/bar.rb'
68
- - 'lib/gruff/mini/legend.rb'
69
- - 'lib/gruff/mini/pie.rb'
70
- - 'lib/gruff/mini/side_bar.rb'
71
- - 'lib/gruff/themes.rb'
72
-
73
- # Offense count: 1
74
- # Cop supports --auto-correct.
75
- # Configuration parameters: EnforcedStyle, IndentationWidth.
76
- # SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
77
- Layout/FirstArgumentIndentation:
78
- Exclude:
79
- - 'lib/gruff/mini/legend.rb'
80
-
81
- # Offense count: 22
82
- # Cop supports --auto-correct.
83
- Layout/FirstMethodArgumentLineBreak:
84
- Exclude:
85
- - 'lib/gruff/base.rb'
86
- - 'lib/gruff/dot.rb'
87
- - 'lib/gruff/mini/legend.rb'
88
- - 'lib/gruff/scatter.rb'
89
- - 'lib/gruff/side_bar.rb'
90
- - 'lib/gruff/spider.rb'
91
-
92
- # Offense count: 1
93
- # Cop supports --auto-correct.
94
- # Configuration parameters: EnforcedStyle.
95
- # SupportedStyles: squiggly, active_support, powerpack, unindent
96
- Layout/HeredocIndentation:
97
- Exclude:
98
- - 'Rakefile'
99
-
100
- # Offense count: 49
101
- # Cop supports --auto-correct.
102
- # Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
103
- Layout/LeadingCommentSpace:
104
- Exclude:
105
- - 'lib/gruff/base.rb'
106
- - 'lib/gruff/line.rb'
107
- - 'lib/gruff/photo_bar.rb'
108
- - 'lib/gruff/scatter.rb'
109
- - 'test/test_bar.rb'
110
- - 'test/test_dot.rb'
111
- - 'test/test_scatter.rb'
112
- - 'test/test_sidestacked_bar.rb'
113
-
114
- # Offense count: 50
115
- # Cop supports --auto-correct.
116
- Layout/MultilineMethodArgumentLineBreaks:
117
- Exclude:
118
- - 'lib/gruff/base.rb'
119
- - 'lib/gruff/dot.rb'
120
- - 'lib/gruff/mini/legend.rb'
121
- - 'lib/gruff/scatter.rb'
122
- - 'lib/gruff/side_bar.rb'
123
- - 'lib/gruff/spider.rb'
124
-
125
- # Offense count: 1
126
- # Cop supports --auto-correct.
127
- # Configuration parameters: EnforcedStyle.
128
- # SupportedStyles: symmetrical, new_line, same_line
129
- Layout/MultilineMethodCallBraceLayout:
130
- Exclude:
131
- - 'lib/gruff/mini/legend.rb'
132
-
133
- # Offense count: 10
134
- # Cop supports --auto-correct.
135
- # Configuration parameters: EnforcedStyle, IndentationWidth.
136
- # SupportedStyles: aligned, indented
137
- Layout/MultilineOperationIndentation:
138
- Exclude:
139
- - 'lib/gruff/bar.rb'
140
- - 'lib/gruff/base.rb'
141
- - 'lib/gruff/line.rb'
142
- - 'lib/gruff/net.rb'
143
-
144
- # Offense count: 1
145
- Lint/AmbiguousBlockAssociation:
146
- Exclude:
147
- - 'test/test_accumulator_bar.rb'
148
-
149
- # Offense count: 1
150
- # Configuration parameters: AllowSafeAssignment.
151
- Lint/AssignmentInCondition:
152
- Exclude:
153
- - 'lib/gruff/scene.rb'
154
-
155
9
  # Offense count: 1
156
10
  Lint/DuplicateMethods:
157
11
  Exclude:
158
12
  - 'lib/gruff/photo_bar.rb'
159
13
 
160
- # Offense count: 90
161
- # Cop supports --auto-correct.
162
- Lint/NumberConversion:
163
- Enabled: false
164
-
165
- # Offense count: 1
166
- Lint/ParenthesesAsGroupedExpression:
167
- Exclude:
168
- - 'Rakefile'
169
-
170
- # Offense count: 1
171
- Lint/RescueException:
172
- Exclude:
173
- - 'Rakefile'
174
-
175
- # Offense count: 14
176
- # Cop supports --auto-correct.
177
- Lint/ScriptPermission:
178
- Exclude:
179
- - 'test/test_area.rb'
180
- - 'test/test_bar.rb'
181
- - 'test/test_base.rb'
182
- - 'test/test_dot.rb'
183
- - 'test/test_line.rb'
184
- - 'test/test_net.rb'
185
- - 'test/test_photo.rb'
186
- - 'test/test_pie.rb'
187
- - 'test/test_scatter.rb'
188
- - 'test/test_scene.rb'
189
- - 'test/test_sidestacked_bar.rb'
190
- - 'test/test_spider.rb'
191
- - 'test/test_stacked_area.rb'
192
- - 'test/test_stacked_bar.rb'
193
-
194
14
  # Offense count: 1
195
15
  Lint/UnreachableCode:
196
16
  Exclude:
197
17
  - 'lib/gruff/photo_bar.rb'
198
18
 
199
- # Offense count: 13
200
- # Cop supports --auto-correct.
201
- # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
202
- Lint/UnusedBlockArgument:
203
- Exclude:
204
- - 'Rakefile'
205
- - 'lib/gruff/stacked_bar.rb'
206
- - 'test/test_area.rb'
207
- - 'test/test_line.rb'
208
- - 'test/test_net.rb'
209
- - 'test/test_pie.rb'
210
-
211
- # Offense count: 1
212
- # Cop supports --auto-correct.
213
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
214
- Lint/UnusedMethodArgument:
215
- Exclude:
216
- - 'lib/gruff/side_stacked_bar.rb'
217
-
218
19
  # Offense count: 1
219
20
  Lint/UselessAssignment:
220
21
  Exclude:
@@ -224,63 +25,49 @@ Lint/UselessAssignment:
224
25
  # Configuration parameters: CheckForMethodsWithNoSideEffects.
225
26
  Lint/Void:
226
27
  Exclude:
227
- - 'lib/gruff/base.rb'
28
+ - 'lib/gruff/patch/rmagick.rb'
228
29
 
229
- # Offense count: 47
30
+ # Offense count: 49
230
31
  # Configuration parameters: IgnoredMethods.
231
32
  Metrics/AbcSize:
232
- Max: 79
33
+ Max: 78
233
34
 
234
- # Offense count: 6
35
+ # Offense count: 1
235
36
  # Configuration parameters: CountComments, ExcludedMethods.
236
37
  # ExcludedMethods: refine
237
38
  Metrics/BlockLength:
238
- Max: 67
239
-
240
- # Offense count: 1
241
- # Configuration parameters: CountBlocks.
242
- Metrics/BlockNesting:
243
- Max: 4
39
+ Max: 29
244
40
 
245
41
  # Offense count: 12
246
42
  # Configuration parameters: CountComments.
247
43
  Metrics/ClassLength:
248
- Max: 662
44
+ Max: 634
249
45
 
250
- # Offense count: 17
46
+ # Offense count: 12
251
47
  # Configuration parameters: IgnoredMethods.
252
48
  Metrics/CyclomaticComplexity:
253
49
  Max: 17
254
50
 
255
- # Offense count: 131
51
+ # Offense count: 126
256
52
  # Configuration parameters: CountComments, ExcludedMethods.
257
53
  Metrics/MethodLength:
258
- Max: 80
54
+ Max: 81
259
55
 
260
- # Offense count: 1
56
+ # Offense count: 2
261
57
  # Configuration parameters: CountKeywordArgs.
262
58
  Metrics/ParameterLists:
263
59
  Max: 7
264
60
 
265
- # Offense count: 15
61
+ # Offense count: 9
266
62
  # Configuration parameters: IgnoredMethods.
267
63
  Metrics/PerceivedComplexity:
268
- Max: 19
64
+ Max: 20
269
65
 
270
- # Offense count: 5
66
+ # Offense count: 2
271
67
  Naming/AccessorMethodName:
272
68
  Exclude:
273
- - 'Rakefile'
274
- - 'lib/gruff/base.rb'
275
- - 'lib/gruff/pie.rb'
276
- - 'lib/gruff/stacked_mixin.rb'
277
-
278
- # Offense count: 1
279
- # Configuration parameters: ForbiddenDelimiters.
280
- # ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
281
- Naming/HeredocDelimiterNaming:
282
- Exclude:
283
- - 'Rakefile'
69
+ - 'lib/gruff/helper/stacked_mixin.rb'
70
+ - 'lib/gruff/store/store.rb'
284
71
 
285
72
  # Offense count: 1
286
73
  # Configuration parameters: EnforcedStyleForLeadingUnderscores.
@@ -295,53 +82,17 @@ Naming/MemoizedInstanceVariableName:
295
82
  Naming/MethodParameterName:
296
83
  Exclude:
297
84
  - 'lib/gruff/base.rb'
298
- - 'lib/gruff/line.rb'
85
+ - 'lib/gruff/patch/rmagick.rb'
299
86
  - 'lib/gruff/pie.rb'
300
-
301
- # Offense count: 4
302
- # Configuration parameters: EnforcedStyle.
303
- # SupportedStyles: snake_case, normalcase, non_integer
304
- Naming/VariableNumber:
305
- Exclude:
306
- - 'lib/gruff/line.rb'
87
+ - 'lib/gruff/renderer/text.rb'
307
88
 
308
89
  # Offense count: 2
309
90
  Security/Eval:
310
91
  Exclude:
311
92
  - 'test/gruff_test_case.rb'
312
93
 
313
- # Offense count: 4
314
- # Cop supports --auto-correct.
315
- Security/YAMLLoad:
316
- Exclude:
317
- - 'Rakefile'
318
-
319
- # Offense count: 1
320
- # Cop supports --auto-correct.
321
- # Configuration parameters: EnforcedStyle.
322
- # SupportedStyles: prefer_alias, prefer_alias_method
323
- Style/Alias:
324
- Exclude:
325
- - 'test/gruff_test_case.rb'
326
-
327
- # Offense count: 1
328
- # Cop supports --auto-correct.
329
- # Configuration parameters: EnforcedStyle.
330
- # SupportedStyles: always, conditionals
331
- Style/AndOr:
332
- Exclude:
333
- - 'lib/gruff/bar.rb'
334
-
335
94
  # Offense count: 1
336
95
  # Cop supports --auto-correct.
337
- # Configuration parameters: EnforcedStyle.
338
- # SupportedStyles: percent_q, bare_percent
339
- Style/BarePercentLiterals:
340
- Exclude:
341
- - 'Rakefile'
342
-
343
- # Offense count: 3
344
- # Cop supports --auto-correct.
345
96
  # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
346
97
  # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
347
98
  # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
@@ -349,575 +100,37 @@ Style/BarePercentLiterals:
349
100
  # IgnoredMethods: lambda, proc, it
350
101
  Style/BlockDelimiters:
351
102
  Exclude:
352
- - 'lib/gruff/base.rb'
353
103
  - 'test/test_accumulator_bar.rb'
354
104
 
355
- # Offense count: 5
356
- Style/CaseEquality:
357
- Exclude:
358
- - 'lib/gruff/base.rb'
359
- - 'lib/gruff/bullet.rb'
360
- - 'lib/gruff/line.rb'
361
-
362
- # Offense count: 22
105
+ # Offense count: 33
363
106
  # Cop supports --auto-correct.
364
107
  # Configuration parameters: AutoCorrect, EnforcedStyle.
365
108
  # SupportedStyles: nested, compact
366
109
  Style/ClassAndModuleChildren:
367
110
  Enabled: false
368
111
 
369
- # Offense count: 25
370
- # Cop supports --auto-correct.
371
- # Configuration parameters: PreferredMethods.
372
- Style/CollectionMethods:
373
- Exclude:
374
- - 'lib/gruff/accumulator_bar.rb'
375
- - 'lib/gruff/base.rb'
376
- - 'lib/gruff/mini/legend.rb'
377
- - 'lib/gruff/scene.rb'
378
- - 'lib/gruff/side_stacked_bar.rb'
379
- - 'lib/gruff/spider.rb'
380
- - 'test/test_accumulator_bar.rb'
381
- - 'test/test_area.rb'
382
- - 'test/test_bar.rb'
383
- - 'test/test_dot.rb'
384
- - 'test/test_line.rb'
385
- - 'test/test_net.rb'
386
-
387
- # Offense count: 6
388
- # Cop supports --auto-correct.
389
- Style/ColonMethodCall:
390
- Exclude:
391
- - 'lib/gruff/net.rb'
392
-
393
- # Offense count: 21
394
- # Cop supports --auto-correct.
395
- # Configuration parameters: Keywords.
396
- # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
397
- Style/CommentAnnotation:
398
- Exclude:
399
- - 'lib/gruff/base.rb'
400
- - 'lib/gruff/bullet.rb'
401
- - 'lib/gruff/deprecated.rb'
402
- - 'lib/gruff/dot.rb'
403
- - 'lib/gruff/photo_bar.rb'
404
- - 'lib/gruff/scatter.rb'
405
- - 'lib/gruff/side_bar.rb'
406
- - 'test/test_accumulator_bar.rb'
407
- - 'test/test_bar.rb'
408
- - 'test/test_dot.rb'
409
- - 'test/test_line.rb'
410
- - 'test/test_scatter.rb'
411
- - 'test/test_scene.rb'
412
-
413
- # Offense count: 9
414
- Style/CommentedKeyword:
415
- Exclude:
416
- - 'lib/gruff/base.rb'
417
- - 'lib/gruff/dot.rb'
418
- - 'lib/gruff/mini/pie.rb'
419
- - 'lib/gruff/scatter.rb'
420
- - 'lib/gruff/side_bar.rb'
421
- - 'test/test_scatter.rb'
422
-
423
- # Offense count: 5
424
- # Cop supports --auto-correct.
425
- # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
426
- # SupportedStyles: assign_to_condition, assign_inside_condition
427
- Style/ConditionalAssignment:
428
- Exclude:
429
- - 'lib/gruff/base.rb'
430
- - 'lib/gruff/bezier.rb'
431
-
432
- # Offense count: 19
433
- Style/ConstantVisibility:
434
- Exclude:
435
- - 'lib/gruff/base.rb'
436
- - 'lib/gruff/pie.rb'
437
- - 'lib/gruff/stacked_mixin.rb'
438
- - 'lib/gruff/themes.rb'
439
- - 'lib/gruff/version.rb'
440
-
441
- # Offense count: 57
442
- # Cop supports --auto-correct.
443
- # Configuration parameters: Notice, AutocorrectNotice.
444
- Style/Copyright:
445
- Enabled: false
446
-
447
- # Offense count: 1
448
- # Configuration parameters: AllowCoercion.
449
- Style/DateTime:
450
- Exclude:
451
- - 'test/test_scatter.rb'
452
-
453
- # Offense count: 27
112
+ # Offense count: 39
454
113
  Style/Documentation:
455
114
  Enabled: false
456
115
 
457
- # Offense count: 74
116
+ # Offense count: 134
458
117
  # Configuration parameters: RequireForNonPublicMethods.
459
118
  Style/DocumentationMethod:
460
119
  Enabled: false
461
120
 
462
- # Offense count: 2
463
- # Cop supports --auto-correct.
464
- # Configuration parameters: EnforcedStyle.
465
- # SupportedStyles: empty, nil, both
466
- Style/EmptyElse:
467
- Exclude:
468
- - 'lib/gruff/line.rb'
469
-
470
- # Offense count: 12
471
- # Cop supports --auto-correct.
472
- Style/EmptyLiteral:
473
- Exclude:
474
- - 'lib/gruff/area.rb'
475
- - 'lib/gruff/base.rb'
476
- - 'lib/gruff/bezier.rb'
477
- - 'lib/gruff/line.rb'
478
- - 'lib/gruff/photo_bar.rb'
479
- - 'lib/gruff/side_stacked_bar.rb'
480
- - 'lib/gruff/stacked_area.rb'
481
- - 'test/test_line.rb'
482
-
483
- # Offense count: 1
484
- # Cop supports --auto-correct.
485
- Style/Encoding:
486
- Exclude:
487
- - 'gruff.gemspec'
488
-
489
121
  # Offense count: 3
490
122
  Style/EvalWithLocation:
491
123
  Exclude:
492
124
  - 'test/gruff_test_case.rb'
493
125
 
494
- # Offense count: 4
495
- # Cop supports --auto-correct.
496
- Style/ExpandPathArguments:
497
- Exclude:
498
- - 'gruff.gemspec'
499
- - 'test/test_mini_bar.rb'
500
- - 'test/test_mini_pie.rb'
501
- - 'test/test_mini_side_bar.rb'
502
-
503
- # Offense count: 16
504
- # Cop supports --auto-correct.
505
- # Configuration parameters: EnforcedStyle.
506
- # SupportedStyles: format, sprintf, percent
507
- Style/FormatString:
508
- Exclude:
509
- - 'Rakefile'
510
- - 'lib/gruff/base.rb'
511
- - 'test/test_legend.rb'
512
-
513
- # Offense count: 16
514
- # Configuration parameters: EnforcedStyle.
515
- # SupportedStyles: annotated, template, unannotated
516
- Style/FormatStringToken:
517
- Exclude:
518
- - 'Rakefile'
519
- - 'lib/gruff/base.rb'
520
- - 'test/test_legend.rb'
521
-
522
- # Offense count: 57
523
- # Cop supports --auto-correct.
524
- # Configuration parameters: EnforcedStyle.
525
- # SupportedStyles: always, always_true, never
526
- Style/FrozenStringLiteralComment:
527
- Enabled: false
528
-
529
- # Offense count: 8
530
- # Configuration parameters: MinBodyLength.
531
- Style/GuardClause:
532
- Exclude:
533
- - 'lib/gruff/base.rb'
534
- - 'lib/gruff/dot.rb'
535
- - 'lib/gruff/pie.rb'
536
- - 'lib/gruff/scatter.rb'
537
- - 'lib/gruff/side_bar.rb'
538
-
539
- # Offense count: 8
540
- Style/IdenticalConditionalBranches:
541
- Exclude:
542
- - 'lib/gruff/bar_conversion.rb'
543
- - 'lib/gruff/stacked_area.rb'
544
-
545
- # Offense count: 2
546
- # Configuration parameters: AllowIfModifier.
547
- Style/IfInsideElse:
548
- Exclude:
549
- - 'lib/gruff/bar.rb'
550
- - 'lib/gruff/scene.rb'
551
-
552
- # Offense count: 11
553
- # Cop supports --auto-correct.
554
- Style/IfUnlessModifier:
555
- Exclude:
556
- - 'Rakefile'
557
- - 'lib/gruff/base.rb'
558
- - 'lib/gruff/line.rb'
559
- - 'lib/gruff/scatter.rb'
560
- - 'lib/gruff/scene.rb'
561
- - 'test/image_compare.rb'
562
-
563
- # Offense count: 1
564
- Style/ImplicitRuntimeError:
565
- Exclude:
566
- - 'Rakefile'
567
-
568
- # Offense count: 87
569
- Style/InlineComment:
570
- Enabled: false
571
-
572
- # Offense count: 255
573
- # Cop supports --auto-correct.
574
- # Configuration parameters: IgnoreMacros, IgnoredMethods, IgnoredPatterns, IncludedMacros, AllowParenthesesInMultilineCall, AllowParenthesesInChaining, AllowParenthesesInCamelCaseMethod, EnforcedStyle.
575
- # SupportedStyles: require_parentheses, omit_parentheses
576
- Style/MethodCallWithArgsParentheses:
577
- Enabled: false
578
-
579
- # Offense count: 7
580
- # Cop supports --auto-correct.
581
- # Configuration parameters: IgnoredMethods.
582
- Style/MethodCallWithoutArgsParentheses:
583
- Exclude:
584
- - 'lib/gruff/bar.rb'
585
- - 'lib/gruff/photo_bar.rb'
586
- - 'lib/gruff/scatter.rb'
587
- - 'test/test_bar.rb'
588
- - 'test/test_line.rb'
589
- - 'test/test_pie.rb'
590
- - 'test/test_spider.rb'
591
-
592
- # Offense count: 1
593
- Style/MethodCalledOnDoEndBlock:
594
- Exclude:
595
- - 'Rakefile'
596
-
597
- # Offense count: 51
598
- # Configuration parameters: EnforcedStyle.
599
- # SupportedStyles: if, case, both
600
- Style/MissingElse:
601
- Exclude:
602
- - 'Rakefile'
603
- - 'lib/gruff/bar.rb'
604
- - 'lib/gruff/base.rb'
605
- - 'lib/gruff/bezier.rb'
606
- - 'lib/gruff/bullet.rb'
607
- - 'lib/gruff/dot.rb'
608
- - 'lib/gruff/line.rb'
609
- - 'lib/gruff/net.rb'
610
- - 'lib/gruff/pie.rb'
611
- - 'lib/gruff/scatter.rb'
612
- - 'lib/gruff/scene.rb'
613
- - 'lib/gruff/side_bar.rb'
614
- - 'lib/gruff/side_stacked_bar.rb'
615
- - 'test/gruff_test_case.rb'
616
- - 'test/image_compare.rb'
617
-
618
126
  # Offense count: 1
619
127
  Style/MissingRespondToMissing:
620
128
  Exclude:
621
129
  - 'lib/gruff/scene.rb'
622
130
 
623
- # Offense count: 13
624
- Style/MultilineTernaryOperator:
625
- Exclude:
626
- - 'lib/gruff/base.rb'
627
- - 'lib/gruff/line.rb'
628
- - 'lib/gruff/scatter.rb'
629
-
630
- # Offense count: 8
631
- # Cop supports --auto-correct.
632
- # Configuration parameters: EnforcedStyle.
633
- # SupportedStyles: literals, strict
634
- Style/MutableConstant:
635
- Exclude:
636
- - 'lib/gruff/base.rb'
637
- - 'lib/gruff/themes.rb'
638
- - 'lib/gruff/version.rb'
639
-
640
- # Offense count: 3
641
- Style/NestedTernaryOperator:
642
- Exclude:
643
- - 'lib/gruff/base.rb'
644
-
645
- # Offense count: 5
646
- # Cop supports --auto-correct.
647
- # Configuration parameters: EnforcedStyle, MinBodyLength.
648
- # SupportedStyles: skip_modifier_ifs, always
649
- Style/Next:
650
- Exclude:
651
- - 'lib/gruff/base.rb'
652
- - 'lib/gruff/line.rb'
653
- - 'lib/gruff/pie.rb'
654
- - 'lib/gruff/scatter.rb'
655
-
656
- # Offense count: 1
657
- # Cop supports --auto-correct.
658
- # Configuration parameters: EnforcedStyle.
659
- # SupportedStyles: predicate, comparison
660
- Style/NilComparison:
661
- Exclude:
662
- - 'lib/gruff/line.rb'
663
-
664
- # Offense count: 1
665
- # Cop supports --auto-correct.
666
- # Configuration parameters: IncludeSemanticChanges.
667
- Style/NonNilCheck:
668
- Exclude:
669
- - 'lib/gruff/line.rb'
670
-
671
- # Offense count: 4
672
- # Cop supports --auto-correct.
673
- Style/Not:
674
- Exclude:
675
- - 'lib/gruff/bullet.rb'
676
- - 'lib/gruff/line.rb'
677
- - 'lib/gruff/scene.rb'
678
-
679
- # Offense count: 4
680
- # Cop supports --auto-correct.
681
- # Configuration parameters: EnforcedOctalStyle.
682
- # SupportedOctalStyles: zero_with_o, zero_only
683
- Style/NumericLiteralPrefix:
684
- Exclude:
685
- - 'test/test_scene.rb'
686
-
687
- # Offense count: 7
688
- # Cop supports --auto-correct.
689
- # Configuration parameters: Strict.
690
- Style/NumericLiterals:
691
- MinDigits: 8
692
-
693
- # Offense count: 22
694
- # Cop supports --auto-correct.
695
- # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
696
- # SupportedStyles: predicate, comparison
697
- Style/NumericPredicate:
698
- Exclude:
699
- - 'spec/**/*'
700
- - 'Rakefile'
701
- - 'lib/gruff/base.rb'
702
- - 'lib/gruff/bezier.rb'
703
- - 'lib/gruff/dot.rb'
704
- - 'lib/gruff/line.rb'
705
- - 'lib/gruff/pie.rb'
706
- - 'lib/gruff/scatter.rb'
707
- - 'lib/gruff/scene.rb'
708
- - 'lib/gruff/side_bar.rb'
709
- - 'lib/gruff/stacked_bar.rb'
710
-
711
- # Offense count: 2
712
- # Configuration parameters: SuspiciousParamNames.
713
- # SuspiciousParamNames: options, opts, args, params, parameters
714
- Style/OptionHash:
715
- Exclude:
716
- - 'lib/gruff/bullet.rb'
717
- - 'test/test_pie.rb'
718
-
719
- # Offense count: 4
720
- # Cop supports --auto-correct.
721
- Style/PerlBackrefs:
722
- Exclude:
723
- - 'lib/gruff/scene.rb'
724
-
725
- # Offense count: 2
726
- # Cop supports --auto-correct.
727
- # Configuration parameters: EnforcedStyle.
728
- # SupportedStyles: short, verbose
729
- Style/PreferredHashMethods:
730
- Exclude:
731
- - 'lib/gruff/bullet.rb'
732
-
733
- # Offense count: 1
734
- # Cop supports --auto-correct.
735
- Style/RedundantParentheses:
736
- Exclude:
737
- - 'lib/gruff/side_bar.rb'
738
-
739
- # Offense count: 6
740
- # Cop supports --auto-correct.
741
- Style/RedundantPercentQ:
742
- Exclude:
743
- - 'Rakefile'
744
- - 'gruff.gemspec'
745
-
746
- # Offense count: 7
747
- # Cop supports --auto-correct.
748
- # Configuration parameters: AllowMultipleReturnValues.
749
- Style/RedundantReturn:
750
- Exclude:
751
- - 'Rakefile'
752
- - 'lib/gruff/scene.rb'
753
- - 'test/test_area.rb'
754
- - 'test/test_net.rb'
755
- - 'test/test_pie.rb'
756
- - 'test/test_sidestacked_bar.rb'
757
- - 'test/test_spider.rb'
758
-
759
- # Offense count: 4
760
- # Cop supports --auto-correct.
761
- Style/RedundantSelf:
762
- Exclude:
763
- - 'lib/gruff/base.rb'
764
- - 'lib/gruff/line.rb'
765
- - 'lib/gruff/side_bar.rb'
766
-
767
- # Offense count: 1
768
- # Cop supports --auto-correct.
769
- Style/RedundantSort:
770
- Exclude:
771
- - 'lib/gruff/base.rb'
772
-
773
- # Offense count: 2
774
- # Cop supports --auto-correct.
775
- # Configuration parameters: EnforcedStyle.
776
- # SupportedStyles: return, return_nil
777
- Style/ReturnNil:
778
- Exclude:
779
- - 'test/image_compare.rb'
780
-
781
- # Offense count: 1
782
- Style/Send:
783
- Exclude:
784
- - 'lib/gruff/stacked_area.rb'
785
-
786
- # Offense count: 10
787
- # Configuration parameters: Methods.
788
- # Methods: {"reduce"=>["acc", "elem"]}, {"inject"=>["acc", "elem"]}
789
- Style/SingleLineBlockParams:
790
- Exclude:
791
- - 'lib/gruff/accumulator_bar.rb'
792
- - 'lib/gruff/base.rb'
793
- - 'lib/gruff/side_stacked_bar.rb'
794
- - 'lib/gruff/spider.rb'
795
- - 'test/test_accumulator_bar.rb'
796
- - 'test/test_bar.rb'
797
- - 'test/test_dot.rb'
798
-
799
- # Offense count: 4
800
- # Cop supports --auto-correct.
801
- # Configuration parameters: EnforcedStyle.
802
- # SupportedStyles: use_perl_names, use_english_names
803
- Style/SpecialGlobalVars:
804
- Exclude:
805
- - 'gruff.gemspec'
806
- - 'test/gruff_test_case.rb'
807
- - 'test/image_compare.rb'
808
-
809
- # Offense count: 8
810
- # Cop supports --auto-correct.
811
- Style/StringHashKeys:
812
- Exclude:
813
- - 'Rakefile'
814
-
815
- # Offense count: 208
816
- # Cop supports --auto-correct.
817
- # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
818
- # SupportedStyles: single_quotes, double_quotes
819
- Style/StringLiterals:
820
- Enabled: false
821
-
822
- # Offense count: 1
823
- Style/StructInheritance:
824
- Exclude:
825
- - 'lib/gruff/pie.rb'
826
-
827
- # Offense count: 2
828
- # Cop supports --auto-correct.
829
- # Configuration parameters: MinSize.
830
- # SupportedStyles: percent, brackets
831
- Style/SymbolArray:
832
- EnforcedStyle: brackets
833
-
834
- # Offense count: 3
835
- # Cop supports --auto-correct.
836
- # Configuration parameters: IgnoredMethods.
837
- # IgnoredMethods: respond_to, define_method
838
- Style/SymbolProc:
839
- Exclude:
840
- - 'lib/gruff/scene.rb'
841
- - 'test/test_line.rb'
842
- - 'test/test_net.rb'
843
-
844
- # Offense count: 14
845
- # Cop supports --auto-correct.
846
- # Configuration parameters: EnforcedStyle, AllowSafeAssignment.
847
- # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
848
- Style/TernaryParentheses:
849
- Exclude:
850
- - 'Rakefile'
851
- - 'lib/gruff/base.rb'
852
- - 'lib/gruff/dot.rb'
853
- - 'lib/gruff/line.rb'
854
- - 'lib/gruff/scatter.rb'
855
- - 'lib/gruff/side_bar.rb'
856
-
857
- # Offense count: 16
858
- # Cop supports --auto-correct.
859
- # Configuration parameters: EnforcedStyleForMultiline.
860
- # SupportedStylesForMultiline: comma, consistent_comma, no_comma
861
- Style/TrailingCommaInArrayLiteral:
862
- Exclude:
863
- - 'lib/gruff/themes.rb'
864
- - 'test/gruff_test_case.rb'
865
- - 'test/image_compare.rb'
866
- - 'test/test_area.rb'
867
- - 'test/test_bar.rb'
868
- - 'test/test_dot.rb'
869
- - 'test/test_legend.rb'
870
- - 'test/test_line.rb'
871
- - 'test/test_net.rb'
872
- - 'test/test_pie.rb'
873
- - 'test/test_scatter.rb'
874
- - 'test/test_sidestacked_bar.rb'
875
- - 'test/test_spider.rb'
876
- - 'test/test_stacked_area.rb'
877
- - 'test/test_stacked_bar.rb'
878
-
879
- # Offense count: 43
880
- # Cop supports --auto-correct.
881
- # Configuration parameters: EnforcedStyleForMultiline.
882
- # SupportedStylesForMultiline: comma, consistent_comma, no_comma
883
- Style/TrailingCommaInHashLiteral:
884
- Exclude:
885
- - 'test/gruff_test_case.rb'
886
- - 'test/test_area.rb'
887
- - 'test/test_bar.rb'
888
- - 'test/test_base.rb'
889
- - 'test/test_dot.rb'
890
- - 'test/test_legend.rb'
891
- - 'test/test_line.rb'
892
- - 'test/test_net.rb'
893
- - 'test/test_sidestacked_bar.rb'
894
- - 'test/test_stacked_area.rb'
895
- - 'test/test_stacked_bar.rb'
896
-
897
- # Offense count: 2
898
- # Cop supports --auto-correct.
899
- # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, AllowedMethods.
900
- # AllowedMethods: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
901
- Style/TrivialAccessors:
902
- Exclude:
903
- - 'lib/gruff/pie.rb'
904
-
905
- # Offense count: 1
906
- # Cop supports --auto-correct.
907
- Style/VariableInterpolation:
908
- Exclude:
909
- - 'test/image_compare.rb'
910
-
911
- # Offense count: 2
912
- # Cop supports --auto-correct.
913
- Style/ZeroLengthPredicate:
914
- Exclude:
915
- - 'lib/gruff/base.rb'
916
- - 'lib/gruff/line.rb'
917
-
918
- # Offense count: 197
131
+ # Offense count: 406
919
132
  # Cop supports --auto-correct.
920
133
  # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
921
134
  # URISchemes: http, https
922
135
  Layout/LineLength:
923
- Max: 166
136
+ Max: 164