uiza_framgia_test 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +535 -0
  3. data/.rubocop_disable.yml +78 -0
  4. data/.rubocop_enable.yml +786 -0
  5. data/CHANGELOG.md +29 -0
  6. data/CODE_OF_CONDUCT.md +74 -0
  7. data/CONTRIBUTORS.txt +3 -0
  8. data/Gemfile +6 -0
  9. data/Gemfile.lock +65 -0
  10. data/History.txt +1 -0
  11. data/LICENSE.txt +21 -0
  12. data/PULL_REQUEST_TEMPLATE.md +44 -0
  13. data/README.md +181 -0
  14. data/Rakefile +6 -0
  15. data/bin/console +14 -0
  16. data/bin/setup +8 -0
  17. data/doc/ANALYTIC.md +5 -0
  18. data/doc/CALLBACK.md +4 -0
  19. data/doc/CATEGORY.md +289 -0
  20. data/doc/EMBED_METADATA.md +4 -0
  21. data/doc/ENTITY.md +486 -0
  22. data/doc/ERRORS_CODE.md +60 -0
  23. data/doc/LIVE_STREAMING.md +6 -0
  24. data/doc/STORAGE.md +195 -0
  25. data/lib/uiza.rb +42 -0
  26. data/lib/uiza/api_operation/add.rb +16 -0
  27. data/lib/uiza/api_operation/create.rb +16 -0
  28. data/lib/uiza/api_operation/delete.rb +15 -0
  29. data/lib/uiza/api_operation/list.rb +14 -0
  30. data/lib/uiza/api_operation/remove.rb +15 -0
  31. data/lib/uiza/api_operation/retrieve.rb +15 -0
  32. data/lib/uiza/api_operation/update.rb +16 -0
  33. data/lib/uiza/api_resource/category_resource.rb +33 -0
  34. data/lib/uiza/api_resource/entity_resource.rb +41 -0
  35. data/lib/uiza/api_resource/storage_resource.rb +21 -0
  36. data/lib/uiza/category.rb +44 -0
  37. data/lib/uiza/entity.rb +68 -0
  38. data/lib/uiza/error/bad_request_error.rb +8 -0
  39. data/lib/uiza/error/client_error.rb +8 -0
  40. data/lib/uiza/error/internal_server_error.rb +8 -0
  41. data/lib/uiza/error/not_found_error.rb +8 -0
  42. data/lib/uiza/error/server_error.rb +8 -0
  43. data/lib/uiza/error/service_unavailable_error.rb +8 -0
  44. data/lib/uiza/error/uiza_error.rb +18 -0
  45. data/lib/uiza/error/unauthorized_error.rb +8 -0
  46. data/lib/uiza/error/unprocessable_error.rb +8 -0
  47. data/lib/uiza/storage.rb +17 -0
  48. data/lib/uiza/uiza_client.rb +82 -0
  49. data/lib/uiza/version.rb +3 -0
  50. data/uiza.gemspec +36 -0
  51. metadata +137 -0
@@ -0,0 +1,78 @@
1
+ # These are all the cops that are disabled in the default configuration.
2
+ # encrypt email function uses dynamic finder method, so disabling this check
3
+ Rails/InverseOf:
4
+ Enabled: false
5
+
6
+ Rails/DynamicFindBy:
7
+ Enabled: false
8
+
9
+ # TODO faced rubocop bug https://github.com/bbatsov/rubocop/issues/4751
10
+ Rails/HasManyOrHasOneDependent:
11
+ Enabled: false
12
+
13
+ Style/InlineComment:
14
+ Description: "Avoid inline comments."
15
+ Enabled: false
16
+
17
+ Style/MethodCalledOnDoEndBlock:
18
+ Description: "Avoid chaining a method call on a do...end block."
19
+ Enabled: false
20
+
21
+ Style/SymbolArray:
22
+ Description: "Use %i or %I for arrays of symbols."
23
+ Enabled: false
24
+
25
+ Style/Documentation:
26
+ Description: "Document classes and non-namespace modules."
27
+ Enabled: false
28
+
29
+ Layout/EmptyLinesAroundAccessModifier:
30
+ Description: "Keep blank lines around access modifiers."
31
+ Enabled: false
32
+
33
+ Style/EmptyLiteral:
34
+ Description: "Prefer literals to Array.new/Hash.new/String.new."
35
+ Enabled: false
36
+
37
+ Style/ClassAndModuleChildren:
38
+ Description: "Checks style of children classes and modules."
39
+ Enabled: false
40
+
41
+ Metrics/ClassLength:
42
+ Description: "Avoid classes longer than 100 lines of code."
43
+ Enabled: false
44
+
45
+ Metrics/MethodLength:
46
+ Description: "Avoid methods longer than 10 lines of code."
47
+ Enabled: false
48
+
49
+ Metrics/ParameterLists:
50
+ Description: "Avoid parameter lists longer than three or four parameters."
51
+ Enabled: false
52
+
53
+ Metrics/CyclomaticComplexity:
54
+ Description: "Avoid complex methods."
55
+ Enabled: false
56
+
57
+ Layout/AlignArray:
58
+ Description: >-
59
+ Align the elements of an array literal if they span more than
60
+ one line.
61
+ Enabled: false
62
+
63
+ Style/UnneededPercentQ:
64
+ Description: "Checks for %q/%Q when single quotes or double quotes would do."
65
+ Enabled: false
66
+
67
+ Naming:
68
+ Description: Check the naming of accessor methods for get_/set_.
69
+ Enabled: false
70
+
71
+ #################### Lint ################################
72
+ ### Warnings
73
+ Lint/AssignmentInCondition:
74
+ Description: "Don't use assignment in conditions."
75
+ Enabled: false
76
+
77
+ Metrics/ModuleLength:
78
+ Enabled: false
@@ -0,0 +1,786 @@
1
+ # These are all the cops that are enabled in the default configuration.
2
+
3
+ Layout/AccessModifierIndentation:
4
+ Description: Check indentation of private/protected visibility modifiers.
5
+ Enabled: true
6
+
7
+ Style/Alias:
8
+ Description: "Use alias_method instead of alias."
9
+ Enabled: true
10
+
11
+ Layout/AlignHash:
12
+ Description: >-
13
+ Align the elements of a hash literal if they span more than
14
+ one line.
15
+ Enabled: true
16
+
17
+ Layout/AlignParameters:
18
+ Description: >-
19
+ Align the parameters of a method call if they span more
20
+ than one line.
21
+ Enabled: true
22
+
23
+ Style/AndOr:
24
+ Description: "Use &&/|| instead of and/or."
25
+ Enabled: true
26
+
27
+ Style/ArrayJoin:
28
+ Description: "Use Array#join instead of Array#*."
29
+ Enabled: true
30
+
31
+ Style/AsciiComments:
32
+ Description: "Use only ascii symbols in comments."
33
+ Enabled: false
34
+
35
+ Naming:
36
+ Description: "Use only ascii symbols in identifiers."
37
+ Enabled: true
38
+
39
+ Style/Attr:
40
+ Description: "Checks for uses of Module#attr."
41
+ Enabled: true
42
+
43
+ Style/BeginBlock:
44
+ Description: "Avoid the use of BEGIN blocks."
45
+ Enabled: true
46
+
47
+ Style/BlockComments:
48
+ Description: "Do not use block comments."
49
+ Enabled: true
50
+
51
+ Metrics/BlockNesting:
52
+ Description: "Avoid excessive block nesting"
53
+ Enabled: true
54
+
55
+ Style/BlockDelimiters:
56
+ Description: >-
57
+ Avoid using {...} for multi-line blocks (multiline chaining is
58
+ always ugly).
59
+ Prefer {...} over do...end for single-line blocks.
60
+ Enabled: true
61
+
62
+ Style/BracesAroundHashParameters:
63
+ Description: "Enforce braces style inside hash parameters."
64
+ Enabled: true
65
+
66
+ Style/CaseEquality:
67
+ Description: "Avoid explicit use of the case equality operator(===)."
68
+ Enabled: true
69
+
70
+ Layout/CaseIndentation:
71
+ Description: "Indentation of when in a case/when/[else/]end."
72
+ Enabled: true
73
+
74
+ Style/CharacterLiteral:
75
+ Description: "Checks for uses of character literals."
76
+ Enabled: true
77
+
78
+ Naming:
79
+ Description: "Use CamelCase for classes and modules."
80
+ Enabled: true
81
+
82
+ Style/ClassAndModuleChildren:
83
+ Description: "Checks style of children classes and modules."
84
+ Enabled: true
85
+
86
+ Style/ClassCheck:
87
+ Description: "Enforces consistent use of `Object#is_a?` or `Object#kind_of?`."
88
+ Enabled: true
89
+
90
+ Style/ClassMethods:
91
+ Description: "Use self when defining module/class methods."
92
+ Enabled: true
93
+
94
+ Style/ClassVars:
95
+ Description: "Avoid the use of class variables."
96
+ Enabled: true
97
+
98
+ Style/CollectionMethods:
99
+ Description: "Preferred collection methods."
100
+ Enabled: true
101
+
102
+ Style/ColonMethodCall:
103
+ Description: "Do not use :: for method call."
104
+ Enabled: true
105
+
106
+ Style/CommentAnnotation:
107
+ Description: >-
108
+ Checks formatting of special comments
109
+ (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
110
+ Enabled: true
111
+
112
+ Layout/CommentIndentation:
113
+ Description: "Indentation of comments."
114
+ Enabled: true
115
+
116
+ Naming:
117
+ Description: "Constants should use SCREAMING_SNAKE_CASE."
118
+ Enabled: true
119
+
120
+ Style/DefWithParentheses:
121
+ Description: "Use def with parentheses when there are arguments."
122
+ Enabled: true
123
+
124
+ Style/PreferredHashMethods:
125
+ Description: "Checks for use of deprecated Hash methods."
126
+ Enabled: true
127
+
128
+ Style/Documentation:
129
+ Description: "Document classes and non-namespace modules."
130
+ Enabled: true
131
+
132
+ Layout/DotPosition:
133
+ Description: "Checks the position of the dot in multi-line method calls."
134
+ Enabled: true
135
+
136
+ Style/DoubleNegation:
137
+ Description: "Checks for uses of double negation (!!)."
138
+ Enabled: false
139
+
140
+ Style/EachWithObject:
141
+ Description: "Prefer `each_with_object` over `inject` or `reduce`."
142
+ Enabled: true
143
+
144
+ Layout/EmptyLineBetweenDefs:
145
+ Description: "Use empty lines between defs."
146
+ Enabled: true
147
+
148
+ Layout/EmptyLines:
149
+ Description: "Don't use several empty lines in a row."
150
+ Enabled: true
151
+
152
+ Layout/EmptyLinesAroundAccessModifier:
153
+ Description: "Keep blank lines around access modifiers."
154
+ Enabled: true
155
+
156
+ Layout/EmptyLinesAroundBlockBody:
157
+ Description: "Keeps track of empty lines around expression bodies."
158
+ Enabled: true
159
+
160
+ Layout/EmptyLinesAroundClassBody:
161
+ Description: "Keeps track of empty lines around expression classes."
162
+ Enabled: true
163
+
164
+ Layout/EmptyLinesAroundModuleBody:
165
+ Description: "Keeps track of empty lines around expression modules."
166
+ Enabled: true
167
+
168
+ Style/EmptyLiteral:
169
+ Description: "Prefer literals to Array.new/Hash.new/String.new."
170
+ Enabled: true
171
+
172
+ Style/EndBlock:
173
+ Description: "Avoid the use of END blocks."
174
+ Enabled: true
175
+
176
+ Layout/EndOfLine:
177
+ Description: "Use Unix-style line endings."
178
+ Enabled: true
179
+
180
+ Style/EvenOdd:
181
+ Description: "Favor the use of Fixnum#even? && Fixnum#odd?"
182
+ Enabled: true
183
+
184
+ Naming:
185
+ Description: "Use snake_case for source file names."
186
+ Enabled: true
187
+
188
+ Style/FlipFlop:
189
+ Description: "Checks for flip flops"
190
+ Enabled: true
191
+
192
+ Style/For:
193
+ Description: "Checks use of for or each in multiline loops."
194
+ Enabled: true
195
+
196
+ Style/FormatString:
197
+ Description: "Enforce the use of Kernel#sprintf, Kernel#format or String#%."
198
+ Enabled: true
199
+
200
+ Style/GlobalVars:
201
+ Description: "Do not introduce global variables."
202
+ Enabled: true
203
+
204
+ Style/GuardClause:
205
+ Description: "Check for conditionals that can be replaced with guard clauses"
206
+ Enabled: true
207
+
208
+ Style/HashSyntax:
209
+ Description: >-
210
+ Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
211
+ { :a => 1, :b => 2 }.
212
+ Enabled: true
213
+
214
+ Style/IfUnlessModifier:
215
+ Description: >-
216
+ Favor modifier if/unless usage when you have a
217
+ single-line body.
218
+ Enabled: true
219
+
220
+ Style/IfWithSemicolon:
221
+ Description: "Never use if x; .... Use the ternary operator instead."
222
+ Enabled: true
223
+
224
+ Layout/IndentationConsistency:
225
+ Description: "Keep indentation straight."
226
+ Enabled: true
227
+
228
+ Layout/IndentationWidth:
229
+ Description: "Use 2 spaces for indentation."
230
+ Enabled: true
231
+
232
+ Layout/IndentArray:
233
+ Description: >-
234
+ Checks the indentation of the first element in an array
235
+ literal.
236
+ Enabled: true
237
+
238
+ Layout/IndentHash:
239
+ Description: "Checks the indentation of the first key in a hash literal."
240
+ Enabled: true
241
+
242
+ Style/Lambda:
243
+ Description: "Use the new lambda literal syntax for single-line blocks."
244
+ Enabled: true
245
+
246
+ Style/LambdaCall:
247
+ Description: "Use lambda.call(...) instead of lambda.(...)."
248
+ Enabled: true
249
+
250
+ Layout/LeadingCommentSpace:
251
+ Description: "Comments should start with a space."
252
+ Enabled: true
253
+
254
+ Style/LineEndConcatenation:
255
+ Description: >-
256
+ Use \ instead of + or << to concatenate two string literals at
257
+ line end.
258
+ Enabled: true
259
+
260
+ Metrics/LineLength:
261
+ Description: "Limit lines to 80 characters."
262
+ Enabled: true
263
+
264
+ Style/MethodCallWithoutArgsParentheses:
265
+ Description: "Do not use parentheses for method calls with no arguments."
266
+ Enabled: true
267
+
268
+ Style/MethodDefParentheses:
269
+ Description: >-
270
+ Checks if the method definitions have or don"t have
271
+ parentheses.
272
+ Enabled: true
273
+
274
+ Naming:
275
+ Description: "Use the configured style when naming methods."
276
+ Enabled: true
277
+
278
+ Style/ModuleFunction:
279
+ Description: "Checks for usage of `extend self` in modules."
280
+ Enabled: true
281
+
282
+ Style/MultilineBlockChain:
283
+ Description: "Avoid multi-line chains of blocks."
284
+ Enabled: true
285
+
286
+ Style/MultilineIfThen:
287
+ Description: "Never use then for multi-line if/unless."
288
+ Enabled: true
289
+
290
+ Style/MultilineTernaryOperator:
291
+ Description: >-
292
+ Avoid multi-line ?: (the ternary operator);
293
+ use if/unless instead.
294
+ Enabled: true
295
+
296
+ Style/NegatedIf:
297
+ Description: >-
298
+ Favor unless over if for negative conditions
299
+ (or control flow or).
300
+ Enabled: true
301
+
302
+ Style/NegatedWhile:
303
+ Description: "Favor until over while for negative conditions."
304
+ Enabled: true
305
+
306
+ Style/NestedTernaryOperator:
307
+ Description: "Use one expression per branch in a ternary operator."
308
+ Enabled: true
309
+
310
+ Style/Next:
311
+ Description: "Use `next` to skip iteration instead of a condition at the end."
312
+ Enabled: true
313
+
314
+ Style/NilComparison:
315
+ Description: "Prefer x.nil? to x == nil."
316
+ Enabled: true
317
+
318
+ Style/NonNilCheck:
319
+ Description: "Checks for redundant nil checks."
320
+ Enabled: true
321
+
322
+ Style/Not:
323
+ Description: "Use ! instead of not."
324
+ Enabled: true
325
+
326
+ Style/NumericLiterals:
327
+ Description: >-
328
+ Add underscores to large numeric literals to improve their
329
+ readability.
330
+ Enabled: true
331
+
332
+ Style/OneLineConditional:
333
+ Description: >-
334
+ Favor the ternary operator(?:) over
335
+ if/then/else/end constructs.
336
+ Enabled: true
337
+
338
+ Naming/BinaryOperatorParameterName:
339
+ Description: "When defining binary operators, name the argument other."
340
+ Enabled: true
341
+
342
+ Style/ParenthesesAroundCondition:
343
+ Description: >-
344
+ Don't use parentheses around the condition of an
345
+ if/unless/while.
346
+ Enabled: true
347
+
348
+ Style/PercentLiteralDelimiters:
349
+ Description: "Use `%`-literal delimiters consistently"
350
+ Enabled: true
351
+
352
+ Style/PerlBackrefs:
353
+ Description: "Avoid Perl-style regex back references."
354
+ Enabled: true
355
+
356
+ Naming:
357
+ Description: "Check the names of predicate methods."
358
+ Enabled: true
359
+
360
+ Style/Proc:
361
+ Description: "Use proc instead of Proc.new."
362
+ Enabled: true
363
+
364
+ Style/RaiseArgs:
365
+ Description: "Checks the arguments passed to raise/fail."
366
+ Enabled: true
367
+
368
+ Style/RedundantBegin:
369
+ Description: "Don't use begin blocks when they are not needed."
370
+ Enabled: true
371
+
372
+ Style/RedundantException:
373
+ Description: "Checks for an obsolete RuntimeException argument in raise/fail."
374
+ Enabled: true
375
+
376
+ Style/RedundantReturn:
377
+ Description: "Don't use return where it's not required."
378
+ Enabled: true
379
+
380
+ Style/RedundantSelf:
381
+ Description: "Don't use self where it's not needed."
382
+ Enabled: true
383
+
384
+ Style/RegexpLiteral:
385
+ Description: >-
386
+ Use %r for regular expressions matching more than
387
+ `MaxSlashes` '/' characters.
388
+ Use %r only for regular expressions matching more than
389
+ `MaxSlashes` '/' character.
390
+ Enabled: true
391
+
392
+ Style/RescueModifier:
393
+ Description: "Avoid using rescue in its modifier form."
394
+ Enabled: true
395
+
396
+ Style/SelfAssignment:
397
+ Description: "Checks for places where self-assignment shorthand should have been used."
398
+ Enabled: true
399
+
400
+ Style/Semicolon:
401
+ Description: "Don't use semicolons to terminate expressions."
402
+ Enabled: true
403
+
404
+ Style/SignalException:
405
+ Description: "Checks for proper usage of fail and raise."
406
+ Enabled: true
407
+
408
+ Style/SingleLineBlockParams:
409
+ Description: "Enforces the names of some block params."
410
+ Enabled: false
411
+
412
+ Style/SingleLineMethods:
413
+ Description: "Avoid single-line methods."
414
+ Enabled: true
415
+
416
+ Layout/SpaceBeforeFirstArg:
417
+ Description: >-
418
+ Checks that exactly one space is used between a method name
419
+ and the first argument for method calls without parentheses.
420
+ Enabled: true
421
+
422
+ Layout/SpaceAfterColon:
423
+ Description: "Use spaces after colons."
424
+ Enabled: true
425
+
426
+ Layout/SpaceAfterComma:
427
+ Description: "Use spaces after commas."
428
+ Enabled: true
429
+
430
+ Layout/SpaceAroundKeyword:
431
+ Description: "Use spaces after if/elsif/unless/while/until/case/when."
432
+ Enabled: true
433
+
434
+ Layout/SpaceAfterMethodName:
435
+ Description: >-
436
+ Never put a space between a method name and the opening
437
+ parenthesis in a method definition.
438
+ Enabled: true
439
+
440
+ Layout/SpaceAfterNot:
441
+ Description: Tracks redundant space after the ! operator.
442
+ Enabled: true
443
+
444
+ Layout/SpaceAfterSemicolon:
445
+ Description: "Use spaces after semicolons."
446
+ Enabled: true
447
+
448
+ Layout/SpaceBeforeBlockBraces:
449
+ Description: >-
450
+ Checks that the left block brace has or doesn't have space
451
+ before it.
452
+ Enabled: true
453
+
454
+ Layout/SpaceBeforeComma:
455
+ Description: "No spaces before commas."
456
+ Enabled: true
457
+
458
+ Layout/SpaceBeforeComment:
459
+ Description: >-
460
+ Checks for missing space between code and a comment on the
461
+ same line.
462
+ Enabled: true
463
+
464
+ Layout/SpaceBeforeSemicolon:
465
+ Description: "No spaces before semicolons."
466
+ Enabled: true
467
+
468
+ Layout/SpaceInsideBlockBraces:
469
+ Description: >-
470
+ Checks that block braces have or don't have surrounding space.
471
+ For blocks taking parameters, checks that the left brace has
472
+ or doesn"t have trailing space.
473
+ Enabled: true
474
+ SpaceBeforeBlockParameters: false
475
+ EnforcedStyle: no_space
476
+
477
+ Layout/SpaceAroundEqualsInParameterDefault:
478
+ Description: >-
479
+ Checks that the equals signs in parameter default assignments
480
+ have or don't have surrounding space depending on
481
+ configuration.
482
+ Enabled: true
483
+
484
+ Layout/SpaceAroundOperators:
485
+ Description: "Use spaces around operators."
486
+ Enabled: true
487
+
488
+ Layout/SpaceAroundKeyword:
489
+ Description: "Put a space before the modifier keyword."
490
+ Enabled: true
491
+
492
+ Layout/SpaceInsideArrayLiteralBrackets:
493
+ Description: "No spaces after [ or before ]."
494
+ Enabled: true
495
+
496
+ Layout/SpaceInsideReferenceBrackets:
497
+ Enabled: true
498
+
499
+ Layout/SpaceInsideHashLiteralBraces:
500
+ Description: "Use spaces inside hash literal braces - or don't."
501
+ Enabled: true
502
+
503
+ Layout/SpaceInsideParens:
504
+ Description: "No spaces after ( or before )."
505
+ Enabled: true
506
+
507
+ Style/SpecialGlobalVars:
508
+ Description: "Avoid Perl-style global variables."
509
+ Enabled: true
510
+
511
+ Style/StringLiterals:
512
+ Description: "Checks if uses of quotes match the configured preference."
513
+ Enabled: true
514
+
515
+ Layout/Tab:
516
+ Description: "No hard tabs."
517
+ Enabled: true
518
+
519
+ Layout/TrailingBlankLines:
520
+ Description: "Checks trailing blank lines and final newline."
521
+ Enabled: true
522
+
523
+ Style/TrailingCommaInArrayLiteral:
524
+ Description: "Checks for trailing comma in parameter lists and literals."
525
+ Enabled: true
526
+
527
+ Style/TrailingCommaInHashLiteral:
528
+ Description: "Checks for trailing comma in parameter lists and literals."
529
+ Enabled: true
530
+
531
+ Layout/TrailingWhitespace:
532
+ Description: "Avoid trailing whitespace."
533
+ Enabled: true
534
+
535
+ Style/TrivialAccessors:
536
+ Description: "Prefer attr_* methods to trivial readers/writers."
537
+ Enabled: true
538
+
539
+ Style/UnlessElse:
540
+ Description: >-
541
+ Never use unless with else. Rewrite these with the positive
542
+ case first.
543
+ Enabled: true
544
+
545
+ Style/UnneededCapitalW:
546
+ Description: "Checks for %W when interpolation is not needed."
547
+ Enabled: true
548
+
549
+ Style/CommandLiteral:
550
+ Description: "Checks for %x when `` would do."
551
+ Enabled: true
552
+
553
+ Style/VariableInterpolation:
554
+ Description: >-
555
+ Don't interpolate global, instance and class variables
556
+ directly in strings.
557
+ Enabled: true
558
+
559
+ Naming:
560
+ Description: "Use the configured style when naming variables."
561
+ Enabled: true
562
+
563
+ Style/WhenThen:
564
+ Description: "Use when x then ... for one-line cases."
565
+ Enabled: true
566
+
567
+ Style/WhileUntilDo:
568
+ Description: "Checks for redundant do after while or until."
569
+ Enabled: true
570
+
571
+ Metrics/LineLength:
572
+ Description: >-
573
+ Favor modifier while/until usage when you have a
574
+ single-line body.
575
+ Enabled: true
576
+
577
+ Metrics/BlockLength:
578
+ Enabled: true
579
+ Exclude:
580
+ - app/controllers/concerns/swagger/*
581
+ - app/models/concerns/swagger/*
582
+ - app/models/logics/*/*
583
+ - lib/tasks/seed_data_v2.rake
584
+ - 'spec/**/*'
585
+
586
+ Metrics/AbcSize:
587
+ Description: >-
588
+ A calculated magnitude based on number of assignments,
589
+ branches, and conditions.
590
+ Reference: 'http://c2.com/cgi/wiki?AbcMetric'
591
+ Enabled: true
592
+ Exclude:
593
+ - app/controllers/concerns/swagger/*
594
+ - app/models/concerns/swagger/*
595
+ - app/models/logics/*/*
596
+ - lib/tasks/seed_data_v2.rake
597
+ - 'spec/**/*'
598
+ - 'lib/uiza/uiza_client.rb'
599
+ Max: 15
600
+
601
+ Style/WordArray:
602
+ Description: "Use %w or %W for arrays of words."
603
+ Enabled: true
604
+
605
+ #################### Lint ################################
606
+ ### Warnings
607
+
608
+ Lint/AmbiguousOperator:
609
+ Description: >-
610
+ Checks for ambiguous operators in the first argument of a
611
+ method invocation without parentheses.
612
+ Enabled: true
613
+
614
+ Lint/AmbiguousRegexpLiteral:
615
+ Description: >-
616
+ Checks for ambiguous regexp literals in the first argument of
617
+ a method invocation without parenthesis.
618
+ Enabled: true
619
+
620
+ Layout/BlockAlignment:
621
+ Description: "Align block ends correctly."
622
+ Enabled: true
623
+
624
+ Layout/ConditionPosition:
625
+ Description: "Checks for condition placed in a confusing position relative to the keyword."
626
+ Enabled: true
627
+
628
+ Lint/Debugger:
629
+ Description: "Check for debugger calls."
630
+ Enabled: true
631
+
632
+ Layout/DefEndAlignment:
633
+ Description: "Align ends corresponding to defs correctly."
634
+ Enabled: true
635
+
636
+ Lint/DeprecatedClassMethods:
637
+ Description: "Check for deprecated class method calls."
638
+ Enabled: true
639
+
640
+ Lint/ElseLayout:
641
+ Description: "Check for odd code arrangement in an else block."
642
+ Enabled: true
643
+
644
+ Lint/EmptyEnsure:
645
+ Description: "Checks for empty ensure block."
646
+ Enabled: true
647
+
648
+ Lint/EmptyInterpolation:
649
+ Description: "Checks for empty string interpolation."
650
+ Enabled: true
651
+
652
+ Layout/EndAlignment:
653
+ Description: "Align ends correctly."
654
+ Enabled: true
655
+
656
+ Lint/EndInMethod:
657
+ Description: "END blocks should not be placed inside method definitions."
658
+ Enabled: true
659
+
660
+ Lint/EnsureReturn:
661
+ Description: "Never use return in an ensure block."
662
+ Enabled: true
663
+
664
+ Security/Eval:
665
+ Description: "The use of eval represents a serious security risk."
666
+ Enabled: true
667
+
668
+ Lint/HandleExceptions:
669
+ Description: "Don't suppress exception."
670
+ Enabled: true
671
+
672
+ Lint/LiteralAsCondition:
673
+ Description: "Checks of literals used in conditions."
674
+ Enabled: true
675
+
676
+ Lint/LiteralInInterpolation:
677
+ Description: "Checks for literals used in interpolation."
678
+ Enabled: true
679
+
680
+ Lint/Loop:
681
+ Description: >-
682
+ Use Kernel#loop with break rather than begin/end/until or
683
+ begin/end/while for post-loop tests.
684
+ Enabled: true
685
+
686
+ Lint/ParenthesesAsGroupedExpression:
687
+ Description: >-
688
+ Checks for method calls with a space before the opening
689
+ parenthesis.
690
+ Enabled: true
691
+
692
+ Lint/RequireParentheses:
693
+ Description: >-
694
+ Use parentheses in the method call to avoid confusion
695
+ about precedence.
696
+ Enabled: true
697
+
698
+ Lint/RescueException:
699
+ Description: "Avoid rescuing the Exception class."
700
+ Enabled: true
701
+
702
+ Lint/ShadowingOuterLocalVariable:
703
+ Description: >-
704
+ Do not use the same name as outer local variable
705
+ for block arguments or block local variables.
706
+ Enabled: true
707
+
708
+ Layout/SpaceBeforeFirstArg:
709
+ Description: >-
710
+ Put a space between a method name and the first argument
711
+ in a method call without parentheses.
712
+ Enabled: true
713
+
714
+ Lint/StringConversionInInterpolation:
715
+ Description: "Checks for Object#to_s usage in string interpolation."
716
+ Enabled: true
717
+
718
+ Lint/UnderscorePrefixedVariableName:
719
+ Description: "Do not use prefix `_` for a variable that is used."
720
+ Enabled: true
721
+
722
+ Lint/UnusedBlockArgument:
723
+ Description: "Checks for unused block arguments."
724
+ Enabled: true
725
+
726
+ Lint/UnusedMethodArgument:
727
+ Description: "Checks for unused method arguments."
728
+ Enabled: true
729
+
730
+ Lint/UnreachableCode:
731
+ Description: "Unreachable code."
732
+ Enabled: true
733
+
734
+ Lint/UselessAccessModifier:
735
+ Description: "Checks for useless access modifiers."
736
+ Enabled: true
737
+
738
+ Lint/UselessAssignment:
739
+ Description: "Checks for useless assignment to a local variable."
740
+ Enabled: true
741
+
742
+ Lint/UselessComparison:
743
+ Description: "Checks for comparison of something with itself."
744
+ Enabled: true
745
+
746
+ Lint/UselessElseWithoutRescue:
747
+ Description: "Checks for useless `else` in `begin..end` without `rescue`."
748
+ Enabled: true
749
+
750
+ Lint/UselessSetterCall:
751
+ Description: "Checks for useless setter call to a local variable."
752
+ Enabled: true
753
+
754
+ Lint/Void:
755
+ Description: "Possible use of operator/literal/variable in void context."
756
+ Enabled: true
757
+
758
+ ##################### Rails ##################################
759
+
760
+ Rails/ActionFilter:
761
+ Description: "Enforces consistent use of action filter methods."
762
+ Enabled: true
763
+
764
+ Rails/Delegate:
765
+ Description: "Prefer delegate method for delegations."
766
+ Enabled: true
767
+
768
+ Rails/HasAndBelongsToMany:
769
+ Description: "Prefer has_many :through to has_and_belongs_to_many."
770
+ Enabled: true
771
+
772
+ Rails/Output:
773
+ Description: "Checks for calls to puts, print, etc."
774
+ Enabled: true
775
+
776
+ Rails/ReadWriteAttribute:
777
+ Description: "Checks for read_attribute(:attr) and write_attribute(:attr, val)."
778
+ Enabled: true
779
+
780
+ Rails/ScopeArgs:
781
+ Description: "Checks the arguments of ActiveRecord scopes."
782
+ Enabled: true
783
+
784
+ Rails/Validation:
785
+ Description: "Use sexy validations."
786
+ Enabled: true