rubocop-rails 2.4.2 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +5 -1
  4. data/config/default.yml +179 -9
  5. data/lib/rubocop-rails.rb +3 -0
  6. data/lib/rubocop/cop/mixin/active_record_helper.rb +84 -0
  7. data/lib/rubocop/cop/mixin/index_method.rb +161 -0
  8. data/lib/rubocop/cop/rails/active_record_callbacks_order.rb +145 -0
  9. data/lib/rubocop/cop/rails/content_tag.rb +69 -0
  10. data/lib/rubocop/cop/rails/create_table_with_timestamps.rb +1 -3
  11. data/lib/rubocop/cop/rails/default_scope.rb +54 -0
  12. data/lib/rubocop/cop/rails/delegate.rb +2 -4
  13. data/lib/rubocop/cop/rails/dynamic_find_by.rb +40 -15
  14. data/lib/rubocop/cop/rails/environment_comparison.rb +60 -14
  15. data/lib/rubocop/cop/rails/exit.rb +2 -2
  16. data/lib/rubocop/cop/rails/file_path.rb +2 -1
  17. data/lib/rubocop/cop/rails/find_by_id.rb +103 -0
  18. data/lib/rubocop/cop/rails/http_positional_arguments.rb +2 -2
  19. data/lib/rubocop/cop/rails/http_status.rb +2 -0
  20. data/lib/rubocop/cop/rails/index_by.rb +56 -0
  21. data/lib/rubocop/cop/rails/index_with.rb +59 -0
  22. data/lib/rubocop/cop/rails/inquiry.rb +34 -0
  23. data/lib/rubocop/cop/rails/inverse_of.rb +0 -4
  24. data/lib/rubocop/cop/rails/link_to_blank.rb +3 -3
  25. data/lib/rubocop/cop/rails/mailer_name.rb +80 -0
  26. data/lib/rubocop/cop/rails/match_route.rb +117 -0
  27. data/lib/rubocop/cop/rails/negate_include.rb +39 -0
  28. data/lib/rubocop/cop/rails/pick.rb +55 -0
  29. data/lib/rubocop/cop/rails/pluck.rb +59 -0
  30. data/lib/rubocop/cop/rails/pluck_id.rb +58 -0
  31. data/lib/rubocop/cop/rails/pluck_in_where.rb +36 -0
  32. data/lib/rubocop/cop/rails/presence.rb +2 -6
  33. data/lib/rubocop/cop/rails/rake_environment.rb +17 -0
  34. data/lib/rubocop/cop/rails/redundant_foreign_key.rb +80 -0
  35. data/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb +0 -3
  36. data/lib/rubocop/cop/rails/refute_methods.rb +52 -26
  37. data/lib/rubocop/cop/rails/render_inline.rb +48 -0
  38. data/lib/rubocop/cop/rails/render_plain_text.rb +76 -0
  39. data/lib/rubocop/cop/rails/reversible_migration.rb +6 -1
  40. data/lib/rubocop/cop/rails/safe_navigation.rb +1 -1
  41. data/lib/rubocop/cop/rails/save_bang.rb +6 -7
  42. data/lib/rubocop/cop/rails/short_i18n.rb +76 -0
  43. data/lib/rubocop/cop/rails/skips_model_validations.rb +46 -8
  44. data/lib/rubocop/cop/rails/time_zone.rb +1 -3
  45. data/lib/rubocop/cop/rails/uniq_before_pluck.rb +12 -12
  46. data/lib/rubocop/cop/rails/unique_validation_without_index.rb +155 -0
  47. data/lib/rubocop/cop/rails/unknown_env.rb +7 -6
  48. data/lib/rubocop/cop/rails/where_exists.rb +68 -0
  49. data/lib/rubocop/cop/rails_cops.rb +22 -0
  50. data/lib/rubocop/rails/schema_loader.rb +61 -0
  51. data/lib/rubocop/rails/schema_loader/schema.rb +190 -0
  52. data/lib/rubocop/rails/version.rb +1 -1
  53. metadata +46 -8
@@ -0,0 +1,68 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module Rails
6
+ # This cop enforces the use of `exists?(...)` over `where(...).exists?`.
7
+ #
8
+ # @example
9
+ # # bad
10
+ # User.where(name: 'john').exists?
11
+ # User.where(['name = ?', 'john']).exists?
12
+ # User.where('name = ?', 'john').exists?
13
+ # user.posts.where(published: true).exists?
14
+ #
15
+ # # good
16
+ # User.exists?(name: 'john')
17
+ # User.where('length(name) > 10').exists?
18
+ # user.posts.exists?(published: true)
19
+ #
20
+ class WhereExists < Cop
21
+ MSG = 'Prefer `%<good_method>s` over `%<bad_method>s`.'
22
+
23
+ def_node_matcher :where_exists_call?, <<~PATTERN
24
+ (send (send _ :where $...) :exists?)
25
+ PATTERN
26
+
27
+ def on_send(node)
28
+ where_exists_call?(node) do |args|
29
+ return unless convertable_args?(args)
30
+
31
+ range = correction_range(node)
32
+ message = format(MSG, good_method: build_good_method(args), bad_method: range.source)
33
+ add_offense(node, location: range, message: message)
34
+ end
35
+ end
36
+
37
+ def autocorrect(node)
38
+ args = where_exists_call?(node)
39
+
40
+ lambda do |corrector|
41
+ corrector.replace(
42
+ correction_range(node),
43
+ build_good_method(args)
44
+ )
45
+ end
46
+ end
47
+
48
+ private
49
+
50
+ def convertable_args?(args)
51
+ args.size > 1 || args[0].hash_type? || args[0].array_type?
52
+ end
53
+
54
+ def correction_range(node)
55
+ node.receiver.loc.selector.join(node.loc.selector)
56
+ end
57
+
58
+ def build_good_method(args)
59
+ if args.size > 1
60
+ "exists?([#{args.map(&:source).join(', ')}])"
61
+ else
62
+ "exists?(#{args[0].source})"
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
@@ -1,9 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative 'mixin/active_record_helper'
4
+ require_relative 'mixin/index_method'
3
5
  require_relative 'mixin/target_rails_version'
4
6
 
5
7
  require_relative 'rails/action_filter'
6
8
  require_relative 'rails/active_record_aliases'
9
+ require_relative 'rails/active_record_callbacks_order'
7
10
  require_relative 'rails/active_record_override'
8
11
  require_relative 'rails/active_support_aliases'
9
12
  require_relative 'rails/application_controller'
@@ -14,8 +17,10 @@ require_relative 'rails/assert_not'
14
17
  require_relative 'rails/belongs_to'
15
18
  require_relative 'rails/blank'
16
19
  require_relative 'rails/bulk_change_table'
20
+ require_relative 'rails/content_tag'
17
21
  require_relative 'rails/create_table_with_timestamps'
18
22
  require_relative 'rails/date'
23
+ require_relative 'rails/default_scope'
19
24
  require_relative 'rails/delegate'
20
25
  require_relative 'rails/delegate_allow_blank'
21
26
  require_relative 'rails/dynamic_find_by'
@@ -25,6 +30,7 @@ require_relative 'rails/environment_comparison'
25
30
  require_relative 'rails/exit'
26
31
  require_relative 'rails/file_path'
27
32
  require_relative 'rails/find_by'
33
+ require_relative 'rails/find_by_id'
28
34
  require_relative 'rails/find_each'
29
35
  require_relative 'rails/has_and_belongs_to_many'
30
36
  require_relative 'rails/has_many_or_has_one_dependent'
@@ -32,30 +38,46 @@ require_relative 'rails/helper_instance_variable'
32
38
  require_relative 'rails/http_positional_arguments'
33
39
  require_relative 'rails/http_status'
34
40
  require_relative 'rails/ignored_skip_action_filter_option'
41
+ require_relative 'rails/index_by'
42
+ require_relative 'rails/index_with'
43
+ require_relative 'rails/inquiry'
35
44
  require_relative 'rails/inverse_of'
36
45
  require_relative 'rails/lexically_scoped_action_filter'
37
46
  require_relative 'rails/link_to_blank'
47
+ require_relative 'rails/mailer_name'
48
+ require_relative 'rails/match_route'
49
+ require_relative 'rails/negate_include'
38
50
  require_relative 'rails/not_null_column'
39
51
  require_relative 'rails/output'
40
52
  require_relative 'rails/output_safety'
53
+ require_relative 'rails/pick'
54
+ require_relative 'rails/pluck'
55
+ require_relative 'rails/pluck_id'
56
+ require_relative 'rails/pluck_in_where'
41
57
  require_relative 'rails/pluralization_grammar'
42
58
  require_relative 'rails/presence'
43
59
  require_relative 'rails/present'
44
60
  require_relative 'rails/rake_environment'
45
61
  require_relative 'rails/read_write_attribute'
46
62
  require_relative 'rails/redundant_allow_nil'
63
+ require_relative 'rails/redundant_foreign_key'
47
64
  require_relative 'rails/redundant_receiver_in_with_options'
48
65
  require_relative 'rails/reflection_class_name'
49
66
  require_relative 'rails/refute_methods'
50
67
  require_relative 'rails/relative_date_constant'
68
+ require_relative 'rails/render_inline'
69
+ require_relative 'rails/render_plain_text'
51
70
  require_relative 'rails/request_referer'
52
71
  require_relative 'rails/reversible_migration'
53
72
  require_relative 'rails/safe_navigation'
54
73
  require_relative 'rails/safe_navigation_with_blank'
55
74
  require_relative 'rails/save_bang'
56
75
  require_relative 'rails/scope_args'
76
+ require_relative 'rails/short_i18n'
57
77
  require_relative 'rails/skips_model_validations'
58
78
  require_relative 'rails/time_zone'
59
79
  require_relative 'rails/uniq_before_pluck'
80
+ require_relative 'rails/unique_validation_without_index'
60
81
  require_relative 'rails/unknown_env'
61
82
  require_relative 'rails/validation'
83
+ require_relative 'rails/where_exists'
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Rails
5
+ # It loads db/schema.rb and return Schema object.
6
+ # Cops refers database schema information with this module.
7
+ module SchemaLoader
8
+ extend self
9
+
10
+ # It parses `db/schema.rb` and return it.
11
+ # It returns `nil` if it can't find `db/schema.rb`.
12
+ # So a cop that uses the loader should handle `nil` properly.
13
+ #
14
+ # @return [Schema, nil]
15
+ def load(target_ruby_version)
16
+ return @schema if defined?(@schema)
17
+
18
+ @schema = load!(target_ruby_version)
19
+ end
20
+
21
+ def reset!
22
+ return unless instance_variable_defined?(:@schema)
23
+
24
+ remove_instance_variable(:@schema)
25
+ end
26
+
27
+ def db_schema_path
28
+ path = Pathname.pwd
29
+ until path.root?
30
+ schema_path = path.join('db/schema.rb')
31
+ return schema_path if schema_path.exist?
32
+
33
+ path = path.join('../').cleanpath
34
+ end
35
+
36
+ nil
37
+ end
38
+
39
+ private
40
+
41
+ def load!(target_ruby_version)
42
+ path = db_schema_path
43
+ return unless path
44
+
45
+ ast = parse(path, target_ruby_version)
46
+ Schema.new(ast)
47
+ end
48
+
49
+ def parse(path, target_ruby_version)
50
+ klass_name = :"Ruby#{target_ruby_version.to_s.sub('.', '')}"
51
+ klass = ::Parser.const_get(klass_name)
52
+ parser = klass.new(RuboCop::AST::Builder.new)
53
+
54
+ buffer = Parser::Source::Buffer.new(path, 1)
55
+ buffer.source = path.read
56
+
57
+ parser.parse(buffer)
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,190 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Rails
5
+ module SchemaLoader
6
+ # Represent db/schema.rb
7
+ class Schema
8
+ attr_reader :tables, :add_indicies
9
+
10
+ def initialize(ast)
11
+ @tables = []
12
+ @add_indicies = []
13
+
14
+ build!(ast)
15
+ end
16
+
17
+ def table_by(name:)
18
+ tables.find do |table|
19
+ table.name == name
20
+ end
21
+ end
22
+
23
+ def add_indicies_by(table_name:)
24
+ add_indicies.select do |add_index|
25
+ add_index.table_name == table_name
26
+ end
27
+ end
28
+
29
+ private
30
+
31
+ def build!(ast)
32
+ raise "Unexpected type: #{ast.type}" unless ast.block_type?
33
+
34
+ each_table(ast) do |table_def|
35
+ @tables << Table.new(table_def)
36
+ end
37
+
38
+ # Compatibility for Rails 4.2.
39
+ each_add_index(ast) do |add_index_def|
40
+ @add_indicies << AddIndex.new(add_index_def)
41
+ end
42
+ end
43
+
44
+ def each_table(ast)
45
+ case ast.body.type
46
+ when :begin
47
+ ast.body.children.each do |node|
48
+ next unless node.block_type? && node.method?(:create_table)
49
+
50
+ yield(node)
51
+ end
52
+ else
53
+ yield ast.body
54
+ end
55
+ end
56
+
57
+ def each_add_index(ast)
58
+ ast.body.children.each do |node|
59
+ next if !node&.send_type? || !node.method?(:add_index)
60
+
61
+ yield(node)
62
+ end
63
+ end
64
+ end
65
+
66
+ # Represent a table
67
+ class Table
68
+ attr_reader :name, :columns, :indices
69
+
70
+ def initialize(node)
71
+ @name = node.send_node.first_argument.value
72
+ @columns = build_columns(node)
73
+ @indices = build_indices(node)
74
+ end
75
+
76
+ def with_column?(name:)
77
+ @columns.any? { |c| c.name == name }
78
+ end
79
+
80
+ private
81
+
82
+ def build_columns(node)
83
+ each_content(node).map do |child|
84
+ next unless child&.send_type?
85
+ next if child.method?(:index)
86
+
87
+ Column.new(child)
88
+ end.compact
89
+ end
90
+
91
+ def build_indices(node)
92
+ each_content(node).map do |child|
93
+ next unless child&.send_type?
94
+ next unless child.method?(:index)
95
+
96
+ Index.new(child)
97
+ end.compact
98
+ end
99
+
100
+ def each_content(node)
101
+ return enum_for(__method__, node) unless block_given?
102
+
103
+ case node.body&.type
104
+ when :begin
105
+ node.body.children.each do |child|
106
+ yield(child)
107
+ end
108
+ else
109
+ yield(node.body)
110
+ end
111
+ end
112
+ end
113
+
114
+ # Represent a column
115
+ class Column
116
+ attr_reader :name, :type, :not_null
117
+
118
+ def initialize(node)
119
+ @name = node.first_argument.value
120
+ @type = node.method_name
121
+ @not_null = nil
122
+
123
+ analyze_keywords!(node)
124
+ end
125
+
126
+ private
127
+
128
+ def analyze_keywords!(node)
129
+ pairs = node.arguments.last
130
+ return unless pairs.hash_type?
131
+
132
+ pairs.each_pair do |k, v|
133
+ if k.value == :null
134
+ @not_null = v.true_type? ? false : true
135
+ end
136
+ end
137
+ end
138
+ end
139
+
140
+ # Represent an index
141
+ class Index
142
+ attr_reader :name, :columns, :expression, :unique
143
+
144
+ def initialize(node)
145
+ @columns, @expression = build_columns_or_expr(node.first_argument)
146
+ @unique = nil
147
+
148
+ analyze_keywords!(node)
149
+ end
150
+
151
+ private
152
+
153
+ def build_columns_or_expr(columns)
154
+ if columns.array_type?
155
+ [columns.values.map(&:value), nil]
156
+ else
157
+ [[], columns.value]
158
+ end
159
+ end
160
+
161
+ def analyze_keywords!(node)
162
+ pairs = node.arguments.last
163
+ return unless pairs.hash_type?
164
+
165
+ pairs.each_pair do |k, v|
166
+ case k.value
167
+ when :name
168
+ @name = v.value
169
+ when :unique
170
+ @unique = true
171
+ end
172
+ end
173
+ end
174
+ end
175
+
176
+ # Represent an `add_index`
177
+ class AddIndex < Index
178
+ attr_reader :table_name
179
+
180
+ def initialize(node)
181
+ @table_name = node.first_argument.value
182
+ @columns, @expression = build_columns_or_expr(node.arguments[1])
183
+ @unique = nil
184
+
185
+ analyze_keywords!(node)
186
+ end
187
+ end
188
+ end
189
+ end
190
+ 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.4.2'
7
+ STRING = '2.7.0'
8
8
  end
9
9
  end
10
10
  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.4.2
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
@@ -10,8 +10,22 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-01-26 00:00:00.000000000 Z
13
+ date: 2020-07-20 00:00:00.000000000 Z
14
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activesupport
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
21
+ version: 4.2.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: 4.2.0
15
29
  - !ruby/object:Gem::Dependency
16
30
  name: rack
17
31
  requirement: !ruby/object:Gem::Requirement
@@ -32,14 +46,14 @@ dependencies:
32
46
  requirements:
33
47
  - - ">="
34
48
  - !ruby/object:Gem::Version
35
- version: 0.72.0
49
+ version: 0.87.0
36
50
  type: :runtime
37
51
  prerelease: false
38
52
  version_requirements: !ruby/object:Gem::Requirement
39
53
  requirements:
40
54
  - - ">="
41
55
  - !ruby/object:Gem::Version
42
- version: 0.72.0
56
+ version: 0.87.0
43
57
  description: |
44
58
  Automatic Rails code style checking tool.
45
59
  A RuboCop extension focused on enforcing Rails best practices and coding conventions.
@@ -55,9 +69,12 @@ files:
55
69
  - bin/setup
56
70
  - config/default.yml
57
71
  - lib/rubocop-rails.rb
72
+ - lib/rubocop/cop/mixin/active_record_helper.rb
73
+ - lib/rubocop/cop/mixin/index_method.rb
58
74
  - lib/rubocop/cop/mixin/target_rails_version.rb
59
75
  - lib/rubocop/cop/rails/action_filter.rb
60
76
  - lib/rubocop/cop/rails/active_record_aliases.rb
77
+ - lib/rubocop/cop/rails/active_record_callbacks_order.rb
61
78
  - lib/rubocop/cop/rails/active_record_override.rb
62
79
  - lib/rubocop/cop/rails/active_support_aliases.rb
63
80
  - lib/rubocop/cop/rails/application_controller.rb
@@ -68,8 +85,10 @@ files:
68
85
  - lib/rubocop/cop/rails/belongs_to.rb
69
86
  - lib/rubocop/cop/rails/blank.rb
70
87
  - lib/rubocop/cop/rails/bulk_change_table.rb
88
+ - lib/rubocop/cop/rails/content_tag.rb
71
89
  - lib/rubocop/cop/rails/create_table_with_timestamps.rb
72
90
  - lib/rubocop/cop/rails/date.rb
91
+ - lib/rubocop/cop/rails/default_scope.rb
73
92
  - lib/rubocop/cop/rails/delegate.rb
74
93
  - lib/rubocop/cop/rails/delegate_allow_blank.rb
75
94
  - lib/rubocop/cop/rails/dynamic_find_by.rb
@@ -79,6 +98,7 @@ files:
79
98
  - lib/rubocop/cop/rails/exit.rb
80
99
  - lib/rubocop/cop/rails/file_path.rb
81
100
  - lib/rubocop/cop/rails/find_by.rb
101
+ - lib/rubocop/cop/rails/find_by_id.rb
82
102
  - lib/rubocop/cop/rails/find_each.rb
83
103
  - lib/rubocop/cop/rails/has_and_belongs_to_many.rb
84
104
  - lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb
@@ -86,45 +106,63 @@ files:
86
106
  - lib/rubocop/cop/rails/http_positional_arguments.rb
87
107
  - lib/rubocop/cop/rails/http_status.rb
88
108
  - lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb
109
+ - lib/rubocop/cop/rails/index_by.rb
110
+ - lib/rubocop/cop/rails/index_with.rb
111
+ - lib/rubocop/cop/rails/inquiry.rb
89
112
  - lib/rubocop/cop/rails/inverse_of.rb
90
113
  - lib/rubocop/cop/rails/lexically_scoped_action_filter.rb
91
114
  - lib/rubocop/cop/rails/link_to_blank.rb
115
+ - lib/rubocop/cop/rails/mailer_name.rb
116
+ - lib/rubocop/cop/rails/match_route.rb
117
+ - lib/rubocop/cop/rails/negate_include.rb
92
118
  - lib/rubocop/cop/rails/not_null_column.rb
93
119
  - lib/rubocop/cop/rails/output.rb
94
120
  - lib/rubocop/cop/rails/output_safety.rb
121
+ - lib/rubocop/cop/rails/pick.rb
122
+ - lib/rubocop/cop/rails/pluck.rb
123
+ - lib/rubocop/cop/rails/pluck_id.rb
124
+ - lib/rubocop/cop/rails/pluck_in_where.rb
95
125
  - lib/rubocop/cop/rails/pluralization_grammar.rb
96
126
  - lib/rubocop/cop/rails/presence.rb
97
127
  - lib/rubocop/cop/rails/present.rb
98
128
  - lib/rubocop/cop/rails/rake_environment.rb
99
129
  - lib/rubocop/cop/rails/read_write_attribute.rb
100
130
  - lib/rubocop/cop/rails/redundant_allow_nil.rb
131
+ - lib/rubocop/cop/rails/redundant_foreign_key.rb
101
132
  - lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb
102
133
  - lib/rubocop/cop/rails/reflection_class_name.rb
103
134
  - lib/rubocop/cop/rails/refute_methods.rb
104
135
  - lib/rubocop/cop/rails/relative_date_constant.rb
136
+ - lib/rubocop/cop/rails/render_inline.rb
137
+ - lib/rubocop/cop/rails/render_plain_text.rb
105
138
  - lib/rubocop/cop/rails/request_referer.rb
106
139
  - lib/rubocop/cop/rails/reversible_migration.rb
107
140
  - lib/rubocop/cop/rails/safe_navigation.rb
108
141
  - lib/rubocop/cop/rails/safe_navigation_with_blank.rb
109
142
  - lib/rubocop/cop/rails/save_bang.rb
110
143
  - lib/rubocop/cop/rails/scope_args.rb
144
+ - lib/rubocop/cop/rails/short_i18n.rb
111
145
  - lib/rubocop/cop/rails/skips_model_validations.rb
112
146
  - lib/rubocop/cop/rails/time_zone.rb
113
147
  - lib/rubocop/cop/rails/uniq_before_pluck.rb
148
+ - lib/rubocop/cop/rails/unique_validation_without_index.rb
114
149
  - lib/rubocop/cop/rails/unknown_env.rb
115
150
  - lib/rubocop/cop/rails/validation.rb
151
+ - lib/rubocop/cop/rails/where_exists.rb
116
152
  - lib/rubocop/cop/rails_cops.rb
117
153
  - lib/rubocop/rails.rb
118
154
  - lib/rubocop/rails/inject.rb
155
+ - lib/rubocop/rails/schema_loader.rb
156
+ - lib/rubocop/rails/schema_loader/schema.rb
119
157
  - lib/rubocop/rails/version.rb
120
158
  homepage: https://github.com/rubocop-hq/rubocop-rails
121
159
  licenses:
122
160
  - MIT
123
161
  metadata:
124
- homepage_uri: https://docs.rubocop.org/projects/rails
162
+ homepage_uri: https://docs.rubocop.org/rubocop-rails/
125
163
  changelog_uri: https://github.com/rubocop-hq/rubocop-rails/blob/master/CHANGELOG.md
126
164
  source_code_uri: https://github.com/rubocop-hq/rubocop-rails/
127
- documentation_uri: https://docs.rubocop.org/projects/rails
165
+ documentation_uri: https://docs.rubocop.org/rubocop-rails/
128
166
  bug_tracker_uri: https://github.com/rubocop-hq/rubocop-rails/issues
129
167
  post_install_message:
130
168
  rdoc_options: []
@@ -134,14 +172,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
134
172
  requirements:
135
173
  - - ">="
136
174
  - !ruby/object:Gem::Version
137
- version: 2.3.0
175
+ version: 2.4.0
138
176
  required_rubygems_version: !ruby/object:Gem::Requirement
139
177
  requirements:
140
178
  - - ">="
141
179
  - !ruby/object:Gem::Version
142
180
  version: '0'
143
181
  requirements: []
144
- rubygems_version: 3.1.2
182
+ rubygems_version: 3.1.4
145
183
  signing_key:
146
184
  specification_version: 4
147
185
  summary: Automatic Rails code style checking tool.