makandra-rubocop 12.1.0 → 13.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0255ba88ffcf79e1a7383278a6b7eddd7611f89b6cde0de5097162bf3a28b487
4
- data.tar.gz: 462fe3bfbcb8167c93bd455069d964b11e7fe33e9886d2ff40b78dccd823b1c1
3
+ metadata.gz: '038d3a8e8094762ce14bfab35f4c9661e96ff05c307cf84a55b4e20e058d5428'
4
+ data.tar.gz: caa68f4bb5c4d6766bfbb30336284ccb9d4b1d3606effe2dfd7cc4a47540f1a1
5
5
  SHA512:
6
- metadata.gz: c6f0ea4c886d783d30a04fad764ebb55528b1a1e44c1499b2df4a312b50ef1430dbea241dc087c9ef037087748bac10906e3a7cdbe089b3c2c590765f4b8d9d5
7
- data.tar.gz: 27b9a1a5ccc212a645714f1631d8f62f957de7d955aa6a8c9e46fd2599335488fbfb16e7ae9c955f4714ff3ab4051bc5e03293bd696a3f15b14b4b5402dd3b02
6
+ metadata.gz: 9998756e689b5ca1ced689b5ba5a73c26dbfc7301fd3cc48372b54a97fddaf4de2e9f453ca09d156e4b55d070e5d208c6a8d27a0b45d007a7fde8353817471c3
7
+ data.tar.gz: 2d086403fe97c553ead31ad0991d247862a869e8e9bb3d68e89aae2788f34cd85d8e8190df2b53cf11ec829fdcbb3ad695d97815dbec28e2e85be2575d86d2ec
data/CHANGELOG.md CHANGED
@@ -9,6 +9,17 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
9
9
  ### Compatible changes
10
10
 
11
11
 
12
+ ## 13.0.0 - 2024-05-27
13
+
14
+ ### Compatible changes
15
+
16
+ ### Breaking changes
17
+
18
+ - Upgrade to `rubocop-rspec` 2.25.0 (was 2.13.2)
19
+ - Disable nested cops introduced by dependencies (e.g. Rspec/Capybara).
20
+ Since the config for the respective gem should be considered the single source of truth
21
+
22
+
12
23
  ## 12.1.0 - 2024-01-07
13
24
 
14
25
  ### Compatible changes
data/Gemfile.lock CHANGED
@@ -1,12 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- makandra-rubocop (12.1.0)
4
+ makandra-rubocop (13.0.0)
5
5
  rubocop (~> 1.60.0)
6
6
  rubocop-capybara (~> 2.20.0)
7
7
  rubocop-factory_bot (~> 2.25.1)
8
8
  rubocop-rails (~> 2.23.1)
9
- rubocop-rspec (~> 2.13.2)
9
+ rubocop-rspec (~> 2.25.0)
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
@@ -30,7 +30,7 @@ GEM
30
30
  ruby2_keywords
31
31
  i18n (1.14.1)
32
32
  concurrent-ruby (~> 1.0)
33
- json (2.7.1)
33
+ json (2.7.2)
34
34
  language_server-protocol (3.17.0.3)
35
35
  minitest (5.21.2)
36
36
  mutex_m (0.2.0)
@@ -55,8 +55,8 @@ GEM
55
55
  rubocop-ast (>= 1.30.0, < 2.0)
56
56
  ruby-progressbar (~> 1.7)
57
57
  unicode-display_width (>= 2.4.0, < 3.0)
58
- rubocop-ast (1.30.0)
59
- parser (>= 3.2.1.0)
58
+ rubocop-ast (1.31.2)
59
+ parser (>= 3.3.0.4)
60
60
  rubocop-capybara (2.20.0)
61
61
  rubocop (~> 1.41)
62
62
  rubocop-factory_bot (2.25.1)
@@ -66,8 +66,10 @@ GEM
66
66
  rack (>= 1.1)
67
67
  rubocop (>= 1.33.0, < 2.0)
68
68
  rubocop-ast (>= 1.30.0, < 2.0)
69
- rubocop-rspec (2.13.2)
70
- rubocop (~> 1.33)
69
+ rubocop-rspec (2.25.0)
70
+ rubocop (~> 1.40)
71
+ rubocop-capybara (~> 2.17)
72
+ rubocop-factory_bot (~> 2.22)
71
73
  ruby-progressbar (1.13.0)
72
74
  ruby2_keywords (0.0.5)
73
75
  tzinfo (2.0.6)
@@ -82,7 +82,7 @@ Capybara/VisibilityMatcher:
82
82
  Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/VisibilityMatcher
83
83
 
84
84
  Capybara/RSpec:
85
- Enabled: true
85
+ Enabled: false # disable nested cops, as we load rubocop-rspec separately
86
86
  Include: *1
87
87
 
88
88
  Capybara/RSpec/HaveSelector:
data/config/ext/rspec.yml CHANGED
@@ -18,8 +18,6 @@ RSpec:
18
18
  - Expectations
19
19
  - Helpers
20
20
  - Hooks
21
- - HookScopes
22
- - Runners
23
21
  - Subjects
24
22
  ExampleGroups:
25
23
  inherit_mode:
@@ -82,12 +80,6 @@ RSpec:
82
80
  - prepend_after
83
81
  - after
84
82
  - append_after
85
- HookScopes:
86
- - each
87
- - example
88
- - context
89
- - all
90
- - suite
91
83
  Includes:
92
84
  inherit_mode:
93
85
  merge:
@@ -99,10 +91,6 @@ RSpec:
99
91
  - include_examples
100
92
  Context:
101
93
  - include_context
102
- Runners:
103
- - to
104
- - to_not
105
- - not_to
106
94
  SharedGroups:
107
95
  inherit_mode:
108
96
  merge:
@@ -157,16 +145,26 @@ RSpec/Be:
157
145
  StyleGuide: https://rspec.rubystyle.guide/#be-matcher
158
146
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Be
159
147
 
148
+ RSpec/BeEmpty:
149
+ Description: Prefer using `be_empty` when checking for an empty array.
150
+ Enabled: pending
151
+ VersionAdded: '2.20'
152
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEmpty
153
+
160
154
  RSpec/BeEq:
161
155
  Description: Check for expectations where `be(...)` can replace `eq(...)`.
162
156
  Enabled: false # Leads to a large diff and the benefit is not that large
157
+ Safe: false
163
158
  VersionAdded: 2.9.0
159
+ VersionChanged: '2.16'
164
160
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEq
165
161
 
166
162
  RSpec/BeEql:
167
163
  Description: Check for expectations where `be(...)` can replace `eql(...)`.
168
164
  Enabled: true
165
+ Safe: false
169
166
  VersionAdded: '1.7'
167
+ VersionChanged: '2.16'
170
168
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEql
171
169
 
172
170
  RSpec/BeNil:
@@ -184,10 +182,11 @@ RSpec/BeforeAfterAll:
184
182
  Description: Check that before/after(:all) isn't being used.
185
183
  Enabled: true
186
184
  Exclude:
187
- - spec/spec_helper.rb
188
- - spec/rails_helper.rb
189
- - spec/support/**/*.rb
185
+ - "**/spec/spec_helper.rb"
186
+ - "**/spec/rails_helper.rb"
187
+ - "**/spec/support/**/*.rb"
190
188
  VersionAdded: '1.12'
189
+ VersionChanged: '2.23'
191
190
  StyleGuide: https://rspec.rubystyle.guide/#avoid-hooks-with-context-scope
192
191
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeforeAfterAll
193
192
 
@@ -195,7 +194,7 @@ RSpec/ChangeByZero:
195
194
  Description: Prefer negated matchers over `to change.by(0)`.
196
195
  Enabled: true
197
196
  VersionAdded: '2.11'
198
- VersionChanged: '2.13'
197
+ VersionChanged: '2.14'
199
198
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ChangeByZero
200
199
  NegatedMatcher: ~
201
200
 
@@ -210,6 +209,12 @@ RSpec/ClassCheck:
210
209
  - be_kind_of
211
210
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ClassCheck
212
211
 
212
+ RSpec/ContainExactly:
213
+ Description: Checks where `contain_exactly` is used.
214
+ Enabled: true
215
+ VersionAdded: '2.19'
216
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContainExactly
217
+
213
218
  RSpec/ContextMethod:
214
219
  Description: "`context` should not be used for specifying methods."
215
220
  Enabled: true
@@ -291,6 +296,12 @@ RSpec/Dialect:
291
296
  VersionAdded: '1.33'
292
297
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Dialect
293
298
 
299
+ RSpec/DuplicatedMetadata:
300
+ Description: Avoid duplicated metadata.
301
+ Enabled: pending
302
+ VersionAdded: '2.16'
303
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DuplicatedMetadata
304
+
294
305
  RSpec/EmptyExampleGroup:
295
306
  Description: Checks if an example group does not include any tests.
296
307
  Enabled: true
@@ -343,6 +354,18 @@ RSpec/EmptyLineAfterSubject:
343
354
  StyleGuide: https://rspec.rubystyle.guide/#empty-line-after-let
344
355
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterSubject
345
356
 
357
+ RSpec/EmptyMetadata:
358
+ Description: Avoid empty metadata hash.
359
+ Enabled: pending
360
+ VersionAdded: '2.24'
361
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyMetadata
362
+
363
+ RSpec/Eq:
364
+ Description: Use `eq` instead of `be ==` to compare objects.
365
+ Enabled: true
366
+ VersionAdded: '2.24'
367
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Eq
368
+
346
369
  RSpec/ExampleLength:
347
370
  Description: Checks for long examples.
348
371
  Enabled: false # We do not want to have such limitation
@@ -378,8 +401,10 @@ RSpec/ExampleWording:
378
401
  have: has
379
402
  HAVE: HAS
380
403
  IgnoredWords: []
404
+ DisallowedExamples:
405
+ - works
381
406
  VersionAdded: '1.0'
382
- VersionChanged: '1.2'
407
+ VersionChanged: '2.13'
383
408
  StyleGuide: https://rspec.rubystyle.guide/#should-in-example-docstrings
384
409
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWording
385
410
 
@@ -387,8 +412,9 @@ RSpec/ExpectActual:
387
412
  Description: Checks for `expect(...)` calls containing literal values.
388
413
  Enabled: true
389
414
  Exclude:
390
- - spec/routing/**/*
415
+ - "**/spec/routing/**/*"
391
416
  VersionAdded: '1.7'
417
+ VersionChanged: '2.23'
392
418
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectActual
393
419
 
394
420
  RSpec/ExpectChange:
@@ -427,7 +453,7 @@ RSpec/FilePath:
427
453
  IgnoreMethods: false
428
454
  SpecSuffixOnly: false
429
455
  VersionAdded: '1.2'
430
- VersionChanged: '1.40'
456
+ VersionChanged: '2.24'
431
457
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FilePath
432
458
 
433
459
  RSpec/Focus:
@@ -487,10 +513,21 @@ RSpec/ImplicitSubject:
487
513
  - single_line_only
488
514
  - single_statement_only
489
515
  - disallow
516
+ - require_implicit
490
517
  VersionAdded: '1.29'
491
- VersionChanged: '1.30'
518
+ VersionChanged: '2.13'
492
519
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitSubject
493
520
 
521
+ RSpec/IndexedLet:
522
+ Description: Do not set up test data using indexes (e.g., `item_1`, `item_2`).
523
+ Enabled: true
524
+ VersionAdded: '2.20'
525
+ VersionChanged: '2.23'
526
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IndexedLet
527
+ Max: 1
528
+ AllowedIdentifiers: []
529
+ AllowedPatterns: []
530
+
494
531
  RSpec/InstanceSpy:
495
532
  Description: Checks for `instance_double` used with `have_received`.
496
533
  Enabled: true
@@ -550,6 +587,12 @@ RSpec/LetSetup:
550
587
  VersionAdded: '1.7'
551
588
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetSetup
552
589
 
590
+ RSpec/MatchArray:
591
+ Description: Checks where `match_array` is used.
592
+ Enabled: true
593
+ VersionAdded: '2.19'
594
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MatchArray
595
+
553
596
  RSpec/MessageChain:
554
597
  Description: Check that chains of messages are not being stubbed.
555
598
  Enabled: true
@@ -577,6 +620,16 @@ RSpec/MessageSpies:
577
620
  VersionAdded: '1.9'
578
621
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageSpies
579
622
 
623
+ RSpec/MetadataStyle:
624
+ Description: Use consistent metadata style.
625
+ Enabled: true
626
+ EnforcedStyle: symbol
627
+ SupportedStyles:
628
+ - hash
629
+ - symbol
630
+ VersionAdded: '2.24'
631
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MetadataStyle
632
+
580
633
  RSpec/MissingExampleGroupArgument:
581
634
  Description: Checks that the first argument to an example group is not empty.
582
635
  Enabled: true
@@ -616,8 +669,13 @@ RSpec/MultipleSubjects:
616
669
  RSpec/NamedSubject:
617
670
  Description: Checks for explicitly referenced test subjects.
618
671
  Enabled: false # https://github.com/makandra/makandra-rubocop/issues/23 - good default but not enforced
672
+ EnforcedStyle: always
673
+ SupportedStyles:
674
+ - always
675
+ - named_only
619
676
  IgnoreSharedExamples: true
620
677
  VersionAdded: 1.5.3
678
+ VersionChanged: '2.15'
621
679
  StyleGuide: https://rspec.rubystyle.guide/#use-subject
622
680
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NamedSubject
623
681
 
@@ -635,7 +693,11 @@ RSpec/NoExpectationExample:
635
693
  Enabled: false # requires some config for custom expectations
636
694
  Safe: false
637
695
  VersionAdded: '2.13'
696
+ VersionChanged: '2.14'
638
697
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NoExpectationExample
698
+ AllowedPatterns:
699
+ - "^expect_"
700
+ - "^assert_"
639
701
 
640
702
  RSpec/NotToNot:
641
703
  Description: Checks for consistent method usage for negating expectations.
@@ -659,6 +721,12 @@ RSpec/Pending:
659
721
  VersionAdded: '1.25'
660
722
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Pending
661
723
 
724
+ RSpec/PendingWithoutReason:
725
+ Description: Checks for pending or skipped examples without reason.
726
+ Enabled: pending
727
+ VersionAdded: '2.16'
728
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/PendingWithoutReason
729
+
662
730
  RSpec/PredicateMatcher:
663
731
  Description: Prefer using predicate matcher over using predicate method directly.
664
732
  Enabled: true # Maybe we need to remove this in the future
@@ -679,12 +747,25 @@ RSpec/ReceiveCounts:
679
747
  VersionAdded: '1.26'
680
748
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveCounts
681
749
 
750
+ RSpec/ReceiveMessages:
751
+ Description: Checks for multiple messages stubbed on the same object.
752
+ Enabled: false
753
+ SafeAutoCorrect: false
754
+ VersionAdded: '2.23'
755
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveMessages
756
+
682
757
  RSpec/ReceiveNever:
683
758
  Description: Prefer `not_to receive(...)` over `receive(...).never`.
684
759
  Enabled: true
685
760
  VersionAdded: '1.28'
686
761
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveNever
687
762
 
763
+ RSpec/RedundantAround:
764
+ Description: Remove redundant `around` hook.
765
+ Enabled: pending
766
+ VersionAdded: '2.19'
767
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RedundantAround
768
+
688
769
  RSpec/RepeatedDescription:
689
770
  Description: Check for repeated description strings in example groups.
690
771
  Enabled: true
@@ -758,6 +839,43 @@ RSpec/SingleArgumentMessageChain:
758
839
  VersionChanged: '1.10'
759
840
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SingleArgumentMessageChain
760
841
 
842
+ RSpec/SkipBlockInsideExample:
843
+ Description: Checks for passing a block to `skip` within examples.
844
+ Enabled: pending
845
+ VersionAdded: '2.19'
846
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SkipBlockInsideExample
847
+
848
+ RSpec/SortMetadata:
849
+ Description: Sort RSpec metadata alphabetically.
850
+ Enabled: false
851
+ VersionAdded: '2.14'
852
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SortMetadata
853
+
854
+ RSpec/SpecFilePathFormat:
855
+ Description: Checks that spec file paths are consistent and well-formed.
856
+ Enabled: pending
857
+ Include:
858
+ - "**/*_spec.rb"
859
+ Exclude:
860
+ - "**/spec/routing/**/*"
861
+ CustomTransform:
862
+ RuboCop: rubocop
863
+ RSpec: rspec
864
+ IgnoreMethods: false
865
+ IgnoreMetadata:
866
+ type: routing
867
+ VersionAdded: '2.24'
868
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SpecFilePathFormat
869
+
870
+ RSpec/SpecFilePathSuffix:
871
+ Description: Checks that spec file paths suffix are consistent and well-formed.
872
+ Enabled: pending
873
+ VersionAdded: '2.24'
874
+ Include:
875
+ - "**/*_spec*rb*"
876
+ - "**/spec/**/*"
877
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SpecFilePathSuffix
878
+
761
879
  RSpec/StubbedMock:
762
880
  Description: Checks that message expectations do not have a configured response.
763
881
  Enabled: false # Maybe add later, currently there are too many conflicts
@@ -841,7 +959,7 @@ RSpec/Yield:
841
959
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Yield
842
960
 
843
961
  RSpec/Capybara:
844
- Enabled: true
962
+ Enabled: false # disable nested cops, as we load rubocop-capybara separately
845
963
  Include: *1
846
964
  Language: *2
847
965
 
@@ -860,6 +978,28 @@ RSpec/Capybara/FeatureMethods:
860
978
  VersionChanged: '2.0'
861
979
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/FeatureMethods
862
980
 
981
+ RSpec/Capybara/MatchStyle:
982
+ Description: Checks for usage of deprecated style methods.
983
+ Enabled: pending
984
+ VersionAdded: '2.17'
985
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/MatchStyle
986
+
987
+ RSpec/Capybara/NegationMatcher:
988
+ Description: Enforces use of `have_no_*` or `not_to` for negated expectations.
989
+ Enabled: pending
990
+ VersionAdded: '2.14'
991
+ EnforcedStyle: not_to
992
+ SupportedStyles:
993
+ - have_no
994
+ - not_to
995
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/NegationMatcher
996
+
997
+ RSpec/Capybara/SpecificActions:
998
+ Description: Checks for there is a more specific actions offered by Capybara.
999
+ Enabled: pending
1000
+ VersionAdded: '2.14'
1001
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/SpecificActions
1002
+
863
1003
  RSpec/Capybara/SpecificFinders:
864
1004
  Description: Checks if there is a more specific finder offered by Capybara.
865
1005
  Enabled: false # Voted in https://github.com/makandra/makandra-rubocop/pull/41
@@ -880,7 +1020,7 @@ RSpec/Capybara/VisibilityMatcher:
880
1020
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/VisibilityMatcher
881
1021
 
882
1022
  RSpec/FactoryBot:
883
- Enabled: true
1023
+ Enabled: false # disable nested cops, as we load rubocop-factory_bot separately
884
1024
  Include: *1
885
1025
  Language: *2
886
1026
 
@@ -888,41 +1028,61 @@ RSpec/FactoryBot/AttributeDefinedStatically:
888
1028
  Description: Always declare attribute values as blocks.
889
1029
  Enabled: true
890
1030
  Include:
891
- - spec/factories.rb
892
- - spec/factories/**/*.rb
893
- - features/support/factories/**/*.rb
1031
+ - "**/spec/factories.rb"
1032
+ - "**/spec/factories/**/*.rb"
1033
+ - "**/features/support/factories/**/*.rb"
894
1034
  VersionAdded: '1.28'
895
- VersionChanged: '2.0'
1035
+ VersionChanged: '2.23'
896
1036
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically
897
1037
 
1038
+ RSpec/FactoryBot/ConsistentParenthesesStyle:
1039
+ Description: Use a consistent style for parentheses in factory bot calls.
1040
+ Enabled: pending
1041
+ EnforcedStyle: require_parentheses
1042
+ SupportedStyles:
1043
+ - require_parentheses
1044
+ - omit_parentheses
1045
+ VersionAdded: '2.14'
1046
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/ConsistentParenthesesStyle
1047
+
898
1048
  RSpec/FactoryBot/CreateList:
899
1049
  Description: Checks for create_list usage.
900
1050
  Enabled: true
901
1051
  Include:
902
1052
  - "**/*_spec.rb"
903
1053
  - "**/spec/**/*"
904
- - spec/factories.rb
905
- - spec/factories/**/*.rb
906
- - features/support/factories/**/*.rb
1054
+ - "**/spec/factories.rb"
1055
+ - "**/spec/factories/**/*.rb"
1056
+ - "**/features/support/factories/**/*.rb"
907
1057
  EnforcedStyle: create_list
908
1058
  SupportedStyles:
909
1059
  - create_list
910
1060
  - n_times
911
1061
  VersionAdded: '1.25'
912
- VersionChanged: '2.0'
1062
+ VersionChanged: '2.23'
913
1063
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/CreateList
914
1064
 
915
1065
  RSpec/FactoryBot/FactoryClassName:
916
1066
  Description: Use string value when setting the class attribute explicitly.
917
1067
  Enabled: true
918
1068
  Include:
919
- - spec/factories.rb
920
- - spec/factories/**/*.rb
921
- - features/support/factories/**/*.rb
1069
+ - "**/spec/factories.rb"
1070
+ - "**/spec/factories/**/*.rb"
1071
+ - "**/features/support/factories/**/*.rb"
922
1072
  VersionAdded: '1.37'
923
- VersionChanged: '2.0'
1073
+ VersionChanged: '2.23'
924
1074
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryClassName
925
1075
 
1076
+ RSpec/FactoryBot/FactoryNameStyle:
1077
+ Description: Checks for name style for argument of FactoryBot::Syntax::Methods.
1078
+ Enabled: pending
1079
+ VersionAdded: '2.16'
1080
+ EnforcedStyle: symbol
1081
+ SupportedStyles:
1082
+ - symbol
1083
+ - string
1084
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryNameStyle
1085
+
926
1086
  RSpec/FactoryBot/SyntaxMethods:
927
1087
  Description: Use shorthands from `FactoryBot::Syntax::Methods` in your specs.
928
1088
  Enabled: false # requires the usage of `FactoryBot::Syntax::Methods`
@@ -931,7 +1091,7 @@ RSpec/FactoryBot/SyntaxMethods:
931
1091
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/SyntaxMethods
932
1092
 
933
1093
  RSpec/Rails:
934
- Enabled: true
1094
+ Enabled: false # disable nested cops, as we load rubocop-rails separately
935
1095
  Include: *1
936
1096
  Language: *2
937
1097
 
@@ -955,6 +1115,54 @@ RSpec/Rails/HttpStatus:
955
1115
  SupportedStyles:
956
1116
  - numeric
957
1117
  - symbolic
1118
+ - be_status
958
1119
  VersionAdded: '1.23'
959
- VersionChanged: '2.0'
1120
+ VersionChanged: '2.20'
960
1121
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HttpStatus
1122
+
1123
+ RSpec/Rails/InferredSpecType:
1124
+ Description: Identifies redundant spec type.
1125
+ Enabled: pending
1126
+ Safe: false
1127
+ VersionAdded: '2.14'
1128
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/InferredSpecType
1129
+ Inferences:
1130
+ channels: channel
1131
+ controllers: controller
1132
+ features: feature
1133
+ generator: generator
1134
+ helpers: helper
1135
+ jobs: job
1136
+ mailboxes: mailbox
1137
+ mailers: mailer
1138
+ models: model
1139
+ requests: request
1140
+ integration: request
1141
+ api: request
1142
+ routing: routing
1143
+ system: system
1144
+ views: view
1145
+
1146
+ RSpec/Rails/MinitestAssertions:
1147
+ Description: Check if using Minitest matchers.
1148
+ Enabled: pending
1149
+ VersionAdded: '2.17'
1150
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/MinitestAssertions
1151
+
1152
+ RSpec/Rails/NegationBeValid:
1153
+ Description: Enforces use of `be_invalid` or `not_to` for negated be_valid.
1154
+ Safe: false
1155
+ EnforcedStyle: not_to
1156
+ SupportedStyles:
1157
+ - not_to
1158
+ - be_invalid
1159
+ Enabled: pending
1160
+ VersionAdded: '2.23'
1161
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/NegationBeValid
1162
+
1163
+ RSpec/Rails/TravelAround:
1164
+ Description: Prefer to travel in `before` rather than `around`.
1165
+ Enabled: pending
1166
+ Safe: false
1167
+ VersionAdded: '2.19'
1168
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/TravelAround
@@ -1,3 +1,3 @@
1
1
  module MakandraRubocop
2
- VERSION = '12.1.0'.freeze
2
+ VERSION = '13.0.0'.freeze
3
3
  end
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
 
27
27
  spec.add_dependency 'rubocop', '~> 1.60.0'
28
28
  spec.add_dependency 'rubocop-rails', '~> 2.23.1'
29
- spec.add_dependency 'rubocop-rspec', '~> 2.13.2'
29
+ spec.add_dependency 'rubocop-rspec', '~> 2.25.0'
30
30
  spec.add_dependency 'rubocop-capybara', '~> 2.20.0'
31
31
  spec.add_dependency 'rubocop-factory_bot', '~> 2.25.1'
32
32
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: makandra-rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.1.0
4
+ version: 13.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arne Hartherz
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2024-02-07 00:00:00.000000000 Z
12
+ date: 2024-05-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubocop
@@ -45,14 +45,14 @@ dependencies:
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: 2.13.2
48
+ version: 2.25.0
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: 2.13.2
55
+ version: 2.25.0
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rubocop-capybara
58
58
  requirement: !ruby/object:Gem::Requirement