lolli 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 025361506abe2f3e41cfaeb55e4f93e7a2aca4e0
4
+ data.tar.gz: 48502455aec3db6334125ed97ab9059f6a8023d7
5
+ SHA512:
6
+ metadata.gz: 83cf9e8a2739ac7a5dbc33037fcf86c42dc6e930f0ae7046b5fece61678129c11adf7cfc1390c512928b9c257fc18b3ff1b78ba2da4e2c6940a4d2cb9b2daeea
7
+ data.tar.gz: 94dc5008e5ffa30c63a57c29f748958faceab9547d9d1f791beb85cd8c88c0df9f486a1834333f14d71dc975138afb88ecab5741d01613bc7dc4ad54bcda0cad
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,608 @@
1
+ AllCops:
2
+ Exclude:
3
+ - 'Gemfile'
4
+ - 'Rakefile'
5
+ - '*.gemspec'
6
+ - 'bin/*'
7
+ - '**/version.rb'
8
+
9
+ Naming/AccessorMethodName:
10
+ Description: Check the naming of accessor methods for get_/set_.
11
+ Enabled: false
12
+
13
+ Style/Alias:
14
+ Description: 'Use alias_method instead of alias.'
15
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
16
+ Enabled: false
17
+
18
+ Style/ArrayJoin:
19
+ Description: 'Use Array#join instead of Array#*.'
20
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
21
+ Enabled: false
22
+
23
+ Style/AsciiComments:
24
+ Description: 'Use only ascii symbols in comments.'
25
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
26
+ Enabled: false
27
+
28
+ Naming/AsciiIdentifiers:
29
+ Description: 'Use only ascii symbols in identifiers.'
30
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
31
+ Enabled: false
32
+
33
+ Style/Attr:
34
+ Description: 'Checks for uses of Module#attr.'
35
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
36
+ Enabled: false
37
+
38
+ Metrics/BlockNesting:
39
+ Description: 'Avoid excessive block nesting'
40
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
41
+ Enabled: false
42
+
43
+ Style/CaseEquality:
44
+ Description: 'Avoid explicit use of the case equality operator(===).'
45
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
46
+ Enabled: false
47
+
48
+ Style/CharacterLiteral:
49
+ Description: 'Checks for uses of character literals.'
50
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
51
+ Enabled: false
52
+
53
+ Style/ClassAndModuleChildren:
54
+ Description: 'Checks style of children classes and modules.'
55
+ Enabled: true
56
+ EnforcedStyle: nested
57
+
58
+ Metrics/ClassLength:
59
+ Description: 'Avoid classes longer than 100 lines of code.'
60
+ Enabled: false
61
+
62
+ Metrics/ModuleLength:
63
+ Description: 'Avoid modules longer than 100 lines of code.'
64
+ Enabled: false
65
+
66
+ Style/ClassVars:
67
+ Description: 'Avoid the use of class variables.'
68
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
69
+ Enabled: false
70
+
71
+ Style/CollectionMethods:
72
+ Enabled: true
73
+ PreferredMethods:
74
+ find: detect
75
+ inject: reduce
76
+ collect: map
77
+ find_all: select
78
+
79
+ Style/ColonMethodCall:
80
+ Description: 'Do not use :: for method call.'
81
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
82
+ Enabled: false
83
+
84
+ Style/CommentAnnotation:
85
+ Description: >-
86
+ Checks formatting of special comments
87
+ (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
88
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
89
+ Enabled: false
90
+
91
+ Metrics/AbcSize:
92
+ Description: >-
93
+ A calculated magnitude based on number of assignments,
94
+ branches, and conditions.
95
+ Enabled: false
96
+
97
+ Metrics/BlockLength:
98
+ CountComments: true # count full line comments?
99
+ Max: 25
100
+ ExcludedMethods: []
101
+ Exclude:
102
+ - "spec/**/*"
103
+
104
+ Metrics/CyclomaticComplexity:
105
+ Description: >-
106
+ A complexity metric that is strongly correlated to the number
107
+ of test cases needed to validate a method.
108
+ Enabled: false
109
+
110
+ Rails/Delegate:
111
+ Description: 'Prefer delegate method for delegations.'
112
+ Enabled: false
113
+
114
+ Style/PreferredHashMethods:
115
+ Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
116
+ StyleGuide: '#hash-key'
117
+ Enabled: false
118
+
119
+ Style/Documentation:
120
+ Description: 'Document classes and non-namespace modules.'
121
+ Enabled: false
122
+
123
+ Style/DoubleNegation:
124
+ Description: 'Checks for uses of double negation (!!).'
125
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
126
+ Enabled: false
127
+
128
+ Style/EachWithObject:
129
+ Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
130
+ Enabled: false
131
+
132
+ Style/EmptyLiteral:
133
+ Description: 'Prefer literals to Array.new/Hash.new/String.new.'
134
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
135
+ Enabled: false
136
+
137
+ # Checks whether the source file has a utf-8 encoding comment or not
138
+ # AutoCorrectEncodingComment must match the regex
139
+ # /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
140
+ Style/Encoding:
141
+ Enabled: false
142
+
143
+ Style/EvenOdd:
144
+ Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
145
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
146
+ Enabled: false
147
+
148
+ Naming/FileName:
149
+ Description: 'Use snake_case for source file names.'
150
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
151
+ Enabled: false
152
+
153
+ Style/FrozenStringLiteralComment:
154
+ Description: >-
155
+ Add the frozen_string_literal comment to the top of files
156
+ to help transition from Ruby 2.3.0 to Ruby 3.0.
157
+ Enabled: false
158
+
159
+ Style/FlipFlop:
160
+ Description: 'Checks for flip flops'
161
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
162
+ Enabled: false
163
+
164
+ Style/FormatString:
165
+ Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
166
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
167
+ Enabled: false
168
+
169
+ Style/GlobalVars:
170
+ Description: 'Do not introduce global variables.'
171
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
172
+ Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
173
+ Enabled: false
174
+
175
+ Style/GuardClause:
176
+ Description: 'Check for conditionals that can be replaced with guard clauses'
177
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
178
+ Enabled: false
179
+
180
+ Style/IfUnlessModifier:
181
+ Description: >-
182
+ Favor modifier if/unless usage when you have a
183
+ single-line body.
184
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
185
+ Enabled: false
186
+
187
+ Style/IfWithSemicolon:
188
+ Description: 'Do not use if x; .... Use the ternary operator instead.'
189
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
190
+ Enabled: false
191
+
192
+ Style/InlineComment:
193
+ Description: 'Avoid inline comments.'
194
+ Enabled: false
195
+
196
+ Style/Lambda:
197
+ Description: 'Use the new lambda literal syntax for single-line blocks.'
198
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
199
+ Enabled: false
200
+
201
+ Style/LambdaCall:
202
+ Description: 'Use lambda.call(...) instead of lambda.(...).'
203
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
204
+ Enabled: false
205
+
206
+ Style/LineEndConcatenation:
207
+ Description: >-
208
+ Use \ instead of + or << to concatenate two string literals at
209
+ line end.
210
+ Enabled: false
211
+
212
+ Metrics/LineLength:
213
+ Description: 'Limit lines to 100 characters.'
214
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
215
+ Max: 100
216
+ Exclude:
217
+ - "spec/**/*"
218
+
219
+ Metrics/MethodLength:
220
+ Description: 'Avoid methods longer than 10 lines of code.'
221
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
222
+ Enabled: false
223
+
224
+ Style/ModuleFunction:
225
+ Description: 'Checks for usage of `extend self` in modules.'
226
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
227
+ Enabled: false
228
+
229
+ Style/MultilineBlockChain:
230
+ Description: 'Avoid multi-line chains of blocks.'
231
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
232
+ Enabled: false
233
+
234
+ Style/NegatedIf:
235
+ Description: >-
236
+ Favor unless over if for negative conditions
237
+ (or control flow or).
238
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
239
+ Enabled: false
240
+
241
+ Style/NegatedWhile:
242
+ Description: 'Favor until over while for negative conditions.'
243
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
244
+ Enabled: false
245
+
246
+ Style/Next:
247
+ Description: 'Use `next` to skip iteration instead of a condition at the end.'
248
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
249
+ Enabled: false
250
+
251
+ Style/NilComparison:
252
+ Description: 'Prefer x.nil? to x == nil.'
253
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
254
+ Enabled: false
255
+
256
+ Style/Not:
257
+ Description: 'Use ! instead of not.'
258
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
259
+ Enabled: false
260
+
261
+ Style/NumericLiterals:
262
+ Description: >-
263
+ Add underscores to large numeric literals to improve their
264
+ readability.
265
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
266
+ Enabled: false
267
+
268
+ Style/OneLineConditional:
269
+ Description: >-
270
+ Favor the ternary operator(?:) over
271
+ if/then/else/end constructs.
272
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
273
+ Enabled: false
274
+
275
+ Naming/BinaryOperatorParameterName:
276
+ Description: 'When defining binary operators, name the argument other.'
277
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
278
+ Enabled: false
279
+
280
+ Metrics/ParameterLists:
281
+ Description: 'Avoid parameter lists longer than three or four parameters.'
282
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
283
+ Enabled: false
284
+
285
+ Style/PercentLiteralDelimiters:
286
+ Description: 'Use `%`-literal delimiters consistently'
287
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
288
+ Enabled: false
289
+
290
+ Style/PerlBackrefs:
291
+ Description: 'Avoid Perl-style regex back references.'
292
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
293
+ Enabled: false
294
+
295
+ Naming/PredicateName:
296
+ Description: 'Check the names of predicate methods.'
297
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
298
+ NamePrefixBlacklist:
299
+ - is_
300
+ Exclude:
301
+ - spec/**/*
302
+
303
+ Style/Proc:
304
+ Description: 'Use proc instead of Proc.new.'
305
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
306
+ Enabled: false
307
+
308
+ Style/RaiseArgs:
309
+ Description: 'Checks the arguments passed to raise/fail.'
310
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
311
+ Enabled: false
312
+
313
+ Style/RegexpLiteral:
314
+ Description: 'Use / or %r around regular expressions.'
315
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
316
+ Enabled: false
317
+
318
+ Style/SelfAssignment:
319
+ Description: >-
320
+ Checks for places where self-assignment shorthand should have
321
+ been used.
322
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
323
+ Enabled: false
324
+
325
+ Style/SingleLineBlockParams:
326
+ Description: 'Enforces the names of some block params.'
327
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
328
+ Enabled: false
329
+
330
+ Style/SingleLineMethods:
331
+ Description: 'Avoid single-line methods.'
332
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
333
+ Enabled: false
334
+
335
+ Style/SignalException:
336
+ Description: 'Checks for proper usage of fail and raise.'
337
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
338
+ Enabled: false
339
+
340
+ Style/SpecialGlobalVars:
341
+ Description: 'Avoid Perl-style global variables.'
342
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
343
+ Enabled: false
344
+
345
+ Style/StringLiterals:
346
+ Description: 'Checks if uses of quotes match the configured preference.'
347
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
348
+ EnforcedStyle: double_quotes
349
+ Enabled: true
350
+
351
+ Style/TrailingCommaInArguments:
352
+ Description: 'Checks for trailing comma in argument lists.'
353
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
354
+ EnforcedStyleForMultiline: comma
355
+ SupportedStylesForMultiline:
356
+ - comma
357
+ - consistent_comma
358
+ - no_comma
359
+ Enabled: true
360
+
361
+ Style/TrailingCommaInArrayLiteral:
362
+ Description: 'Checks for trailing comma in array literals.'
363
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
364
+ EnforcedStyleForMultiline: comma
365
+ SupportedStylesForMultiline:
366
+ - comma
367
+ - consistent_comma
368
+ - no_comma
369
+ Enabled: true
370
+
371
+ Style/TrailingCommaInHashLiteral:
372
+ Description: 'Checks for trailing comma in hash literals.'
373
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
374
+ EnforcedStyleForMultiline: comma
375
+ SupportedStylesForMultiline:
376
+ - comma
377
+ - consistent_comma
378
+ - no_comma
379
+ Enabled: true
380
+
381
+ Style/TrivialAccessors:
382
+ Description: 'Prefer attr_* methods to trivial readers/writers.'
383
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
384
+ Enabled: false
385
+
386
+ Style/VariableInterpolation:
387
+ Description: >-
388
+ Don't interpolate global, instance and class variables
389
+ directly in strings.
390
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
391
+ Enabled: false
392
+
393
+ Style/WhenThen:
394
+ Description: 'Use when x then ... for one-line cases.'
395
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
396
+ Enabled: false
397
+
398
+ Style/WhileUntilModifier:
399
+ Description: >-
400
+ Favor modifier while/until usage when you have a
401
+ single-line body.
402
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
403
+ Enabled: false
404
+
405
+ Style/WordArray:
406
+ Description: 'Use %w or %W for arrays of words.'
407
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
408
+ Enabled: false
409
+
410
+ # Layout
411
+
412
+ Layout/AlignParameters:
413
+ Description: 'Here we check if the parameters on a multi-line method call or definition are aligned.'
414
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
415
+ Enabled: false
416
+
417
+ Layout/ConditionPosition:
418
+ Description: >-
419
+ Checks for condition placed in a confusing position relative to
420
+ the keyword.
421
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
422
+ Enabled: false
423
+
424
+ Layout/DotPosition:
425
+ Description: 'Checks the position of the dot in multi-line method calls.'
426
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
427
+ EnforcedStyle: trailing
428
+
429
+ Layout/ExtraSpacing:
430
+ Description: 'Do not use unnecessary spacing.'
431
+ Enabled: true
432
+
433
+ Layout/MultilineOperationIndentation:
434
+ Description: >-
435
+ Checks indentation of binary operations that span more than
436
+ one line.
437
+ Enabled: true
438
+ EnforcedStyle: indented
439
+
440
+ Layout/MultilineMethodCallIndentation:
441
+ Description: >-
442
+ Checks indentation of method calls with the dot operator
443
+ that span more than one line.
444
+ Enabled: true
445
+ EnforcedStyle: indented
446
+
447
+ Layout/InitialIndentation:
448
+ Description: >-
449
+ Checks the indentation of the first non-blank non-comment line in a file.
450
+ Enabled: false
451
+
452
+ # Lint
453
+
454
+ Lint/AmbiguousOperator:
455
+ Description: >-
456
+ Checks for ambiguous operators in the first argument of a
457
+ method invocation without parentheses.
458
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
459
+ Enabled: false
460
+
461
+ Lint/AmbiguousRegexpLiteral:
462
+ Description: >-
463
+ Checks for ambiguous regexp literals in the first argument of
464
+ a method invocation without parenthesis.
465
+ Enabled: false
466
+
467
+ Lint/AssignmentInCondition:
468
+ Description: "Don't use assignment in conditions."
469
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
470
+ Enabled: false
471
+
472
+ Lint/CircularArgumentReference:
473
+ Description: "Don't refer to the keyword argument in the default value."
474
+ Enabled: false
475
+
476
+ Lint/DeprecatedClassMethods:
477
+ Description: 'Check for deprecated class method calls.'
478
+ Enabled: false
479
+
480
+ Lint/DuplicatedKey:
481
+ Description: 'Check for duplicate keys in hash literals.'
482
+ Enabled: false
483
+
484
+ Lint/EachWithObjectArgument:
485
+ Description: 'Check for immutable argument given to each_with_object.'
486
+ Enabled: false
487
+
488
+ Lint/ElseLayout:
489
+ Description: 'Check for odd code arrangement in an else block.'
490
+ Enabled: false
491
+
492
+ Lint/FormatParameterMismatch:
493
+ Description: 'The number of parameters to format/sprint must match the fields.'
494
+ Enabled: false
495
+
496
+ Lint/HandleExceptions:
497
+ Description: "Don't suppress exception."
498
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
499
+ Enabled: false
500
+
501
+ Lint/LiteralAsCondition:
502
+ Description: 'Checks of literals used in conditions.'
503
+ Enabled: false
504
+
505
+ Lint/LiteralInInterpolation:
506
+ Description: 'Checks for literals used in interpolation.'
507
+ Enabled: false
508
+
509
+ Lint/Loop:
510
+ Description: >-
511
+ Use Kernel#loop with break rather than begin/end/until or
512
+ begin/end/while for post-loop tests.
513
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
514
+ Enabled: false
515
+
516
+ Lint/NestedMethodDefinition:
517
+ Description: 'Do not use nested method definitions.'
518
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
519
+ Enabled: false
520
+
521
+ Lint/NonLocalExitFromIterator:
522
+ Description: 'Do not use return in iterator to cause non-local exit.'
523
+ Enabled: false
524
+
525
+ Lint/ParenthesesAsGroupedExpression:
526
+ Description: >-
527
+ Checks for method calls with a space before the opening
528
+ parenthesis.
529
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
530
+ Enabled: false
531
+
532
+ Lint/RequireParentheses:
533
+ Description: >-
534
+ Use parentheses in the method call to avoid confusion
535
+ about precedence.
536
+ Enabled: false
537
+
538
+ Lint/UnderscorePrefixedVariableName:
539
+ Description: 'Do not use prefix `_` for a variable that is used.'
540
+ Enabled: false
541
+
542
+ Lint/UnneededCopDisableDirective:
543
+ Description: >-
544
+ Checks for rubocop:disable comments that can be removed.
545
+ Note: this cop is not disabled when disabling all cops.
546
+ It must be explicitly disabled.
547
+ Enabled: false
548
+
549
+ Lint/Void:
550
+ Description: 'Possible use of operator/literal/variable in void context.'
551
+ Enabled: false
552
+
553
+ # Performance
554
+
555
+ Performance/CaseWhenSplat:
556
+ Description: >-
557
+ Place `when` conditions that use splat at the end
558
+ of the list of `when` branches.
559
+ Enabled: false
560
+
561
+ Performance/Count:
562
+ Description: >-
563
+ Use `count` instead of `select...size`, `reject...size`,
564
+ `select...count`, `reject...count`, `select...length`,
565
+ and `reject...length`.
566
+ Enabled: false
567
+
568
+ Performance/Detect:
569
+ Description: >-
570
+ Use `detect` instead of `select.first`, `find_all.first`,
571
+ `select.last`, and `find_all.last`.
572
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
573
+ Enabled: false
574
+
575
+ Performance/FlatMap:
576
+ Description: >-
577
+ Use `Enumerable#flat_map`
578
+ instead of `Enumerable#map...Array#flatten(1)`
579
+ or `Enumberable#collect..Array#flatten(1)`
580
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
581
+ Enabled: false
582
+
583
+ Performance/ReverseEach:
584
+ Description: 'Use `reverse_each` instead of `reverse.each`.'
585
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
586
+ Enabled: false
587
+
588
+ Performance/Sample:
589
+ Description: >-
590
+ Use `sample` instead of `shuffle.first`,
591
+ `shuffle.last`, and `shuffle[Fixnum]`.
592
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
593
+ Enabled: false
594
+
595
+ Performance/Size:
596
+ Description: >-
597
+ Use `size` instead of `count` for counting
598
+ the number of elements in `Array` and `Hash`.
599
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
600
+ Enabled: false
601
+
602
+ Performance/StringReplacement:
603
+ Description: >-
604
+ Use `tr` instead of `gsub` when you are replacing the same
605
+ number of characters. Use `delete` instead of `gsub` when
606
+ you are deleting characters.
607
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
608
+ Enabled: false
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.4.1
5
+ before_install: gem install bundler -v 1.16.1
data/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Version 0.2.0
2
+ ## New Features
3
+ - Re-release of initial version
4
+
5
+ # Version 0.1.0
6
+ ## New Features
7
+ - Initial Release
8
+ - Single equality matcher
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at thomascountz@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in lolli.gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,59 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ lolli (0.2.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.0)
10
+ diff-lcs (1.3)
11
+ docile (1.3.0)
12
+ json (2.1.0)
13
+ parallel (1.12.1)
14
+ parser (2.5.1.0)
15
+ ast (~> 2.4.0)
16
+ powerpack (0.1.1)
17
+ rainbow (3.0.0)
18
+ rake (10.5.0)
19
+ rspec (3.7.0)
20
+ rspec-core (~> 3.7.0)
21
+ rspec-expectations (~> 3.7.0)
22
+ rspec-mocks (~> 3.7.0)
23
+ rspec-core (3.7.1)
24
+ rspec-support (~> 3.7.0)
25
+ rspec-expectations (3.7.0)
26
+ diff-lcs (>= 1.2.0, < 2.0)
27
+ rspec-support (~> 3.7.0)
28
+ rspec-mocks (3.7.0)
29
+ diff-lcs (>= 1.2.0, < 2.0)
30
+ rspec-support (~> 3.7.0)
31
+ rspec-support (3.7.1)
32
+ rubocop (0.55.0)
33
+ parallel (~> 1.10)
34
+ parser (>= 2.5)
35
+ powerpack (~> 0.1)
36
+ rainbow (>= 2.2.2, < 4.0)
37
+ ruby-progressbar (~> 1.7)
38
+ unicode-display_width (~> 1.0, >= 1.0.1)
39
+ ruby-progressbar (1.9.0)
40
+ simplecov (0.16.1)
41
+ docile (~> 1.1)
42
+ json (>= 1.8, < 3)
43
+ simplecov-html (~> 0.10.0)
44
+ simplecov-html (0.10.2)
45
+ unicode-display_width (1.3.2)
46
+
47
+ PLATFORMS
48
+ ruby
49
+
50
+ DEPENDENCIES
51
+ bundler (~> 1.16)
52
+ lolli!
53
+ rake (~> 10.0)
54
+ rspec (~> 3.0)
55
+ rubocop (~> 0.55)
56
+ simplecov (~> 0.16)
57
+
58
+ BUNDLED WITH
59
+ 1.16.1
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Thomas Countz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # Lolli
2
+
3
+ Your first micro unit testing framework
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'lolli'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install lolli
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Development
26
+
27
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
28
+
29
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
30
+
31
+ ## Contributing
32
+
33
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/lolli. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
34
+
35
+ ## License
36
+
37
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
38
+
39
+ ## Code of Conduct
40
+
41
+ Everyone interacting in the Lolli project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/lolli/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "lolli"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/lib/lolli.rb ADDED
@@ -0,0 +1,8 @@
1
+ require "lolli/version"
2
+ require "lolli/example"
3
+ require "lolli/resultant"
4
+
5
+ require "lolli/reporters/reporter"
6
+ require "lolli/reporters/text_reporter"
7
+
8
+ require "lolli/matchers/equality_matchers"
@@ -0,0 +1,14 @@
1
+ require_relative "reporters/reporter"
2
+ require_relative "matchers/equality_matchers"
3
+
4
+ module Lolli
5
+ class Example
6
+ extend EqualityMatchers
7
+ class << self
8
+ def example(description)
9
+ resultant = yield
10
+ Lolli::REPORTER.report(resultant: resultant, description: description)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,10 @@
1
+ require_relative "../resultant"
2
+
3
+ module Lolli
4
+ module EqualityMatchers
5
+ def assert_equals(expected:, actual:)
6
+ result = expected == actual
7
+ Lolli::Resultant.new(expected: expected, actual: actual, result: result)
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,5 @@
1
+ require_relative "text_reporter"
2
+
3
+ module Lolli
4
+ REPORTER = Lolli::TextReporter.new.freeze
5
+ end
@@ -0,0 +1,21 @@
1
+ module Lolli
2
+ class TextReporter
3
+ def initialize(output: $stdout)
4
+ @output = output
5
+ end
6
+
7
+ def report(resultant:, description:)
8
+ output.puts description
9
+ output.puts "\s\s#{resultant.result}"
10
+ unless resultant.result
11
+ output.puts "\s\s\s\sExpected: #{resultant.expected}"
12
+ output.puts "\s\s\s\sActual: #{resultant.actual}"
13
+ end
14
+ output.puts "\n"
15
+ end
16
+
17
+ private
18
+
19
+ attr_reader :output
20
+ end
21
+ end
@@ -0,0 +1,10 @@
1
+ module Lolli
2
+ class Resultant
3
+ attr_reader :expected, :actual, :result
4
+ def initialize(expected:, actual:, result:)
5
+ @expected = expected
6
+ @actual = actual
7
+ @result = result
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,3 @@
1
+ module Lolli
2
+ VERSION = "0.2.0"
3
+ end
data/lolli.gemspec ADDED
@@ -0,0 +1,38 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "lolli/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "lolli"
8
+ spec.version = Lolli::VERSION
9
+ spec.authors = ["Thomas Countz"]
10
+ spec.email = ["thomascountz@gmail.com"]
11
+
12
+ spec.summary = %q{Micro unit testing framework for Ruby}
13
+ spec.description = %q{A fun & simple unit testing framework to learn testing/TDD}
14
+ spec.homepage = "https://github.com/Thomascountz/lolli"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
21
+ else
22
+ raise "RubyGems 2.0 or newer is required to protect against " \
23
+ "public gem pushes."
24
+ end
25
+
26
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
27
+ f.match(%r{^(test|spec|features)/})
28
+ end
29
+ spec.bindir = "exe"
30
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
+ spec.require_paths = ["lib"]
32
+
33
+ spec.add_development_dependency "bundler", "~> 1.16"
34
+ spec.add_development_dependency "rake", "~> 10.0"
35
+ spec.add_development_dependency "rspec", "~> 3.0"
36
+ spec.add_development_dependency "rubocop", "~> 0.55"
37
+ spec.add_development_dependency "simplecov", "~> 0.16"
38
+ end
metadata ADDED
@@ -0,0 +1,136 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: lolli
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ platform: ruby
6
+ authors:
7
+ - Thomas Countz
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-06-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.55'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.55'
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.16'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.16'
83
+ description: A fun & simple unit testing framework to learn testing/TDD
84
+ email:
85
+ - thomascountz@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".gitignore"
91
+ - ".rspec"
92
+ - ".rubocop.yml"
93
+ - ".travis.yml"
94
+ - CHANGELOG.md
95
+ - CODE_OF_CONDUCT.md
96
+ - Gemfile
97
+ - Gemfile.lock
98
+ - LICENSE.txt
99
+ - README.md
100
+ - Rakefile
101
+ - bin/console
102
+ - bin/setup
103
+ - lib/lolli.rb
104
+ - lib/lolli/example.rb
105
+ - lib/lolli/matchers/equality_matchers.rb
106
+ - lib/lolli/reporters/reporter.rb
107
+ - lib/lolli/reporters/text_reporter.rb
108
+ - lib/lolli/resultant.rb
109
+ - lib/lolli/version.rb
110
+ - lolli.gemspec
111
+ homepage: https://github.com/Thomascountz/lolli
112
+ licenses:
113
+ - MIT
114
+ metadata:
115
+ allowed_push_host: https://rubygems.org
116
+ post_install_message:
117
+ rdoc_options: []
118
+ require_paths:
119
+ - lib
120
+ required_ruby_version: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ required_rubygems_version: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
130
+ requirements: []
131
+ rubyforge_project:
132
+ rubygems_version: 2.6.14
133
+ signing_key:
134
+ specification_version: 4
135
+ summary: Micro unit testing framework for Ruby
136
+ test_files: []