magellanalytics 0.2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 0b23665c2646e42c71c55734980645d276c3a79652ecdbdc5721937dd0b12997
4
+ data.tar.gz: 718f67d0f1e039293b503381654738d644ae111c166bc7f03b7b6eb7ede60c51
5
+ SHA512:
6
+ metadata.gz: ee3bb5ba1ca98587654a7046c121d37564a9399f824b988441b3cd61d39ad04f36e05966ef3a7248f9e56c30b7492d95d0a4ced8a5858f1d87de92a1aba61b2e
7
+ data.tar.gz: c879fac4f95fe6ac3983740e6c31bad70292f67e4119554a72590d419ab1a96bb166a128b9af98d0422e8e89de4c3ed16cda141218751c11e3322d367c970396
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
data/.rspec_parallel ADDED
@@ -0,0 +1,3 @@
1
+ --format progress
2
+ --format ParallelTests::RSpec::RuntimeLogger --out tmp/parallel_runtime_rspec.log
3
+ --require rails_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,659 @@
1
+ inherit_mode:
2
+ merge:
3
+ - Exclude
4
+
5
+ AllCops:
6
+ Exclude:
7
+ - 'db/*schema.rb'
8
+ - 'lib/scratch/*.rb'
9
+
10
+ #################### Gemspec ###########################
11
+
12
+ Gemspec/DeprecatedAttributeAssignment:
13
+ Enabled: true
14
+
15
+ Gemspec/DevelopmentDependencies:
16
+ Enabled: true
17
+
18
+ Gemspec/RequireMFA:
19
+ Enabled: true
20
+
21
+ #################### Layout ###########################
22
+
23
+ Layout/AccessModifierIndentation:
24
+ Enabled: false
25
+
26
+ Layout/BeginEndAlignment:
27
+ Enabled: true
28
+
29
+ Layout/EmptyLinesAroundAttributeAccessor:
30
+ Enabled: true
31
+
32
+ Layout/ClassStructure:
33
+ Enabled: true
34
+
35
+ Layout/EndAlignment:
36
+ AutoCorrect: true
37
+
38
+ Layout/ExtraSpacing:
39
+ Enabled: true
40
+ ForceEqualSignAlignment: true
41
+
42
+ Layout/FirstHashElementLineBreak:
43
+ Enabled: true
44
+
45
+ Layout/HashAlignment:
46
+ Enabled: true
47
+ EnforcedHashRocketStyle: table
48
+ EnforcedColonStyle: table
49
+
50
+ Layout/HeredocArgumentClosingParenthesis:
51
+ Enabled: true
52
+
53
+ Layout/LineContinuationLeadingSpace:
54
+ Enabled: true
55
+
56
+ Layout/LineContinuationSpacing:
57
+ Enabled: true
58
+
59
+ Layout/LineEndStringConcatenationIndentation:
60
+ Enabled: true
61
+
62
+ Layout/LineLength:
63
+ Enabled: false
64
+
65
+ Layout/MultilineAssignmentLayout:
66
+ Enabled: true
67
+ EnforcedStyle: new_line
68
+
69
+ Layout/MultilineHashKeyLineBreaks:
70
+ Enabled: true
71
+
72
+ Layout/MultilineMethodArgumentLineBreaks:
73
+ Enabled: true
74
+
75
+ Layout/MultilineOperationIndentation:
76
+ Enabled: true
77
+ EnforcedStyle: aligned
78
+
79
+ Layout/SpaceAroundMethodCallOperator:
80
+ Enabled: true
81
+
82
+ Layout/SpaceBeforeBrackets:
83
+ Enabled: true
84
+
85
+ #################### Lint ##################################
86
+ ### Warnings
87
+
88
+ Lint/AmbiguousAssignment:
89
+ Enabled: true
90
+
91
+ Lint/AmbiguousBlockAssociation:
92
+ Enabled: false
93
+
94
+ Lint/AmbiguousOperatorPrecedence:
95
+ Enabled: true
96
+
97
+ Lint/AmbiguousRange:
98
+ Enabled: true
99
+
100
+ Lint/BinaryOperatorWithIdenticalOperands:
101
+ Enabled: true
102
+
103
+ Lint/ConstantDefinitionInBlock:
104
+ Enabled: false
105
+
106
+ Lint/ConstantOverwrittenInRescue:
107
+ Enabled: true
108
+
109
+ Lint/DeprecatedConstants:
110
+ Enabled: true
111
+
112
+ Lint/DeprecatedOpenSSLConstant:
113
+ Enabled: true
114
+
115
+ Lint/DuplicateBranch:
116
+ Enabled: true
117
+
118
+ Lint/DuplicateElsifCondition:
119
+ Enabled: true
120
+
121
+ Lint/DuplicateMagicComment:
122
+ Enabled: true
123
+
124
+ Lint/DuplicateMatchPattern:
125
+ Enabled: true
126
+
127
+ Lint/DuplicateRegexpCharacterClassElement:
128
+ Enabled: true
129
+
130
+ Lint/DuplicateRequire:
131
+ Enabled: true
132
+
133
+ Lint/DuplicateRescueException:
134
+ Enabled: true
135
+
136
+ Lint/EmptyBlock:
137
+ Enabled: true
138
+
139
+ Lint/EmptyClass:
140
+ Enabled: true
141
+
142
+ Lint/EmptyConditionalBody:
143
+ Enabled: true
144
+
145
+ Lint/EmptyFile:
146
+ Enabled: true
147
+
148
+ Lint/EmptyInPattern:
149
+ Enabled: true
150
+
151
+ Lint/FloatComparison:
152
+ Enabled: true
153
+
154
+ Lint/HeredocMethodCallPosition:
155
+ Enabled: true
156
+
157
+ Lint/IdentityComparison:
158
+ Enabled: true
159
+
160
+ Lint/IncompatibleIoSelectWithFiberScheduler:
161
+ Enabled: true
162
+
163
+ Lint/InheritException:
164
+ EnforcedStyle: standard_error
165
+
166
+ Lint/LambdaWithoutLiteralBlock:
167
+ Enabled: true
168
+
169
+ Lint/MissingSuper:
170
+ Enabled: false
171
+
172
+ Lint/MixedRegexpCaptureTypes:
173
+ Enabled: true
174
+
175
+ Lint/NoReturnInBeginEndBlocks:
176
+ Enabled: true
177
+
178
+ Lint/NonAtomicFileOperation:
179
+ Enabled: true
180
+
181
+ Lint/NumberedParameterAssignment:
182
+ Enabled: true
183
+
184
+ Lint/OrAssignmentToConstant:
185
+ Enabled: true
186
+
187
+ Lint/OutOfRangeRegexpRef:
188
+ Enabled: true
189
+
190
+ Lint/RaiseException:
191
+ Enabled: true
192
+
193
+ Lint/RedundantDirGlobSort:
194
+ Enabled: true
195
+
196
+ Lint/RefinementImportMethods:
197
+ Enabled: true
198
+
199
+ Lint/RequireRangeParentheses:
200
+ Enabled: true
201
+
202
+ Lint/RequireRelativeSelfPath:
203
+ Enabled: true
204
+
205
+ Lint/SelfAssignment:
206
+ Enabled: true
207
+
208
+ Lint/StructNewOverride:
209
+ Enabled: true
210
+
211
+ Lint/SuppressedException:
212
+ Enabled: true
213
+ AllowComments: true
214
+
215
+ Lint/SymbolConversion:
216
+ Enabled: true
217
+
218
+ Lint/ToEnumArguments:
219
+ Enabled: true
220
+
221
+ Lint/TripleQuotes:
222
+ Enabled: true
223
+
224
+ Lint/TopLevelReturnWithArgument:
225
+ Enabled: true
226
+
227
+ Lint/TrailingCommaInAttributeDeclaration:
228
+ Enabled: true
229
+
230
+ Lint/UnexpectedBlockArity:
231
+ Enabled: true
232
+
233
+ Lint/UnmodifiedReduceAccumulator:
234
+ Enabled: true
235
+
236
+ Lint/UnreachableLoop:
237
+ Enabled: true
238
+
239
+ Lint/UselessMethodDefinition:
240
+ Enabled: true
241
+
242
+ Lint/UselessRescue:
243
+ Enabled: true
244
+
245
+ Lint/UselessRuby2Keywords:
246
+ Enabled: true
247
+
248
+ Lint/UselessTimes:
249
+ Enabled: true
250
+
251
+ #################### Metrics ###############################
252
+
253
+ Metrics/AbcSize:
254
+ Enabled: false
255
+
256
+ Metrics/BlockLength:
257
+ Description: 'Avoid long blocks with many lines.'
258
+ Enabled: false
259
+ CountComments: false # count full line comments?
260
+ Max: 25
261
+ CountAsOne: []
262
+ AllowedMethods:
263
+ # By default, exclude the `#refine` method, as it tends to have larger
264
+ # associated blocks.
265
+ - refine
266
+
267
+ Metrics/BlockNesting:
268
+ Description: 'Avoid excessive block nesting.'
269
+ StyleGuide: '#three-is-the-number-thou-shalt-count'
270
+ Enabled: true
271
+ CountBlocks: false
272
+ Max: 3
273
+
274
+ Metrics/ClassLength:
275
+ Description: 'Avoid classes longer than 100 lines of code.'
276
+ Enabled: false
277
+ CountComments: false # count full line comments?
278
+ Max: 100
279
+
280
+ Metrics/CollectionLiteralLength:
281
+ Enabled: true
282
+
283
+ # Avoid complex methods.
284
+ Metrics/CyclomaticComplexity:
285
+ Description: >-
286
+ A complexity metric that is strongly correlated to the number
287
+ of test cases needed to validate a method.
288
+ Enabled: false
289
+ AllowedMethods: []
290
+ Max: 7
291
+
292
+ Metrics/MethodLength:
293
+ Description: 'Avoid methods longer than 10 lines of code.'
294
+ Enabled: false
295
+ CountComments: false # count full line comments?
296
+ Max: 10
297
+
298
+ Metrics/ModuleLength:
299
+ Description: 'Avoid modules longer than 100 lines of code.'
300
+ Enabled: false
301
+ CountComments: false # count full line comments?
302
+ Max: 100
303
+
304
+ Metrics/ParameterLists:
305
+ Description: 'Avoid parameter lists longer than three or four parameters.'
306
+ Enabled: false
307
+ Max: 5
308
+ CountKeywordArgs: true
309
+
310
+ Metrics/PerceivedComplexity:
311
+ Description: >-
312
+ A complexity metric geared towards measuring complexity for a
313
+ human reader.
314
+ Enabled: true
315
+ AllowedMethods: []
316
+ Max: 8
317
+
318
+ #################### Naming ##############################
319
+
320
+ Naming/BlockForwarding:
321
+ Enabled: true
322
+
323
+ Naming/VariableNumber:
324
+ Enabled: true
325
+ EnforcedStyle: snake_case
326
+ AllowedIdentifiers:
327
+ - capture3
328
+ - iso8601
329
+ - rfc1123_date
330
+ - rfc822
331
+ - rfc2822
332
+ - rfc3339
333
+ - !ruby/regexp /\bmd5\b/
334
+ - !ruby/regexp /\bs3\b/
335
+ - !ruby/regexp /\bv\d+\b/
336
+
337
+ #################### Security ############################
338
+
339
+ Security/CompoundHash:
340
+ Enabled: true
341
+
342
+ Security/IoMethods:
343
+ Enabled: true
344
+
345
+ #################### Style ###############################
346
+
347
+ # We don't do either much, but I've heard arguments for both sides.
348
+ Style/AccessorGrouping:
349
+ Enabled: true
350
+
351
+ # TODO: Pick one!
352
+ Style/Alias:
353
+ Enabled: false
354
+ EnforcedStyle: prefer_alias
355
+
356
+ Style/ArgumentsForwarding: # (new in 1.1)
357
+ Enabled: true
358
+
359
+ Style/ArrayCoercion:
360
+ Enabled: true
361
+
362
+ Style/ArrayIntersect:
363
+ Enabled: false
364
+
365
+ # e.g. File.open { ... } which auto-closes instead of just f = File.open
366
+ Style/AutoResourceCleanup:
367
+ Description: 'Suggests the usage of an auto resource cleanup version of a method (if available).'
368
+ Enabled: false
369
+
370
+ Style/BisectedAttrAccessor:
371
+ Enabled: true
372
+
373
+ Style/CaseLikeIf:
374
+ Enabled: true
375
+
376
+ # TODO: Update in files and then enable
377
+ Style/ClassAndModuleChildren:
378
+ Enabled: false
379
+ EnforcedStyle: nested
380
+
381
+ Style/CollectionCompact:
382
+ Enabled: true
383
+
384
+ # Align with the style guide.
385
+ Style/CollectionMethods:
386
+ Enabled: false
387
+
388
+ Style/CombinableLoops:
389
+ Enabled: true
390
+
391
+ Style/ComparableClamp:
392
+ Enabled: true
393
+
394
+ Style/ConcatArrayLiterals:
395
+ Enabled: true
396
+
397
+ Style/DataInheritance:
398
+ Enabled: true
399
+
400
+ Style/DirEmpty:
401
+ Enabled: true
402
+
403
+ Style/DisableCopsWithinSourceCodeDirective:
404
+ Enabled: false
405
+
406
+ Style/Documentation:
407
+ Enabled: false
408
+
409
+ Style/DocumentDynamicEvalDefinition:
410
+ Enabled: true
411
+
412
+ Style/EmptyHeredoc:
413
+ Enabled: true
414
+
415
+ Style/EmptyMethod:
416
+ Enabled: true
417
+ EnforcedStyle: compact
418
+
419
+ Style/EndlessMethod:
420
+ Enabled: true
421
+
422
+ Style/EnvHome:
423
+ Enabled: true
424
+
425
+ Style/ExplicitBlockArgument:
426
+ Enabled: true
427
+
428
+ Style/ExponentialNotation:
429
+ Enabled: true
430
+
431
+ Style/FetchEnvVar:
432
+ Enabled: true
433
+
434
+ Style/FileEmpty:
435
+ Enabled: true
436
+
437
+ Style/FileRead:
438
+ Enabled: true
439
+
440
+ Style/FileWrite:
441
+ Enabled: true
442
+
443
+ Style/FormatString:
444
+ Enabled: true
445
+ EnforcedStyle: format
446
+
447
+ Style/FormatStringToken:
448
+ Enabled: true
449
+ EnforcedStyle: template
450
+
451
+ Style/GlobalStdStream:
452
+ Enabled: true
453
+
454
+ Style/HashAsLastArrayItem:
455
+ Enabled: true
456
+
457
+ Style/HashConversion:
458
+ Enabled: true
459
+
460
+ Style/HashEachMethods:
461
+ Enabled: true
462
+
463
+ Style/HashExcept:
464
+ Enabled: true
465
+
466
+ Style/HashLikeCase:
467
+ Enabled: true
468
+
469
+ Style/HashTransformKeys:
470
+ Enabled: true
471
+
472
+ Style/HashTransformValues:
473
+ Enabled: true
474
+
475
+ Style/IfWithBooleanLiteralBranches:
476
+ Enabled: true
477
+
478
+ Style/ImplicitRuntimeError:
479
+ Enabled: true
480
+
481
+ Style/InPatternThen:
482
+ Enabled: true
483
+
484
+ Style/IpAddresses:
485
+ Enabled: true
486
+ AllowedAddresses:
487
+ - "::"
488
+ # :: is a valid IPv6 address, but could potentially be legitimately in code
489
+
490
+ Style/KeywordParametersOrder:
491
+ Enabled: true
492
+
493
+ Style/LambdaCall:
494
+ Enabled: false
495
+
496
+ Style/MagicCommentFormat:
497
+ Enabled: true
498
+
499
+ Style/MapCompactWithConditionalBlock:
500
+ Enabled: true
501
+
502
+ Style/MapToHash:
503
+ Enabled: true
504
+
505
+ Style/MapToSet:
506
+ Enabled: true
507
+
508
+ # TODO: Divided on this one. Disabled until we reach a majority, if not a consensus.
509
+ Style/MethodCalledOnDoEndBlock:
510
+ Enabled: false
511
+
512
+ Style/MinMaxComparison:
513
+ Enabled: true
514
+
515
+ Style/MissingElse:
516
+ Enabled: false
517
+
518
+ Style/ModuleFunction:
519
+ Enabled: false
520
+ EnforcedStyle: module_function
521
+ SupportedStyles:
522
+ - module_function
523
+ - extend_self
524
+ - forbidden
525
+
526
+ Style/MultilineInPatternThen:
527
+ Enabled: true
528
+
529
+ Style/NegatedIfElseCondition:
530
+ Enabled: true
531
+
532
+ Style/NestedFileDirname:
533
+ Enabled: true
534
+
535
+ Style/NilLambda:
536
+ Enabled: true
537
+
538
+ Style/NumberedParameters:
539
+ Enabled: true
540
+
541
+ Style/NumberedParametersLimit:
542
+ Enabled: true
543
+
544
+ Style/ObjectThen:
545
+ Enabled: true
546
+
547
+ Style/OpenStructUse:
548
+ Enabled: true
549
+
550
+ Style/OperatorMethodCall:
551
+ Enabled: true
552
+
553
+ Style/OptionHash:
554
+ Enabled: true
555
+
556
+ Style/OptionalBooleanParameter:
557
+ Enabled: true
558
+
559
+ Style/QuotedSymbols:
560
+ Enabled: true
561
+
562
+ Style/RedundantArgument:
563
+ Enabled: true
564
+
565
+ Style/RedundantAssignment:
566
+ Enabled: true
567
+
568
+ Style/RedundantConstantBase:
569
+ Enabled: true
570
+
571
+ Style/RedundantDoubleSplatHashBraces:
572
+ Enabled: true
573
+
574
+ Style/RedundantEach:
575
+ Enabled: true
576
+
577
+ Style/RedundantFetchBlock:
578
+ Enabled: true
579
+
580
+ Style/RedundantFileExtensionInRequire:
581
+ Enabled: true
582
+
583
+ Style/RedundantHeredocDelimiterQuotes:
584
+ Enabled: true
585
+
586
+ Style/RedundantInitialize:
587
+ Enabled: true
588
+
589
+ Style/RedundantLineContinuation:
590
+ Enabled: true
591
+
592
+ Style/RedundantRegexpCharacterClass:
593
+ Enabled: true
594
+
595
+ Style/RedundantRegexpEscape:
596
+ Enabled: true
597
+
598
+ Style/RedundantSelfAssignment:
599
+ Enabled: true
600
+
601
+ Style/RedundantSelfAssignmentBranch:
602
+ Enabled: true
603
+
604
+ Style/RescueStandardError:
605
+ Enabled: true
606
+ EnforcedStyle: implicit
607
+
608
+ Style/RedundantStringEscape:
609
+ Enabled: true
610
+
611
+ Style/ReturnNil:
612
+ Enabled: true
613
+ EnforcedStyle: return
614
+
615
+ Style/SelectByRegexp:
616
+ Enabled: true
617
+
618
+ Style/SingleArgumentDig:
619
+ Enabled: true
620
+
621
+ Style/SlicingWithRange:
622
+ Enabled: true
623
+
624
+ Style/SoleNestedConditional:
625
+ Enabled: true
626
+
627
+ Style/StringChars:
628
+ Enabled: true
629
+
630
+ Style/StringConcatenation:
631
+ Enabled: true
632
+
633
+ Style/StringHashKeys:
634
+ Enabled: false
635
+
636
+ # omg
637
+ Style/StringLiterals:
638
+ Enabled: false
639
+
640
+ Style/StringLiteralsInInterpolation:
641
+ Enabled: false
642
+
643
+ Style/SwapValues:
644
+ Enabled: true
645
+
646
+ Style/TernaryParentheses:
647
+ Enabled: true
648
+ EnforcedStyle: require_parentheses_when_complex
649
+ AllowSafeAssignment: true
650
+
651
+ Style/TrailingCommaInArrayLiteral:
652
+ Enabled: true
653
+
654
+ Style/TrailingCommaInHashLiteral:
655
+ Enabled: true
656
+
657
+ # Accept `redirect_to(...) and return` and similar cases.
658
+ Style/AndOr:
659
+ EnforcedStyle: conditionals
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ magellanalytics
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-3.1.2
data/Gemfile ADDED
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ git_source(:github) do |repo_name|
6
+ repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
7
+ "https://github.com/#{repo_name}.git"
8
+ end
9
+
10
+ ruby '3.1.2'
11
+
12
+ gem 'activesupport', '>= 7.0.4.3'
13
+ gem 'analytics-ruby'
14
+
15
+ group :development do
16
+ gem 'bundler', '~> 2.0'
17
+ gem 'juwelier', '~> 2.4'
18
+ gem 'rdoc', '~> 6.3', '>= 6.3.1'
19
+ gem 'rspec'
20
+ gem 'rubocop'
21
+ gem 'shoulda'
22
+ gem 'simplecov'
23
+
24
+ gem 'actionpack', '>= 7.0.4.3', '< 7.1'
25
+ end