rubocop-rails 2.19.0 → 2.19.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/config/default.yml +1 -0
- data/lib/rubocop/cop/rails/three_state_boolean_column.rb +3 -1
- data/lib/rubocop/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b020fcc0db6203c33dfe23032cc2c6ec0df139e6abb048409bdf7439ea2d4183
|
4
|
+
data.tar.gz: fc6e892161124d21b9067e01e6b86178857df27d14ae687f3f0fdcceb2b3d078
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f09636066a282111462ab5cc3b93463ec0cd8a111e2882b6e7c21889da3b36958766f722926418439e48933d8791ce41c0edadc3e4a590c5f8caeb82f35ad5b1
|
7
|
+
data.tar.gz: 40586400ad94701ee39ee71ab7280f7328889245f4786503cf5a851d158a05e4f736eea42c53f61164a420af8fab7e19854c6302237115a29efd3bdd1f19cc68
|
data/README.md
CHANGED
@@ -71,7 +71,8 @@ your config/application.rb to apply RuboCop autocorrection to code generated by
|
|
71
71
|
module YourCoolApp
|
72
72
|
class Application < Rails::Application
|
73
73
|
config.generators.after_generate do |files|
|
74
|
-
|
74
|
+
parsable_files = files.filter { |file| file.end_with?('.rb') }
|
75
|
+
system("bundle exec rubocop -A --fail-level=E #{parsable_files.shelljoin}", exception: true)
|
75
76
|
end
|
76
77
|
end
|
77
78
|
end
|
data/config/default.yml
CHANGED
@@ -1139,6 +1139,7 @@ Rails/WhereNot:
|
|
1139
1139
|
|
1140
1140
|
Rails/WhereNotWithMultipleConditions:
|
1141
1141
|
Description: 'Do not use `where.not(...)` with multiple conditions.'
|
1142
|
+
StyleGuide: 'https://rails.rubystyle.guide/#where-not-with-multiple-attributes'
|
1142
1143
|
Enabled: 'pending'
|
1143
1144
|
Severity: warning
|
1144
1145
|
VersionAdded: '2.17'
|
@@ -46,7 +46,9 @@ module RuboCop
|
|
46
46
|
|
47
47
|
def_node = node.each_ancestor(:def, :defs).first
|
48
48
|
table_node = table_node(node)
|
49
|
-
|
49
|
+
if def_node && (table_node.nil? || change_column_null?(def_node, table_node.value, column_node.value))
|
50
|
+
return
|
51
|
+
end
|
50
52
|
|
51
53
|
add_offense(node)
|
52
54
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.19.
|
4
|
+
version: 2.19.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-04-
|
13
|
+
date: 2023-04-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|