rubocop-rails 2.14.2 → 2.19.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +23 -2
  4. data/config/default.yml +190 -12
  5. data/config/obsoletion.yml +10 -0
  6. data/lib/rubocop/cop/mixin/active_record_helper.rb +3 -6
  7. data/lib/rubocop/cop/mixin/active_record_migrations_helper.rb +1 -3
  8. data/lib/rubocop/cop/mixin/enforce_superclass.rb +1 -1
  9. data/lib/rubocop/cop/mixin/index_method.rb +7 -17
  10. data/lib/rubocop/cop/mixin/migrations_helper.rb +1 -1
  11. data/lib/rubocop/cop/rails/action_controller_flash_before_render.rb +112 -0
  12. data/lib/rubocop/cop/rails/action_controller_test_case.rb +2 -2
  13. data/lib/rubocop/cop/rails/action_filter.rb +2 -2
  14. data/lib/rubocop/cop/rails/action_order.rb +116 -0
  15. data/lib/rubocop/cop/rails/active_record_aliases.rb +3 -4
  16. data/lib/rubocop/cop/rails/active_record_callbacks_order.rb +7 -4
  17. data/lib/rubocop/cop/rails/active_record_override.rb +2 -5
  18. data/lib/rubocop/cop/rails/active_support_aliases.rb +1 -1
  19. data/lib/rubocop/cop/rails/active_support_on_load.rb +70 -0
  20. data/lib/rubocop/cop/rails/add_column_index.rb +3 -6
  21. data/lib/rubocop/cop/rails/after_commit_override.rb +1 -1
  22. data/lib/rubocop/cop/rails/application_controller.rb +2 -2
  23. data/lib/rubocop/cop/rails/application_job.rb +3 -3
  24. data/lib/rubocop/cop/rails/application_mailer.rb +2 -2
  25. data/lib/rubocop/cop/rails/application_record.rb +2 -2
  26. data/lib/rubocop/cop/rails/arel_star.rb +2 -2
  27. data/lib/rubocop/cop/rails/assert_not.rb +1 -1
  28. data/lib/rubocop/cop/rails/attribute_default_block_value.rb +1 -1
  29. data/lib/rubocop/cop/rails/belongs_to.rb +2 -5
  30. data/lib/rubocop/cop/rails/blank.rb +10 -11
  31. data/lib/rubocop/cop/rails/bulk_change_table.rb +8 -25
  32. data/lib/rubocop/cop/rails/compact_blank.rb +6 -2
  33. data/lib/rubocop/cop/rails/content_tag.rb +6 -7
  34. data/lib/rubocop/cop/rails/create_table_with_timestamps.rb +16 -3
  35. data/lib/rubocop/cop/rails/date.rb +12 -17
  36. data/lib/rubocop/cop/rails/default_scope.rb +1 -1
  37. data/lib/rubocop/cop/rails/delegate.rb +24 -18
  38. data/lib/rubocop/cop/rails/delegate_allow_blank.rb +2 -2
  39. data/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb +63 -3
  40. data/lib/rubocop/cop/rails/dot_separated_keys.rb +71 -0
  41. data/lib/rubocop/cop/rails/duplicate_association.rb +2 -2
  42. data/lib/rubocop/cop/rails/duplicate_scope.rb +1 -1
  43. data/lib/rubocop/cop/rails/duration_arithmetic.rb +4 -4
  44. data/lib/rubocop/cop/rails/dynamic_find_by.rb +26 -14
  45. data/lib/rubocop/cop/rails/eager_evaluation_log_message.rb +6 -2
  46. data/lib/rubocop/cop/rails/enum_hash.rb +3 -4
  47. data/lib/rubocop/cop/rails/enum_uniqueness.rb +3 -6
  48. data/lib/rubocop/cop/rails/environment_comparison.rb +3 -4
  49. data/lib/rubocop/cop/rails/environment_variable_access.rb +1 -1
  50. data/lib/rubocop/cop/rails/exit.rb +1 -1
  51. data/lib/rubocop/cop/rails/expanded_date_range.rb +39 -23
  52. data/lib/rubocop/cop/rails/file_path.rb +41 -24
  53. data/lib/rubocop/cop/rails/find_by.rb +1 -1
  54. data/lib/rubocop/cop/rails/find_by_id.rb +3 -3
  55. data/lib/rubocop/cop/rails/find_each.rb +14 -4
  56. data/lib/rubocop/cop/rails/freeze_time.rb +79 -0
  57. data/lib/rubocop/cop/rails/has_and_belongs_to_many.rb +1 -1
  58. data/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb +14 -8
  59. data/lib/rubocop/cop/rails/helper_instance_variable.rb +3 -3
  60. data/lib/rubocop/cop/rails/http_positional_arguments.rb +23 -12
  61. data/lib/rubocop/cop/rails/http_status.rb +6 -11
  62. data/lib/rubocop/cop/rails/i18n_lazy_lookup.rb +3 -1
  63. data/lib/rubocop/cop/rails/i18n_locale_assignment.rb +1 -1
  64. data/lib/rubocop/cop/rails/i18n_locale_texts.rb +2 -2
  65. data/lib/rubocop/cop/rails/ignored_columns_assignment.rb +50 -0
  66. data/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb +5 -14
  67. data/lib/rubocop/cop/rails/index_by.rb +2 -2
  68. data/lib/rubocop/cop/rails/index_with.rb +2 -2
  69. data/lib/rubocop/cop/rails/inquiry.rb +1 -1
  70. data/lib/rubocop/cop/rails/inverse_of.rb +4 -10
  71. data/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb +22 -16
  72. data/lib/rubocop/cop/rails/link_to_blank.rb +2 -5
  73. data/lib/rubocop/cop/rails/mailer_name.rb +5 -5
  74. data/lib/rubocop/cop/rails/match_route.rb +1 -1
  75. data/lib/rubocop/cop/rails/migration_class_name.rb +2 -2
  76. data/lib/rubocop/cop/rails/negate_include.rb +2 -2
  77. data/lib/rubocop/cop/rails/not_null_column.rb +10 -7
  78. data/lib/rubocop/cop/rails/order_by_id.rb +2 -3
  79. data/lib/rubocop/cop/rails/output.rb +7 -9
  80. data/lib/rubocop/cop/rails/output_safety.rb +6 -2
  81. data/lib/rubocop/cop/rails/pick.rb +1 -1
  82. data/lib/rubocop/cop/rails/pluck.rb +45 -13
  83. data/lib/rubocop/cop/rails/pluck_id.rb +2 -2
  84. data/lib/rubocop/cop/rails/pluck_in_where.rb +1 -1
  85. data/lib/rubocop/cop/rails/pluralization_grammar.rb +2 -3
  86. data/lib/rubocop/cop/rails/presence.rb +22 -13
  87. data/lib/rubocop/cop/rails/present.rb +10 -13
  88. data/lib/rubocop/cop/rails/rake_environment.rb +3 -3
  89. data/lib/rubocop/cop/rails/read_write_attribute.rb +2 -2
  90. data/lib/rubocop/cop/rails/redundant_allow_nil.rb +5 -7
  91. data/lib/rubocop/cop/rails/redundant_foreign_key.rb +3 -3
  92. data/lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb +3 -3
  93. data/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb +31 -27
  94. data/lib/rubocop/cop/rails/redundant_travel_back.rb +1 -1
  95. data/lib/rubocop/cop/rails/reflection_class_name.rb +35 -2
  96. data/lib/rubocop/cop/rails/refute_methods.rb +1 -5
  97. data/lib/rubocop/cop/rails/relative_date_constant.rb +5 -8
  98. data/lib/rubocop/cop/rails/render_inline.rb +1 -1
  99. data/lib/rubocop/cop/rails/render_plain_text.rb +1 -1
  100. data/lib/rubocop/cop/rails/request_referer.rb +2 -3
  101. data/lib/rubocop/cop/rails/require_dependency.rb +2 -2
  102. data/lib/rubocop/cop/rails/response_parsed_body.rb +57 -0
  103. data/lib/rubocop/cop/rails/reversible_migration.rb +15 -63
  104. data/lib/rubocop/cop/rails/reversible_migration_method_definition.rb +5 -6
  105. data/lib/rubocop/cop/rails/root_join_chain.rb +1 -1
  106. data/lib/rubocop/cop/rails/root_pathname_methods.rb +238 -0
  107. data/lib/rubocop/cop/rails/root_public_path.rb +59 -0
  108. data/lib/rubocop/cop/rails/safe_navigation.rb +8 -13
  109. data/lib/rubocop/cop/rails/safe_navigation_with_blank.rb +2 -4
  110. data/lib/rubocop/cop/rails/save_bang.rb +12 -24
  111. data/lib/rubocop/cop/rails/schema_comment.rb +1 -1
  112. data/lib/rubocop/cop/rails/scope_args.rb +1 -1
  113. data/lib/rubocop/cop/rails/short_i18n.rb +3 -6
  114. data/lib/rubocop/cop/rails/skips_model_validations.rb +3 -4
  115. data/lib/rubocop/cop/rails/squished_sql_heredocs.rb +10 -7
  116. data/lib/rubocop/cop/rails/strip_heredoc.rb +56 -0
  117. data/lib/rubocop/cop/rails/table_name_assignment.rb +1 -1
  118. data/lib/rubocop/cop/rails/three_state_boolean_column.rb +73 -0
  119. data/lib/rubocop/cop/rails/time_zone.rb +34 -32
  120. data/lib/rubocop/cop/rails/time_zone_assignment.rb +4 -4
  121. data/lib/rubocop/cop/rails/to_formatted_s.rb +46 -0
  122. data/lib/rubocop/cop/rails/to_s_with_argument.rb +78 -0
  123. data/lib/rubocop/cop/rails/top_level_hash_with_indifferent_access.rb +49 -0
  124. data/lib/rubocop/cop/rails/transaction_exit_statement.rb +17 -12
  125. data/lib/rubocop/cop/rails/uniq_before_pluck.rb +3 -6
  126. data/lib/rubocop/cop/rails/unique_validation_without_index.rb +14 -7
  127. data/lib/rubocop/cop/rails/unknown_env.rb +3 -5
  128. data/lib/rubocop/cop/rails/unused_ignored_columns.rb +7 -2
  129. data/lib/rubocop/cop/rails/validation.rb +5 -13
  130. data/lib/rubocop/cop/rails/where_equals.rb +2 -2
  131. data/lib/rubocop/cop/rails/where_exists.rb +3 -3
  132. data/lib/rubocop/cop/rails/where_missing.rb +118 -0
  133. data/lib/rubocop/cop/rails/where_not.rb +2 -2
  134. data/lib/rubocop/cop/rails/where_not_with_multiple_conditions.rb +55 -0
  135. data/lib/rubocop/cop/rails_cops.rb +16 -0
  136. data/lib/rubocop/rails/schema_loader/schema.rb +8 -5
  137. data/lib/rubocop/rails/version.rb +1 -1
  138. data/lib/rubocop/rails.rb +1 -1
  139. data/lib/rubocop-rails.rb +19 -0
  140. metadata +23 -9
  141. data/bin/console +0 -11
  142. data/bin/setup +0 -7
@@ -8,12 +8,15 @@ require_relative 'mixin/index_method'
8
8
  require_relative 'mixin/migrations_helper'
9
9
  require_relative 'mixin/target_rails_version'
10
10
 
11
+ require_relative 'rails/action_controller_flash_before_render'
11
12
  require_relative 'rails/action_controller_test_case'
12
13
  require_relative 'rails/action_filter'
14
+ require_relative 'rails/action_order'
13
15
  require_relative 'rails/active_record_aliases'
14
16
  require_relative 'rails/active_record_callbacks_order'
15
17
  require_relative 'rails/active_record_override'
16
18
  require_relative 'rails/active_support_aliases'
19
+ require_relative 'rails/active_support_on_load'
17
20
  require_relative 'rails/add_column_index'
18
21
  require_relative 'rails/after_commit_override'
19
22
  require_relative 'rails/application_controller'
@@ -34,6 +37,7 @@ require_relative 'rails/default_scope'
34
37
  require_relative 'rails/delegate'
35
38
  require_relative 'rails/delegate_allow_blank'
36
39
  require_relative 'rails/deprecated_active_model_errors_methods'
40
+ require_relative 'rails/dot_separated_keys'
37
41
  require_relative 'rails/duplicate_association'
38
42
  require_relative 'rails/duplicate_scope'
39
43
  require_relative 'rails/duration_arithmetic'
@@ -49,6 +53,7 @@ require_relative 'rails/file_path'
49
53
  require_relative 'rails/find_by'
50
54
  require_relative 'rails/find_by_id'
51
55
  require_relative 'rails/find_each'
56
+ require_relative 'rails/freeze_time'
52
57
  require_relative 'rails/has_and_belongs_to_many'
53
58
  require_relative 'rails/has_many_or_has_one_dependent'
54
59
  require_relative 'rails/helper_instance_variable'
@@ -57,6 +62,7 @@ require_relative 'rails/http_status'
57
62
  require_relative 'rails/i18n_lazy_lookup'
58
63
  require_relative 'rails/i18n_locale_assignment'
59
64
  require_relative 'rails/i18n_locale_texts'
65
+ require_relative 'rails/ignored_columns_assignment'
60
66
  require_relative 'rails/ignored_skip_action_filter_option'
61
67
  require_relative 'rails/index_by'
62
68
  require_relative 'rails/index_with'
@@ -93,9 +99,12 @@ require_relative 'rails/render_inline'
93
99
  require_relative 'rails/render_plain_text'
94
100
  require_relative 'rails/request_referer'
95
101
  require_relative 'rails/require_dependency'
102
+ require_relative 'rails/response_parsed_body'
96
103
  require_relative 'rails/reversible_migration'
97
104
  require_relative 'rails/reversible_migration_method_definition'
98
105
  require_relative 'rails/root_join_chain'
106
+ require_relative 'rails/root_pathname_methods'
107
+ require_relative 'rails/root_public_path'
99
108
  require_relative 'rails/safe_navigation'
100
109
  require_relative 'rails/safe_navigation_with_blank'
101
110
  require_relative 'rails/save_bang'
@@ -104,9 +113,14 @@ require_relative 'rails/scope_args'
104
113
  require_relative 'rails/short_i18n'
105
114
  require_relative 'rails/skips_model_validations'
106
115
  require_relative 'rails/squished_sql_heredocs'
116
+ require_relative 'rails/strip_heredoc'
107
117
  require_relative 'rails/table_name_assignment'
118
+ require_relative 'rails/three_state_boolean_column'
108
119
  require_relative 'rails/time_zone'
109
120
  require_relative 'rails/time_zone_assignment'
121
+ require_relative 'rails/to_formatted_s'
122
+ require_relative 'rails/to_s_with_argument'
123
+ require_relative 'rails/top_level_hash_with_indifferent_access'
110
124
  require_relative 'rails/transaction_exit_statement'
111
125
  require_relative 'rails/uniq_before_pluck'
112
126
  require_relative 'rails/unique_validation_without_index'
@@ -115,4 +129,6 @@ require_relative 'rails/unused_ignored_columns'
115
129
  require_relative 'rails/validation'
116
130
  require_relative 'rails/where_equals'
117
131
  require_relative 'rails/where_exists'
132
+ require_relative 'rails/where_missing'
118
133
  require_relative 'rails/where_not'
134
+ require_relative 'rails/where_not_with_multiple_conditions'
@@ -5,11 +5,11 @@ module RuboCop
5
5
  module SchemaLoader
6
6
  # Represent db/schema.rb
7
7
  class Schema
8
- attr_reader :tables, :add_indicies
8
+ attr_reader :tables, :add_indices
9
9
 
10
10
  def initialize(ast)
11
11
  @tables = []
12
- @add_indicies = []
12
+ @add_indices = []
13
13
 
14
14
  build!(ast)
15
15
  end
@@ -20,8 +20,8 @@ module RuboCop
20
20
  end
21
21
  end
22
22
 
23
- def add_indicies_by(table_name:)
24
- add_indicies.select do |add_index|
23
+ def add_indices_by(table_name:)
24
+ add_indices.select do |add_index|
25
25
  add_index.table_name == table_name
26
26
  end
27
27
  end
@@ -32,12 +32,14 @@ module RuboCop
32
32
  raise "Unexpected type: #{ast.type}" unless ast.block_type?
33
33
 
34
34
  each_table(ast) do |table_def|
35
+ next unless table_def.method?(:create_table)
36
+
35
37
  @tables << Table.new(table_def)
36
38
  end
37
39
 
38
40
  # Compatibility for Rails 4.2.
39
41
  each_add_index(ast) do |add_index_def|
40
- @add_indicies << AddIndex.new(add_index_def)
42
+ @add_indices << AddIndex.new(add_index_def)
41
43
  end
42
44
  end
43
45
 
@@ -56,6 +58,7 @@ module RuboCop
56
58
 
57
59
  def each_add_index(ast)
58
60
  ast.body.children.each do |node|
61
+ next unless node.respond_to?(:send_type?)
59
62
  next if !node&.send_type? || !node.method?(:add_index)
60
63
 
61
64
  yield(node)
@@ -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.14.2'
7
+ STRING = '2.19.1'
8
8
 
9
9
  def self.document_version
10
10
  STRING.match('\d+\.\d+').to_s
data/lib/rubocop/rails.rb CHANGED
@@ -5,7 +5,7 @@ module RuboCop
5
5
  module Rails
6
6
  PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze
7
7
  CONFIG_DEFAULT = PROJECT_ROOT.join('config', 'default.yml').freeze
8
- CONFIG = YAML.safe_load(CONFIG_DEFAULT.read).freeze
8
+ CONFIG = YAML.safe_load(CONFIG_DEFAULT.read, permitted_classes: [Regexp, Symbol]).freeze
9
9
 
10
10
  private_constant(:CONFIG_DEFAULT, :PROJECT_ROOT)
11
11
 
data/lib/rubocop-rails.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  require 'rubocop'
4
4
  require 'rack/utils'
5
5
  require 'active_support/inflector'
6
+ require 'active_support/core_ext/object/blank'
6
7
 
7
8
  require_relative 'rubocop/rails'
8
9
  require_relative 'rubocop/rails/version'
@@ -13,3 +14,21 @@ require_relative 'rubocop/rails/schema_loader/schema'
13
14
  RuboCop::Rails::Inject.defaults!
14
15
 
15
16
  require_relative 'rubocop/cop/rails_cops'
17
+
18
+ RuboCop::Cop::Style::HashExcept.minimum_target_ruby_version(2.0)
19
+
20
+ RuboCop::Cop::Style::MethodCallWithArgsParentheses.singleton_class.prepend(
21
+ Module.new do
22
+ def autocorrect_incompatible_with
23
+ super.push(RuboCop::Cop::Rails::EagerEvaluationLogMessage)
24
+ end
25
+ end
26
+ )
27
+
28
+ RuboCop::Cop::Style::RedundantSelf.singleton_class.prepend(
29
+ Module.new do
30
+ def autocorrect_incompatible_with
31
+ super.push(RuboCop::Cop::Rails::SafeNavigation)
32
+ end
33
+ end
34
+ )
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.14.2
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: 2022-03-18 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
@@ -46,7 +46,7 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 1.7.0
49
+ version: 1.33.0
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
52
  version: '2.0'
@@ -56,7 +56,7 @@ dependencies:
56
56
  requirements:
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: 1.7.0
59
+ version: 1.33.0
60
60
  - - "<"
61
61
  - !ruby/object:Gem::Version
62
62
  version: '2.0'
@@ -72,8 +72,6 @@ extra_rdoc_files:
72
72
  files:
73
73
  - LICENSE.txt
74
74
  - README.md
75
- - bin/console
76
- - bin/setup
77
75
  - config/default.yml
78
76
  - config/obsoletion.yml
79
77
  - lib/rubocop-rails.rb
@@ -84,12 +82,15 @@ files:
84
82
  - lib/rubocop/cop/mixin/index_method.rb
85
83
  - lib/rubocop/cop/mixin/migrations_helper.rb
86
84
  - lib/rubocop/cop/mixin/target_rails_version.rb
85
+ - lib/rubocop/cop/rails/action_controller_flash_before_render.rb
87
86
  - lib/rubocop/cop/rails/action_controller_test_case.rb
88
87
  - lib/rubocop/cop/rails/action_filter.rb
88
+ - lib/rubocop/cop/rails/action_order.rb
89
89
  - lib/rubocop/cop/rails/active_record_aliases.rb
90
90
  - lib/rubocop/cop/rails/active_record_callbacks_order.rb
91
91
  - lib/rubocop/cop/rails/active_record_override.rb
92
92
  - lib/rubocop/cop/rails/active_support_aliases.rb
93
+ - lib/rubocop/cop/rails/active_support_on_load.rb
93
94
  - lib/rubocop/cop/rails/add_column_index.rb
94
95
  - lib/rubocop/cop/rails/after_commit_override.rb
95
96
  - lib/rubocop/cop/rails/application_controller.rb
@@ -110,6 +111,7 @@ files:
110
111
  - lib/rubocop/cop/rails/delegate.rb
111
112
  - lib/rubocop/cop/rails/delegate_allow_blank.rb
112
113
  - lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb
114
+ - lib/rubocop/cop/rails/dot_separated_keys.rb
113
115
  - lib/rubocop/cop/rails/duplicate_association.rb
114
116
  - lib/rubocop/cop/rails/duplicate_scope.rb
115
117
  - lib/rubocop/cop/rails/duration_arithmetic.rb
@@ -125,6 +127,7 @@ files:
125
127
  - lib/rubocop/cop/rails/find_by.rb
126
128
  - lib/rubocop/cop/rails/find_by_id.rb
127
129
  - lib/rubocop/cop/rails/find_each.rb
130
+ - lib/rubocop/cop/rails/freeze_time.rb
128
131
  - lib/rubocop/cop/rails/has_and_belongs_to_many.rb
129
132
  - lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb
130
133
  - lib/rubocop/cop/rails/helper_instance_variable.rb
@@ -133,6 +136,7 @@ files:
133
136
  - lib/rubocop/cop/rails/i18n_lazy_lookup.rb
134
137
  - lib/rubocop/cop/rails/i18n_locale_assignment.rb
135
138
  - lib/rubocop/cop/rails/i18n_locale_texts.rb
139
+ - lib/rubocop/cop/rails/ignored_columns_assignment.rb
136
140
  - lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb
137
141
  - lib/rubocop/cop/rails/index_by.rb
138
142
  - lib/rubocop/cop/rails/index_with.rb
@@ -169,9 +173,12 @@ files:
169
173
  - lib/rubocop/cop/rails/render_plain_text.rb
170
174
  - lib/rubocop/cop/rails/request_referer.rb
171
175
  - lib/rubocop/cop/rails/require_dependency.rb
176
+ - lib/rubocop/cop/rails/response_parsed_body.rb
172
177
  - lib/rubocop/cop/rails/reversible_migration.rb
173
178
  - lib/rubocop/cop/rails/reversible_migration_method_definition.rb
174
179
  - lib/rubocop/cop/rails/root_join_chain.rb
180
+ - lib/rubocop/cop/rails/root_pathname_methods.rb
181
+ - lib/rubocop/cop/rails/root_public_path.rb
175
182
  - lib/rubocop/cop/rails/safe_navigation.rb
176
183
  - lib/rubocop/cop/rails/safe_navigation_with_blank.rb
177
184
  - lib/rubocop/cop/rails/save_bang.rb
@@ -180,9 +187,14 @@ files:
180
187
  - lib/rubocop/cop/rails/short_i18n.rb
181
188
  - lib/rubocop/cop/rails/skips_model_validations.rb
182
189
  - lib/rubocop/cop/rails/squished_sql_heredocs.rb
190
+ - lib/rubocop/cop/rails/strip_heredoc.rb
183
191
  - lib/rubocop/cop/rails/table_name_assignment.rb
192
+ - lib/rubocop/cop/rails/three_state_boolean_column.rb
184
193
  - lib/rubocop/cop/rails/time_zone.rb
185
194
  - lib/rubocop/cop/rails/time_zone_assignment.rb
195
+ - lib/rubocop/cop/rails/to_formatted_s.rb
196
+ - lib/rubocop/cop/rails/to_s_with_argument.rb
197
+ - lib/rubocop/cop/rails/top_level_hash_with_indifferent_access.rb
186
198
  - lib/rubocop/cop/rails/transaction_exit_statement.rb
187
199
  - lib/rubocop/cop/rails/uniq_before_pluck.rb
188
200
  - lib/rubocop/cop/rails/unique_validation_without_index.rb
@@ -191,7 +203,9 @@ files:
191
203
  - lib/rubocop/cop/rails/validation.rb
192
204
  - lib/rubocop/cop/rails/where_equals.rb
193
205
  - lib/rubocop/cop/rails/where_exists.rb
206
+ - lib/rubocop/cop/rails/where_missing.rb
194
207
  - lib/rubocop/cop/rails/where_not.rb
208
+ - lib/rubocop/cop/rails/where_not_with_multiple_conditions.rb
195
209
  - lib/rubocop/cop/rails_cops.rb
196
210
  - lib/rubocop/rails.rb
197
211
  - lib/rubocop/rails/inject.rb
@@ -205,7 +219,7 @@ metadata:
205
219
  homepage_uri: https://docs.rubocop.org/rubocop-rails/
206
220
  changelog_uri: https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md
207
221
  source_code_uri: https://github.com/rubocop/rubocop-rails/
208
- documentation_uri: https://docs.rubocop.org/rubocop-rails/2.14/
222
+ documentation_uri: https://docs.rubocop.org/rubocop-rails/2.19/
209
223
  bug_tracker_uri: https://github.com/rubocop/rubocop-rails/issues
210
224
  rubygems_mfa_required: 'true'
211
225
  post_install_message:
@@ -216,14 +230,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
216
230
  requirements:
217
231
  - - ">="
218
232
  - !ruby/object:Gem::Version
219
- version: 2.5.0
233
+ version: 2.6.0
220
234
  required_rubygems_version: !ruby/object:Gem::Requirement
221
235
  requirements:
222
236
  - - ">="
223
237
  - !ruby/object:Gem::Version
224
238
  version: '0'
225
239
  requirements: []
226
- rubygems_version: 3.3.3
240
+ rubygems_version: 3.5.0.dev
227
241
  signing_key:
228
242
  specification_version: 4
229
243
  summary: Automatic Rails code style checking tool.
data/bin/console DELETED
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require 'bundler/setup'
5
- require 'irb'
6
- require 'rubocop'
7
- require 'rubocop-rails'
8
-
9
- ARGV.clear
10
-
11
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -euo pipefail
4
- IFS=$'\n\t'
5
- set -vx
6
-
7
- bundle install