otto 2.8.0 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,1384 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config --exclude-limit 10000`
3
+ # on 2026-08-16 18:54:27 UTC using RuboCop version 1.89.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # This cop supports safe autocorrection (--autocorrect).
11
+ # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation.
12
+ Bundler/OrderedGems:
13
+ Exclude:
14
+ - 'Gemfile'
15
+
16
+ # Offense count: 7
17
+ # This cop supports safe autocorrection (--autocorrect).
18
+ Layout/EmptyLineAfterGuardClause:
19
+ Exclude:
20
+ - 'lib/otto/core/helper_registry.rb'
21
+ - 'lib/otto/locale/middleware.rb'
22
+ - 'lib/otto/privacy/core.rb'
23
+ - 'lib/otto/privacy/geo_resolver.rb'
24
+ - 'spec/otto/route_handlers_spec.rb'
25
+
26
+ # Offense count: 8
27
+ # This cop supports safe autocorrection (--autocorrect).
28
+ Layout/EmptyLineAfterMagicComment:
29
+ Exclude:
30
+ - 'lib/otto/env_keys.rb'
31
+ - 'lib/otto/security/authentication.rb'
32
+ - 'lib/otto/security/csrf.rb'
33
+ - 'lib/otto/security/rate_limiting.rb'
34
+ - 'lib/otto/security/validator.rb'
35
+ - 'spec/otto/handler_wrappers_spec.rb'
36
+ - 'spec/security_example.rb'
37
+ - 'spec/test_security_defaults.rb'
38
+
39
+ # Offense count: 4
40
+ # This cop supports safe autocorrection (--autocorrect).
41
+ # Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, DefLikeMacros, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
42
+ Layout/EmptyLineBetweenDefs:
43
+ Exclude:
44
+ - 'spec/otto/error_handler_registration_spec.rb'
45
+ - 'spec/otto/middleware_stack_synchronization_spec.rb'
46
+ - 'spec/support/test_helpers.rb'
47
+
48
+ # Offense count: 4
49
+ # This cop supports safe autocorrection (--autocorrect).
50
+ Layout/EmptyLines:
51
+ Exclude:
52
+ - 'spec/otto/locale_config_spec.rb'
53
+ - 'spec/otto/logging_integration_spec.rb'
54
+ - 'spec/support/test_helpers.rb'
55
+
56
+ # Offense count: 1
57
+ # This cop supports safe autocorrection (--autocorrect).
58
+ Layout/EmptyLinesAfterModuleInclusion:
59
+ Exclude:
60
+ - 'spec/otto/security/csrf_validation_spec.rb'
61
+
62
+ # Offense count: 5
63
+ # This cop supports safe autocorrection (--autocorrect).
64
+ # Configuration parameters: AllowAliasSyntax, AllowedMethods.
65
+ # AllowedMethods: alias_method, public, protected, private
66
+ Layout/EmptyLinesAroundAttributeAccessor:
67
+ Exclude:
68
+ - 'spec/otto/core/middleware_stack_spec.rb'
69
+
70
+ # Offense count: 1
71
+ # This cop supports safe autocorrection (--autocorrect).
72
+ # Configuration parameters: EnforcedStyle.
73
+ # SupportedStyles: empty_lines, no_empty_lines
74
+ Layout/EmptyLinesAroundBlockBody:
75
+ Exclude:
76
+ - 'spec/otto/locale_config_spec.rb'
77
+
78
+ # Offense count: 50
79
+ # This cop supports safe autocorrection (--autocorrect).
80
+ # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
81
+ Layout/ExtraSpacing:
82
+ Exclude:
83
+ - 'lib/otto/security/config.rb'
84
+ - 'spec/otto/auth_logging_spec.rb'
85
+ - 'spec/otto/error_handler_registration_spec.rb'
86
+ - 'spec/otto/error_handling_spec.rb'
87
+ - 'spec/otto/ip_harmonization_spec.rb'
88
+ - 'spec/otto/ip_privacy_spec.rb'
89
+ - 'spec/otto/logging_integration_spec.rb'
90
+ - 'spec/otto/mcp/rate_limiting_spec.rb'
91
+ - 'spec/otto/route_handlers/lambda_handler_spec.rb'
92
+ - 'spec/otto/route_loading_diagnostics_spec.rb'
93
+
94
+ # Offense count: 16
95
+ # This cop supports safe autocorrection (--autocorrect).
96
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
97
+ # SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
98
+ Layout/FirstArgumentIndentation:
99
+ Exclude:
100
+ - 'spec/otto/auth_logging_spec.rb'
101
+ - 'spec/otto/error_handler_registration_spec.rb'
102
+ - 'spec/otto/logging_integration_spec.rb'
103
+
104
+ # Offense count: 6
105
+ # This cop supports safe autocorrection (--autocorrect).
106
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
107
+ # SupportedStyles: special_inside_parentheses, consistent, align_brackets
108
+ Layout/FirstArrayElementIndentation:
109
+ Exclude:
110
+ - 'spec/otto/backtrace_sanitization_spec.rb'
111
+ - 'spec/otto/logging_integration_spec.rb'
112
+
113
+ # Offense count: 118
114
+ # This cop supports safe autocorrection (--autocorrect).
115
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
116
+ # SupportedStyles: special_inside_parentheses, consistent, align_braces
117
+ Layout/FirstHashElementIndentation:
118
+ Exclude:
119
+ - 'examples/advanced_routes/app/logic/admin/logic/manager.rb'
120
+ - 'examples/advanced_routes/app/logic/admin/panel.rb'
121
+ - 'examples/advanced_routes/app/logic/data_logic.rb'
122
+ - 'examples/advanced_routes/app/logic/data_processor.rb'
123
+ - 'examples/advanced_routes/app/logic/input_validator.rb'
124
+ - 'examples/advanced_routes/app/logic/simple_logic.rb'
125
+ - 'examples/advanced_routes/app/logic/test_logic.rb'
126
+ - 'examples/advanced_routes/app/logic/upload_logic.rb'
127
+ - 'examples/advanced_routes/app/logic/v2/logic/processor.rb'
128
+ - 'examples/advanced_routes/config.rb'
129
+ - 'examples/advanced_routes/run.rb'
130
+ - 'examples/backtrace_sanitization_demo.rb'
131
+ - 'examples/error_handler_registration.rb'
132
+ - 'examples/lambda_handlers/config.ru'
133
+ - 'examples/mcp_demo/app.rb'
134
+ - 'examples/mcp_demo/config.ru'
135
+ - 'examples/security_features/app.rb'
136
+ - 'examples/security_features/config.ru'
137
+ - 'lib/otto/core/error_handler.rb'
138
+ - 'lib/otto/mcp/auth/token.rb'
139
+ - 'lib/otto/mcp/protocol.rb'
140
+ - 'lib/otto/mcp/rate_limiting.rb'
141
+ - 'lib/otto/mcp/registry.rb'
142
+ - 'lib/otto/mcp/route_parser.rb'
143
+ - 'lib/otto/mcp/schema_validation.rb'
144
+ - 'lib/otto/mcp/server.rb'
145
+ - 'lib/otto/security/authentication/route_auth_wrapper.rb'
146
+ - 'lib/otto/security/authorization_error.rb'
147
+ - 'lib/otto/security/middleware/validation_middleware.rb'
148
+ - 'lib/otto/security/rate_limiter.rb'
149
+ - 'spec/otto/auth_config_sharing_spec.rb'
150
+ - 'spec/otto/auth_logging_spec.rb'
151
+ - 'spec/otto/configuration_methods_spec.rb'
152
+ - 'spec/otto/error_handler_registration_spec.rb'
153
+ - 'spec/otto/initialization_spec.rb'
154
+ - 'spec/otto/locale_config_spec.rb'
155
+ - 'spec/otto/logging_integration_spec.rb'
156
+ - 'spec/otto/mcp/rate_limiting_spec.rb'
157
+ - 'spec/otto/mcp_route_parsing_spec.rb'
158
+ - 'spec/otto/security/route_auth_wrapper_spec.rb'
159
+ - 'spec/otto/uri_spec.rb'
160
+ - 'spec/otto/user_agent_anonymization_comprehensive_spec.rb'
161
+ - 'spec/security_example.rb'
162
+ - 'spec/support/test_helpers.rb'
163
+
164
+ # Offense count: 159
165
+ # This cop supports safe autocorrection (--autocorrect).
166
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
167
+ # SupportedHashRocketStyles: key, separator, table
168
+ # SupportedColonStyles: key, separator, table
169
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
170
+ Layout/HashAlignment:
171
+ Exclude:
172
+ - 'examples/advanced_routes/app/logic/admin/logic/manager.rb'
173
+ - 'examples/advanced_routes/app/logic/admin/panel.rb'
174
+ - 'examples/advanced_routes/app/logic/analytics_processor.rb'
175
+ - 'examples/advanced_routes/app/logic/complex/business/handler.rb'
176
+ - 'examples/advanced_routes/app/logic/data_logic.rb'
177
+ - 'examples/advanced_routes/app/logic/data_processor.rb'
178
+ - 'examples/advanced_routes/app/logic/input_validator.rb'
179
+ - 'examples/advanced_routes/app/logic/nested/feature/logic.rb'
180
+ - 'examples/advanced_routes/app/logic/reports_generator.rb'
181
+ - 'examples/advanced_routes/app/logic/simple_logic.rb'
182
+ - 'examples/advanced_routes/app/logic/system/config/manager.rb'
183
+ - 'examples/advanced_routes/app/logic/test_logic.rb'
184
+ - 'examples/advanced_routes/app/logic/transform_logic.rb'
185
+ - 'examples/advanced_routes/app/logic/upload_logic.rb'
186
+ - 'examples/advanced_routes/app/logic/v2/logic/dashboard.rb'
187
+ - 'examples/advanced_routes/app/logic/v2/logic/processor.rb'
188
+ - 'examples/advanced_routes/config.rb'
189
+ - 'examples/error_handler_registration.rb'
190
+ - 'examples/lambda_handlers/handlers.rb'
191
+ - 'examples/mcp_demo/app.rb'
192
+ - 'examples/security_features/app.rb'
193
+ - 'lib/otto/mcp/auth/token.rb'
194
+ - 'lib/otto/mcp/protocol.rb'
195
+ - 'lib/otto/mcp/rate_limiting.rb'
196
+ - 'lib/otto/mcp/registry.rb'
197
+ - 'lib/otto/mcp/route_parser.rb'
198
+ - 'lib/otto/mcp/schema_validation.rb'
199
+ - 'lib/otto/mcp/server.rb'
200
+ - 'lib/otto/security/authentication/route_auth_wrapper.rb'
201
+ - 'lib/otto/security/authentication/route_auth_wrapper/role_authorization.rb'
202
+ - 'lib/otto/security/authorization_error.rb'
203
+ - 'lib/otto/security/middleware/validation_middleware.rb'
204
+ - 'lib/otto/security/rate_limiter.rb'
205
+ - 'spec/otto/configuration_methods_spec.rb'
206
+ - 'spec/otto/error_handler_registration_spec.rb'
207
+ - 'spec/otto/initialization_spec.rb'
208
+ - 'spec/otto/ip_privacy_spec.rb'
209
+ - 'spec/otto/locale_config_spec.rb'
210
+ - 'spec/otto/mcp/rate_limiting_spec.rb'
211
+ - 'spec/otto/mcp_route_parsing_spec.rb'
212
+ - 'spec/otto/middleware_execution_order_spec.rb'
213
+ - 'spec/otto/rate_limiting_spec.rb'
214
+ - 'spec/otto/security/configurator_bypass_spec.rb'
215
+ - 'spec/otto/security/configurator_spec.rb'
216
+ - 'spec/otto/security/route_auth_wrapper_spec.rb'
217
+ - 'spec/otto/uri_spec.rb'
218
+ - 'spec/support/test_helpers.rb'
219
+
220
+ # Offense count: 9
221
+ # This cop supports safe autocorrection (--autocorrect).
222
+ # Configuration parameters: EnforcedStyle.
223
+ # SupportedStyles: symmetrical, new_line, same_line
224
+ Layout/MultilineMethodCallBraceLayout:
225
+ Exclude:
226
+ - 'examples/logging_improvements.rb'
227
+ - 'lib/otto/security/middleware/validation_middleware.rb'
228
+ - 'spec/otto/logging_integration_spec.rb'
229
+
230
+ # Offense count: 2
231
+ # This cop supports safe autocorrection (--autocorrect).
232
+ # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator, EnforcedStyleForRationalLiterals.
233
+ # SupportedStylesForExponentOperator: space, no_space
234
+ # SupportedStylesForRationalLiterals: space, no_space
235
+ Layout/SpaceAroundOperators:
236
+ Exclude:
237
+ - 'spec/otto/route_loading_diagnostics_spec.rb'
238
+ - 'spec/otto/security/configurator_spec.rb'
239
+
240
+ # Offense count: 4
241
+ # This cop supports safe autocorrection (--autocorrect).
242
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
243
+ # SupportedStyles: space, no_space, compact
244
+ # SupportedStylesForEmptyBraces: space, no_space
245
+ Layout/SpaceInsideHashLiteralBraces:
246
+ Exclude:
247
+ - 'spec/otto/configuration_freezing_spec.rb'
248
+
249
+ # Offense count: 3
250
+ # This cop supports safe autocorrection (--autocorrect).
251
+ Lint/AmbiguousOperatorPrecedence:
252
+ Exclude:
253
+ - 'spec/otto/logging_integration_spec.rb'
254
+ - 'spec/otto/user_agent_anonymization_comprehensive_spec.rb'
255
+
256
+ # Offense count: 2
257
+ # This cop supports unsafe autocorrection (--autocorrect-all).
258
+ # Configuration parameters: RequireParenthesesForMethodChains.
259
+ Lint/AmbiguousRange:
260
+ Exclude:
261
+ - 'spec/security_validation_spec.rb'
262
+
263
+ # Offense count: 2
264
+ # This cop supports unsafe autocorrection (--autocorrect-all).
265
+ # Configuration parameters: AllowSafeAssignment.
266
+ Lint/AssignmentInCondition:
267
+ Exclude:
268
+ - 'lib/otto/core/error_handler.rb'
269
+
270
+ # Offense count: 15
271
+ # Configuration parameters: AllowedMethods.
272
+ # AllowedMethods: enums
273
+ Lint/ConstantDefinitionInBlock:
274
+ Exclude:
275
+ - 'spec/otto/caddy_tls/caddy_tls_spec.rb'
276
+ - 'spec/otto/error_handler_registration_spec.rb'
277
+ - 'spec/otto/middleware_stack_synchronization_spec.rb'
278
+ - 'spec/otto/route_handlers_spec.rb'
279
+ - 'spec/otto/security/configurator_bypass_spec.rb'
280
+ - 'spec/otto/security/csp_emission_integration_spec.rb'
281
+ - 'spec/otto/security/csp_reporting_frozen_spec.rb'
282
+ - 'spec/otto/security/csp_reporting_integration_spec.rb'
283
+
284
+ # Offense count: 5
285
+ # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
286
+ Lint/DuplicateBranch:
287
+ Exclude:
288
+ - 'lib/otto/mcp/protocol.rb'
289
+ - 'lib/otto/response_handlers/auto.rb'
290
+ - 'spec/otto/security/route_auth_wrapper_spec.rb'
291
+
292
+ # Offense count: 1
293
+ # Configuration parameters: DelegatingMethods.
294
+ # DelegatingMethods: delegate
295
+ Lint/DuplicateMethods:
296
+ Exclude:
297
+ - 'lib/otto/privacy/geo_resolver.rb'
298
+
299
+ # Offense count: 5
300
+ # Configuration parameters: AllowedParentClasses.
301
+ Lint/MissingSuper:
302
+ Exclude:
303
+ - 'lib/otto/mcp/rate_limiting.rb'
304
+ - 'lib/otto/security/authentication/strategies/api_key_strategy.rb'
305
+ - 'lib/otto/security/authentication/strategies/permission_strategy.rb'
306
+ - 'lib/otto/security/authentication/strategies/role_strategy.rb'
307
+ - 'lib/otto/security/authentication/strategies/session_strategy.rb'
308
+
309
+ # Offense count: 12
310
+ # This cop supports unsafe autocorrection (--autocorrect-all).
311
+ Lint/NonAtomicFileOperation:
312
+ Exclude:
313
+ - 'examples/error_handler_registration.rb'
314
+ - 'spec/otto/file_safety_spec.rb'
315
+ - 'spec/otto/static_file_freezing_spec.rb'
316
+ - 'spec/spec_helper.rb'
317
+
318
+ # Offense count: 4
319
+ # This cop supports unsafe autocorrection (--autocorrect-all).
320
+ # Configuration parameters: AllowedMethods, InferNonNilReceiver, AdditionalNilMethods.
321
+ # AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal?
322
+ # AdditionalNilMethods: present?, blank?, try, try!
323
+ Lint/RedundantSafeNavigation:
324
+ Exclude:
325
+ - 'lib/otto/response_handlers/auto.rb'
326
+ - 'lib/otto/response_handlers/json.rb'
327
+ - 'lib/otto/response_handlers/redirect.rb'
328
+
329
+ # Offense count: 6
330
+ # This cop supports safe autocorrection (--autocorrect).
331
+ Lint/ScriptPermission:
332
+ Exclude:
333
+ - 'examples/advanced_routes/puma.rb'
334
+ - 'examples/advanced_routes/run.rb'
335
+ - 'examples/advanced_routes/test.rb'
336
+ - 'examples/backtrace_sanitization_demo.rb'
337
+ - 'examples/logging_improvements.rb'
338
+ - 'examples/simple_geo_resolver.rb'
339
+
340
+ # Offense count: 1
341
+ Lint/ShadowedException:
342
+ Exclude:
343
+ - 'lib/otto/core/configuration.rb'
344
+
345
+ # Offense count: 1
346
+ # Configuration parameters: AllowKeywordBlockArguments.
347
+ Lint/UnderscorePrefixedVariableName:
348
+ Exclude:
349
+ - 'spec/otto/caddy_tls/caddy_tls_spec.rb'
350
+
351
+ # Offense count: 16
352
+ # This cop supports safe autocorrection (--autocorrect).
353
+ # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
354
+ Lint/UnusedBlockArgument:
355
+ Exclude:
356
+ - 'spec/otto/ip_precision_capability_spec.rb'
357
+ - 'spec/otto/ip_privacy_spec.rb'
358
+ - 'spec/otto/security/route_auth_wrapper_spec.rb'
359
+ - 'spec/otto/user_agent_anonymization_comprehensive_spec.rb'
360
+
361
+ # Offense count: 11
362
+ # This cop supports safe autocorrection (--autocorrect).
363
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
364
+ # NotImplementedExceptions: NotImplementedError
365
+ Lint/UnusedMethodArgument:
366
+ Exclude:
367
+ - 'examples/error_handler_registration.rb'
368
+ - 'lib/otto/security/configurator.rb'
369
+ - 'spec/otto/ip_privacy_spec.rb'
370
+ - 'spec/otto/middleware_stack_synchronization_spec.rb'
371
+ - 'spec/otto/security/configurator_bypass_spec.rb'
372
+ - 'spec/otto/security/csp/emit_middleware_spec.rb'
373
+ - 'spec/otto/security/csp_reporting_frozen_spec.rb'
374
+ - 'spec/support/test_helpers.rb'
375
+
376
+ # Offense count: 2
377
+ # This cop supports safe autocorrection (--autocorrect).
378
+ # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
379
+ Lint/UselessAccessModifier:
380
+ Exclude:
381
+ - 'lib/otto/core/error_handler.rb'
382
+
383
+ # Offense count: 1
384
+ # This cop supports safe autocorrection (--autocorrect).
385
+ Lint/UselessAssignment:
386
+ Exclude:
387
+ - 'examples/advanced_routes/test.rb'
388
+
389
+ # Offense count: 2
390
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
391
+ # AllowedMethods: refine
392
+ Metrics/BlockLength:
393
+ Max: 56
394
+
395
+ # Offense count: 3
396
+ # Configuration parameters: CountComments, Max, CountAsOne.
397
+ Metrics/ClassLength:
398
+ Exclude:
399
+ - 'examples/security_features/app.rb'
400
+ - 'lib/otto/request.rb'
401
+ - 'lib/otto/security/config.rb'
402
+
403
+ # Offense count: 6
404
+ # Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns.
405
+ Metrics/MethodLength:
406
+ Exclude:
407
+ - 'examples/security_features/app.rb'
408
+ - 'lib/otto/core/router.rb'
409
+ - 'lib/otto/logging_helpers.rb'
410
+ - 'lib/otto/route.rb'
411
+ - 'spec/test_security_defaults.rb'
412
+
413
+ # Offense count: 1
414
+ # Configuration parameters: CountComments, Max, CountAsOne.
415
+ Metrics/ModuleLength:
416
+ Exclude:
417
+ - 'lib/otto/design_system.rb'
418
+
419
+ # Offense count: 4
420
+ # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
421
+ Metrics/ParameterLists:
422
+ Max: 11
423
+
424
+ # Offense count: 46
425
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
426
+ Metrics/PerceivedComplexity:
427
+ Max: 23
428
+
429
+ # Offense count: 2
430
+ Naming/AccessorMethodName:
431
+ Exclude:
432
+ - 'lib/otto/security/config.rb'
433
+ - 'lib/otto/security/core.rb'
434
+
435
+ # Offense count: 1
436
+ # Configuration parameters: EnforcedStyle, AllowedPatterns, ForbiddenIdentifiers, ForbiddenPatterns.
437
+ # SupportedStyles: snake_case, camelCase
438
+ # ForbiddenIdentifiers: __id__, __send__
439
+ Naming/MethodName:
440
+ Exclude:
441
+ - 'spec/support/test_applications.rb'
442
+
443
+ # Offense count: 6
444
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
445
+ # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
446
+ Naming/MethodParameterName:
447
+ Exclude:
448
+ - 'lib/otto/privacy/redacted_fingerprint.rb'
449
+ - 'lib/otto/privacy/user_agent_privacy.rb'
450
+ - 'lib/otto/security/config.rb'
451
+ - 'spec/otto/caddy_tls/caddy_tls_spec.rb'
452
+
453
+ # Offense count: 7
454
+ # Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
455
+ # AllowedMethods: call
456
+ # WaywardPredicates: infinite?, nonzero?
457
+ Naming/PredicateMethod:
458
+ Exclude:
459
+ - 'lib/otto/mcp/auth/token.rb'
460
+ - 'lib/otto/mcp/schema_validation.rb'
461
+ - 'lib/otto/security/config.rb'
462
+ - 'spec/test_security_defaults.rb'
463
+
464
+ # Offense count: 7
465
+ # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros, UseSorbetSigs.
466
+ # NamePrefix: is_, has_, have_, does_
467
+ # ForbiddenPrefixes: is_, has_, have_, does_
468
+ # AllowedMethods: is_a?
469
+ # MethodDefinitionMacros: define_method, define_singleton_method
470
+ Naming/PredicatePrefix:
471
+ Exclude:
472
+ - 'spec/**/*'
473
+ - 'lib/otto/mcp/route_parser.rb'
474
+ - 'lib/otto/route_definition.rb'
475
+ - 'lib/otto/security/authentication/strategy_result.rb'
476
+
477
+ # Offense count: 1
478
+ # This cop supports safe autocorrection (--autocorrect).
479
+ # Configuration parameters: PreferredName.
480
+ Naming/RescuedExceptionsVariableName:
481
+ Exclude:
482
+ - 'lib/otto/locale/middleware.rb'
483
+
484
+ # Offense count: 2
485
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
486
+ # SupportedStyles: snake_case, normalcase, non_integer
487
+ # AllowedIdentifiers: TLS1_1, TLS1_2, capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
488
+ Naming/VariableNumber:
489
+ Exclude:
490
+ - 'spec/otto/route_class_otto_accessor_spec.rb'
491
+
492
+ # Offense count: 1
493
+ # Configuration parameters: MinSize.
494
+ Performance/CollectionLiteralInLoop:
495
+ Exclude:
496
+ - 'examples/security_features/app.rb'
497
+
498
+ # Offense count: 1
499
+ # This cop supports unsafe autocorrection (--autocorrect-all).
500
+ Performance/MapCompact:
501
+ Exclude:
502
+ - 'spec/otto/user_agent_anonymization_comprehensive_spec.rb'
503
+
504
+ # Offense count: 1
505
+ # This cop supports safe autocorrection (--autocorrect).
506
+ Performance/RegexpMatch:
507
+ Exclude:
508
+ - 'lib/otto/logging_helpers.rb'
509
+
510
+ # Offense count: 1
511
+ # This cop supports safe autocorrection (--autocorrect).
512
+ Performance/StringReplacement:
513
+ Exclude:
514
+ - 'lib/otto/helpers/validation.rb'
515
+
516
+ # Offense count: 4
517
+ # This cop supports unsafe autocorrection (--autocorrect-all).
518
+ Performance/TimesMap:
519
+ Exclude:
520
+ - 'spec/otto/ip_privacy_spec.rb'
521
+
522
+ # Offense count: 13
523
+ RSpec/AnyInstance:
524
+ Exclude:
525
+ - 'spec/otto/route_handlers_spec.rb'
526
+
527
+ # Offense count: 2
528
+ RSpec/BeforeAfterAll:
529
+ Exclude:
530
+ - '**/spec/spec_helper.rb'
531
+ - '**/spec/rails_helper.rb'
532
+ - '**/spec/support/**/*.rb'
533
+ - 'spec/otto/geo_resolver_config_spec.rb'
534
+ - 'spec/otto/user_agent_anonymization_comprehensive_spec.rb'
535
+
536
+ # Offense count: 91
537
+ # Configuration parameters: Prefixes, AllowedPatterns.
538
+ # Prefixes: when, with, without
539
+ RSpec/ContextWording:
540
+ Exclude:
541
+ - 'spec/otto/caddy_tls/localhost_guard_spec.rb'
542
+ - 'spec/otto/error_handler_registration_spec.rb'
543
+ - 'spec/otto/error_handling_spec.rb'
544
+ - 'spec/otto/geo_resolver_config_spec.rb'
545
+ - 'spec/otto/initialization_spec.rb'
546
+ - 'spec/otto/ip_precision_capability_spec.rb'
547
+ - 'spec/otto/ip_privacy_spec.rb'
548
+ - 'spec/otto/lambda_routes_integration_spec.rb'
549
+ - 'spec/otto/mcp_route_parsing_spec.rb'
550
+ - 'spec/otto/request_helpers_spec.rb'
551
+ - 'spec/otto/response_csp_spec.rb'
552
+ - 'spec/otto/route_handlers_spec.rb'
553
+ - 'spec/otto/security/csp/parser_spec.rb'
554
+ - 'spec/otto/security/route_auth_wrapper_spec.rb'
555
+ - 'spec/otto/utils_spec.rb'
556
+ - 'spec/support/nonce_csp_emission_examples.rb'
557
+
558
+ # Offense count: 24
559
+ # Configuration parameters: IgnoredMetadata.
560
+ RSpec/DescribeClass:
561
+ Exclude:
562
+ - '**/spec/features/**/*'
563
+ - '**/spec/requests/**/*'
564
+ - '**/spec/routing/**/*'
565
+ - '**/spec/system/**/*'
566
+ - '**/spec/views/**/*'
567
+ - 'spec/otto/auth_config_sharing_spec.rb'
568
+ - 'spec/otto/auth_logging_spec.rb'
569
+ - 'spec/otto/backtrace_sanitization_spec.rb'
570
+ - 'spec/otto/errors_spec.rb'
571
+ - 'spec/otto/geo_resolver_config_spec.rb'
572
+ - 'spec/otto/handler_wrappers_spec.rb'
573
+ - 'spec/otto/ip_harmonization_spec.rb'
574
+ - 'spec/otto/ip_precision_capability_spec.rb'
575
+ - 'spec/otto/ip_privacy_spec.rb'
576
+ - 'spec/otto/lambda_handler_config_spec.rb'
577
+ - 'spec/otto/lambda_routes_integration_spec.rb'
578
+ - 'spec/otto/logging_integration_spec.rb'
579
+ - 'spec/otto/middleware_args_edge_cases_spec.rb'
580
+ - 'spec/otto/middleware_execution_order_spec.rb'
581
+ - 'spec/otto/middleware_stack_synchronization_spec.rb'
582
+ - 'spec/otto/request_response_helpers_spec.rb'
583
+ - 'spec/otto/route_loading_diagnostics_spec.rb'
584
+ - 'spec/otto/route_single_setup_spec.rb'
585
+ - 'spec/otto/security/configurator_bypass_spec.rb'
586
+ - 'spec/otto/security/csp_emission_integration_spec.rb'
587
+ - 'spec/otto/security/csp_reporting_frozen_spec.rb'
588
+ - 'spec/otto/security/csp_reporting_integration_spec.rb'
589
+ - 'spec/otto/uri_duplicate_targets_spec.rb'
590
+ - 'spec/otto/user_agent_anonymization_comprehensive_spec.rb'
591
+
592
+ # Offense count: 17
593
+ RSpec/DescribeMethod:
594
+ Exclude:
595
+ - 'spec/otto/configuration_freezing_spec.rb'
596
+ - 'spec/otto/configuration_methods_spec.rb'
597
+ - 'spec/otto/enhanced_routing_spec.rb'
598
+ - 'spec/otto/error_handler_registration_spec.rb'
599
+ - 'spec/otto/error_handling_spec.rb'
600
+ - 'spec/otto/file_safety_spec.rb'
601
+ - 'spec/otto/initialization_spec.rb'
602
+ - 'spec/otto/locale_config_spec.rb'
603
+ - 'spec/otto/mcp/rate_limiting_spec.rb'
604
+ - 'spec/otto/mcp_route_parsing_spec.rb'
605
+ - 'spec/otto/rate_limiting_spec.rb'
606
+ - 'spec/otto/response_integration_spec.rb'
607
+ - 'spec/otto/router_path_normalization_spec.rb'
608
+ - 'spec/otto/routing_spec.rb'
609
+ - 'spec/otto/security/csp_config_spec.rb'
610
+ - 'spec/otto/security_spec.rb'
611
+ - 'spec/otto/static_file_freezing_spec.rb'
612
+
613
+ # Offense count: 366
614
+ # This cop supports unsafe autocorrection (--autocorrect-all).
615
+ # Configuration parameters: SkipBlocks, EnforcedStyle, OnlyStaticConstants.
616
+ # SupportedStyles: described_class, explicit
617
+ RSpec/DescribedClass:
618
+ Exclude:
619
+ - 'spec/otto/configuration_freezing_spec.rb'
620
+ - 'spec/otto/configuration_methods_spec.rb'
621
+ - 'spec/otto/enhanced_routing_spec.rb'
622
+ - 'spec/otto/error_handler_registration_spec.rb'
623
+ - 'spec/otto/error_handling_spec.rb'
624
+ - 'spec/otto/initialization_spec.rb'
625
+ - 'spec/otto/ip_privacy_spec.rb'
626
+ - 'spec/otto/locale_config_spec.rb'
627
+ - 'spec/otto/mcp_route_parsing_spec.rb'
628
+ - 'spec/otto/rate_limiting_spec.rb'
629
+ - 'spec/otto/request_helpers_spec.rb'
630
+ - 'spec/otto/response_handlers_spec.rb'
631
+ - 'spec/otto/route_handlers_spec.rb'
632
+ - 'spec/otto/router_path_normalization_spec.rb'
633
+ - 'spec/otto/routing_spec.rb'
634
+ - 'spec/otto/security_spec.rb'
635
+ - 'spec/otto/utils_spec.rb'
636
+
637
+ # Offense count: 1
638
+ # This cop supports safe autocorrection (--autocorrect).
639
+ # Configuration parameters: AllowConsecutiveOneLiners.
640
+ RSpec/EmptyLineAfterExample:
641
+ Exclude:
642
+ - 'spec/otto/ip_privacy_spec.rb'
643
+
644
+ # Offense count: 1
645
+ # This cop supports safe autocorrection (--autocorrect).
646
+ RSpec/EmptyLineAfterExampleGroup:
647
+ Exclude:
648
+ - 'spec/security_validation_spec.rb'
649
+
650
+ # Offense count: 4
651
+ # This cop supports safe autocorrection (--autocorrect).
652
+ RSpec/EmptyLineAfterFinalLet:
653
+ Exclude:
654
+ - 'spec/otto/initialization_spec.rb'
655
+ - 'spec/otto/locale_config_spec.rb'
656
+ - 'spec/otto/uri_spec.rb'
657
+
658
+ # Offense count: 563
659
+ # Configuration parameters: CountAsOne.
660
+ RSpec/ExampleLength:
661
+ Max: 36
662
+
663
+ # Offense count: 1
664
+ # This cop supports safe autocorrection (--autocorrect).
665
+ RSpec/ExpectActual:
666
+ Exclude:
667
+ - '**/spec/routing/**/*'
668
+ - 'spec/security_validation_spec.rb'
669
+
670
+ # Offense count: 3
671
+ # This cop supports unsafe autocorrection (--autocorrect-all).
672
+ # Configuration parameters: EnforcedStyle, NegatedMatcher.
673
+ # SupportedStyles: method_call, block
674
+ RSpec/ExpectChange:
675
+ Exclude:
676
+ - 'spec/security_config_spec.rb'
677
+
678
+ # Offense count: 2
679
+ # This cop supports safe autocorrection (--autocorrect).
680
+ # Configuration parameters: EnforcedStyle.
681
+ # SupportedStyles: implicit, each, example
682
+ RSpec/HookArgument:
683
+ Exclude:
684
+ - 'spec/spec_helper.rb'
685
+
686
+ # Offense count: 1
687
+ RSpec/IdenticalEqualityAssertion:
688
+ Exclude:
689
+ - 'spec/otto/ip_privacy_spec.rb'
690
+
691
+ # Offense count: 8
692
+ # This cop supports unsafe autocorrection (--autocorrect-all).
693
+ RSpec/IncludeExamples:
694
+ Exclude:
695
+ - 'spec/otto/response_csp_spec.rb'
696
+ - 'spec/otto/security/csp/emit_middleware_spec.rb'
697
+ - 'spec/otto/security/csp/writer_spec.rb'
698
+
699
+ # Offense count: 9
700
+ # Configuration parameters: Max, AllowedIdentifiers, AllowedPatterns.
701
+ RSpec/IndexedLet:
702
+ Exclude:
703
+ - 'spec/otto/auth_config_sharing_spec.rb'
704
+ - 'spec/otto/core/middleware_stack_spec.rb'
705
+ - 'spec/otto/middleware_stack_synchronization_spec.rb'
706
+
707
+ # Offense count: 32
708
+ # Configuration parameters: AssignmentOnly.
709
+ RSpec/InstanceVariable:
710
+ Exclude:
711
+ - 'spec/otto/middleware_stack_synchronization_spec.rb'
712
+ - 'spec/otto/route_handlers_spec.rb'
713
+ - 'spec/otto/security/configurator_bypass_spec.rb'
714
+ - 'spec/otto/security/csp_emission_integration_spec.rb'
715
+ - 'spec/otto/security/csp_reporting_frozen_spec.rb'
716
+ - 'spec/otto/security/csp_reporting_integration_spec.rb'
717
+ - 'spec/otto/user_agent_anonymization_comprehensive_spec.rb'
718
+
719
+ # Offense count: 1
720
+ # This cop supports safe autocorrection (--autocorrect).
721
+ RSpec/IteratedExpectation:
722
+ Exclude:
723
+ - 'spec/otto/error_handling_spec.rb'
724
+
725
+ # Offense count: 5
726
+ # This cop supports safe autocorrection (--autocorrect).
727
+ RSpec/LeadingSubject:
728
+ Exclude:
729
+ - 'spec/otto/caddy_tls/localhost_guard_spec.rb'
730
+ - 'spec/otto/initialization_spec.rb'
731
+ - 'spec/otto/locale_config_spec.rb'
732
+ - 'spec/otto/uri_spec.rb'
733
+
734
+ # Offense count: 14
735
+ RSpec/LeakyConstantDeclaration:
736
+ Exclude:
737
+ - 'spec/otto/caddy_tls/caddy_tls_spec.rb'
738
+ - 'spec/otto/error_handler_registration_spec.rb'
739
+ - 'spec/otto/route_handlers_spec.rb'
740
+ - 'spec/otto/security/configurator_bypass_spec.rb'
741
+ - 'spec/otto/security/csp_emission_integration_spec.rb'
742
+ - 'spec/otto/security/csp_reporting_frozen_spec.rb'
743
+ - 'spec/otto/security/csp_reporting_integration_spec.rb'
744
+
745
+ # Offense count: 2
746
+ # This cop supports safe autocorrection (--autocorrect).
747
+ RSpec/LetBeforeExamples:
748
+ Exclude:
749
+ - 'spec/otto/security/csp/emit_middleware_spec.rb'
750
+
751
+ # Offense count: 14
752
+ # This cop supports safe autocorrection (--autocorrect).
753
+ RSpec/MatchWithSimpleRegex:
754
+ Exclude:
755
+ - 'spec/otto/configuration_freezing_spec.rb'
756
+ - 'spec/otto/lambda_handler_config_spec.rb'
757
+ - 'spec/otto/rate_limiting_spec.rb'
758
+ - 'spec/otto/route_handlers/lambda_handler_spec.rb'
759
+ - 'spec/otto/uri_spec.rb'
760
+
761
+ # Offense count: 107
762
+ # Configuration parameters: EnforcedStyle.
763
+ # SupportedStyles: have_received, receive
764
+ RSpec/MessageSpies:
765
+ Exclude:
766
+ - 'spec/otto/auth_logging_spec.rb'
767
+ - 'spec/otto/caddy_tls/caddy_tls_spec.rb'
768
+ - 'spec/otto/configuration_methods_spec.rb'
769
+ - 'spec/otto/error_handler_registration_spec.rb'
770
+ - 'spec/otto/error_handling_spec.rb'
771
+ - 'spec/otto/ip_privacy_spec.rb'
772
+ - 'spec/otto/lambda_routes_integration_spec.rb'
773
+ - 'spec/otto/logging_integration_spec.rb'
774
+ - 'spec/otto/mcp/rate_limiting_spec.rb'
775
+ - 'spec/otto/mcp_route_parsing_spec.rb'
776
+ - 'spec/otto/rate_limiting_spec.rb'
777
+ - 'spec/otto/request_helpers_spec.rb'
778
+ - 'spec/otto/response_csp_spec.rb'
779
+ - 'spec/otto/route_handlers/lambda_handler_spec.rb'
780
+ - 'spec/otto/route_handlers_spec.rb'
781
+ - 'spec/otto/route_loading_diagnostics_spec.rb'
782
+ - 'spec/otto/router_path_normalization_spec.rb'
783
+ - 'spec/otto/security/csp/writer_spec.rb'
784
+ - 'spec/otto/security/csp_config_spec.rb'
785
+ - 'spec/otto/security/csrf_validation_spec.rb'
786
+ - 'spec/otto/uri_duplicate_targets_spec.rb'
787
+ - 'spec/otto/utils_spec.rb'
788
+
789
+ # Offense count: 2
790
+ RSpec/MultipleDescribes:
791
+ Exclude:
792
+ - 'spec/security_csrf_spec.rb'
793
+ - 'spec/security_validation_spec.rb'
794
+
795
+ # Offense count: 826
796
+ RSpec/MultipleExpectations:
797
+ Max: 12
798
+
799
+ # Offense count: 71
800
+ # Configuration parameters: AllowSubject.
801
+ RSpec/MultipleMemoizedHelpers:
802
+ Max: 14
803
+
804
+ # Offense count: 33
805
+ # Configuration parameters: AllowedGroups.
806
+ RSpec/NestedGroups:
807
+ Max: 5
808
+
809
+ # Offense count: 228
810
+ # This cop supports unsafe autocorrection (--autocorrect-all).
811
+ RSpec/Output:
812
+ Exclude:
813
+ - 'spec/otto/initialization_spec.rb'
814
+ - 'spec/otto/locale_config_spec.rb'
815
+ - 'spec/otto/routing_spec.rb'
816
+ - 'spec/otto/security_spec.rb'
817
+ - 'spec/otto/user_agent_anonymization_comprehensive_spec.rb'
818
+ - 'spec/otto_spec.rb'
819
+ - 'spec/security_config_spec.rb'
820
+ - 'spec/security_csrf_spec.rb'
821
+ - 'spec/security_example.rb'
822
+ - 'spec/security_validation_spec.rb'
823
+ - 'spec/support/test_helpers.rb'
824
+ - 'spec/test_security_defaults.rb'
825
+
826
+ # Offense count: 4
827
+ # This cop supports unsafe autocorrection (--autocorrect-all).
828
+ RSpec/ReceiveMessages:
829
+ Exclude:
830
+ - 'spec/otto/mcp_route_parsing_spec.rb'
831
+ - 'spec/security_csrf_spec.rb'
832
+
833
+ # Offense count: 4
834
+ RSpec/RemoveConst:
835
+ Exclude:
836
+ - 'spec/otto/configuration_freezing_spec.rb'
837
+ - 'spec/otto/mcp/rate_limiting_spec.rb'
838
+ - 'spec/otto/rate_limiting_spec.rb'
839
+
840
+ # Offense count: 6
841
+ RSpec/RepeatedExample:
842
+ Exclude:
843
+ - 'spec/otto/auth_config_sharing_spec.rb'
844
+ - 'spec/otto/route_definition_spec.rb'
845
+
846
+ # Offense count: 1
847
+ # This cop supports safe autocorrection (--autocorrect).
848
+ RSpec/ScatteredLet:
849
+ Exclude:
850
+ - 'spec/otto/security/csp_reporting_integration_spec.rb'
851
+
852
+ # Offense count: 22
853
+ # Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata, InflectorPath, EnforcedInflector.
854
+ # SupportedInflectors: default, active_support
855
+ RSpec/SpecFilePathFormat:
856
+ Exclude:
857
+ - '**/spec/routing/**/*'
858
+ - 'spec/otto/caddy_tls/caddy_tls_spec.rb'
859
+ - 'spec/otto/configuration_methods_spec.rb'
860
+ - 'spec/otto/enhanced_routing_spec.rb'
861
+ - 'spec/otto/error_handler_registration_spec.rb'
862
+ - 'spec/otto/error_handling_spec.rb'
863
+ - 'spec/otto/file_safety_spec.rb'
864
+ - 'spec/otto/locale_config_spec.rb'
865
+ - 'spec/otto/mcp/rate_limiting_spec.rb'
866
+ - 'spec/otto/mcp/token_auth_spec.rb'
867
+ - 'spec/otto/mcp_route_parsing_spec.rb'
868
+ - 'spec/otto/rate_limiting_spec.rb'
869
+ - 'spec/otto/response_integration_spec.rb'
870
+ - 'spec/otto/route_class_otto_accessor_spec.rb'
871
+ - 'spec/otto/router_path_normalization_spec.rb'
872
+ - 'spec/otto/routing_spec.rb'
873
+ - 'spec/otto/security/csp/nonce_spec.rb'
874
+ - 'spec/otto/security/csp_config_spec.rb'
875
+ - 'spec/otto/security/route_auth_wrapper_spec.rb'
876
+ - 'spec/otto/security_spec.rb'
877
+ - 'spec/otto/static_file_freezing_spec.rb'
878
+ - 'spec/otto/user_agent_privacy_spec.rb'
879
+ - 'spec/security_config_spec.rb'
880
+
881
+ # Offense count: 13
882
+ RSpec/StubbedMock:
883
+ Exclude:
884
+ - 'spec/otto/ip_privacy_spec.rb'
885
+ - 'spec/otto/mcp_route_parsing_spec.rb'
886
+ - 'spec/otto/router_path_normalization_spec.rb'
887
+ - 'spec/otto/utils_spec.rb'
888
+
889
+ # Offense count: 11
890
+ # This cop supports unsafe autocorrection (--autocorrect-all).
891
+ RSpec/VerifiedDoubleReference:
892
+ Exclude:
893
+ - 'spec/otto/core/middleware_stack_spec.rb'
894
+ - 'spec/otto/mcp/rate_limiting_spec.rb'
895
+ - 'spec/otto/rate_limiting_spec.rb'
896
+
897
+ # Offense count: 28
898
+ # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
899
+ RSpec/VerifiedDoubles:
900
+ Exclude:
901
+ - 'spec/otto/auth_config_sharing_spec.rb'
902
+ - 'spec/otto/auth_logging_spec.rb'
903
+ - 'spec/otto/configuration_freezing_spec.rb'
904
+ - 'spec/otto/ip_privacy_spec.rb'
905
+ - 'spec/otto/logging_integration_spec.rb'
906
+ - 'spec/otto/request_helpers_spec.rb'
907
+ - 'spec/otto/response_handlers_spec.rb'
908
+ - 'spec/otto/route_handlers_spec.rb'
909
+ - 'spec/otto/security/configurator_spec.rb'
910
+ - 'spec/security_csrf_spec.rb'
911
+
912
+ # Offense count: 2
913
+ # This cop supports safe autocorrection (--autocorrect).
914
+ # Configuration parameters: AllowOnlyRestArgument, UseAnonymousForwarding, RedundantRestArgumentNames, RedundantKeywordRestArgumentNames, RedundantBlockArgumentNames.
915
+ # RedundantRestArgumentNames: args, arguments
916
+ # RedundantKeywordRestArgumentNames: kwargs, options, opts
917
+ # RedundantBlockArgumentNames: blk, block, proc
918
+ Style/ArgumentsForwarding:
919
+ Exclude:
920
+ - 'spec/support/mmdb_fixture.rb'
921
+
922
+ # Offense count: 2
923
+ # This cop supports unsafe autocorrection (--autocorrect-all).
924
+ Style/ArrayIntersect:
925
+ Exclude:
926
+ - 'lib/otto/security/authentication/route_auth_wrapper/role_authorization.rb'
927
+
928
+ # Offense count: 8
929
+ # This cop supports safe autocorrection (--autocorrect).
930
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
931
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
932
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
933
+ # FunctionalMethods: let, let!, subject, watch
934
+ # AllowedMethods: lambda, proc, it
935
+ Style/BlockDelimiters:
936
+ Exclude:
937
+ - 'spec/otto/error_handler_registration_spec.rb'
938
+ - 'spec/otto/ip_privacy_spec.rb'
939
+ - 'spec/otto/logging_integration_spec.rb'
940
+ - 'spec/otto/request_response_helpers_spec.rb'
941
+ - 'spec/otto/security_spec.rb'
942
+
943
+ # Offense count: 6
944
+ # This cop supports safe autocorrection (--autocorrect).
945
+ # Configuration parameters: Keywords, RequireColon.
946
+ # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE
947
+ Style/CommentAnnotation:
948
+ Exclude:
949
+ - 'spec/otto/initialization_spec.rb'
950
+ - 'spec/otto/security/configurator_spec.rb'
951
+ - 'spec/otto/security/route_auth_wrapper_spec.rb'
952
+ - 'spec/otto/user_agent_anonymization_comprehensive_spec.rb'
953
+
954
+ # Offense count: 34
955
+ # Configuration parameters: AllowedConstants.
956
+ Style/Documentation:
957
+ Exclude:
958
+ - 'spec/**/*'
959
+ - 'test/**/*'
960
+ - 'examples/advanced_routes/app/controllers/handlers/async.rb'
961
+ - 'examples/advanced_routes/app/controllers/handlers/dynamic.rb'
962
+ - 'examples/advanced_routes/app/controllers/handlers/static.rb'
963
+ - 'examples/advanced_routes/app/controllers/modules/auth.rb'
964
+ - 'examples/advanced_routes/app/controllers/modules/transformer.rb'
965
+ - 'examples/advanced_routes/app/controllers/modules/validator.rb'
966
+ - 'examples/advanced_routes/app/controllers/v2/admin.rb'
967
+ - 'examples/advanced_routes/app/controllers/v2/config.rb'
968
+ - 'examples/advanced_routes/app/controllers/v2/settings.rb'
969
+ - 'examples/advanced_routes/app/logic/admin/logic/manager.rb'
970
+ - 'examples/advanced_routes/app/logic/admin/panel.rb'
971
+ - 'examples/advanced_routes/app/logic/analytics_processor.rb'
972
+ - 'examples/advanced_routes/app/logic/complex/business/handler.rb'
973
+ - 'examples/advanced_routes/app/logic/data_logic.rb'
974
+ - 'examples/advanced_routes/app/logic/data_processor.rb'
975
+ - 'examples/advanced_routes/app/logic/input_validator.rb'
976
+ - 'examples/advanced_routes/app/logic/nested/feature/logic.rb'
977
+ - 'examples/advanced_routes/app/logic/reports_generator.rb'
978
+ - 'examples/advanced_routes/app/logic/simple_logic.rb'
979
+ - 'examples/advanced_routes/app/logic/system/config/manager.rb'
980
+ - 'examples/advanced_routes/app/logic/test_logic.rb'
981
+ - 'examples/advanced_routes/app/logic/transform_logic.rb'
982
+ - 'examples/advanced_routes/app/logic/upload_logic.rb'
983
+ - 'examples/advanced_routes/app/logic/v2/logic/dashboard.rb'
984
+ - 'examples/advanced_routes/app/logic/v2/logic/processor.rb'
985
+ - 'examples/authentication_strategies/app/auth.rb'
986
+ - 'examples/authentication_strategies/app/controllers/auth_controller.rb'
987
+ - 'examples/authentication_strategies/app/controllers/main_controller.rb'
988
+ - 'examples/error_handler_registration.rb'
989
+ - 'examples/simple_geo_resolver.rb'
990
+ - 'lib/otto/locale.rb'
991
+ - 'lib/otto/privacy.rb'
992
+ - 'lib/otto/response_handlers.rb'
993
+
994
+ # Offense count: 1
995
+ # This cop supports safe autocorrection (--autocorrect).
996
+ # Configuration parameters: EnforcedStyle, AllowComments.
997
+ # SupportedStyles: empty, nil, both
998
+ Style/EmptyElse:
999
+ Exclude:
1000
+ - 'examples/simple_geo_resolver.rb'
1001
+
1002
+ # Offense count: 1
1003
+ # This cop supports safe autocorrection (--autocorrect).
1004
+ # Configuration parameters: EnforcedStyle.
1005
+ # SupportedStyles: trailing_conditional, ternary
1006
+ Style/EmptyStringInsideInterpolation:
1007
+ Exclude:
1008
+ - 'examples/advanced_routes/test.rb'
1009
+
1010
+ # Offense count: 9
1011
+ # This cop supports safe autocorrection (--autocorrect).
1012
+ # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, Mode, AllowedMethods, AllowedPatterns.
1013
+ # SupportedStyles: annotated, template, unannotated
1014
+ Style/FormatStringToken:
1015
+ EnforcedStyle: unannotated
1016
+
1017
+ # Offense count: 1
1018
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1019
+ Style/GlobalStdStream:
1020
+ Exclude:
1021
+ - 'examples/logging_improvements.rb'
1022
+
1023
+ # Offense count: 1
1024
+ # This cop supports safe autocorrection (--autocorrect).
1025
+ # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
1026
+ Style/GuardClause:
1027
+ Exclude:
1028
+ - 'lib/otto/security/middleware/ip_privacy_middleware.rb'
1029
+
1030
+ # Offense count: 4
1031
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1032
+ Style/IdenticalConditionalBranches:
1033
+ Exclude:
1034
+ - 'lib/otto/core/error_handler.rb'
1035
+ - 'spec/otto/middleware_args_edge_cases_spec.rb'
1036
+
1037
+ # Offense count: 34
1038
+ # This cop supports safe autocorrection (--autocorrect).
1039
+ Style/IfUnlessModifier:
1040
+ Exclude:
1041
+ - 'examples/security_features/app.rb'
1042
+ - 'lib/otto/core/helper_registry.rb'
1043
+ - 'lib/otto/core/router.rb'
1044
+ - 'lib/otto/helpers/validation.rb'
1045
+ - 'lib/otto/mcp/protocol.rb'
1046
+ - 'lib/otto/mcp/server.rb'
1047
+ - 'lib/otto/privacy/config.rb'
1048
+ - 'lib/otto/privacy/geo_resolver.rb'
1049
+ - 'lib/otto/privacy/redacted_fingerprint.rb'
1050
+ - 'lib/otto/route.rb'
1051
+ - 'lib/otto/route_handlers/base.rb'
1052
+ - 'lib/otto/route_handlers/logic_class.rb'
1053
+ - 'lib/otto/security/configurator.rb'
1054
+ - 'lib/otto/security/constant_resolver.rb'
1055
+ - 'lib/otto/security/core.rb'
1056
+ - 'lib/otto/security/csp/writer.rb'
1057
+ - 'lib/otto/security/middleware/ip_privacy_middleware.rb'
1058
+ - 'lib/otto/security/middleware/validation_middleware.rb'
1059
+ - 'spec/otto/route_handlers_spec.rb'
1060
+
1061
+ # Offense count: 4
1062
+ # This cop supports safe autocorrection (--autocorrect).
1063
+ # Configuration parameters: EnforcedStyle.
1064
+ # SupportedStyles: line_count_dependent, lambda, literal
1065
+ Style/Lambda:
1066
+ Exclude:
1067
+ - 'spec/otto/ip_privacy_spec.rb'
1068
+ - 'spec/otto/security/route_auth_wrapper_spec.rb'
1069
+
1070
+ # Offense count: 1
1071
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1072
+ Style/MapIntoArray:
1073
+ Exclude:
1074
+ - 'spec/otto/caddy_tls/caddy_tls_spec.rb'
1075
+
1076
+ # Offense count: 1
1077
+ # This cop supports safe autocorrection (--autocorrect).
1078
+ # Configuration parameters: EnforcedStyle.
1079
+ # SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
1080
+ Style/MethodDefParentheses:
1081
+ Exclude:
1082
+ - 'lib/otto.rb'
1083
+
1084
+ # Offense count: 2
1085
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1086
+ # Configuration parameters: EnforcedStyle, Autocorrect.
1087
+ # SupportedStyles: module_function, extend_self, forbidden
1088
+ Style/ModuleFunction:
1089
+ Exclude:
1090
+ - 'lib/otto/static.rb'
1091
+ - 'lib/otto/utils.rb'
1092
+
1093
+ # Offense count: 3
1094
+ Style/MultilineBlockChain:
1095
+ Exclude:
1096
+ - 'lib/otto/core/router.rb'
1097
+ - 'spec/otto/route_handlers/lambda_handler_spec.rb'
1098
+
1099
+ # Offense count: 3
1100
+ # This cop supports safe autocorrection (--autocorrect).
1101
+ Style/MultilineIfModifier:
1102
+ Exclude:
1103
+ - 'spec/otto/security/route_auth_wrapper_spec.rb'
1104
+
1105
+ # Offense count: 1
1106
+ # This cop supports safe autocorrection (--autocorrect).
1107
+ # Configuration parameters: EnforcedStyle.
1108
+ # SupportedStyles: both, prefix, postfix
1109
+ Style/NegatedIf:
1110
+ Exclude:
1111
+ - 'lib/otto/locale/middleware.rb'
1112
+
1113
+ # Offense count: 2
1114
+ # This cop supports safe autocorrection (--autocorrect).
1115
+ Style/NilLambda:
1116
+ Exclude:
1117
+ - 'spec/otto/ip_privacy_spec.rb'
1118
+ - 'spec/otto/route_handlers/lambda_handler_spec.rb'
1119
+
1120
+ # Offense count: 2
1121
+ # This cop supports safe autocorrection (--autocorrect).
1122
+ # Configuration parameters: Strict, AllowedNumbers, AllowedPatterns.
1123
+ Style/NumericLiterals:
1124
+ MinDigits: 11
1125
+
1126
+ # Offense count: 1
1127
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1128
+ # Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
1129
+ # SupportedStyles: predicate, comparison
1130
+ Style/NumericPredicate:
1131
+ Exclude:
1132
+ - 'spec/**/*'
1133
+ - 'lib/otto/security/config.rb'
1134
+
1135
+ # Offense count: 4
1136
+ # Configuration parameters: AllowedClasses.
1137
+ Style/OneClassPerFile:
1138
+ Exclude:
1139
+ - 'spec/**/*'
1140
+ - 'test/**/*'
1141
+ - 'examples/caddy_tls_demo/app.rb'
1142
+ - 'examples/error_handler_registration.rb'
1143
+ - 'examples/mcp_demo/app.rb'
1144
+
1145
+ # Offense count: 1
1146
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1147
+ # Configuration parameters: EnforcedStyle.
1148
+ # SupportedStyles: short, verbose
1149
+ Style/PreferredHashMethods:
1150
+ Exclude:
1151
+ - 'lib/otto/core/router.rb'
1152
+
1153
+ # Offense count: 1
1154
+ # This cop supports safe autocorrection (--autocorrect).
1155
+ Style/RedundantBegin:
1156
+ Exclude:
1157
+ - 'lib/otto/logging_helpers.rb'
1158
+
1159
+ # Offense count: 1
1160
+ # This cop supports safe autocorrection (--autocorrect).
1161
+ Style/RedundantConstantBase:
1162
+ Exclude:
1163
+ - 'spec/otto/security/constant_resolver_spec.rb'
1164
+
1165
+ # Offense count: 3
1166
+ # This cop supports safe autocorrection (--autocorrect).
1167
+ Style/RedundantParentheses:
1168
+ Exclude:
1169
+ - 'spec/support/mmdb_fixture.rb'
1170
+
1171
+ # Offense count: 1
1172
+ # This cop supports safe autocorrection (--autocorrect).
1173
+ Style/RedundantRegexpArgument:
1174
+ Exclude:
1175
+ - 'spec/otto/user_agent_anonymization_comprehensive_spec.rb'
1176
+
1177
+ # Offense count: 4
1178
+ # This cop supports safe autocorrection (--autocorrect).
1179
+ Style/RedundantRegexpEscape:
1180
+ Exclude:
1181
+ - 'spec/otto/error_handling_spec.rb'
1182
+
1183
+ # Offense count: 2
1184
+ # This cop supports safe autocorrection (--autocorrect).
1185
+ Style/RedundantStringEscape:
1186
+ Exclude:
1187
+ - 'spec/otto/backtrace_sanitization_spec.rb'
1188
+
1189
+ # Offense count: 4
1190
+ # This cop supports safe autocorrection (--autocorrect).
1191
+ # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
1192
+ # SupportedStyles: slashes, percent_r, mixed
1193
+ Style/RegexpLiteral:
1194
+ Exclude:
1195
+ - 'spec/otto/ip_privacy_spec.rb'
1196
+ - 'spec/otto/route_handlers/lambda_handler_spec.rb'
1197
+ - 'spec/otto/user_agent_anonymization_comprehensive_spec.rb'
1198
+
1199
+ # Offense count: 3
1200
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1201
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
1202
+ # AllowedMethods: present?, blank?, presence, try, try!
1203
+ Style/SafeNavigation:
1204
+ Exclude:
1205
+ - 'lib/otto/security/rate_limiter.rb'
1206
+ - 'spec/otto/core/middleware_stack_spec.rb'
1207
+ - 'spec/otto/user_agent_anonymization_comprehensive_spec.rb'
1208
+
1209
+ # Offense count: 2
1210
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1211
+ Style/SelectByRegexp:
1212
+ Exclude:
1213
+ - 'spec/otto/user_agent_anonymization_comprehensive_spec.rb'
1214
+ - 'spec/otto_spec.rb'
1215
+
1216
+ # Offense count: 3
1217
+ # This cop supports safe autocorrection (--autocorrect).
1218
+ # Configuration parameters: AllowAsExpressionSeparator.
1219
+ Style/Semicolon:
1220
+ Exclude:
1221
+ - 'spec/otto/lambda_routes_integration_spec.rb'
1222
+
1223
+ # Offense count: 8
1224
+ # This cop supports safe autocorrection (--autocorrect).
1225
+ # Configuration parameters: AllowIfMethodIsEmpty.
1226
+ Style/SingleLineMethods:
1227
+ Exclude:
1228
+ - 'spec/otto/caddy_tls/caddy_tls_spec.rb'
1229
+ - 'spec/otto/request_response_helpers_spec.rb'
1230
+
1231
+ # Offense count: 1
1232
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1233
+ Style/SlicingWithRange:
1234
+ Exclude:
1235
+ - 'lib/otto/route.rb'
1236
+
1237
+ # Offense count: 1
1238
+ # This cop supports safe autocorrection (--autocorrect).
1239
+ # Configuration parameters: AllowModifier.
1240
+ Style/SoleNestedConditional:
1241
+ Exclude:
1242
+ - 'lib/otto/security/middleware/ip_privacy_middleware.rb'
1243
+
1244
+ # Offense count: 9
1245
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1246
+ # Configuration parameters: Mode.
1247
+ Style/StringConcatenation:
1248
+ Exclude:
1249
+ - 'examples/advanced_routes/app/controllers/routes_app.rb'
1250
+ - 'examples/advanced_routes/test.rb'
1251
+ - 'spec/otto/logging_integration_spec.rb'
1252
+ - 'spec/otto/user_agent_anonymization_comprehensive_spec.rb'
1253
+ - 'spec/security_validation_spec.rb'
1254
+ - 'spec/support/test_helpers.rb'
1255
+ - 'spec/test_security_defaults.rb'
1256
+
1257
+ # Offense count: 469
1258
+ # This cop supports safe autocorrection (--autocorrect).
1259
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
1260
+ # SupportedStyles: single_quotes, double_quotes
1261
+ Style/StringLiterals:
1262
+ Exclude:
1263
+ - 'examples/advanced_routes/puma.rb'
1264
+ - 'examples/advanced_routes/run.rb'
1265
+ - 'examples/advanced_routes/test.rb'
1266
+ - 'examples/backtrace_sanitization_demo.rb'
1267
+ - 'examples/error_handler_registration.rb'
1268
+ - 'examples/logging_improvements.rb'
1269
+ - 'lib/otto/security/middleware/ip_privacy_middleware.rb'
1270
+ - 'lib/otto/security/middleware/validation_middleware.rb'
1271
+ - 'spec/otto/ip_privacy_spec.rb'
1272
+ - 'spec/otto/locale_config_spec.rb'
1273
+ - 'spec/otto/request_response_helpers_spec.rb'
1274
+ - 'spec/otto/route_handlers_spec.rb'
1275
+ - 'spec/otto/user_agent_anonymization_comprehensive_spec.rb'
1276
+ - 'spec/otto/utils_spec.rb'
1277
+ - 'spec/support/test_helpers.rb'
1278
+
1279
+ # Offense count: 2
1280
+ # This cop supports safe autocorrection (--autocorrect).
1281
+ # Configuration parameters: EnforcedStyle.
1282
+ # SupportedStyles: single_quotes, double_quotes
1283
+ Style/StringLiteralsInInterpolation:
1284
+ Exclude:
1285
+ - 'spec/otto/locale_config_spec.rb'
1286
+
1287
+ # Offense count: 2
1288
+ # This cop supports safe autocorrection (--autocorrect).
1289
+ Style/SuperArguments:
1290
+ Exclude:
1291
+ - 'examples/authentication_strategies/app/auth.rb'
1292
+ - 'spec/otto/route_handlers_spec.rb'
1293
+
1294
+ # Offense count: 9
1295
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1296
+ # Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
1297
+ # AllowedMethods: define_method
1298
+ Style/SymbolProc:
1299
+ Exclude:
1300
+ - 'spec/otto/rate_limiting_spec.rb'
1301
+ - 'spec/otto/security/configurator_bypass_spec.rb'
1302
+ - 'spec/otto/security/configurator_spec.rb'
1303
+
1304
+ # Offense count: 1
1305
+ # This cop supports safe autocorrection (--autocorrect).
1306
+ # Configuration parameters: EnforcedStyleForMultiline.
1307
+ # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
1308
+ Style/TrailingCommaInArguments:
1309
+ Exclude:
1310
+ - 'lib/otto/core/error_handler.rb'
1311
+
1312
+ # Offense count: 17
1313
+ # This cop supports safe autocorrection (--autocorrect).
1314
+ # Configuration parameters: EnforcedStyleForMultiline.
1315
+ # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
1316
+ Style/TrailingCommaInArrayLiteral:
1317
+ Exclude:
1318
+ - 'examples/backtrace_sanitization_demo.rb'
1319
+ - 'spec/otto/backtrace_sanitization_spec.rb'
1320
+ - 'spec/otto/ip_privacy_spec.rb'
1321
+ - 'spec/otto/logging_integration_spec.rb'
1322
+ - 'spec/otto/user_agent_anonymization_comprehensive_spec.rb'
1323
+
1324
+ # Offense count: 104
1325
+ # This cop supports safe autocorrection (--autocorrect).
1326
+ # Configuration parameters: EnforcedStyleForMultiline.
1327
+ # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
1328
+ Style/TrailingCommaInHashLiteral:
1329
+ Exclude:
1330
+ - 'examples/advanced_routes/run.rb'
1331
+ - 'examples/backtrace_sanitization_demo.rb'
1332
+ - 'examples/error_handler_registration.rb'
1333
+ - 'lib/otto/core/error_handler.rb'
1334
+ - 'spec/otto/auth_logging_spec.rb'
1335
+ - 'spec/otto/error_handler_registration_spec.rb'
1336
+ - 'spec/otto/ip_privacy_spec.rb'
1337
+ - 'spec/otto/logging_integration_spec.rb'
1338
+ - 'spec/otto/security/route_auth_wrapper_spec.rb'
1339
+ - 'spec/otto/user_agent_anonymization_comprehensive_spec.rb'
1340
+
1341
+ # Offense count: 8
1342
+ # This cop supports safe autocorrection (--autocorrect).
1343
+ # Configuration parameters: AllowNamedUnderscoreVariables.
1344
+ Style/TrailingUnderscoreVariable:
1345
+ Exclude:
1346
+ - 'spec/otto/route_handlers_spec.rb'
1347
+
1348
+ # Offense count: 21
1349
+ # This cop supports safe autocorrection (--autocorrect).
1350
+ # Configuration parameters: EnforcedStyle, MinSize, WordRegex.
1351
+ # SupportedStyles: percent, brackets
1352
+ Style/WordArray:
1353
+ Exclude:
1354
+ - 'examples/advanced_routes/app/logic/admin/logic/manager.rb'
1355
+ - 'examples/advanced_routes/app/logic/v2/logic/dashboard.rb'
1356
+ - 'examples/backtrace_sanitization_demo.rb'
1357
+ - 'examples/logging_improvements.rb'
1358
+ - 'examples/mcp_demo/config.ru'
1359
+ - 'spec/otto/logging_integration_spec.rb'
1360
+ - 'spec/otto/route_definition_spec.rb'
1361
+ - 'spec/otto/security/route_auth_wrapper_spec.rb'
1362
+ - 'spec/otto/user_agent_anonymization_comprehensive_spec.rb'
1363
+
1364
+ # Offense count: 3
1365
+ # Configuration parameters: ActiveSupportClassAttributeAllowed.
1366
+ ThreadSafety/ClassAndModuleAttributes:
1367
+ Exclude:
1368
+ - 'lib/otto/mcp/server.rb'
1369
+ - 'lib/otto/privacy/geo_resolver.rb'
1370
+ - 'spec/otto/middleware_execution_order_spec.rb'
1371
+
1372
+ # Offense count: 6
1373
+ ThreadSafety/NewThread:
1374
+ Exclude:
1375
+ - 'spec/otto/ip_privacy_spec.rb'
1376
+ - 'spec/otto/route_class_otto_accessor_spec.rb'
1377
+ - 'spec/otto/static_file_freezing_spec.rb'
1378
+
1379
+ # Offense count: 68
1380
+ # This cop supports safe autocorrection (--autocorrect).
1381
+ # Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
1382
+ # URISchemes: http, https
1383
+ Layout/LineLength:
1384
+ Max: 224