Skip to content

Commit f59f324

Browse files
authored
Merge pull request #196 from skryukov/support-configuration-via-env
Support configuration via env
2 parents 5e1abc2 + 747d621 commit f59f324

File tree

6 files changed

+143
-121
lines changed

6 files changed

+143
-121
lines changed

.rubocop.yml

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ AllCops:
44
TargetRubyVersion: 3.0
55
NewCops: enable
66
SuggestExtensions: false
7+
Exclude:
8+
- 'node_modules/**/*'
9+
- 'tmp/**/*'
10+
- 'vendor/**/*'
11+
- '.git/**/*'
12+
- 'docs/**/*'
713

814
Metrics:
915
Enabled: false

.rubocop_todo.yml

+27-79
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config --exclude-limit 10000`
3-
# on 2024-11-22 18:44:50 UTC using RuboCop version 1.68.0.
3+
# on 2025-03-01 10:06:34 UTC using RuboCop version 1.73.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9-
# Offense count: 1
10-
# This cop supports safe autocorrection (--autocorrect).
11-
# Configuration parameters: EnforcedStyle, IndentationWidth.
12-
# SupportedStyles: outdent, indent
13-
Layout/AccessModifierIndentation:
14-
Exclude:
15-
- 'lib/inertia_rails/configuration.rb'
16-
179
# Offense count: 2
1810
# This cop supports safe autocorrection (--autocorrect).
1911
# Configuration parameters: EnforcedStyle, IndentationWidth.
@@ -23,7 +15,7 @@ Layout/ArgumentAlignment:
2315
- 'bin/console'
2416
- 'spec/inertia/response_spec.rb'
2517

26-
# Offense count: 5
18+
# Offense count: 9
2719
# This cop supports safe autocorrection (--autocorrect).
2820
Layout/BlockEndNewline:
2921
Exclude:
@@ -37,18 +29,10 @@ Layout/CaseIndentation:
3729
Exclude:
3830
- 'lib/inertia_rails/renderer.rb'
3931

40-
# Offense count: 2
41-
# This cop supports safe autocorrection (--autocorrect).
42-
# Configuration parameters: AllowForAlignment.
43-
Layout/CommentIndentation:
44-
Exclude:
45-
- 'lib/inertia_rails/rspec.rb'
46-
47-
# Offense count: 2
32+
# Offense count: 1
4833
# This cop supports safe autocorrection (--autocorrect).
4934
Layout/EmptyLineAfterGuardClause:
5035
Exclude:
51-
- 'lib/inertia_rails/configuration.rb'
5236
- 'lib/inertia_rails/controller.rb'
5337

5438
# Offense count: 1
@@ -97,14 +81,7 @@ Layout/FirstArgumentIndentation:
9781
Layout/FirstHashElementIndentation:
9882
EnforcedStyle: consistent
9983

100-
# Offense count: 1
101-
# This cop supports safe autocorrection (--autocorrect).
102-
# Configuration parameters: Width, AllowedPatterns.
103-
Layout/IndentationWidth:
104-
Exclude:
105-
- 'spec/inertia/configuration_spec.rb'
106-
107-
# Offense count: 5
84+
# Offense count: 9
10885
# This cop supports safe autocorrection (--autocorrect).
10986
Layout/MultilineBlockLayout:
11087
Exclude:
@@ -118,7 +95,7 @@ Layout/MultilineMethodCallIndentation:
11895
Exclude:
11996
- 'spec/inertia/ssr_spec.rb'
12097

121-
# Offense count: 7
98+
# Offense count: 6
12299
# This cop supports safe autocorrection (--autocorrect).
123100
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
124101
# SupportedStyles: space, no_space
@@ -139,19 +116,18 @@ Layout/SpaceInsideArrayLiteralBrackets:
139116
- 'spec/dummy/app/controllers/inertia_test_controller.rb'
140117
- 'spec/dummy/config/environments/production.rb'
141118

142-
# Offense count: 20
119+
# Offense count: 13
143120
# This cop supports safe autocorrection (--autocorrect).
144121
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
145122
# SupportedStyles: space, no_space
146123
# SupportedStylesForEmptyBraces: space, no_space
147124
Layout/SpaceInsideBlockBraces:
148125
Exclude:
149-
- 'spec/inertia/configuration_spec.rb'
150126
- 'spec/inertia/error_sharing_spec.rb'
151127
- 'spec/inertia/rendering_spec.rb'
152128
- 'spec/inertia/request_spec.rb'
153129

154-
# Offense count: 128
130+
# Offense count: 122
155131
# This cop supports safe autocorrection (--autocorrect).
156132
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
157133
# SupportedStyles: space, no_space, compact
@@ -163,7 +139,6 @@ Layout/SpaceInsideHashLiteralBraces:
163139
- 'spec/dummy/app/controllers/inertia_conditional_sharing_controller.rb'
164140
- 'spec/dummy/app/controllers/inertia_share_test_controller.rb'
165141
- 'spec/inertia/conditional_sharing_spec.rb'
166-
- 'spec/inertia/configuration_spec.rb'
167142
- 'spec/inertia/middleware_spec.rb'
168143
- 'spec/inertia/rails_mimic_spec.rb'
169144
- 'spec/inertia/rendering_spec.rb'
@@ -181,7 +156,7 @@ Layout/TrailingEmptyLines:
181156
- 'lib/tasks/inertia_rails.rake'
182157
- 'spec/inertia/rails_mimic_spec.rb'
183158

184-
# Offense count: 12
159+
# Offense count: 10
185160
# This cop supports safe autocorrection (--autocorrect).
186161
# Configuration parameters: AllowInHeredoc.
187162
Layout/TrailingWhitespace:
@@ -226,7 +201,8 @@ Lint/UnderscorePrefixedVariableName:
226201

227202
# Offense count: 1
228203
# This cop supports safe autocorrection (--autocorrect).
229-
# Configuration parameters: AutoCorrect, AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
204+
# Configuration parameters: AutoCorrect, AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
205+
# NotImplementedExceptions: NotImplementedError
230206
Lint/UnusedMethodArgument:
231207
Exclude:
232208
- 'lib/patches/mapper.rb'
@@ -254,7 +230,7 @@ Naming/VariableNumber:
254230
Exclude:
255231
- 'spec/dummy/app/controllers/inertia_test_controller.rb'
256232

257-
# Offense count: 21
233+
# Offense count: 25
258234
# This cop supports safe autocorrection (--autocorrect).
259235
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
260236
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
@@ -263,11 +239,9 @@ Naming/VariableNumber:
263239
# AllowedMethods: lambda, proc, it
264240
Style/BlockDelimiters:
265241
Exclude:
266-
- 'lib/inertia_rails/configuration.rb'
267242
- 'lib/inertia_rails/controller.rb'
268243
- 'spec/inertia/action_filter_spec.rb'
269244
- 'spec/inertia/conditional_sharing_spec.rb'
270-
- 'spec/inertia/configuration_spec.rb'
271245
- 'spec/inertia/rendering_spec.rb'
272246
- 'spec/inertia/request_spec.rb'
273247
- 'spec/inertia/rspec_helper_spec.rb'
@@ -331,20 +305,20 @@ Style/ExpandPathArguments:
331305
Exclude:
332306
- 'spec/rails_helper.rb'
333307

334-
# Offense count: 74
308+
# Offense count: 71
335309
# This cop supports unsafe autocorrection (--autocorrect-all).
336310
# Configuration parameters: EnforcedStyle.
337311
# SupportedStyles: always, always_true, never
338312
Style/FrozenStringLiteralComment:
339313
Exclude:
314+
- '**/*.arb'
340315
- 'app/controllers/inertia_rails/static_controller.rb'
341316
- 'bin/console'
342317
- 'lib/inertia_rails.rb'
343318
- 'lib/inertia_rails/controller.rb'
344319
- 'lib/inertia_rails/engine.rb'
345320
- 'lib/inertia_rails/helper.rb'
346321
- 'lib/inertia_rails/inertia_rails.rb'
347-
- 'lib/inertia_rails/middleware.rb'
348322
- 'lib/inertia_rails/rspec.rb'
349323
- 'lib/inertia_rails/version.rb'
350324
- 'lib/patches/better_errors.rb'
@@ -396,7 +370,6 @@ Style/FrozenStringLiteralComment:
396370
- 'spec/inertia/always_prop_spec.rb'
397371
- 'spec/inertia/base_prop_spec.rb'
398372
- 'spec/inertia/conditional_sharing_spec.rb'
399-
- 'spec/inertia/configuration_spec.rb'
400373
- 'spec/inertia/error_sharing_spec.rb'
401374
- 'spec/inertia/lazy_prop_spec.rb'
402375
- 'spec/inertia/middleware_spec.rb'
@@ -409,7 +382,6 @@ Style/FrozenStringLiteralComment:
409382
- 'spec/inertia/ssr_spec.rb'
410383
- 'spec/rails_helper.rb'
411384
- 'spec/spec_helper.rb'
412-
- 'spec/support/helper_module.rb'
413385
- 'spec/support/shared_examples.rb'
414386

415387
# Offense count: 1
@@ -424,13 +396,6 @@ Style/GlobalVars:
424396
Exclude:
425397
- 'spec/inertia/rspec_helper_spec.rb'
426398

427-
# Offense count: 1
428-
# This cop supports safe autocorrection (--autocorrect).
429-
# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
430-
Style/GuardClause:
431-
Exclude:
432-
- 'lib/inertia_rails/configuration.rb'
433-
434399
# Offense count: 1
435400
# This cop supports safe autocorrection (--autocorrect).
436401
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
@@ -440,11 +405,10 @@ Style/HashSyntax:
440405
Exclude:
441406
- 'lib/tasks/inertia_rails.rake'
442407

443-
# Offense count: 6
408+
# Offense count: 5
444409
# This cop supports safe autocorrection (--autocorrect).
445410
Style/IfUnlessModifier:
446411
Exclude:
447-
- 'lib/inertia_rails/configuration.rb'
448412
- 'lib/inertia_rails/controller.rb'
449413
- 'lib/patches/better_errors.rb'
450414
- 'lib/patches/debug_exceptions/patch-5-0.rb'
@@ -457,12 +421,6 @@ Style/IfUnlessModifierOfIfUnless:
457421
Exclude:
458422
- 'lib/inertia_rails/controller.rb'
459423

460-
# Offense count: 1
461-
# This cop supports safe autocorrection (--autocorrect).
462-
Style/KeywordArgumentsMerging:
463-
Exclude:
464-
- 'lib/inertia_rails/configuration.rb'
465-
466424
# Offense count: 3
467425
# This cop supports safe autocorrection (--autocorrect).
468426
# Configuration parameters: EnforcedStyle.
@@ -479,12 +437,6 @@ Style/MapToSet:
479437
Exclude:
480438
- 'lib/inertia_rails/action_filter.rb'
481439

482-
# Offense count: 1
483-
# This cop supports safe autocorrection (--autocorrect).
484-
Style/MultilineIfModifier:
485-
Exclude:
486-
- 'lib/inertia_rails/configuration.rb'
487-
488440
# Offense count: 1
489441
# This cop supports unsafe autocorrection (--autocorrect-all).
490442
# Configuration parameters: EnforcedStyle.
@@ -493,7 +445,7 @@ Style/MutableConstant:
493445
Exclude:
494446
- 'lib/inertia_rails/version.rb'
495447

496-
# Offense count: 1
448+
# Offense count: 2
497449
# This cop supports safe autocorrection (--autocorrect).
498450
Style/NegatedIfElseCondition:
499451
Exclude:
@@ -558,7 +510,7 @@ Style/SoleNestedConditional:
558510
Exclude:
559511
- 'lib/inertia_rails/controller.rb'
560512

561-
# Offense count: 90
513+
# Offense count: 82
562514
# This cop supports safe autocorrection (--autocorrect).
563515
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
564516
# SupportedStyles: single_quotes, double_quotes
@@ -580,15 +532,12 @@ Style/StringLiterals:
580532
- 'spec/dummy/app/controllers/inertia_config_test_controller.rb'
581533
- 'spec/dummy/app/controllers/inertia_lambda_shared_props_controller.rb'
582534
- 'spec/dummy/app/controllers/inertia_rails_mimic_controller.rb'
583-
- 'spec/dummy/app/controllers/inertia_render_test_controller.rb'
584535
- 'spec/dummy/config/application.rb'
585536
- 'spec/dummy/config/environments/production.rb'
586537
- 'spec/dummy/config/puma.rb'
587538
- 'spec/dummy/config/routes.rb'
588539
- 'spec/dummy/config/spring.rb'
589540
- 'spec/inertia/conditional_sharing_spec.rb'
590-
- 'spec/inertia/configuration_spec.rb'
591-
- 'spec/inertia/rendering_spec.rb'
592541
- 'spec/inertia/response_spec.rb'
593542
- 'spec/inertia/rspec_helper_spec.rb'
594543
- 'spec/rails_helper.rb'
@@ -610,23 +559,21 @@ Style/SymbolArray:
610559
EnforcedStyle: percent
611560
MinSize: 3
612561

613-
# Offense count: 16
562+
# Offense count: 14
614563
# This cop supports safe autocorrection (--autocorrect).
615564
# Configuration parameters: EnforcedStyleForMultiline.
616565
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
617566
Style/TrailingCommaInArguments:
618567
Exclude:
619568
- 'lib/inertia_rails.rb'
620-
- 'lib/inertia_rails/renderer.rb'
621569
- 'spec/dummy/app/controllers/inertia_config_test_controller.rb'
622570
- 'spec/dummy/app/controllers/inertia_rails_mimic_controller.rb'
623-
- 'spec/inertia/configuration_spec.rb'
624571
- 'spec/inertia/rendering_spec.rb'
625572

626-
# Offense count: 21
573+
# Offense count: 22
627574
# This cop supports safe autocorrection (--autocorrect).
628575
# Configuration parameters: EnforcedStyleForMultiline.
629-
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
576+
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
630577
Style/TrailingCommaInHashLiteral:
631578
Exclude:
632579
- 'lib/inertia_rails/rspec.rb'
@@ -639,17 +586,18 @@ Style/TrailingCommaInHashLiteral:
639586
- 'spec/inertia/response_spec.rb'
640587
- 'spec/inertia/rspec_helper_spec.rb'
641588

642-
# Offense count: 1
589+
# Offense count: 2
643590
# This cop supports safe autocorrection (--autocorrect).
644-
# Configuration parameters: WordRegex.
591+
# Configuration parameters: EnforcedStyle, MinSize, WordRegex.
645592
# SupportedStyles: percent, brackets
646593
Style/WordArray:
647-
EnforcedStyle: percent
648-
MinSize: 4
594+
Exclude:
595+
- 'lib/inertia_rails/middleware.rb'
596+
- 'spec/inertia/rendering_spec.rb'
649597

650-
# Offense count: 21
598+
# Offense count: 26
651599
# This cop supports safe autocorrection (--autocorrect).
652-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
600+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
653601
# URISchemes: http, https
654602
Layout/LineLength:
655-
Max: 290
603+
Max: 276

0 commit comments

Comments
 (0)