prawn-dev 0.3.0 → 0.5.0

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.
data/rubocop.yml CHANGED
@@ -1,11 +1,26 @@
1
1
  require:
2
2
  - rubocop-performance
3
3
  - rubocop-rspec
4
+ - rubocop/cop/prawn_cops
4
5
 
5
6
  AllCops:
6
- TargetRubyVersion: 2.6
7
+ TargetRubyVersion: 2.7
7
8
  Exclude:
8
9
  - pkg/**/*
10
+ - "*.rb"
11
+
12
+ Gemspec/DependencyVersion:
13
+ Enabled: true
14
+
15
+ Gemspec/DeprecatedAttributeAssignment:
16
+ Enabled: true
17
+
18
+ Gemspec/DevelopmentDependencies:
19
+ Enabled: true
20
+ EnforcedStyle: gemspec
21
+
22
+ Gemspec/RequireMFA:
23
+ Enabled: true
9
24
 
10
25
  Layout/ArgumentAlignment:
11
26
  EnforcedStyle: with_fixed_indentation
@@ -13,9 +28,18 @@ Layout/ArgumentAlignment:
13
28
  Layout/ExtraSpacing:
14
29
  AllowForAlignment: false
15
30
 
31
+ Layout/FirstArgumentIndentation:
32
+ EnforcedStyle: consistent
33
+
34
+ Layout/FirstArrayElementIndentation:
35
+ EnforcedStyle: consistent
36
+
16
37
  Layout/FirstArrayElementLineBreak:
17
38
  Enabled: true
18
39
 
40
+ Layout/FirstHashElementIndentation:
41
+ EnforcedStyle: consistent
42
+
19
43
  Layout/FirstHashElementLineBreak:
20
44
  Enabled: true
21
45
 
@@ -25,32 +49,43 @@ Layout/FirstMethodArgumentLineBreak:
25
49
  Layout/FirstMethodParameterLineBreak:
26
50
  Enabled: true
27
51
 
28
- Layout/FirstArgumentIndentation:
29
- EnforcedStyle: consistent
52
+ Layout/HeredocArgumentClosingParenthesis:
53
+ Enabled: true
30
54
 
31
- Layout/FirstArrayElementIndentation:
32
- EnforcedStyle: consistent
55
+ Layout/LineContinuationLeadingSpace:
56
+ Enabled: true
33
57
 
34
- Layout/FirstHashElementIndentation:
35
- EnforcedStyle: consistent
58
+ Layout/LineContinuationSpacing:
59
+ Enabled: true
36
60
 
37
- Layout/HeredocArgumentClosingParenthesis:
61
+ Layout/LineEndStringConcatenationIndentation:
38
62
  Enabled: true
63
+ EnforcedStyle: indented
64
+
65
+ Layout/MultilineArrayBraceLayout:
66
+ EnforcedStyle: new_line
39
67
 
40
68
  Layout/MultilineAssignmentLayout:
41
69
  Enabled: true
42
70
 
71
+ Layout/MultilineHashBraceLayout:
72
+ EnforcedStyle: new_line
73
+
43
74
  Layout/MultilineHashKeyLineBreaks:
44
75
  Enabled: true
45
76
 
46
- Layout/MultilineMethodArgumentLineBreaks:
47
- Enabled: true
77
+ Layout/MultilineMethodCallBraceLayout:
78
+ EnforcedStyle: new_line
48
79
 
49
80
  Layout/MultilineMethodCallIndentation:
50
81
  EnforcedStyle: indented
51
82
 
83
+ Layout/MultilineMethodDefinitionBraceLayout:
84
+ EnforcedStyle: new_line
85
+
52
86
  Layout/MultilineOperationIndentation:
53
87
  EnforcedStyle: indented
88
+ IndentationWidth: 2
54
89
 
55
90
  Layout/ParameterAlignment:
56
91
  EnforcedStyle: with_fixed_indentation
@@ -58,55 +93,122 @@ Layout/ParameterAlignment:
58
93
  Layout/SpaceAroundOperators:
59
94
  AllowForAlignment: false
60
95
 
61
- Layout/SpaceBeforeBrackets: # (new in 1.7)
96
+ Layout/SpaceBeforeBrackets:
97
+ Enabled: true
98
+
99
+ Lint/AmbiguousAssignment:
62
100
  Enabled: true
63
101
 
102
+ Lint/AmbiguousOperatorPrecedence:
103
+ Enabled: true
64
104
 
65
- Lint/AmbiguousAssignment: # (new in 1.7)
105
+ Lint/AmbiguousRange:
66
106
  Enabled: true
67
107
 
68
- Lint/DeprecatedConstants: # (new in 1.8)
108
+ Lint/ConstantOverwrittenInRescue:
69
109
  Enabled: true
70
110
 
71
- Lint/DuplicateBranch: # (new in 1.3)
111
+ Lint/DeprecatedConstants:
72
112
  Enabled: true
73
113
 
74
- Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
114
+ Lint/DuplicateBranch:
75
115
  Enabled: true
76
116
 
77
- Lint/EmptyBlock: # (new in 1.1)
117
+ Lint/DuplicateMagicComment:
78
118
  Enabled: true
79
119
 
80
- Lint/EmptyClass: # (new in 1.3)
120
+ Lint/DuplicateMatchPattern:
121
+ Enabled: true
122
+
123
+ Lint/DuplicateRegexpCharacterClassElement:
124
+ Enabled: true
125
+
126
+ Lint/EmptyBlock:
127
+ Enabled: true
128
+
129
+ Lint/EmptyClass:
130
+ Enabled: true
131
+
132
+ Lint/EmptyInPattern:
81
133
  Enabled: true
82
134
 
83
135
  Lint/HeredocMethodCallPosition:
84
136
  Enabled: true
85
137
 
86
- Lint/LambdaWithoutLiteralBlock: # (new in 1.8)
138
+ Lint/IncompatibleIoSelectWithFiberScheduler:
139
+ Enabled: true
140
+
141
+ Lint/ItWithoutArgumentsInBlock:
142
+ Enabled: true
143
+
144
+ Lint/LambdaWithoutLiteralBlock:
145
+ Enabled: true
146
+
147
+ Lint/LiteralAssignmentInCondition:
148
+ Enabled: true
149
+
150
+ Lint/MixedCaseRange:
87
151
  Enabled: true
88
152
 
89
- Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
153
+ Lint/NoReturnInBeginEndBlocks:
90
154
  Enabled: true
91
155
 
92
- Lint/RedundantDirGlobSort: # (new in 1.8)
156
+ Lint/NonAtomicFileOperation:
93
157
  Enabled: true
94
158
 
95
- Lint/ToEnumArguments: # (new in 1.1)
159
+ Lint/NumberConversion:
96
160
  Enabled: true
97
161
 
98
- Lint/UnexpectedBlockArity: # (new in 1.5)
162
+ Lint/NumberedParameterAssignment:
99
163
  Enabled: true
100
164
 
101
- Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
165
+ Lint/OrAssignmentToConstant:
102
166
  Enabled: true
103
167
 
168
+ Lint/RedundantDirGlobSort:
169
+ Enabled: true
170
+
171
+ Lint/RedundantRegexpQuantifiers:
172
+ Enabled: true
173
+
174
+ Lint/RefinementImportMethods:
175
+ Enabled: true
176
+
177
+ Lint/RequireRangeParentheses:
178
+ Enabled: true
179
+
180
+ Lint/RequireRelativeSelfPath:
181
+ Enabled: true
182
+
183
+ Lint/SafeNavigationChain:
184
+ Enabled: true
185
+
186
+ Lint/SymbolConversion:
187
+ Enabled: true
188
+
189
+ Lint/ToEnumArguments:
190
+ Enabled: true
191
+
192
+ Lint/TripleQuotes:
193
+ Enabled: true
194
+
195
+ Lint/UnexpectedBlockArity:
196
+ Enabled: true
197
+
198
+ Lint/UnmodifiedReduceAccumulator:
199
+ Enabled: true
200
+
201
+ Lint/UselessRescue:
202
+ Enabled: true
203
+
204
+ Lint/UselessRuby2Keywords:
205
+ Enabled: true
104
206
 
105
207
  Metrics/AbcSize:
106
208
  Enabled: false
107
209
 
108
210
  Metrics/BlockLength:
109
- IgnoredMethods:
211
+ AllowedMethods:
110
212
  - context
111
213
  - describe
112
214
  - it
@@ -114,40 +216,57 @@ Metrics/BlockLength:
114
216
 
115
217
  Metrics/ClassLength:
116
218
  Enabled: false
219
+
220
+ Metrics/CollectionLiteralLength:
221
+ Enabled: false
222
+
117
223
  Metrics/CyclomaticComplexity:
118
224
  Enabled: false
225
+
119
226
  Metrics/MethodLength:
120
227
  Enabled: false
228
+
121
229
  Metrics/ModuleLength:
122
230
  Enabled: false
231
+
123
232
  Metrics/PerceivedComplexity:
124
233
  Enabled: false
125
234
 
235
+ Naming/BlockForwarding:
236
+ Enabled: true
237
+
126
238
  Naming/MethodParameterName:
127
239
  MinNameLength: 3
128
240
  AllowNamesEndingInNumbers: true
129
241
  AllowedNames:
130
- - id
131
- - io
132
- - to
133
- - at
134
- - x
135
- - x1
136
- - x2
137
- - y
138
- - y1
139
- - y2
140
- - r1
141
- - r2
242
+ - id
243
+ - io
244
+ - to
245
+ - at
246
+ - x
247
+ - x1
248
+ - x2
249
+ - y
250
+ - y1
251
+ - y2
252
+ - r1
253
+ - r2
142
254
 
143
255
  ForbiddenNames: []
144
256
 
257
+ Security/CompoundHash:
258
+ Enabled: true
259
+
260
+ Security/IoMethods:
261
+ Enabled: true
145
262
 
146
- # This one doesn't work well with YARD
147
263
  Style/AccessorGrouping:
148
- Enabled: false
264
+ EnforcedStyle: separated
149
265
 
150
- Style/ArgumentsForwarding: # (new in 1.1)
266
+ Style/ArgumentsForwarding:
267
+ Enabled: true
268
+
269
+ Style/ArrayIntersect:
151
270
  Enabled: true
152
271
 
153
272
  # We need to reference non-ascii characters when testing and explaining
@@ -158,25 +277,76 @@ Style/AsciiComments:
158
277
  Style/AutoResourceCleanup:
159
278
  Enabled: true
160
279
 
161
- Style/CollectionCompact: # (new in 1.2)
280
+ Style/BlockDelimiters:
281
+ EnforcedStyle: semantic
282
+ AllowBracesOnProceduralOneLiners: true
283
+
284
+ Style/CollectionCompact:
162
285
  Enabled: true
163
286
 
164
287
  Style/CollectionMethods:
165
288
  Enabled: true
166
289
 
290
+ Style/ComparableClamp:
291
+ Enabled: true
292
+
293
+ Style/ConcatArrayLiterals:
294
+ Enabled: true
295
+
296
+ Style/DataInheritance:
297
+ Enabled: true
298
+
299
+ Style/DirEmpty:
300
+ Enabled: true
301
+
302
+ Style/DocumentDynamicEvalDefinition:
303
+ Enabled: true
304
+
167
305
  Style/Documentation:
168
- Enabled: false
306
+ Exclude:
307
+ - bench/**/*
308
+ - examples/**/*.rb
309
+ - manual/**/*.rb
310
+
311
+ Style/DocumentationMethod:
312
+ Enabled: true
313
+ Exclude:
314
+ - bench/**/*
315
+ - examples/**/*.rb
316
+ - manual/**/*.rb
317
+ - spec/**/*_spec.rb
318
+
319
+ Style/EmptyHeredoc:
320
+ Enabled: true
321
+
322
+ Style/EndlessMethod:
323
+ Enabled: true
324
+
325
+ Style/EnvHome:
326
+ Enabled: true
327
+
328
+ Style/ExactRegexpMatch:
329
+ Enabled: true
330
+
331
+ Style/FetchEnvVar:
332
+ Enabled: true
333
+
334
+ Style/FileEmpty:
335
+ Enabled: true
169
336
 
170
- Style/DocumentDynamicEvalDefinition: # (new in 1.1)
337
+ Style/FileRead:
171
338
  Enabled: true
172
339
 
173
- Style/EndlessMethod: # (new in 1.8)
340
+ Style/FileWrite:
174
341
  Enabled: true
175
342
 
176
343
  Style/GuardClause:
177
344
  Enabled: false
178
345
 
179
- Style/HashExcept: # (new in 1.7)
346
+ Style/HashConversion:
347
+ Enabled: true
348
+
349
+ Style/HashExcept:
180
350
  Enabled: true
181
351
 
182
352
  # We don't always prefer modifier statements even if they do fit on a line.
@@ -185,13 +355,69 @@ Style/IfUnlessModifier:
185
355
  Style/WhileUntilModifier:
186
356
  Enabled: false
187
357
 
358
+ Style/IfWithBooleanLiteralBranches:
359
+ Enabled: true
360
+
188
361
  Style/ImplicitRuntimeError:
189
362
  Enabled: true
190
363
 
191
- Style/NegatedIfElseCondition: # (new in 1.2)
364
+ Style/InPatternThen:
365
+ Enabled: true
366
+
367
+ Style/InvertibleUnlessCondition:
368
+ Enabled: true
369
+
370
+ Style/MagicCommentFormat:
371
+ Enabled: true
372
+
373
+ Style/MapCompactWithConditionalBlock:
374
+ Enabled: true
375
+
376
+ Style/MapToHash:
377
+ Enabled: true
378
+
379
+ Style/MapToSet:
380
+ Enabled: true
381
+
382
+ Style/MethodCallWithArgsParentheses:
383
+ Enabled: true
384
+ AllowedMethods:
385
+ - raise
386
+ - describe
387
+ - to
388
+ - to_not
389
+ - eq
390
+ - be
391
+ - yield
392
+
393
+ Style/MinMaxComparison:
394
+ Enabled: true
395
+
396
+ Style/MultilineInPatternThen:
397
+ Enabled: true
398
+
399
+ Style/NegatedIfElseCondition:
400
+ Enabled: true
401
+
402
+ Style/NestedFileDirname:
403
+ Enabled: true
404
+
405
+ Style/NilLambda:
406
+ Enabled: true
407
+
408
+ Style/NumberedParameters:
409
+ Enabled: true
410
+
411
+ Style/NumberedParametersLimit:
412
+ Enabled: true
413
+
414
+ Style/ObjectThen:
192
415
  Enabled: true
193
416
 
194
- Style/NilLambda: # (new in 1.3)
417
+ Style/OpenStructUse:
418
+ Enabled: true
419
+
420
+ Style/OperatorMethodCall:
195
421
  Enabled: true
196
422
 
197
423
  # This one would break our public API
@@ -200,90 +426,268 @@ Style/OptionalBooleanParameter:
200
426
 
201
427
  Style/PercentLiteralDelimiters:
202
428
  PreferredDelimiters:
203
- '%': '()'
204
- '%i': '[]'
205
- '%I': '[]'
206
- '%q': '()'
207
- '%Q': '()'
208
- '%r': '{}'
209
- '%s': '()'
210
- '%w': '[]'
211
- '%W': '[]'
212
- '%x': '()'
213
-
214
- Style/RedundantArgument: # (new in 1.4)
429
+ "%": "()"
430
+ "%i": "[]"
431
+ "%I": "[]"
432
+ "%q": "()"
433
+ "%Q": "()"
434
+ "%r": "{}"
435
+ "%s": "()"
436
+ "%w": "[]"
437
+ "%W": "[]"
438
+ "%x": "()"
439
+
440
+ Style/QuotedSymbols:
441
+ Enabled: true
442
+
443
+ Style/RedundantArgument:
444
+ Enabled: false
445
+
446
+ Style/RedundantArrayConstructor:
447
+ Enabled: true
448
+
449
+ Style/RedundantConstantBase:
215
450
  Enabled: false
216
451
 
452
+ Style/RedundantCurrentDirectoryInPath:
453
+ Enabled: true
454
+
455
+ Style/RedundantDoubleSplatHashBraces:
456
+ Enabled: true
457
+
458
+ Style/RedundantEach:
459
+ Enabled: true
460
+
461
+ Style/RedundantFilterChain:
462
+ Enabled: true
463
+
464
+ Style/RedundantHeredocDelimiterQuotes:
465
+ Enabled: true
466
+
467
+ Style/RedundantInitialize:
468
+ Enabled: true
469
+
470
+ Style/RedundantLineContinuation:
471
+ Enabled: true
472
+
473
+ Style/RedundantRegexpArgument:
474
+ Enabled: true
475
+
476
+ Style/RedundantRegexpConstructor:
477
+ Enabled: true
478
+
479
+ Style/RedundantSelfAssignmentBranch:
480
+ Enabled: true
481
+
482
+ Style/RedundantStringEscape:
483
+ Enabled: true
484
+
217
485
  Style/ReturnNil:
218
486
  Enabled: true
219
487
 
488
+ Style/ReturnNilInPredicateMethodDefinition:
489
+ Enabled: true
490
+
491
+ Style/SelectByRegexp:
492
+ Enabled: true
493
+
220
494
  Style/Send:
221
495
  Enabled: true
222
496
 
223
- Style/SwapValues: # (new in 1.1)
497
+ Style/SingleLineDoEndBlock:
224
498
  Enabled: true
225
499
 
500
+ Style/StringChars:
501
+ Enabled: true
226
502
 
227
- Performance/AncestorsInclude: # (new in 1.7)
503
+ Style/StringMethods:
228
504
  Enabled: true
229
505
 
230
- Performance/BigDecimalWithNumericArgument: # (new in 1.7)
506
+ Style/SuperWithArgsParentheses:
507
+ Enabled: true
508
+
509
+ Style/SwapValues:
510
+ Enabled: true
511
+
512
+ Style/TrailingCommaInArguments:
513
+ EnforcedStyleForMultiline: prawn_comma
514
+
515
+ Style/TrailingCommaInArrayLiteral:
516
+ EnforcedStyleForMultiline: prawn_comma
517
+
518
+ Style/TrailingCommaInHashLiteral:
519
+ EnforcedStyleForMultiline: prawn_comma
520
+
521
+ Style/YAMLFileRead:
231
522
  Enabled: true
232
523
 
233
- Performance/BlockGivenWithExplicitBlock: # (new in 1.9)
524
+ Performance/AncestorsInclude:
234
525
  Enabled: true
235
526
 
527
+ Performance/BigDecimalWithNumericArgument:
528
+ Enabled: true
529
+
530
+ Performance/BlockGivenWithExplicitBlock:
531
+ Enabled: false
532
+
236
533
  Performance/CaseWhenSplat:
237
534
  Enabled: true
238
535
 
239
- Performance/CollectionLiteralInLoop: # (new in 1.8)
536
+ Performance/CollectionLiteralInLoop:
240
537
  Enabled: true
241
538
 
242
- Performance/ConstantRegexp: # (new in 1.9)
539
+ Performance/ConcurrentMonotonicTime:
540
+ Enabled: true
541
+
542
+ Performance/ConstantRegexp:
243
543
  Enabled: true
244
544
 
245
545
  Performance/IoReadlines:
246
546
  Enabled: true
247
547
 
248
- Performance/MethodObjectAsBlock: # (new in 1.9)
548
+ Performance/MapCompact:
249
549
  Enabled: true
250
550
 
251
- Performance/RedundantSortBlock: # (new in 1.7)
551
+ Performance/MapMethodChain:
252
552
  Enabled: true
253
553
 
254
- Performance/RedundantStringChars: # (new in 1.7)
554
+ Performance/MethodObjectAsBlock:
255
555
  Enabled: true
256
556
 
257
- Performance/ReverseFirst: # (new in 1.7)
557
+ Performance/RedundantEqualityComparisonBlock:
258
558
  Enabled: true
259
559
 
260
- Performance/SortReverse: # (new in 1.7)
560
+ Performance/RedundantSortBlock:
261
561
  Enabled: true
262
562
 
263
- Performance/Squeeze: # (new in 1.7)
563
+ Performance/RedundantSplitRegexpArgument:
264
564
  Enabled: true
265
565
 
266
- Performance/StringInclude: # (new in 1.7)
566
+ Performance/RedundantStringChars:
267
567
  Enabled: true
268
568
 
269
- Performance/Sum: # (new in 1.8)
569
+ Performance/ReverseFirst:
270
570
  Enabled: true
271
571
 
572
+ Performance/SortReverse:
573
+ Enabled: true
574
+
575
+ Performance/Squeeze:
576
+ Enabled: true
577
+
578
+ Performance/StringIdentifierArgument:
579
+ Enabled: true
580
+
581
+ Performance/StringInclude:
582
+ Enabled: true
583
+
584
+ Performance/Sum:
585
+ Enabled: true
586
+
587
+ RSpec/Capybara:
588
+ Enabled: false
589
+
590
+ Capybara:
591
+ Enabled: false
592
+
593
+ FactoryBot:
594
+ Enabled: false
595
+
596
+ RSpec/Rails:
597
+ Enabled: false
598
+
599
+ RSpec/BeEmpty:
600
+ Enabled: true
601
+
602
+ RSpec/BeEq:
603
+ Enabled: true
604
+
605
+ RSpec/BeNil:
606
+ Enabled: true
607
+
608
+ RSpec/ChangeByZero:
609
+ Enabled: true
610
+
611
+ RSpec/ClassCheck:
612
+ Enabled: true
613
+
614
+ RSpec/ContainExactly:
615
+ Enabled: true
272
616
 
273
617
  RSpec/DescribedClassModuleWrapping:
274
618
  Enabled: true
275
619
 
620
+ RSpec/DuplicatedMetadata:
621
+ Enabled: true
622
+
623
+ RSpec/EmptyMetadata:
624
+ Enabled: true
625
+
626
+ RSpec/Eq:
627
+ Enabled: true
628
+
276
629
  RSpec/ExampleLength:
277
630
  Enabled: false
278
631
 
632
+ RSpec/ExcessiveDocstringSpacing:
633
+ Enabled: true
634
+
635
+ RSpec/IdenticalEqualityAssertion:
636
+ Enabled: true
637
+
638
+ RSpec/IndexedLet:
639
+ Enabled: true
640
+
641
+ RSpec/MatchArray:
642
+ Enabled: true
643
+
279
644
  RSpec/MessageExpectation:
280
645
  Enabled: true
281
646
 
647
+ RSpec/MetadataStyle:
648
+ Enabled: true
649
+
282
650
  RSpec/MultipleExpectations:
283
651
  Enabled: false
284
652
 
285
653
  RSpec/NestedGroups:
286
654
  Max: 5
287
655
 
656
+ RSpec/NoExpectationExample:
657
+ Enabled: true
658
+
288
659
  RSpec/NotToNot:
289
660
  EnforcedStyle: to_not
661
+
662
+ RSpec/PendingWithoutReason:
663
+ Enabled: true
664
+
665
+ RSpec/ReceiveMessages:
666
+ Enabled: true
667
+
668
+ RSpec/RedundantAround:
669
+ Enabled: true
670
+
671
+ RSpec/RedundantPredicateMatcher:
672
+ Enabled: true
673
+
674
+ RSpec/RemoveConst:
675
+ Enabled: true
676
+
677
+ RSpec/SkipBlockInsideExample:
678
+ Enabled: true
679
+
680
+ RSpec/SortMetadata:
681
+ Enabled: true
682
+
683
+ RSpec/SpecFilePathFormat:
684
+ Enabled: true
685
+
686
+ RSpec/SpecFilePathSuffix:
687
+ Enabled: true
688
+
689
+ RSpec/SubjectDeclaration:
690
+ Enabled: true
691
+
692
+ RSpec/VerifiedDoubleReference:
693
+ Enabled: true