rubocop-rails 2.0.1 → 2.1.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca19a40db180cbb867ecc23d7d17847353b83ec36b7bbd0b3c5cc7ab0292be97
|
4
|
+
data.tar.gz: be277fe9bceb0d47ab049c2d3cbc2f7315b98022053a13cad04e6a46fa887bdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97bd6156d36c5e09e82588d636417e30f926f1cb0c68dafcf0b93f0c4a373851613d1ed2200863925f4374c1876d85d14d9fd8b013f45aad092bddefcdf1b243
|
7
|
+
data.tar.gz: c09d5c7765d0186bcd389cedf6a0b45d0b0a442f173c6489decd17c56767b3ca6d20e2dd35e6610fc4bee2b2e2af657055c4cf87e20312d611b07aeae3ae2d2d
|
data/README.md
CHANGED
@@ -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
|
@@ -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
|
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
|
|
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
|
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-
|
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.
|
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.
|
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.
|
139
|
+
rubygems_version: 3.0.4
|
140
140
|
signing_key:
|
141
141
|
specification_version: 4
|
142
142
|
summary: Automatic Rails code style checking tool.
|