rubocop-infinum 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +4 -0
- data/lib/rubocop/cop/infinum/factory_bot_association.rb +7 -9
- data/lib/rubocop/infinum/version.rb +1 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1135b596b05a6c1ca1a301ebd22040ec140a9c3a83409c3d1a261b839f4b7f50
|
4
|
+
data.tar.gz: d983ba7eac41b7ca5e282deb9d2d4bccd24ee3fea51e3e6c058de5a87566bb3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74a5e95b3d4125d93b19b7ba67bd4413539287da3a12a16783533391903bc2630ef66a95baa83ed751dde6d92c9b0998d840955ac6df9ad64399a6471fb1243b
|
7
|
+
data.tar.gz: 378598448bc083feb676a192ca232ee107003e52e410b040f1fac2a8ec530194f85a21c551cd474f3aa173b85c3804efbd31483956057ba06f147be87271c406
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# RuboCop Infinum Change Log
|
2
2
|
|
3
|
+
## 0.9.0 (Oct 7th 2024)
|
4
|
+
|
5
|
+
- "Cop#corrections is deprecated" warning fixed ([PR#21](https://github.com/infinum/rubocop-infinum/pull/21) tnx @unavailabl3)
|
6
|
+
|
3
7
|
## 0.8.0 (May 11th, 2022)
|
4
8
|
|
5
9
|
- Remove TargetRubyVersion from rubocop yml template (@cilim)
|
@@ -53,19 +53,17 @@ module RuboCop
|
|
53
53
|
inline_association_definition(node) do |association_name, factory_name|
|
54
54
|
message = format(MSG, association_name: association_name.to_s, factory_name: factory_name.to_s)
|
55
55
|
|
56
|
-
add_offense(node,
|
56
|
+
add_offense(node, message: message)
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
60
|
def on_send(node)
|
61
|
-
return unless corrections.empty?
|
62
|
-
|
63
61
|
association_definition(node) do |association_name, factory_name|
|
64
62
|
factory_name = [association_name] if factory_name.empty?
|
65
63
|
|
66
64
|
message = format(MSG, association_name: association_name.to_s, factory_name: factory_name.first.to_s)
|
67
65
|
|
68
|
-
add_offense(node,
|
66
|
+
add_offense(node, message: message)
|
69
67
|
end
|
70
68
|
end
|
71
69
|
|
@@ -82,11 +80,11 @@ module RuboCop
|
|
82
80
|
private
|
83
81
|
|
84
82
|
def expression(node)
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
83
|
+
if node.block_type?
|
84
|
+
inline_association_definition(node)
|
85
|
+
else
|
86
|
+
association_definition(node).flatten
|
87
|
+
end
|
90
88
|
end
|
91
89
|
end
|
92
90
|
end
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-infinum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marko Ćilimković
|
8
8
|
- Stjepan Hađić
|
9
9
|
- Tin Benaković
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2024-10-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: pry-byebug
|
@@ -96,7 +96,7 @@ dependencies:
|
|
96
96
|
- - ">="
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: '0'
|
99
|
-
description:
|
99
|
+
description:
|
100
100
|
email:
|
101
101
|
- team.backend@infinum.com
|
102
102
|
executables: []
|
@@ -127,7 +127,7 @@ metadata:
|
|
127
127
|
allowed_push_host: https://rubygems.org
|
128
128
|
homepage_uri: https://github.com/infinum/rubocop-infinum
|
129
129
|
source_code_uri: https://github.com/infinum/rubocop-infinum
|
130
|
-
post_install_message:
|
130
|
+
post_install_message:
|
131
131
|
rdoc_options: []
|
132
132
|
require_paths:
|
133
133
|
- lib
|
@@ -142,9 +142,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
142
|
- !ruby/object:Gem::Version
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
|
-
|
146
|
-
|
147
|
-
signing_key:
|
145
|
+
rubygems_version: 3.3.3
|
146
|
+
signing_key:
|
148
147
|
specification_version: 4
|
149
148
|
summary: Automatic Infinum code style checking tool.
|
150
149
|
test_files: []
|