rubocop-factory_bot 2.25.1 → 2.26.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/config/default.yml +2 -1
- data/lib/rubocop/cop/factory_bot/association_style.rb +1 -0
- data/lib/rubocop/factory_bot/cop/generator.rb +25 -0
- data/lib/rubocop/factory_bot/version.rb +1 -1
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60519b0d051edd3ba23a10f3dfb346dc5aaed4964c489bcfabdb7d16c084cb63
|
4
|
+
data.tar.gz: effac41ed4215d5cb27295cdb0a37d8c7021c309e97a8f8e6f8fdf6e385e8226
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee33ad705e93ffa3a68240adabd9de50735819d4d82bbf66868f2efa80d489a0032fd045878bf8fd539dc7677fed9bbf9ef0e3755340b81b4fc1881220e0b24c
|
7
|
+
data.tar.gz: 89936fe77a9c8f3ff5dad656b9e30455ec2f6467ac7cba1c678e63fca22396825c3859bc1830f6e766a90109cbae3eca68f64d5a110e3bbd8cebd229cf3218e9
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,15 @@
|
|
2
2
|
|
3
3
|
## Master (Unreleased)
|
4
4
|
|
5
|
+
## 2.26.1 (2024-06-12)
|
6
|
+
|
7
|
+
- Bump RuboCop requirement to +1.61. ([@ydah])
|
8
|
+
|
9
|
+
## 2.26.0 (2024-06-08)
|
10
|
+
|
11
|
+
- Fix a false positive for `FactoryBot/AssociationStyle` when using nested factories with traits. ([@jaydorsey])
|
12
|
+
- Support `AutoCorrect: contextual` option for LSP. ([@ydah])
|
13
|
+
|
5
14
|
## 2.25.1 (2024-01-08)
|
6
15
|
|
7
16
|
- Fix a false positive for `FactoryBot/CreateList` when create call does have method calls and repeat multiple times with other argument. ([@ydah])
|
@@ -88,6 +97,7 @@
|
|
88
97
|
[@ddieulivol]: https://github.com/ddieulivol
|
89
98
|
[@dmitrytsepelev]: https://github.com/dmitrytsepelev
|
90
99
|
[@harrylewis]: https://github.com/harrylewis
|
100
|
+
[@jaydorsey]: https://github.com/jaydorsey
|
91
101
|
[@jfragoulis]: https://github.com/jfragoulis
|
92
102
|
[@jonatas]: https://github.com/jonatas
|
93
103
|
[@leoarnold]: https://github.com/leoarnold
|
data/config/default.yml
CHANGED
@@ -49,6 +49,7 @@ FactoryBot/ConsistentParenthesesStyle:
|
|
49
49
|
FactoryBot/CreateList:
|
50
50
|
Description: Checks for create_list usage.
|
51
51
|
Enabled: true
|
52
|
+
AutoCorrect: contextual
|
52
53
|
Include:
|
53
54
|
- "**/*_spec.rb"
|
54
55
|
- "**/spec/**/*"
|
@@ -61,7 +62,7 @@ FactoryBot/CreateList:
|
|
61
62
|
ExplicitOnly: false
|
62
63
|
SafeAutoCorrect: false
|
63
64
|
VersionAdded: '1.25'
|
64
|
-
VersionChanged: '2.
|
65
|
+
VersionChanged: '2.26'
|
65
66
|
Reference: https://www.rubydoc.info/gems/rubocop-factory_bot/RuboCop/Cop/FactoryBot/CreateList
|
66
67
|
|
67
68
|
FactoryBot/ExcessiveCreateList:
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module FactoryBot
|
5
|
+
module Cop
|
6
|
+
# Source and spec generator for new cops
|
7
|
+
#
|
8
|
+
# This generator will take a cop name and generate a source file
|
9
|
+
# and spec file when given a valid qualified cop name.
|
10
|
+
# @api private
|
11
|
+
class Generator < RuboCop::Cop::Generator
|
12
|
+
def todo
|
13
|
+
<<~TODO
|
14
|
+
Do 4 steps:
|
15
|
+
1. Modify the description of #{badge} in config/default.yml
|
16
|
+
2. Implement your new cop in the generated file!
|
17
|
+
3. Add an entry about new cop to CHANGELOG.md
|
18
|
+
4. Commit your new cop with a message such as
|
19
|
+
e.g. "Add new `#{badge}` cop"
|
20
|
+
TODO
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-factory_bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.26.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Backus
|
@@ -9,10 +9,10 @@ authors:
|
|
9
9
|
- Phil Pirozhkov
|
10
10
|
- Maxim Krizhanovsky
|
11
11
|
- Andrew Bromwich
|
12
|
-
autorequire:
|
12
|
+
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2024-
|
15
|
+
date: 2024-06-11 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rubocop
|
@@ -20,18 +20,18 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - "~>"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: '1.
|
23
|
+
version: '1.61'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
28
|
- - "~>"
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: '1.
|
30
|
+
version: '1.61'
|
31
31
|
description: |
|
32
32
|
Code style checking for factory_bot files.
|
33
33
|
A plugin for the RuboCop code style enforcing & linting tool.
|
34
|
-
email:
|
34
|
+
email:
|
35
35
|
executables: []
|
36
36
|
extensions: []
|
37
37
|
extra_rdoc_files:
|
@@ -58,6 +58,7 @@ files:
|
|
58
58
|
- lib/rubocop/cop/factory_bot/syntax_methods.rb
|
59
59
|
- lib/rubocop/cop/factory_bot_cops.rb
|
60
60
|
- lib/rubocop/factory_bot/config_formatter.rb
|
61
|
+
- lib/rubocop/factory_bot/cop/generator.rb
|
61
62
|
- lib/rubocop/factory_bot/description_extractor.rb
|
62
63
|
- lib/rubocop/factory_bot/factory_bot.rb
|
63
64
|
- lib/rubocop/factory_bot/language.rb
|
@@ -69,7 +70,7 @@ metadata:
|
|
69
70
|
changelog_uri: https://github.com/rubocop/rubocop-factory_bot/blob/master/CHANGELOG.md
|
70
71
|
documentation_uri: https://docs.rubocop.org/rubocop-factory_bot/
|
71
72
|
rubygems_mfa_required: 'true'
|
72
|
-
post_install_message:
|
73
|
+
post_install_message:
|
73
74
|
rdoc_options: []
|
74
75
|
require_paths:
|
75
76
|
- lib
|
@@ -84,8 +85,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
85
|
- !ruby/object:Gem::Version
|
85
86
|
version: '0'
|
86
87
|
requirements: []
|
87
|
-
rubygems_version: 3.
|
88
|
-
signing_key:
|
88
|
+
rubygems_version: 3.5.9
|
89
|
+
signing_key:
|
89
90
|
specification_version: 4
|
90
91
|
summary: Code style checking for factory_bot files
|
91
92
|
test_files: []
|