atomic_json 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: '06197535fdc39b97d63996f30915b34218992b6a'
4
+ data.tar.gz: 6426ccf81026c5302c8bd4917cb57a500b21c6e9
5
+ SHA512:
6
+ metadata.gz: 5cb38457ce4b79e9b1ff23609ade02f3dc828f97d10798e2cc8cf9c7e2a52b57b92e4af31e4b0122df4b5332435c0977da90e0b4079c8902f65be5e1275ce0d5
7
+ data.tar.gz: 8a84ae72374eef525299bcca15b7d8c0d2c1eabbf8916edcba984f94f21a748dd4374c6d8f52a6360376014ab394d1eec52d0dd9a0814f5cc8e277414c6b1d68
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ .byebug_history
11
+ # Editors
12
+ **/.idea/
data/.rubocop.yml ADDED
@@ -0,0 +1,683 @@
1
+ AllCops:
2
+ Exclude:
3
+ - db/schema.rb
4
+ TargetRubyVersion: 2.5
5
+
6
+ Naming/AccessorMethodName:
7
+ Description: Check the naming of accessor methods for get_/set_.
8
+ Enabled: false
9
+
10
+ Naming/AsciiIdentifiers:
11
+ Description: 'Use only ascii symbols in identifiers.'
12
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
13
+ Enabled: true
14
+
15
+ Naming/BinaryOperatorParameterName:
16
+ Description: 'When defining binary operators, name the argument other.'
17
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
18
+ Enabled: false
19
+
20
+ Naming/FileName:
21
+ Description: 'Use snake_case for source file names.'
22
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
23
+ Enabled: true
24
+
25
+ Naming/PredicateName:
26
+ Description: 'Check the names of predicate methods.'
27
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
28
+ NamePrefixBlacklist:
29
+ - is_
30
+ Exclude:
31
+ - spec/**/*
32
+
33
+ Style/Alias:
34
+ Description: 'Use alias_method instead of alias.'
35
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
36
+ Enabled: true
37
+
38
+ Style/ArrayJoin:
39
+ Description: 'Use Array#join instead of Array#*.'
40
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
41
+ Enabled: true
42
+
43
+ Style/AsciiComments:
44
+ Description: 'Use only ascii symbols in comments.'
45
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
46
+ Enabled: true
47
+
48
+ Style/Attr:
49
+ Description: 'Checks for uses of Module#attr.'
50
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
51
+ Enabled: true
52
+
53
+ Metrics/BlockLength:
54
+ Enabled: true
55
+ ExcludedMethods:
56
+ - namespace
57
+ Exclude:
58
+ - config/environments/*
59
+ - config/routes.rb
60
+
61
+
62
+ Metrics/BlockNesting:
63
+ Description: 'Avoid excessive block nesting'
64
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
65
+ Enabled: true
66
+
67
+ Style/CaseEquality:
68
+ Description: 'Avoid explicit use of the case equality operator(===).'
69
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
70
+ Enabled: false
71
+
72
+ Style/CharacterLiteral:
73
+ Description: 'Checks for uses of character literals.'
74
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
75
+ Enabled: true
76
+
77
+ Style/ClassAndModuleChildren:
78
+ Description: 'Checks style of children classes and modules.'
79
+ Enabled: true
80
+ EnforcedStyle: nested
81
+
82
+ Metrics/ClassLength:
83
+ Description: 'Avoid classes longer than 100 lines of code.'
84
+ Enabled: false
85
+
86
+ Metrics/ModuleLength:
87
+ Description: 'Avoid modules longer than 100 lines of code.'
88
+ Enabled: false
89
+
90
+ Style/ClassVars:
91
+ Description: 'Avoid the use of class variables.'
92
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
93
+ Enabled: true
94
+
95
+ Style/CollectionMethods:
96
+ Enabled: true
97
+ PreferredMethods:
98
+ detect: find
99
+ inject: reduce
100
+ collect: map
101
+ find_all: select
102
+
103
+ Style/ColonMethodCall:
104
+ Description: 'Do not use :: for method call.'
105
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
106
+ Enabled: true
107
+
108
+ Style/MutableConstant:
109
+ Description: 'Avoids assignment of mutable literals to constants..'
110
+ StyleGuide: 'http://www.rubydoc.info/github/bbatsov/RuboCop/RuboCop/Cop/Style/MutableConstant'
111
+ Enabled: false
112
+
113
+ Style/CommentAnnotation:
114
+ Description: >-
115
+ Checks formatting of special comments
116
+ (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
117
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
118
+ Enabled: false
119
+
120
+ Metrics/AbcSize:
121
+ Description: >-
122
+ A calculated magnitude based on number of assignments,
123
+ branches, and conditions.
124
+ Enabled: false
125
+
126
+ Metrics/CyclomaticComplexity:
127
+ Description: >-
128
+ A complexity metric that is strongly correlated to the number
129
+ of test cases needed to validate a method.
130
+ Enabled: false
131
+
132
+ Rails/Delegate:
133
+ Description: 'Prefer delegate method for delegations.'
134
+ Enabled: false
135
+
136
+ Style/PreferredHashMethods:
137
+ Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
138
+ StyleGuide: '#hash-key'
139
+ Enabled: true
140
+
141
+ Style/Documentation:
142
+ Description: 'Document classes and non-namespace modules.'
143
+ Enabled: false
144
+
145
+ Style/DoubleNegation:
146
+ Description: 'Checks for uses of double negation (!!).'
147
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
148
+ Enabled: true
149
+
150
+ Style/EachWithObject:
151
+ Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
152
+ Enabled: false
153
+
154
+ Style/EmptyLiteral:
155
+ Description: 'Prefer literals to Array.new/Hash.new/String.new.'
156
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
157
+ Enabled: true
158
+
159
+ # Checks whether the source file has a utf-8 encoding comment or not
160
+ # AutoCorrectEncodingComment must match the regex
161
+ # /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
162
+ Style/Encoding:
163
+ Enabled: false
164
+
165
+ Style/EvenOdd:
166
+ Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
167
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
168
+ Enabled: true
169
+
170
+ Style/FrozenStringLiteralComment:
171
+ Description: >-
172
+ Add the frozen_string_literal comment to the top of files
173
+ to help transition from Ruby 2.3.0 to Ruby 3.0.
174
+ Enabled: false
175
+
176
+ Style/FlipFlop:
177
+ Description: 'Checks for flip flops'
178
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
179
+ Enabled: true
180
+
181
+ Style/FormatString:
182
+ Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
183
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
184
+ Enabled: true
185
+
186
+ Style/GlobalVars:
187
+ Description: 'Do not introduce global variables.'
188
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
189
+ Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
190
+ Enabled: false
191
+
192
+ Style/GuardClause:
193
+ Description: 'Check for conditionals that can be replaced with guard clauses'
194
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
195
+ Enabled: true
196
+
197
+ Style/IfUnlessModifier:
198
+ Description: >-
199
+ Favor modifier if/unless usage when you have a
200
+ single-line body.
201
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
202
+ Enabled: true
203
+
204
+ Style/IfWithSemicolon:
205
+ Description: 'Do not use if x; .... Use the ternary operator instead.'
206
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
207
+ Enabled: true
208
+
209
+ Style/InlineComment:
210
+ Description: 'Avoid inline comments.'
211
+ Enabled: true
212
+
213
+ Style/Lambda:
214
+ Description: 'Use the new lambda literal syntax for single-line blocks.'
215
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
216
+ Enabled: true
217
+
218
+ Style/LambdaCall:
219
+ Description: 'Use lambda.call(...) instead of lambda.(...).'
220
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
221
+ Enabled: true
222
+
223
+ Style/LineEndConcatenation:
224
+ Description: >-
225
+ Use \ instead of + or << to concatenate two string literals at
226
+ line end.
227
+ Enabled: true
228
+
229
+ Metrics/LineLength:
230
+ Description: 'Limit lines to 80 characters.'
231
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
232
+ Max: 80
233
+ Enabled: false
234
+
235
+ Metrics/MethodLength:
236
+ Description: 'Avoid methods longer than 10 lines of code.'
237
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
238
+ Enabled: false
239
+
240
+ Style/MixinUsage:
241
+ Description: 'Checks that `include` statements appaear inside classes.'
242
+ Enabled: true
243
+ Exclude:
244
+ - bin/*
245
+
246
+ Style/ModuleFunction:
247
+ Description: 'Checks for usage of `extend self` in modules.'
248
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
249
+ Enabled: false
250
+
251
+ Style/MultilineBlockChain:
252
+ Description: 'Avoid multi-line chains of blocks.'
253
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
254
+ Enabled: false
255
+
256
+ Style/NegatedIf:
257
+ Description: >-
258
+ Favor unless over if for negative conditions
259
+ (or control flow or).
260
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
261
+ Enabled: true
262
+
263
+ Style/NegatedWhile:
264
+ Description: 'Favor until over while for negative conditions.'
265
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
266
+ Enabled: true
267
+
268
+ Style/Next:
269
+ Description: 'Use `next` to skip iteration instead of a condition at the end.'
270
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
271
+ Enabled: true
272
+
273
+ Style/NilComparison:
274
+ Description: 'Prefer x.nil? to x == nil.'
275
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
276
+ Enabled: true
277
+
278
+ Style/Not:
279
+ Description: 'Use ! instead of not.'
280
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
281
+ Enabled: true
282
+
283
+ Style/NumericLiterals:
284
+ Description: >-
285
+ Add underscores to large numeric literals to improve their
286
+ readability.
287
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
288
+ Enabled: false
289
+
290
+ Style/OneLineConditional:
291
+ Description: >-
292
+ Favor the ternary operator(?:) over
293
+ if/then/else/end constructs.
294
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
295
+ Enabled: true
296
+
297
+ Style/WordArray:
298
+ MinSize: 4
299
+
300
+ Style/SymbolArray:
301
+ MinSize: 4
302
+
303
+ Style/EmptyMethod:
304
+ EnforcedStyle: expanded
305
+
306
+ Metrics/ParameterLists:
307
+ Description: 'Avoid parameter lists longer than three or four parameters.'
308
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
309
+ Enabled: true
310
+
311
+ Style/PercentLiteralDelimiters:
312
+ Description: 'Use `%`-literal delimiters consistently'
313
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
314
+ Enabled: true
315
+
316
+ Style/PerlBackrefs:
317
+ Description: 'Avoid Perl-style regex back references.'
318
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
319
+ Enabled: true
320
+
321
+ Style/Proc:
322
+ Description: 'Use proc instead of Proc.new.'
323
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
324
+ Enabled: true
325
+
326
+ Style/RaiseArgs:
327
+ Description: 'Checks the arguments passed to raise/fail.'
328
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
329
+ Enabled: true
330
+
331
+ Style/RegexpLiteral:
332
+ Description: 'Use / or %r around regular expressions.'
333
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
334
+ Enabled: true
335
+
336
+ Style/SelfAssignment:
337
+ Description: >-
338
+ Checks for places where self-assignment shorthand should have
339
+ been used.
340
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
341
+ Enabled: true
342
+
343
+ Style/SingleLineBlockParams:
344
+ Description: 'Enforces the names of some block params.'
345
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
346
+ Enabled: false
347
+
348
+ Style/SingleLineMethods:
349
+ Description: 'Avoid single-line methods.'
350
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
351
+ Enabled: true
352
+
353
+ Style/SignalException:
354
+ Description: 'Checks for proper usage of fail and raise.'
355
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
356
+ Enabled: true
357
+
358
+ Style/SpecialGlobalVars:
359
+ Description: 'Avoid Perl-style global variables.'
360
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
361
+ Enabled: true
362
+
363
+ Style/StringLiterals:
364
+ Description: 'Checks if uses of quotes match the configured preference.'
365
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
366
+ EnforcedStyle: single_quotes
367
+ Enabled: true
368
+
369
+ Style/TrailingCommaInArguments:
370
+ Description: 'Checks for trailing comma in argument lists.'
371
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
372
+ EnforcedStyleForMultiline: no_comma
373
+ Enabled: true
374
+
375
+ Style/TrailingCommaInArrayLiteral:
376
+ Description: 'Checks for trailing comma in array literals.'
377
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
378
+ EnforcedStyleForMultiline: no_comma
379
+ Enabled: false
380
+
381
+ Style/TrailingCommaInHashLiteral:
382
+ Description: 'Checks for trailing comma in hash literals.'
383
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
384
+ EnforcedStyleForMultiline: no_comma
385
+ Enabled: false
386
+
387
+ Style/TrivialAccessors:
388
+ Description: 'Prefer attr_* methods to trivial readers/writers.'
389
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
390
+ Enabled: true
391
+
392
+ Style/VariableInterpolation:
393
+ Description: >-
394
+ Don't interpolate global, instance and class variables
395
+ directly in strings.
396
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
397
+ Enabled: true
398
+
399
+ Style/WhenThen:
400
+ Description: 'Use when x then ... for one-line cases.'
401
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
402
+ Enabled: true
403
+
404
+ Style/WhileUntilModifier:
405
+ Description: >-
406
+ Favor modifier while/until usage when you have a
407
+ single-line body.
408
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
409
+ Enabled: true
410
+
411
+ Style/WordArray:
412
+ Description: 'Use %w or %W for arrays of words.'
413
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
414
+ Enabled: true
415
+
416
+ Style/SymbolArray:
417
+ MinSize: 3
418
+
419
+ # Lint
420
+
421
+ Lint/AmbiguousOperator:
422
+ Description: >-
423
+ Checks for ambiguous operators in the first argument of a
424
+ method invocation without parentheses.
425
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
426
+ Enabled: true
427
+
428
+ Lint/AmbiguousRegexpLiteral:
429
+ Description: >-
430
+ Checks for ambiguous regexp literals in the first argument of
431
+ a method invocation without parenthesis.
432
+ Enabled: false
433
+
434
+ Lint/AssignmentInCondition:
435
+ Description: "Don't use assignment in conditions."
436
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
437
+ Enabled: true
438
+
439
+ Lint/CircularArgumentReference:
440
+ Description: "Don't refer to the keyword argument in the default value."
441
+ Enabled: false
442
+
443
+ Lint/DeprecatedClassMethods:
444
+ Description: 'Check for deprecated class method calls.'
445
+ Enabled: true
446
+
447
+ Lint/DuplicatedKey:
448
+ Description: 'Check for duplicate keys in hash literals.'
449
+ Enabled: true
450
+
451
+ Lint/EachWithObjectArgument:
452
+ Description: 'Check for immutable argument given to each_with_object.'
453
+ Enabled: false
454
+
455
+ Lint/ElseLayout:
456
+ Description: 'Check for odd code arrangement in an else block.'
457
+ Enabled: true
458
+
459
+ Lint/FormatParameterMismatch:
460
+ Description: 'The number of parameters to format/sprint must match the fields.'
461
+ Enabled: true
462
+
463
+ Lint/HandleExceptions:
464
+ Description: "Don't suppress exception."
465
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
466
+ Enabled: true
467
+
468
+ Lint/LiteralAsCondition:
469
+ Description: 'Checks of literals used in conditions.'
470
+ Enabled: false
471
+
472
+ Lint/LiteralInInterpolation:
473
+ Description: 'Checks for literals used in interpolation.'
474
+ Enabled: false
475
+
476
+ Lint/Loop:
477
+ Description: >-
478
+ Use Kernel#loop with break rather than begin/end/until or
479
+ begin/end/while for post-loop tests.
480
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
481
+ Enabled: false
482
+
483
+ Lint/NestedMethodDefinition:
484
+ Description: 'Do not use nested method definitions.'
485
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
486
+ Enabled: true
487
+
488
+ Lint/NonLocalExitFromIterator:
489
+ Description: 'Do not use return in iterator to cause non-local exit.'
490
+ Enabled: true
491
+
492
+ Lint/ParenthesesAsGroupedExpression:
493
+ Description: >-
494
+ Checks for method calls with a space before the opening
495
+ parenthesis.
496
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
497
+ Enabled: true
498
+
499
+ Lint/RequireParentheses:
500
+ Description: >-
501
+ Use parentheses in the method call to avoid confusion
502
+ about precedence.
503
+ Enabled: true
504
+
505
+ Lint/UnderscorePrefixedVariableName:
506
+ Description: 'Do not use prefix `_` for a variable that is used.'
507
+ Enabled: false
508
+
509
+ Lint/Void:
510
+ Description: 'Possible use of operator/literal/variable in void context.'
511
+ Enabled: false
512
+
513
+ # Performance
514
+
515
+ Performance/CaseWhenSplat:
516
+ Description: >-
517
+ Place `when` conditions that use splat at the end
518
+ of the list of `when` branches.
519
+ Enabled: false
520
+
521
+ Performance/Count:
522
+ Description: >-
523
+ Use `count` instead of `select...size`, `reject...size`,
524
+ `select...count`, `reject...count`, `select...length`,
525
+ and `reject...length`.
526
+ Enabled: true
527
+
528
+ Performance/Detect:
529
+ Description: >-
530
+ Use `detect` instead of `select.first`, `find_all.first`,
531
+ `select.last`, and `find_all.last`.
532
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
533
+ Enabled: true
534
+
535
+ Performance/FlatMap:
536
+ Description: >-
537
+ Use `Enumerable#flat_map`
538
+ instead of `Enumerable#map...Array#flatten(1)`
539
+ or `Enumberable#collect..Array#flatten(1)`
540
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
541
+ Enabled: true
542
+
543
+ Performance/ReverseEach:
544
+ Description: 'Use `reverse_each` instead of `reverse.each`.'
545
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
546
+ Enabled: true
547
+
548
+ Performance/Sample:
549
+ Description: >-
550
+ Use `sample` instead of `shuffle.first`,
551
+ `shuffle.last`, and `shuffle[Fixnum]`.
552
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
553
+ Enabled: true
554
+
555
+ Performance/Size:
556
+ Description: >-
557
+ Use `size` instead of `count` for counting
558
+ the number of elements in `Array` and `Hash`.
559
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
560
+ Enabled: true
561
+
562
+ Performance/StringReplacement:
563
+ Description: >-
564
+ Use `tr` instead of `gsub` when you are replacing the same
565
+ number of characters. Use `delete` instead of `gsub` when
566
+ you are deleting characters.
567
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
568
+ Enabled: true
569
+
570
+ # Rails
571
+
572
+ Rails/ActionFilter:
573
+ Description: 'Enforces consistent use of action filter methods.'
574
+ Enabled: true
575
+
576
+ Rails/Date:
577
+ Description: >-
578
+ Checks the correct usage of date aware methods,
579
+ such as Date.today, Date.current etc.
580
+ Enabled: true
581
+
582
+ Rails/FindBy:
583
+ Description: 'Prefer find_by over where.first.'
584
+ Enabled: true
585
+
586
+ Rails/FindEach:
587
+ Description: 'Prefer all.find_each over all.find.'
588
+ Enabled: true
589
+
590
+ Rails/HasAndBelongsToMany:
591
+ Description: 'Prefer has_many :through to has_and_belongs_to_many.'
592
+ Enabled: true
593
+
594
+ Rails/Output:
595
+ Description: 'Checks for calls to puts, print, etc.'
596
+ Enabled: true
597
+
598
+ Rails/ReadWriteAttribute:
599
+ Description: >-
600
+ Checks for read_attribute(:attr) and
601
+ write_attribute(:attr, val).
602
+ Enabled: false
603
+
604
+ Rails/ScopeArgs:
605
+ Description: 'Checks the arguments of ActiveRecord scopes.'
606
+ Enabled: true
607
+
608
+ Rails/TimeZone:
609
+ Description: 'Checks the correct usage of time zone aware methods.'
610
+ StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
611
+ Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
612
+ Enabled: true
613
+
614
+ Rails/Validation:
615
+ Description: 'Use validates :attribute, hash of validations.'
616
+ Enabled: false
617
+
618
+ # Layout
619
+
620
+ Layout/ConditionPosition:
621
+ Description: >-
622
+ Checks for condition placed in a confusing position relative to
623
+ the keyword.
624
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
625
+ Enabled: true
626
+
627
+ Layout/EmptyLinesAroundClassBody:
628
+ Enabled: true
629
+ EnforcedStyle: empty_lines
630
+
631
+ Layout/EmptyLinesAroundModuleBody:
632
+ Enabled: true
633
+ EnforcedStyle: empty_lines_except_namespace
634
+
635
+ Layout/AlignParameters:
636
+ Description: 'Here we check if the parameters on a multi-line method call or definition are aligned.'
637
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
638
+ Enabled: true,
639
+ EnforcedStyle: with_fixed_indentation
640
+
641
+ Layout/DotPosition:
642
+ Description: 'Checks the position of the dot in multi-line method calls.'
643
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
644
+ EnforcedStyle: leading
645
+
646
+ Layout/ExtraSpacing:
647
+ Description: 'Do not use unnecessary spacing.'
648
+ Enabled: true
649
+
650
+ Layout/MultilineOperationIndentation:
651
+ Description: >-
652
+ Checks indentation of binary operations that span more than
653
+ one line.
654
+ Enabled: true
655
+ EnforcedStyle: indented
656
+
657
+ Layout/MultilineMethodCallIndentation:
658
+ Description: >-
659
+ Checks indentation of method calls with the dot operator
660
+ that span more than one line.
661
+ Enabled: true
662
+ EnforcedStyle: indented
663
+
664
+ Layout/InitialIndentation:
665
+ Description: >-
666
+ Checks the indentation of the first non-blank non-comment line in a file.
667
+ Enabled: false
668
+
669
+ Layout/IndentHash:
670
+ Enabled: true
671
+ EnforcedStyle: consistent
672
+
673
+ Layout/AccessModifierIndentation:
674
+ Enabled: true
675
+
676
+ Layout/IndentationConsistency:
677
+ EnforcedStyle: rails
678
+ Enabled: true
679
+
680
+ # Bundler
681
+
682
+ Bundler/OrderedGems:
683
+ Enabled: false