rubocop-rails 2.19.0 → 2.19.1

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: 327dd4bed957b6be1d52e47a9087f43abf7f7361ddaf8b0c3b13dbb0bf7bbb52
4
- data.tar.gz: cf2c5747f8abab6e65ff8ffc9d31693c42c0515e8751a1d5b0651c12c7ceb93a
3
+ metadata.gz: b020fcc0db6203c33dfe23032cc2c6ec0df139e6abb048409bdf7439ea2d4183
4
+ data.tar.gz: fc6e892161124d21b9067e01e6b86178857df27d14ae687f3f0fdcceb2b3d078
5
5
  SHA512:
6
- metadata.gz: 4114a576ae595944cd0ec1b673e8f706fa975a643fb9d56e25b5498b7964f5141e2724aeb2dc24c6b63f6d501c7e1a85469a32333be69862e054fdb10874f09c
7
- data.tar.gz: c87e88b3de8ea166a68a0be6a08e70e387790b3d705648145a8d769978f1c92e03ea18fe510b1ce5543c6f1fefe59be1f0fd583ba392dd2274b1dde58a21ca61
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
- system("bundle exec rubocop -A --fail-level=E #{files.shelljoin}", exception: true)
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
- return if def_node && change_column_null?(def_node, table_node.value, column_node.value)
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
@@ -4,7 +4,7 @@ module RuboCop
4
4
  module Rails
5
5
  # This module holds the RuboCop Rails version information.
6
6
  module Version
7
- STRING = '2.19.0'
7
+ STRING = '2.19.1'
8
8
 
9
9
  def self.document_version
10
10
  STRING.match('\d+\.\d+').to_s
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.0
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-07 00:00:00.000000000 Z
13
+ date: 2023-04-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport