motaword 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: eb13e58a0b156679350dfe008c353c5f26f8aa84
4
+ data.tar.gz: 9e9383d48f136c475f3a5f4c6b45f6f51a2af0b8
5
+ SHA512:
6
+ metadata.gz: d98a70bed7e6b2f1fb7d1ead0793f6d6ec6f244e9f892ba565d839d0ed52c1a0a9061b0d3dcb95fc7c3c712b407e37231cfb375cc87c88a81c793eae9535830c
7
+ data.tar.gz: 089bf762126958548ffbbf6fe5b2450791afb7d68c885d4cb720267ef9fde480a57126e69cb17d52cf418fc3849db874df4dca2f9cc16052d5b220ffb0e7c723
@@ -0,0 +1,3 @@
1
+ # User-specific stuff:
2
+ .idea/**
3
+ *.gem
@@ -0,0 +1,1205 @@
1
+ AllCops:
2
+ DisabledByDefault: false
3
+ TargetRubyVersion: 2.4
4
+
5
+ #################### Security ############################
6
+
7
+ Security/Eval:
8
+ Description: 'The use of eval represents a serious security risk.'
9
+ Enabled: true
10
+
11
+ #################### Lint ################################
12
+
13
+ Lint/AmbiguousOperator:
14
+ Description: >-
15
+ Checks for ambiguous operators in the first argument of a
16
+ method invocation without parentheses.
17
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
18
+ Enabled: true
19
+
20
+ Lint/AmbiguousRegexpLiteral:
21
+ Description: >-
22
+ Checks for ambiguous regexp literals in the first argument of
23
+ a method invocation without parenthesis.
24
+ Enabled: true
25
+
26
+ Lint/AmbiguousBlockAssociation:
27
+ Description: This cop checks for ambiguous block association with method when param passed without parentheses.
28
+ Enabled: false
29
+
30
+ Lint/AssignmentInCondition:
31
+ Description: "Don't use assignment in conditions."
32
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
33
+ Enabled: true
34
+
35
+ Lint/BlockAlignment:
36
+ Description: 'Align block ends correctly.'
37
+ Enabled: true
38
+
39
+ Lint/CircularArgumentReference:
40
+ Description: "Don't refer to the keyword argument in the default value."
41
+ Enabled: true
42
+
43
+ Lint/ConditionPosition:
44
+ Description: >-
45
+ Checks for condition placed in a confusing position relative to
46
+ the keyword.
47
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
48
+ Enabled: true
49
+
50
+ Lint/Debugger:
51
+ Description: 'Check for debugger calls.'
52
+ Enabled: true
53
+
54
+ Lint/DefEndAlignment:
55
+ Description: 'Align ends corresponding to defs correctly.'
56
+ Enabled: true
57
+
58
+ Lint/DeprecatedClassMethods:
59
+ Description: 'Check for deprecated class method calls.'
60
+ Enabled: true
61
+
62
+ Lint/DuplicateMethods:
63
+ Description: 'Check for duplicate methods calls.'
64
+ Enabled: true
65
+
66
+ Lint/EachWithObjectArgument:
67
+ Description: 'Check for immutable argument given to each_with_object.'
68
+ Enabled: true
69
+
70
+ Lint/ElseLayout:
71
+ Description: 'Check for odd code arrangement in an else block.'
72
+ Enabled: true
73
+
74
+ Lint/EmptyEnsure:
75
+ Description: 'Checks for empty ensure block.'
76
+ Enabled: true
77
+
78
+ Lint/EmptyInterpolation:
79
+ Description: 'Checks for empty string interpolation.'
80
+ Enabled: true
81
+
82
+ Lint/EndAlignment:
83
+ Description: 'Align ends correctly.'
84
+ Enabled: true
85
+
86
+ Lint/EndInMethod:
87
+ Description: 'END blocks should not be placed inside method definitions.'
88
+ Enabled: true
89
+
90
+ Lint/EnsureReturn:
91
+ Description: 'Do not use return in an ensure block.'
92
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
93
+ Enabled: true
94
+
95
+ Lint/FormatParameterMismatch:
96
+ Description: 'The number of parameters to format/sprint must match the fields.'
97
+ Enabled: true
98
+
99
+ Lint/HandleExceptions:
100
+ Description: "Don't suppress exception."
101
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
102
+ Enabled: true
103
+
104
+ Lint/InvalidCharacterLiteral:
105
+ Description: >-
106
+ Checks for invalid character literals with a non-escaped
107
+ whitespace character.
108
+ Enabled: true
109
+
110
+ Lint/LiteralInCondition:
111
+ Description: 'Checks of literals used in conditions.'
112
+ Enabled: true
113
+
114
+ Lint/LiteralInInterpolation:
115
+ Description: 'Checks for literals used in interpolation.'
116
+ Enabled: true
117
+
118
+ Lint/Loop:
119
+ Description: >-
120
+ Use Kernel#loop with break rather than begin/end/until or
121
+ begin/end/while for post-loop tests.
122
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
123
+ Enabled: true
124
+
125
+ Lint/NestedMethodDefinition:
126
+ Description: 'Do not use nested method definitions.'
127
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
128
+ Enabled: true
129
+
130
+ Lint/NonLocalExitFromIterator:
131
+ Description: 'Do not use return in iterator to cause non-local exit.'
132
+ Enabled: true
133
+
134
+ Lint/ParenthesesAsGroupedExpression:
135
+ Description: >-
136
+ Checks for method calls with a space before the opening
137
+ parenthesis.
138
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
139
+ Enabled: true
140
+
141
+ Lint/RequireParentheses:
142
+ Description: >-
143
+ Use parentheses in the method call to avoid confusion
144
+ about precedence.
145
+ Enabled: true
146
+
147
+ Lint/RescueException:
148
+ Description: 'Avoid rescuing the Exception class.'
149
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
150
+ Enabled: true
151
+
152
+ Lint/ShadowingOuterLocalVariable:
153
+ Description: >-
154
+ Do not use the same name as outer local variable
155
+ for block arguments or block local variables.
156
+ Enabled: true
157
+
158
+ Lint/StringConversionInInterpolation:
159
+ Description: 'Checks for Object#to_s usage in string interpolation.'
160
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
161
+ Enabled: true
162
+
163
+ Lint/UnderscorePrefixedVariableName:
164
+ Description: 'Do not use prefix `_` for a variable that is used.'
165
+ Enabled: true
166
+
167
+ Lint/UnneededDisable:
168
+ Description: >-
169
+ Checks for rubocop:disable comments that can be removed.
170
+ Note: this cop is not disabled when disabling all cops.
171
+ It must be explicitly disabled.
172
+ Enabled: true
173
+
174
+ Lint/UnusedBlockArgument:
175
+ Description: 'Checks for unused block arguments.'
176
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
177
+ Enabled: true
178
+
179
+ Lint/UnusedMethodArgument:
180
+ Description: 'Checks for unused method arguments.'
181
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
182
+ Enabled: true
183
+
184
+ Lint/UnreachableCode:
185
+ Description: 'Unreachable code.'
186
+ Enabled: true
187
+
188
+ Lint/UselessAccessModifier:
189
+ Description: 'Checks for useless access modifiers.'
190
+ Enabled: true
191
+
192
+ Lint/UselessAssignment:
193
+ Description: 'Checks for useless assignment to a local variable.'
194
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
195
+ Enabled: true
196
+
197
+ Lint/UselessComparison:
198
+ Description: 'Checks for comparison of something with itself.'
199
+ Enabled: true
200
+
201
+ Lint/UselessElseWithoutRescue:
202
+ Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
203
+ Enabled: true
204
+
205
+ Lint/UselessSetterCall:
206
+ Description: 'Checks for useless setter call to a local variable.'
207
+ Enabled: true
208
+
209
+ Lint/Void:
210
+ Description: 'Possible use of operator/literal/variable in void context.'
211
+ Enabled: true
212
+
213
+ ###################### Metrics ####################################
214
+
215
+ Metrics/AbcSize:
216
+ Description: >-
217
+ A calculated magnitude based on number of assignments,
218
+ branches, and conditions.
219
+ Reference: 'http://c2.com/cgi/wiki?AbcMetric'
220
+ Enabled: false
221
+ Max: 20
222
+
223
+ Metics/BlockLength:
224
+ Description: >-
225
+ This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be
226
+ ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed
227
+ to certain methods.
228
+ Enabled: true
229
+ Exclude:
230
+ - 'Rakefile'
231
+ - '**/*.rake'
232
+ - 'spec/**/*.rb'
233
+ - 'no_rails_spec/**/*.rb'
234
+ - 'features/**/*.feature'
235
+ - '**/routes.rb'
236
+
237
+ Metrics/BlockNesting:
238
+ Description: 'Avoid excessive block nesting'
239
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
240
+ Enabled: true
241
+ Max: 4
242
+
243
+ Metrics/ClassLength:
244
+ Description: 'Avoid classes longer than 250 lines of code.'
245
+ Enabled: true
246
+ Max: 250
247
+
248
+ Metrics/CyclomaticComplexity:
249
+ Description: >-
250
+ A complexity metric that is strongly correlated to the number
251
+ of test cases needed to validate a method.
252
+ Enabled: true
253
+
254
+ Metrics/LineLength:
255
+ Description: 'Limit lines to 80 characters.'
256
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
257
+ Enabled: false
258
+
259
+ Metrics/MethodLength:
260
+ Description: 'Avoid methods longer than 30 lines of code.'
261
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
262
+ Enabled: true
263
+ Max: 30
264
+
265
+ Metrics/ModuleLength:
266
+ Description: 'Avoid modules longer than 250 lines of code.'
267
+ Enabled: true
268
+ Max: 250
269
+
270
+ Metrics/ParameterLists:
271
+ Description: 'Avoid parameter lists longer than three or four parameters.'
272
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
273
+ Enabled: true
274
+
275
+ Metrics/PerceivedComplexity:
276
+ Description: >-
277
+ A complexity metric geared towards measuring complexity for a
278
+ human reader.
279
+ Enabled: false
280
+
281
+ ##################### Performance #############################
282
+
283
+ Performance/Count:
284
+ Description: >-
285
+ Use `count` instead of `select...size`, `reject...size`,
286
+ `select...count`, `reject...count`, `select...length`,
287
+ and `reject...length`.
288
+ Enabled: true
289
+
290
+ Performance/Detect:
291
+ Description: >-
292
+ Use `detect` instead of `select.first`, `find_all.first`,
293
+ `select.last`, and `find_all.last`.
294
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
295
+ Enabled: true
296
+
297
+ Performance/FlatMap:
298
+ Description: >-
299
+ Use `Enumerable#flat_map`
300
+ instead of `Enumerable#map...Array#flatten(1)`
301
+ or `Enumberable#collect..Array#flatten(1)`
302
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
303
+ Enabled: true
304
+ EnabledForFlattenWithoutParams: false
305
+ # If enabled, this cop will warn about usages of
306
+ # `flatten` being called without any parameters.
307
+ # This can be dangerous since `flat_map` will only flatten 1 level, and
308
+ # `flatten` without any parameters can flatten multiple levels.
309
+
310
+ Performance/ReverseEach:
311
+ Description: 'Use `reverse_each` instead of `reverse.each`.'
312
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
313
+ Enabled: true
314
+
315
+ Performance/Sample:
316
+ Description: >-
317
+ Use `sample` instead of `shuffle.first`,
318
+ `shuffle.last`, and `shuffle[Fixnum]`.
319
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
320
+ Enabled: true
321
+
322
+ Performance/Size:
323
+ Description: >-
324
+ Use `size` instead of `count` for counting
325
+ the number of elements in `Array` and `Hash`.
326
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
327
+ Enabled: true
328
+
329
+ Performance/StringReplacement:
330
+ Description: >-
331
+ Use `tr` instead of `gsub` when you are replacing the same
332
+ number of characters. Use `delete` instead of `gsub` when
333
+ you are deleting characters.
334
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
335
+ Enabled: true
336
+
337
+ ##################### Rails ##################################
338
+
339
+ Rails/ActionFilter:
340
+ Description: 'Enforces consistent use of action filter methods.'
341
+ Enabled: false
342
+
343
+ Rails/Date:
344
+ Description: >-
345
+ Checks the correct usage of date aware methods,
346
+ such as Date.today, Date.current etc.
347
+ Enabled: true
348
+
349
+ Rails/Delegate:
350
+ Description: 'Prefer delegate method for delegations.'
351
+ Enabled: false
352
+
353
+ Rails/FindBy:
354
+ Description: 'Prefer find_by over where.first.'
355
+ Enabled: false
356
+
357
+ Rails/FindEach:
358
+ Description: 'Prefer all.find_each over all.find.'
359
+ Enabled: false
360
+
361
+ Rails/HasAndBelongsToMany:
362
+ Description: 'Prefer has_many :through to has_and_belongs_to_many.'
363
+ Enabled: false
364
+
365
+ Rails/Output:
366
+ Description: 'Checks for calls to puts, print, etc.'
367
+ Enabled: true
368
+
369
+ Rails/ReadWriteAttribute:
370
+ Description: >-
371
+ Checks for read_attribute(:attr) and
372
+ write_attribute(:attr, val).
373
+ Enabled: false
374
+
375
+ Rails/ScopeArgs:
376
+ Description: 'Checks the arguments of ActiveRecord scopes.'
377
+ Enabled: false
378
+
379
+ Rails/TimeZone:
380
+ Description: 'Checks the correct usage of time zone aware methods.'
381
+ StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
382
+ Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
383
+ Enabled: false
384
+
385
+ Rails/Validation:
386
+ Description: 'Use validates :attribute, hash of validations.'
387
+ Enabled: false
388
+
389
+ ################## Style #################################
390
+
391
+ Style/AccessModifierIndentation:
392
+ Description: Check indentation of private/protected visibility modifiers.
393
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
394
+ Enabled: true
395
+
396
+ Style/AccessorMethodName:
397
+ Description: Check the naming of accessor methods for get_/set_.
398
+ Enabled: true
399
+
400
+ Style/Alias:
401
+ Description: 'Use alias_method instead of alias.'
402
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
403
+ Enabled: true
404
+
405
+ Style/AlignArray:
406
+ Description: >-
407
+ Align the elements of an array literal if they span more than
408
+ one line.
409
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
410
+ Enabled: true
411
+
412
+ Style/AlignHash:
413
+ Description: >-
414
+ Align the elements of a hash literal if they span more than
415
+ one line.
416
+ Enabled: true
417
+
418
+ Style/AlignParameters:
419
+ Description: >-
420
+ Align the parameters of a method call if they span more
421
+ than one line.
422
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
423
+ Enabled: true
424
+
425
+ Style/AndOr:
426
+ Description: 'Use &&/|| instead of and/or.'
427
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
428
+ Enabled: true
429
+
430
+ Style/ArrayJoin:
431
+ Description: 'Use Array#join instead of Array#*.'
432
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
433
+ Enabled: true
434
+
435
+ Style/AsciiComments:
436
+ Description: 'Use only ascii symbols in comments.'
437
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
438
+ Enabled: true
439
+
440
+ Style/AsciiIdentifiers:
441
+ Description: 'Use only ascii symbols in identifiers.'
442
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
443
+ Enabled: true
444
+
445
+ Style/Attr:
446
+ Description: 'Checks for uses of Module#attr.'
447
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
448
+ Enabled: true
449
+
450
+ Style/BeginBlock:
451
+ Description: 'Avoid the use of BEGIN blocks.'
452
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
453
+ Enabled: true
454
+
455
+ Style/BarePercentLiterals:
456
+ Description: 'Checks if usage of %() or %Q() matches configuration.'
457
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
458
+ Enabled: true
459
+
460
+ Style/BlockComments:
461
+ Description: 'Do not use block comments.'
462
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
463
+ Enabled: true
464
+
465
+ Style/BlockEndNewline:
466
+ Description: 'Put end statement of multiline block on its own line.'
467
+ Enabled: true
468
+
469
+ Style/BlockDelimiters:
470
+ Description: >-
471
+ Avoid using {...} for multi-line blocks (multiline chaining is
472
+ always ugly).
473
+ Prefer {...} over do...end for single-line blocks.
474
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
475
+ Enabled: true
476
+
477
+ Style/BracesAroundHashParameters:
478
+ Description: 'Enforce braces style around hash parameters.'
479
+ Enabled: true
480
+
481
+ Style/CaseEquality:
482
+ Description: 'Avoid explicit use of the case equality operator(===).'
483
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
484
+ Enabled: true
485
+
486
+ Style/CaseIndentation:
487
+ Description: 'Indentation of when in a case/when/[else/]end.'
488
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
489
+ Enabled: true
490
+
491
+ Style/CharacterLiteral:
492
+ Description: 'Checks for uses of character literals.'
493
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
494
+ Enabled: true
495
+
496
+ Style/ClassAndModuleCamelCase:
497
+ Description: 'Use CamelCase for classes and modules.'
498
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
499
+ Enabled: true
500
+
501
+ Style/ClassAndModuleChildren:
502
+ Description: 'Checks style of children classes and modules.'
503
+ Enabled: true
504
+
505
+ Style/ClassCheck:
506
+ Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
507
+ Enabled: true
508
+
509
+ Style/ClassMethods:
510
+ Description: 'Use self when defining module/class methods.'
511
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-class-methods'
512
+ Enabled: true
513
+
514
+ Style/ClassVars:
515
+ Description: 'Avoid the use of class variables.'
516
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
517
+ Enabled: true
518
+
519
+ Style/ClosingParenthesisIndentation:
520
+ Description: 'Checks the indentation of hanging closing parentheses.'
521
+ Enabled: true
522
+
523
+ Style/ColonMethodCall:
524
+ Description: 'Do not use :: for method call.'
525
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
526
+ Enabled: true
527
+
528
+ Style/CommandLiteral:
529
+ Description: 'Use `` or %x around command literals.'
530
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
531
+ Enabled: true
532
+
533
+ Style/CommentAnnotation:
534
+ Description: >-
535
+ Checks formatting of special comments
536
+ (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
537
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
538
+ Enabled: true
539
+
540
+ Style/CommentIndentation:
541
+ Description: 'Indentation of comments.'
542
+ Enabled: true
543
+
544
+ Style/ConstantName:
545
+ Description: 'Constants should use SCREAMING_SNAKE_CASE.'
546
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
547
+ Enabled: true
548
+
549
+ Style/DefWithParentheses:
550
+ Description: 'Use def with parentheses when there are arguments.'
551
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
552
+ Enabled: true
553
+
554
+ Style/DeprecatedHashMethods:
555
+ Description: 'Checks for use of deprecated Hash methods.'
556
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
557
+ Enabled: true
558
+
559
+ Style/Documentation:
560
+ Description: 'Document classes and non-namespace modules.'
561
+ Enabled: false
562
+
563
+ Style/DotPosition:
564
+ Description: 'Checks the position of the dot in multi-line method calls.'
565
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
566
+ Enabled: true
567
+
568
+ Style/DoubleNegation:
569
+ Description: 'Checks for uses of double negation (!!).'
570
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
571
+ Enabled: true
572
+
573
+ Style/EachWithObject:
574
+ Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
575
+ Enabled: true
576
+
577
+ Style/ElseAlignment:
578
+ Description: 'Align elses and elsifs correctly.'
579
+ Enabled: true
580
+
581
+ Style/EmptyElse:
582
+ Description: 'Avoid empty else-clauses.'
583
+ Enabled: true
584
+
585
+ Style/EmptyLineBetweenDefs:
586
+ Description: 'Use empty lines between defs.'
587
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
588
+ Enabled: true
589
+
590
+ Style/EmptyLines:
591
+ Description: "Don't use several empty lines in a row."
592
+ Enabled: true
593
+
594
+ Style/EmptyLinesAroundAccessModifier:
595
+ Description: "Keep blank lines around access modifiers."
596
+ Enabled: true
597
+
598
+ Style/EmptyLinesAroundBlockBody:
599
+ Description: "Keeps track of empty lines around block bodies."
600
+ Enabled: true
601
+
602
+ Style/EmptyLinesAroundClassBody:
603
+ Description: "Keeps track of empty lines around class bodies."
604
+ Enabled: true
605
+
606
+ Style/EmptyLinesAroundModuleBody:
607
+ Description: "Keeps track of empty lines around module bodies."
608
+ Enabled: true
609
+
610
+ Style/EmptyLinesAroundMethodBody:
611
+ Description: "Keeps track of empty lines around method bodies."
612
+ Enabled: true
613
+
614
+ Style/EmptyLiteral:
615
+ Description: 'Prefer literals to Array.new/Hash.new/String.new.'
616
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
617
+ Enabled: true
618
+
619
+ Style/EndBlock:
620
+ Description: 'Avoid the use of END blocks.'
621
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
622
+ Enabled: true
623
+
624
+ Style/EndOfLine:
625
+ Description: 'Use Unix-style line endings.'
626
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
627
+ Enabled: true
628
+
629
+ Style/EvenOdd:
630
+ Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
631
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
632
+ Enabled: true
633
+
634
+ Style/ExtraSpacing:
635
+ Description: 'Do not use unnecessary spacing.'
636
+ Enabled: true
637
+
638
+ Style/FileName:
639
+ Description: 'Use snake_case for source file names.'
640
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
641
+ Enabled: true
642
+
643
+ Style/FrozenStringLiteralComment:
644
+ Description: >-
645
+ This cop is designed to help upgrade to Ruby 3.0. It will add the comment `# frozen_string_literal: true` to the
646
+ top of files to enable frozen string literals. Frozen string literals will be default in Ruby 3.0. The comment will
647
+ be added below a shebang and encoding comment. The frozen string literal comment is only valid in Ruby 2.3+.
648
+ Enabled: false
649
+
650
+ Style/InitialIndentation:
651
+ Description: >-
652
+ Checks the indentation of the first non-blank non-comment line in a file.
653
+ Enabled: true
654
+
655
+ Style/FirstParameterIndentation:
656
+ Description: 'Checks the indentation of the first parameter in a method call.'
657
+ Enabled: true
658
+
659
+ Style/FlipFlop:
660
+ Description: 'Checks for flip flops'
661
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
662
+ Enabled: true
663
+
664
+ Style/For:
665
+ Description: 'Checks use of for or each in multiline loops.'
666
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
667
+ Enabled: true
668
+
669
+ Style/FormatString:
670
+ Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
671
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
672
+ Enabled: true
673
+
674
+ Style/GlobalVars:
675
+ Description: 'Do not introduce global variables.'
676
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
677
+ Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
678
+ Enabled: true
679
+
680
+ Style/GuardClause:
681
+ Description: 'Check for conditionals that can be replaced with guard clauses'
682
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
683
+ Enabled: true
684
+
685
+ Style/HashSyntax:
686
+ Description: >-
687
+ Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
688
+ { :a => 1, :b => 2 }.
689
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
690
+ Enabled: true
691
+
692
+ Style/IfUnlessModifier:
693
+ Description: >-
694
+ Favor modifier if/unless usage when you have a
695
+ single-line body.
696
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
697
+ Enabled: true
698
+
699
+ Style/IfWithSemicolon:
700
+ Description: 'Do not use if x; .... Use the ternary operator instead.'
701
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
702
+ Enabled: true
703
+
704
+ Style/IndentationConsistency:
705
+ Description: 'Keep indentation straight.'
706
+ Enabled: true
707
+
708
+ Style/IndentationWidth:
709
+ Description: 'Use 2 spaces for indentation.'
710
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
711
+ Enabled: false
712
+
713
+ Style/IndentArray:
714
+ Description: >-
715
+ Checks the indentation of the first element in an array
716
+ literal.
717
+ Enabled: true
718
+
719
+ Style/IndentHash:
720
+ Description: 'Checks the indentation of the first key in a hash literal.'
721
+ Enabled: true
722
+
723
+ Style/InfiniteLoop:
724
+ Description: 'Use Kernel#loop for infinite loops.'
725
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
726
+ Enabled: true
727
+
728
+ Style/Lambda:
729
+ Description: 'Use the new lambda literal syntax for single-line blocks.'
730
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
731
+ Enabled: false
732
+ DisabledBecause: "See: https://github.com/bbatsov/rubocop/issues/1520"
733
+
734
+ Style/LambdaCall:
735
+ Description: 'Use lambda.call(...) instead of lambda.(...).'
736
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
737
+ Enabled: true
738
+
739
+ Style/LeadingCommentSpace:
740
+ Description: 'Comments should start with a space.'
741
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
742
+ Enabled: true
743
+
744
+ Style/LineEndConcatenation:
745
+ Description: >-
746
+ Use \ instead of + or << to concatenate two string literals at
747
+ line end.
748
+ Enabled: true
749
+
750
+ Style/MethodCallWithoutArgsParentheses:
751
+ Description: 'Do not use parentheses for method calls with no arguments.'
752
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
753
+ Enabled: true
754
+
755
+ Style/MethodDefParentheses:
756
+ Description: >-
757
+ Checks if the method definitions have or don't have
758
+ parentheses.
759
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
760
+ Enabled: true
761
+
762
+ Style/MethodName:
763
+ Description: 'Use the configured style when naming methods.'
764
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
765
+ Enabled: true
766
+
767
+ Style/ModuleFunction:
768
+ Description: 'Checks for usage of `extend self` in modules.'
769
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
770
+ Enabled: true
771
+
772
+ Style/MultilineBlockChain:
773
+ Description: 'Avoid multi-line chains of blocks.'
774
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
775
+ Enabled: true
776
+
777
+ Style/MultilineBlockLayout:
778
+ Description: 'Ensures newlines after multiline block do statements.'
779
+ Enabled: true
780
+
781
+ Style/MultilineIfThen:
782
+ Description: 'Do not use then for multi-line if/unless.'
783
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
784
+ Enabled: true
785
+
786
+ Style/MultilineOperationIndentation:
787
+ Description: >-
788
+ Checks indentation of binary operations that span more than
789
+ one line.
790
+ Enabled: true
791
+
792
+ Style/MultilineTernaryOperator:
793
+ Description: >-
794
+ Avoid multi-line ?: (the ternary operator);
795
+ use if/unless instead.
796
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
797
+ Enabled: true
798
+
799
+ Style/NegatedIf:
800
+ Description: >-
801
+ Favor unless over if for negative conditions
802
+ (or control flow or).
803
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
804
+ Enabled: true
805
+
806
+ Style/NegatedWhile:
807
+ Description: 'Favor until over while for negative conditions.'
808
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
809
+ Enabled: true
810
+
811
+ Style/NestedTernaryOperator:
812
+ Description: 'Use one expression per branch in a ternary operator.'
813
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
814
+ Enabled: true
815
+
816
+ Style/Next:
817
+ Description: 'Use `next` to skip iteration instead of a condition at the end.'
818
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
819
+ Enabled: true
820
+
821
+ Style/NilComparison:
822
+ Description: 'Prefer x.nil? to x == nil.'
823
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
824
+ Enabled: true
825
+
826
+ Style/NonNilCheck:
827
+ Description: 'Checks for redundant nil checks.'
828
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
829
+ Enabled: true
830
+
831
+ Style/Not:
832
+ Description: 'Use ! instead of not.'
833
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
834
+ Enabled: true
835
+
836
+ Style/NumericLiterals:
837
+ Description: >-
838
+ Add underscores to large numeric literals to improve their
839
+ readability.
840
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
841
+ Enabled: true
842
+
843
+ Style/OneLineConditional:
844
+ Description: >-
845
+ Favor the ternary operator(?:) over
846
+ if/then/else/end constructs.
847
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
848
+ Enabled: true
849
+
850
+ Style/OpMethod:
851
+ Description: 'When defining binary operators, name the argument other.'
852
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
853
+ Enabled: true
854
+
855
+ Style/OptionalArguments:
856
+ Description: >-
857
+ Checks for optional arguments that do not appear at the end
858
+ of the argument list
859
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#optional-arguments'
860
+ Enabled: true
861
+
862
+ Style/ParallelAssignment:
863
+ Description: >-
864
+ Check for simple usages of parallel assignment.
865
+ It will only warn when the number of variables
866
+ matches on both sides of the assignment.
867
+ This also provides performance benefits
868
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parallel-assignment'
869
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#parallel-assignment-vs-sequential-assignment-code'
870
+ Enabled: true
871
+
872
+ Style/ParenthesesAroundCondition:
873
+ Description: >-
874
+ Don't use parentheses around the condition of an
875
+ if/unless/while.
876
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
877
+ Enabled: true
878
+
879
+ Style/PercentLiteralDelimiters:
880
+ Description: 'Use `%`-literal delimiters consistently'
881
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
882
+ Enabled: true
883
+ PreferredDelimiters:
884
+ default: []
885
+ '%i': '[]'
886
+ '%I': '[]'
887
+ '%r': '{}'
888
+ '%w': '[]'
889
+ '%W': '[]'
890
+
891
+ Style/PercentQLiterals:
892
+ Description: 'Checks if uses of %Q/%q match the configured preference.'
893
+ Enabled: true
894
+
895
+ Style/PerlBackrefs:
896
+ Description: 'Avoid Perl-style regex back references.'
897
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
898
+ Enabled: true
899
+
900
+ Style/PredicateName:
901
+ Description: 'Check the names of predicate methods.'
902
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
903
+ Enabled: true
904
+
905
+ Style/Proc:
906
+ Description: 'Use proc instead of Proc.new.'
907
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
908
+ Enabled: true
909
+
910
+ Style/RaiseArgs:
911
+ Description: 'Checks the arguments passed to raise/fail.'
912
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
913
+ Enabled: true
914
+
915
+ Style/RedundantBegin:
916
+ Description: "Don't use begin blocks when they are not needed."
917
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
918
+ Enabled: true
919
+
920
+ Style/RedundantException:
921
+ Description: "Checks for an obsolete RuntimeException argument in raise/fail."
922
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
923
+ Enabled: true
924
+
925
+ Style/RedundantReturn:
926
+ Description: "Don't use return where it's not required."
927
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
928
+ Enabled: true
929
+
930
+ Style/RedundantSelf:
931
+ Description: "Don't use self where it's not needed."
932
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
933
+ Enabled: true
934
+
935
+ Style/RegexpLiteral:
936
+ Description: 'Use / or %r around regular expressions.'
937
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
938
+ Enabled: true
939
+
940
+ Style/RescueEnsureAlignment:
941
+ Description: 'Align rescues and ensures correctly.'
942
+ Enabled: true
943
+
944
+ Style/RescueModifier:
945
+ Description: 'Avoid using rescue in its modifier form.'
946
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
947
+ Enabled: true
948
+
949
+ Style/SelfAssignment:
950
+ Description: >-
951
+ Checks for places where self-assignment shorthand should have
952
+ been used.
953
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
954
+ Enabled: true
955
+
956
+ Style/Semicolon:
957
+ Description: "Don't use semicolons to terminate expressions."
958
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
959
+ Enabled: true
960
+
961
+ Style/SignalException:
962
+ Description: 'Checks for proper usage of fail and raise.'
963
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
964
+ Enabled: true
965
+
966
+ Style/SingleLineBlockParams:
967
+ Description: 'Enforces the names of some block params.'
968
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
969
+ Enabled: true
970
+
971
+ Style/SingleLineMethods:
972
+ Description: 'Avoid single-line methods.'
973
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
974
+ Enabled: false
975
+
976
+ Style/SpaceBeforeFirstArg:
977
+ Description: >-
978
+ Checks that exactly one space is used between a method name
979
+ and the first argument for method calls without parentheses.
980
+ Enabled: true
981
+
982
+ Style/SpaceAfterColon:
983
+ Description: 'Use spaces after colons.'
984
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
985
+ Enabled: true
986
+
987
+ Style/SpaceAfterComma:
988
+ Description: 'Use spaces after commas.'
989
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
990
+ Enabled: true
991
+
992
+ Style/SpaceAroundKeyword:
993
+ Description: 'Use spaces after if/elsif/unless/while/until/case/when.'
994
+ Enabled: true
995
+
996
+ Style/SpaceAfterMethodName:
997
+ Description: >-
998
+ Do not put a space between a method name and the opening
999
+ parenthesis in a method definition.
1000
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
1001
+ Enabled: true
1002
+
1003
+ Style/SpaceAfterNot:
1004
+ Description: Tracks redundant space after the ! operator.
1005
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
1006
+ Enabled: true
1007
+
1008
+ Style/SpaceAfterSemicolon:
1009
+ Description: 'Use spaces after semicolons.'
1010
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
1011
+ Enabled: true
1012
+
1013
+ Style/SpaceBeforeBlockBraces:
1014
+ Description: >-
1015
+ Checks that the left block brace has or doesn't have space
1016
+ before it.
1017
+ Enabled: true
1018
+
1019
+ Style/SpaceBeforeComma:
1020
+ Description: 'No spaces before commas.'
1021
+ Enabled: true
1022
+
1023
+ Style/SpaceBeforeComment:
1024
+ Description: >-
1025
+ Checks for missing space between code and a comment on the
1026
+ same line.
1027
+ Enabled: true
1028
+
1029
+ Style/SpaceBeforeFirstArg:
1030
+ Description: >-
1031
+ Put a space between a method name and the first argument
1032
+ in a method call without parentheses.
1033
+ Enabled: true
1034
+
1035
+ Style/SpaceBeforeSemicolon:
1036
+ Description: 'No spaces before semicolons.'
1037
+ Enabled: true
1038
+
1039
+ Style/SpaceInsideBlockBraces:
1040
+ Description: >-
1041
+ Checks that block braces have or don't have surrounding space.
1042
+ For blocks taking parameters, checks that the left brace has
1043
+ or doesn't have trailing space.
1044
+ Enabled: true
1045
+
1046
+ Style/SpaceAroundBlockParameters:
1047
+ Description: 'Checks the spacing inside and after block parameters pipes.'
1048
+ Enabled: true
1049
+
1050
+ Style/SpaceAroundEqualsInParameterDefault:
1051
+ Description: >-
1052
+ Checks that the equals signs in parameter default assignments
1053
+ have or don't have surrounding space depending on
1054
+ configuration.
1055
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
1056
+ Enabled: true
1057
+
1058
+ Style/SpaceAroundOperators:
1059
+ Description: 'Use a single space around operators.'
1060
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
1061
+ Enabled: true
1062
+
1063
+ Style/SpaceAroundKeyword:
1064
+ Description: 'Put a space before the modifier keyword.'
1065
+ Enabled: true
1066
+
1067
+ Style/SpaceInsideBrackets:
1068
+ Description: 'No spaces after [ or before ].'
1069
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
1070
+ Enabled: true
1071
+
1072
+ Style/SpaceInsideHashLiteralBraces:
1073
+ Description: "Use spaces inside hash literal braces - or don't."
1074
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
1075
+ Enabled: true
1076
+
1077
+ Style/SpaceInsideParens:
1078
+ Description: 'No spaces after ( or before ).'
1079
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
1080
+ Enabled: true
1081
+
1082
+ Style/SpaceInsideRangeLiteral:
1083
+ Description: 'No spaces inside range literals.'
1084
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
1085
+ Enabled: true
1086
+
1087
+ Style/SpaceInsideStringInterpolation:
1088
+ Description: 'Checks for padding/surrounding spaces inside string interpolation.'
1089
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
1090
+ Enabled: true
1091
+
1092
+ Style/SpecialGlobalVars:
1093
+ Description: 'Avoid Perl-style global variables.'
1094
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
1095
+ Enabled: true
1096
+
1097
+ Style/StringLiterals:
1098
+ Description: 'Checks if uses of quotes match the configured preference.'
1099
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
1100
+ Enabled: true
1101
+
1102
+ Style/StringLiteralsInInterpolation:
1103
+ Description: >-
1104
+ Checks if uses of quotes inside expressions in interpolated
1105
+ strings match the configured preference.
1106
+ Enabled: true
1107
+
1108
+ Style/StructInheritance:
1109
+ Description: 'Checks for inheritance from Struct.new.'
1110
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
1111
+ Enabled: true
1112
+
1113
+ Style/SymbolLiteral:
1114
+ Description: 'Use plain symbols instead of string symbols when possible.'
1115
+ Enabled: true
1116
+
1117
+ Style/SymbolProc:
1118
+ Description: 'Use symbols as procs instead of blocks when possible.'
1119
+ Enabled: true
1120
+
1121
+ Style/Tab:
1122
+ Description: 'No hard tabs.'
1123
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
1124
+ Enabled: false
1125
+
1126
+ Style/TrailingBlankLines:
1127
+ Description: 'Checks trailing blank lines and final newline.'
1128
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
1129
+ Enabled: true
1130
+
1131
+ Style/TrailingCommaInLiteral:
1132
+ Description: 'Checks for trailing comma in parameter lists and literals.'
1133
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
1134
+ Enabled: true
1135
+
1136
+ Style/TrailingCommaInArguments:
1137
+ Description: 'Checks for trailing comma in parameter lists and literals.'
1138
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
1139
+ Enabled: true
1140
+
1141
+ Style/TrailingWhitespace:
1142
+ Description: 'Avoid trailing whitespace.'
1143
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
1144
+ Enabled: true
1145
+
1146
+ Style/TrivialAccessors:
1147
+ Description: 'Prefer attr_* methods to trivial readers/writers.'
1148
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
1149
+ Enabled: true
1150
+
1151
+ Style/UnlessElse:
1152
+ Description: >-
1153
+ Do not use unless with else. Rewrite these with the positive
1154
+ case first.
1155
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
1156
+ Enabled: true
1157
+
1158
+ Style/UnneededCapitalW:
1159
+ Description: 'Checks for %W when interpolation is not needed.'
1160
+ Enabled: true
1161
+
1162
+ Style/UnneededPercentQ:
1163
+ Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
1164
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
1165
+ Enabled: true
1166
+
1167
+ Style/TrailingUnderscoreVariable:
1168
+ Description: >-
1169
+ Checks for the usage of unneeded trailing underscores at the
1170
+ end of parallel variable assignment.
1171
+ Enabled: true
1172
+
1173
+ Style/VariableInterpolation:
1174
+ Description: >-
1175
+ Don't interpolate global, instance and class variables
1176
+ directly in strings.
1177
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
1178
+ Enabled: true
1179
+
1180
+ Style/VariableName:
1181
+ Description: 'Use the configured style when naming variables.'
1182
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
1183
+ Enabled: true
1184
+
1185
+ Style/WhenThen:
1186
+ Description: 'Use when x then ... for one-line cases.'
1187
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
1188
+ Enabled: true
1189
+
1190
+ Style/WhileUntilDo:
1191
+ Description: 'Checks for redundant do after while or until.'
1192
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
1193
+ Enabled: true
1194
+
1195
+ Style/WhileUntilModifier:
1196
+ Description: >-
1197
+ Favor modifier while/until usage when you have a
1198
+ single-line body.
1199
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
1200
+ Enabled: true
1201
+
1202
+ Style/WordArray:
1203
+ Description: 'Use %w or %W for arrays of words.'
1204
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
1205
+ Enabled: true
@@ -0,0 +1,2 @@
1
+ # motaword-ruby
2
+ Gem for interacting with the motaword API
@@ -0,0 +1,5 @@
1
+ class Motaword
2
+ def self.hi
3
+ puts 'Hello world!'
4
+ end
5
+ end
@@ -0,0 +1,21 @@
1
+ require 'active_hash'
2
+
3
+ module Motaword
4
+ module Config
5
+ class Authors < ActiveHash::Base
6
+ self.data = [
7
+ { name: 'Robert Ingrum',
8
+ email: 'robert@bonus.ly',
9
+ organization: 'Bonusly'}
10
+ ]
11
+
12
+ def self.names
13
+ all.map(&:name)
14
+ end
15
+
16
+ def self.emails
17
+ all.map(&:email)
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,5 @@
1
+ module Motaword
2
+ module Config
3
+ VERSION = '0.0.1'
4
+ end
5
+ end
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+
3
+ lib = File.expand_path('../lib', __FILE__)
4
+ $LOAD_PATH.unshift lib unless $LOAD_PATH.include? lib
5
+
6
+ require 'motaword/config/version'
7
+ require 'motaword/config/authors'
8
+
9
+ Gem::Specification.new do |spec|
10
+ spec.name = 'motaword'
11
+ spec.version = Motaword::Config::VERSION
12
+ spec.authors = Motaword::Config::Authors.names
13
+ spec.email = Motaword::Config::Authors.emails
14
+
15
+ spec.summary = 'Gem for interacting with the motaword API'
16
+ spec.homepage = 'https://github.com/bonusly/motaword-ruby'
17
+ spec.license = 'MIT'
18
+
19
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
20
+ f.match(%r{^(test|spec|features)/})
21
+ end
22
+
23
+ spec.require_paths = %w[lib]
24
+
25
+ spec.add_runtime_dependency 'active_hash', '~> 0'
26
+ end
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: motaword
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Robert Ingrum
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-08-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: active_hash
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description:
28
+ email:
29
+ - robert@bonus.ly
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".gitignore"
35
+ - ".rubocop.yml"
36
+ - README.md
37
+ - lib/motaword.rb
38
+ - lib/motaword/config/authors.rb
39
+ - lib/motaword/config/version.rb
40
+ - motaword.gemspec
41
+ homepage: https://github.com/bonusly/motaword-ruby
42
+ licenses:
43
+ - MIT
44
+ metadata: {}
45
+ post_install_message:
46
+ rdoc_options: []
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ requirements: []
60
+ rubyforge_project:
61
+ rubygems_version: 2.5.1
62
+ signing_key:
63
+ specification_version: 4
64
+ summary: Gem for interacting with the motaword API
65
+ test_files: []
66
+ has_rdoc: