rubocop-rails 2.0.1 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c86591caa45eacc65b20aa23e80fd623b3122a7e28d57b80b9122c20bcf60793
4
- data.tar.gz: f1dd97d9221040cc8f03ecdea45706b215c4f7b820abdceecfe623c50c005338
3
+ metadata.gz: ca19a40db180cbb867ecc23d7d17847353b83ec36b7bbd0b3c5cc7ab0292be97
4
+ data.tar.gz: be277fe9bceb0d47ab049c2d3cbc2f7315b98022053a13cad04e6a46fa887bdc
5
5
  SHA512:
6
- metadata.gz: '00134581586524ab6f4123346ac212cfee0b87cc333974498d786b407221ba8d7ea5d09ad438e3bb492e68970aea57625753f00e646b2cfa8d4062e1ff67e8b9'
7
- data.tar.gz: fc6bedd9fdd740b1098a6620f176e742f989d96bca8e1267981b5483081f7139e451ed9fad8715883f7a5c3a95f95e9fb235889a418a8eee7699970d27a37c73
6
+ metadata.gz: 97bd6156d36c5e09e82588d636417e30f926f1cb0c68dafcf0b93f0c4a373851613d1ed2200863925f4374c1876d85d14d9fd8b013f45aad092bddefcdf1b243
7
+ data.tar.gz: c09d5c7765d0186bcd389cedf6a0b45d0b0a442f173c6489decd17c56767b3ca6d20e2dd35e6610fc4bee2b2e2af657055c4cf87e20312d611b07aeae3ae2d2d
data/README.md CHANGED
@@ -76,6 +76,12 @@ Rails/FindBy:
76
76
  - lib/example.rb
77
77
  ```
78
78
 
79
+ ## Compatibility
80
+
81
+ Rails cops support the following versions:
82
+
83
+ - Rails 4.0+
84
+
79
85
  ## Contributing
80
86
 
81
87
  Checkout the [contribution guidelines](CONTRIBUTING.md).
@@ -8,9 +8,6 @@ module RuboCop
8
8
  # The cop is configurable and can enforce the use of the older
9
9
  # something_filter methods or the newer something_action methods.
10
10
  #
11
- # If the TargetRailsVersion is set to less than 4.0, the cop will enforce
12
- # the use of filter methods.
13
- #
14
11
  # @example EnforcedStyle: action (default)
15
12
  # # bad
16
13
  # after_filter :do_stuff
@@ -33,7 +30,6 @@ module RuboCop
33
30
  # append_around_filter :do_stuff
34
31
  # skip_after_filter :do_stuff
35
32
  class ActionFilter < Cop
36
- extend TargetRailsVersion
37
33
  include ConfigurableEnforcedStyle
38
34
 
39
35
  MSG = 'Prefer `%<prefer>s` over `%<current>s`.'
@@ -70,8 +66,6 @@ module RuboCop
70
66
  skip_action_callback
71
67
  ].freeze
72
68
 
73
- minimum_target_rails_version 4.0
74
-
75
69
  def on_block(node)
76
70
  check_method_node(node.send_node)
77
71
  end
@@ -129,7 +129,6 @@ module RuboCop
129
129
 
130
130
  POSTGRESQL_COMBINABLE_ALTER_METHODS = %i[
131
131
  change_column_default
132
- change_column_null
133
132
  ].freeze
134
133
 
135
134
  def on_def(node)
@@ -231,12 +231,7 @@ module RuboCop
231
231
 
232
232
  def check_change_table_node(node, block)
233
233
  change_table_call(node) do |arg|
234
- if target_rails_version < 4.0
235
- add_offense(
236
- node,
237
- message: format(MSG, action: 'change_table')
238
- )
239
- elsif block.send_type?
234
+ if block.send_type?
240
235
  check_change_table_offense(arg, block)
241
236
  else
242
237
  block.each_child_node(:send) do |child_node|
@@ -4,7 +4,7 @@ module RuboCop
4
4
  # RuboCop included the Rails cops directly before version 1.0.0.
5
5
  # We can remove them to avoid warnings about redefining constants.
6
6
  module Cop
7
- remove_const('Rails') if const_defined?('Rails')
7
+ remove_const('Rails') if const_defined?('Rails', false)
8
8
  end
9
9
  end
10
10
 
@@ -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.0.1'
7
+ STRING = '2.1.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.0.1
4
+ version: 2.1.0
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: 2019-06-08 00:00:00.000000000 Z
13
+ date: 2019-06-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack
@@ -32,14 +32,14 @@ dependencies:
32
32
  requirements:
33
33
  - - ">="
34
34
  - !ruby/object:Gem::Version
35
- version: 0.70.0
35
+ version: 0.72.0
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: 0.70.0
42
+ version: 0.72.0
43
43
  description: |2
44
44
  Automatic Rails code style checking tool.
45
45
  A RuboCop extension focused on enforcing Rails best practices and coding conventions.
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0'
138
138
  requirements: []
139
- rubygems_version: 3.0.3
139
+ rubygems_version: 3.0.4
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: Automatic Rails code style checking tool.