cocina 0.1.1 → 0.1.2

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