bankroll 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 2fce9b108026fb88dc7010a720a419ba1c4511da3f54b4c6f227340c936b084c
4
+ data.tar.gz: a565f6231e134aa9df16a44c9b99dc8fdd8154694bdf3b9be3a0e180c58e246e
5
+ SHA512:
6
+ metadata.gz: d9845beb9d4b8ce2fabc7a86f387e421a6c51c925304638ca0f0998291078f07a86dff5884ce7aef7a9353025b9d7fa63b2ce365c9ba085cabdd26b8ba33fec7
7
+ data.tar.gz: dcf4c4f7fe1d59296669ffdc1dda48373fa228fd6909a85219823281dd671786c17d1f33e5337c8b5129a613b46f50d2d69cf4bde050edb814388841097f06b4
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,485 @@
1
+ require:
2
+ - rubocop-performance
3
+ - rubocop-rake
4
+ - rubocop-rspec
5
+
6
+ # ==================== Main ==========================
7
+ AllCops:
8
+ DisplayCopNames: true
9
+ Exclude:
10
+ - "bin/**/*"
11
+ - "db/schema.rb"
12
+ - "node_modules/**/*"
13
+ - "tmp/**/*"
14
+ - "vendor/**/*"
15
+ Bundler/InsecureProtocolSource:
16
+ AllowHttpProtocol: false
17
+ Gemspec/DateAssignment:
18
+ Enabled: true
19
+ Gemspec/RequireMFA:
20
+ Enabled: true
21
+ Layout/BeginEndAlignment:
22
+ Enabled: true
23
+ EnforcedStyleAlignWith: begin
24
+ Layout/CaseIndentation:
25
+ IndentOneStep: true
26
+ Layout/ClassStructure:
27
+ Enabled: true
28
+ Categories:
29
+ module_inclusion:
30
+ - extend
31
+ - include
32
+ - prepend
33
+ associations:
34
+ - belongs_to
35
+ - has_one
36
+ - has_many
37
+ ExpectedOrder:
38
+ - module_inclusion
39
+ - constants
40
+ - associations
41
+ - public_class_methods
42
+ - initializer
43
+ - public_methods
44
+ - protected_methods
45
+ - private_methods
46
+ Layout/CommentIndentation:
47
+ AllowForAlignment: true
48
+ Layout/EmptyLineAfterMultilineCondition:
49
+ Enabled: true
50
+ Layout/EmptyLinesAroundAttributeAccessor:
51
+ Enabled: true
52
+ AllowAliasSyntax: false
53
+ AllowedMethods: []
54
+ Layout/FirstArrayElementIndentation:
55
+ EnforcedStyle: consistent
56
+ Layout/FirstArrayElementLineBreak:
57
+ Enabled: true
58
+ Layout/FirstHashElementIndentation:
59
+ EnforcedStyle: consistent
60
+ Layout/FirstHashElementLineBreak:
61
+ Enabled: true
62
+ Layout/FirstMethodArgumentLineBreak:
63
+ Enabled: true
64
+ Layout/FirstMethodParameterLineBreak:
65
+ Enabled: true
66
+ Layout/LineEndStringConcatenationIndentation:
67
+ Enabled: true
68
+ IndentationWidth: 0
69
+ Layout/LineLength:
70
+ Max: 100
71
+ Layout/MultilineArrayLineBreaks:
72
+ Enabled: true
73
+ Layout/MultilineAssignmentLayout:
74
+ Enabled: true
75
+ EnforcedStyle: same_line
76
+ Layout/MultilineHashKeyLineBreaks:
77
+ Enabled: true
78
+ Layout/MultilineMethodArgumentLineBreaks:
79
+ Enabled: true
80
+ Layout/RedundantLineBreak:
81
+ Enabled: false
82
+ Layout/SingleLineBlockChain:
83
+ Enabled: true
84
+ Layout/SpaceAroundMethodCallOperator:
85
+ Enabled: true
86
+ Layout/SpaceBeforeBrackets:
87
+ Enabled: true
88
+ Layout/SpaceInsideHashLiteralBraces:
89
+ EnforcedStyle: no_space
90
+ Layout/TrailingWhitespace:
91
+ AllowInHeredoc: false
92
+ Lint/AmbiguousAssignment:
93
+ Enabled: true
94
+ Lint/AmbiguousOperatorPrecedence:
95
+ Enabled: true
96
+ Lint/AmbiguousRange:
97
+ Enabled: true
98
+ Lint/BinaryOperatorWithIdenticalOperands:
99
+ Enabled: true
100
+ Lint/ConstantDefinitionInBlock:
101
+ Enabled: true
102
+ Lint/DeprecatedConstants:
103
+ Enabled: true
104
+ Lint/DeprecatedOpenSSLConstant:
105
+ Enabled: true
106
+ Lint/DuplicateBranch:
107
+ Enabled: true
108
+ Lint/DuplicateElsifCondition:
109
+ Enabled: true
110
+ Lint/DuplicateRegexpCharacterClassElement:
111
+ Enabled: true
112
+ Lint/DuplicateRescueException:
113
+ Enabled: true
114
+ Lint/DuplicateRequire:
115
+ Enabled: true
116
+ Lint/ElseLayout:
117
+ Enabled: false
118
+ Lint/EmptyBlock:
119
+ Enabled: true
120
+ AllowComments: false
121
+ AllowEmptyLambdas: false
122
+ Lint/EmptyClass:
123
+ Enabled: true
124
+ Lint/EmptyConditionalBody:
125
+ Enabled: true
126
+ Lint/EmptyFile:
127
+ Enabled: true
128
+ AllowComments: true
129
+ Lint/EmptyInPattern:
130
+ Enabled: true
131
+ AllowComments: false
132
+ Lint/EmptyWhen:
133
+ AllowComments: false
134
+ Lint/FloatComparison:
135
+ Enabled: true
136
+ Lint/HashCompareByIdentity:
137
+ Enabled: true
138
+ Lint/IdentityComparison:
139
+ Enabled: true
140
+ Lint/IncompatibleIoSelectWithFiberScheduler:
141
+ Enabled: true
142
+ Lint/LambdaWithoutLiteralBlock:
143
+ Enabled: true
144
+ Lint/MissingSuper:
145
+ Enabled: true
146
+ Lint/MixedRegexpCaptureTypes:
147
+ Enabled: true
148
+ Lint/NoReturnInBeginEndBlocks:
149
+ Enabled: true
150
+ Lint/NumberedParameterAssignment:
151
+ Enabled: true
152
+ Lint/OrAssignmentToConstant:
153
+ Enabled: true
154
+ Lint/RaiseException:
155
+ Enabled: true
156
+ Lint/RedundantDirGlobSort:
157
+ Enabled: true
158
+ Lint/RedundantSafeNavigation:
159
+ Enabled: true
160
+ Lint/RequireRelativeSelfPath:
161
+ Enabled: true
162
+ Lint/SelfAssignment:
163
+ Enabled: true
164
+ Lint/StructNewOverride:
165
+ Enabled: true
166
+ Lint/SymbolConversion:
167
+ Enabled: true
168
+ Lint/ToEnumArguments:
169
+ Enabled: true
170
+ Lint/TopLevelReturnWithArgument:
171
+ Enabled: true
172
+ Lint/TrailingCommaInAttributeDeclaration:
173
+ Enabled: true
174
+ Lint/TripleQuotes:
175
+ Enabled: true
176
+ Lint/OutOfRangeRegexpRef:
177
+ Enabled: true
178
+ Lint/UnexpectedBlockArity:
179
+ Enabled: true
180
+ Lint/UnmodifiedReduceAccumulator:
181
+ Enabled: true
182
+ Lint/UnreachableLoop:
183
+ Enabled: true
184
+ Lint/UselessMethodDefinition:
185
+ Enabled: true
186
+ AllowComments: false
187
+ Lint/UselessRuby2Keywords:
188
+ Enabled: true
189
+ Lint/UselessTimes:
190
+ Enabled: true
191
+ Lint/Void:
192
+ CheckForMethodsWithNoSideEffects: true
193
+ Metrics/BlockLength:
194
+ IgnoredMethods:
195
+ - ips
196
+ - refine
197
+ Exclude:
198
+ - "**/*.gemspec"
199
+ - "spec/**/*"
200
+ Metrics/ParameterLists:
201
+ Max: 3
202
+ Naming/BlockForwarding:
203
+ Enabled: true
204
+ Naming/InclusiveLanguage:
205
+ Enabled: true
206
+ Naming/MethodName:
207
+ IgnoredPatterns:
208
+ - Array
209
+ - BigDecimal
210
+ - Complex
211
+ - Float
212
+ - Hash
213
+ - Integer
214
+ - JSON
215
+ - Pathname
216
+ - Rational
217
+ - String
218
+ - URI
219
+ - Version
220
+ Naming/RescuedExceptionsVariableName:
221
+ PreferredName: error
222
+ Naming/VariableNumber:
223
+ EnforcedStyle: snake_case
224
+ AllowedIdentifiers:
225
+ - capture3
226
+ Naming/MethodParameterName:
227
+ AllowNamesEndingInNumbers: false
228
+ Security/IoMethods:
229
+ Enabled: true
230
+ Style/AccessorGrouping:
231
+ Enabled: true
232
+ Style/ArgumentsForwarding:
233
+ Enabled: false
234
+ Style/ArrayCoercion:
235
+ Enabled: true
236
+ Style/AndOr:
237
+ EnforcedStyle: conditionals
238
+ Style/AutoResourceCleanup:
239
+ Enabled: true
240
+ Style/BisectedAttrAccessor:
241
+ Enabled: true
242
+ Style/CaseLikeIf:
243
+ Enabled: true
244
+ Style/ClassEqualityComparison:
245
+ Enabled: true
246
+ Style/ClassMethodsDefinitions:
247
+ Enabled: true
248
+ Style/CombinableLoops:
249
+ Enabled: true
250
+ Style/CollectionCompact:
251
+ Enabled: true
252
+ Style/CollectionMethods:
253
+ Enabled: true
254
+ Style/Documentation:
255
+ Enabled: false
256
+ Style/DocumentDynamicEvalDefinition:
257
+ Enabled: false
258
+ Style/DoubleNegation:
259
+ EnforcedStyle: forbidden
260
+ Style/EmptyLiteral:
261
+ Enabled: false
262
+ Style/EmptyMethod:
263
+ EnforcedStyle: expanded
264
+ Style/EndlessMethod:
265
+ Enabled: true
266
+ Style/ExplicitBlockArgument:
267
+ Enabled: false
268
+ Style/ExponentialNotation:
269
+ Enabled: true
270
+ Style/FileRead:
271
+ Enabled: true
272
+ Style/FileWrite:
273
+ Enabled: true
274
+ Style/FormatStringToken:
275
+ EnforcedStyle: template
276
+ Style/GlobalStdStream:
277
+ Enabled: false
278
+ Style/HashAsLastArrayItem:
279
+ Enabled: true
280
+ Style/HashConversion:
281
+ Enabled: true
282
+ Style/HashEachMethods:
283
+ Enabled: true
284
+ Style/HashExcept:
285
+ Enabled: true
286
+ Style/HashLikeCase:
287
+ Enabled: true
288
+ MinBranchesCount: 2
289
+ Style/HashTransformKeys:
290
+ Enabled: true
291
+ Style/HashTransformValues:
292
+ Enabled: true
293
+ Style/IfWithBooleanLiteralBranches:
294
+ Enabled: true
295
+ Style/ImplicitRuntimeError:
296
+ Enabled: true
297
+ Style/InPatternThen:
298
+ Enabled: true
299
+ Style/IpAddresses:
300
+ Enabled: true
301
+ Style/KeywordParametersOrder:
302
+ Enabled: true
303
+ Style/MapToHash:
304
+ Enabled: true
305
+ Style/MethodCalledOnDoEndBlock:
306
+ Enabled: true
307
+ Style/MethodCallWithArgsParentheses:
308
+ Enabled: false
309
+ EnforcedStyle: omit_parentheses
310
+ AllowParenthesesInChaining: true
311
+ AllowParenthesesInMultilineCall: true
312
+ IgnoreMacros: false
313
+ Style/MethodDefParentheses:
314
+ EnforcedStyle: false
315
+ Style/MissingElse:
316
+ Enabled: false
317
+ Style/MultilineInPatternThen:
318
+ Enabled: true
319
+ Style/MultilineMethodSignature:
320
+ Enabled: true
321
+ Style/NegatedIfElseCondition:
322
+ Enabled: true
323
+ Style/NilLambda:
324
+ Enabled: true
325
+ Style/NumberedParameters:
326
+ Enabled: true
327
+ EnforcedStyle: disallow
328
+ Style/NumberedParametersLimit:
329
+ Enabled: true
330
+ Style/NumericLiterals:
331
+ Enabled: false
332
+ Style/OptionalBooleanParameter:
333
+ Enabled: true
334
+ Style/OptionHash:
335
+ Enabled: true
336
+ Style/OpenStructUse:
337
+ Enabled: true
338
+ Style/PercentLiteralDelimiters:
339
+ PreferredDelimiters:
340
+ "%w": "[]"
341
+ "%W": "[]"
342
+ "%i": "[]"
343
+ "%I": "[]"
344
+ "%r": "()"
345
+ Style/QuotedSymbols:
346
+ Enabled: true
347
+ Style/RedundantArgument:
348
+ Enabled: true
349
+ Style/RedundantAssignment:
350
+ Enabled: true
351
+ Style/RedundantSelfAssignment:
352
+ Enabled: true
353
+ Style/RedundantSelfAssignmentBranch:
354
+ Enabled: true
355
+ Style/RedundantFetchBlock:
356
+ Enabled: true
357
+ Style/RedundantFileExtensionInRequire:
358
+ Enabled: true
359
+ Style/RedundantRegexpCharacterClass:
360
+ Enabled: true
361
+ Style/RedundantRegexpEscape:
362
+ Enabled: true
363
+ Style/ReturnNil:
364
+ Enabled: true
365
+ Style/SafeNavigation:
366
+ Enabled: false
367
+ Style/SelectByRegexp:
368
+ Enabled: true
369
+ Style/Send:
370
+ Enabled: true
371
+ Style/SignalException:
372
+ EnforcedStyle: semantic
373
+ Style/SingleArgumentDig:
374
+ Enabled: true
375
+ Style/SlicingWithRange:
376
+ Enabled: true
377
+ Style/SoleNestedConditional:
378
+ Enabled: true
379
+ Style/StaticClass:
380
+ Enabled: true
381
+ Style/StringChars:
382
+ Enabled: true
383
+ Style/StringConcatenation:
384
+ Enabled: false
385
+ Style/StringLiterals:
386
+ EnforcedStyle: double_quotes
387
+ Style/StringLiteralsInInterpolation:
388
+ EnforcedStyle: double_quotes
389
+ Style/StringMethods:
390
+ Enabled: true
391
+ Style/SwapValues:
392
+ Enabled: true
393
+ Style/SymbolArray:
394
+ Enabled: true
395
+ Style/FrozenStringLiteralComment:
396
+ Enabled: true
397
+
398
+ # ====================== Performance =======================
399
+ Performance/AncestorsInclude:
400
+ Enabled: true
401
+ Performance/BigDecimalWithNumericArgument:
402
+ Enabled: true
403
+ Performance/BlockGivenWithExplicitBlock:
404
+ Enabled: true
405
+ Performance/CollectionLiteralInLoop:
406
+ Enabled: true
407
+ Performance/ConcurrentMonotonicTime:
408
+ Enabled: true
409
+ Performance/ConstantRegexp:
410
+ Enabled: true
411
+ Performance/IoReadlines:
412
+ Enabled: true
413
+ Performance/MapCompact:
414
+ Enabled: true
415
+ Performance/MethodObjectAsBlock:
416
+ Enabled: true
417
+ Performance/OpenStruct:
418
+ Enabled: true
419
+ Performance/RedundantEqualityComparisonBlock:
420
+ Enabled: true
421
+ Performance/RedundantSortBlock:
422
+ Enabled: true
423
+ Performance/RedundantSplitRegexpArgument:
424
+ Enabled: true
425
+ Performance/RedundantStringChars:
426
+ Enabled: true
427
+ Performance/ReverseFirst:
428
+ Enabled: true
429
+ Performance/SortReverse:
430
+ Enabled: true
431
+ Performance/StringIdentifierArgument:
432
+ Enabled: true
433
+ Performance/Squeeze:
434
+ Enabled: true
435
+ Performance/StringInclude:
436
+ Enabled: true
437
+ Performance/Sum:
438
+ Enabled: true
439
+
440
+ # ==================== RSpec ============================
441
+ RSpec/ContextWording:
442
+ Prefixes:
443
+ - when
444
+ - with
445
+ - without
446
+ RSpec/DescribeClass:
447
+ IgnoredMetadata:
448
+ type:
449
+ - feature
450
+ - request
451
+ - task
452
+ RSpec/DescribedClassModuleWrapping:
453
+ Enabled: true
454
+ RSpec/Dialect:
455
+ Enabled: true
456
+ PreferredMethods:
457
+ append_after: after
458
+ append_before: before
459
+ example: it
460
+ example_group: context
461
+ expect_any_instance_of: expect
462
+ is_expected: expect
463
+ its: it
464
+ let!: let
465
+ prepend_after: after
466
+ prepend_before: before
467
+ shared_examples_for: shared_examples
468
+ specify: it
469
+ subject!: subject
470
+ RSpec/ExampleLength:
471
+ Max: 10
472
+ RSpec/ExcessiveDocstringSpacing:
473
+ Enabled: true
474
+ RSpec/FactoryBot/SyntaxMethods:
475
+ Enabled: false
476
+ RSpec/IdenticalEqualityAssertion:
477
+ Enabled: true
478
+ RSpec/NamedSubject:
479
+ IgnoreSharedExamples: false
480
+ RSpec/Rails/AvoidSetupHook:
481
+ Enabled: true
482
+ RSpec/StubbedMock:
483
+ Enabled: true
484
+ RSpec/SubjectDeclaration:
485
+ Enabled: true
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2022-02-07
4
+
5
+ - Initial release
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in bankroll.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
11
+
12
+ gem "rubocop", "~> 1.21"
13
+
14
+ gem "byebug"
data/Gemfile.lock ADDED
@@ -0,0 +1,81 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ bankroll (0.1.0)
5
+ dry-equalizer
6
+ dry-initializer
7
+ dry-types
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ ast (2.4.2)
13
+ byebug (11.1.3)
14
+ concurrent-ruby (1.1.9)
15
+ diff-lcs (1.5.0)
16
+ dry-configurable (0.14.0)
17
+ concurrent-ruby (~> 1.0)
18
+ dry-core (~> 0.6)
19
+ dry-container (0.9.0)
20
+ concurrent-ruby (~> 1.0)
21
+ dry-configurable (~> 0.13, >= 0.13.0)
22
+ dry-core (0.7.1)
23
+ concurrent-ruby (~> 1.0)
24
+ dry-equalizer (0.3.0)
25
+ dry-inflector (0.2.1)
26
+ dry-initializer (3.1.1)
27
+ dry-logic (1.2.0)
28
+ concurrent-ruby (~> 1.0)
29
+ dry-core (~> 0.5, >= 0.5)
30
+ dry-types (1.5.1)
31
+ concurrent-ruby (~> 1.0)
32
+ dry-container (~> 0.3)
33
+ dry-core (~> 0.5, >= 0.5)
34
+ dry-inflector (~> 0.1, >= 0.1.2)
35
+ dry-logic (~> 1.0, >= 1.0.2)
36
+ parallel (1.21.0)
37
+ parser (3.1.0.0)
38
+ ast (~> 2.4.1)
39
+ rainbow (3.1.1)
40
+ rake (13.0.6)
41
+ regexp_parser (2.2.0)
42
+ rexml (3.2.5)
43
+ rspec (3.10.0)
44
+ rspec-core (~> 3.10.0)
45
+ rspec-expectations (~> 3.10.0)
46
+ rspec-mocks (~> 3.10.0)
47
+ rspec-core (3.10.2)
48
+ rspec-support (~> 3.10.0)
49
+ rspec-expectations (3.10.2)
50
+ diff-lcs (>= 1.2.0, < 2.0)
51
+ rspec-support (~> 3.10.0)
52
+ rspec-mocks (3.10.3)
53
+ diff-lcs (>= 1.2.0, < 2.0)
54
+ rspec-support (~> 3.10.0)
55
+ rspec-support (3.10.3)
56
+ rubocop (1.25.1)
57
+ parallel (~> 1.10)
58
+ parser (>= 3.1.0.0)
59
+ rainbow (>= 2.2.2, < 4.0)
60
+ regexp_parser (>= 1.8, < 3.0)
61
+ rexml
62
+ rubocop-ast (>= 1.15.1, < 2.0)
63
+ ruby-progressbar (~> 1.7)
64
+ unicode-display_width (>= 1.4.0, < 3.0)
65
+ rubocop-ast (1.15.1)
66
+ parser (>= 3.0.1.1)
67
+ ruby-progressbar (1.11.0)
68
+ unicode-display_width (2.1.0)
69
+
70
+ PLATFORMS
71
+ x86_64-darwin-20
72
+
73
+ DEPENDENCIES
74
+ bankroll!
75
+ byebug
76
+ rake (~> 13.0)
77
+ rspec (~> 3.0)
78
+ rubocop (~> 1.21)
79
+
80
+ BUNDLED WITH
81
+ 2.2.32
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Nolan J Tait
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.