rubocop-minitest 0.32.1 → 0.32.2
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: ce290f7a13faed25c00a17d9daf8bcaf17e187599a075323fc99f8494c29c2bb
|
4
|
+
data.tar.gz: 9def860d52f65aed4e8923bcf2fd851a5188485986c7ad5bce44a9dc0d79b2d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8db20fcf7d8e58b564da63b85f6692c4a2be189ffeacdc654f4b18ea689416688442df945606c84f55e63b9007c8df51b4f173004a7ae145603733f6bac62c61
|
7
|
+
data.tar.gz: 41232dfbabd012e4edbe1e78b49f1846004246950773a6f06c50fff358cb71a79fbdcd95ed0657690387801331093606c2dabb376788368cf51438ff84846be4
|
@@ -18,10 +18,14 @@ module RuboCop
|
|
18
18
|
|
19
19
|
MSG = 'Prefer using `assert_operator(%<new_arguments>s)`.'
|
20
20
|
RESTRICT_ON_SEND = %i[assert].freeze
|
21
|
+
ALLOWED_OPERATORS = [:[]].freeze
|
21
22
|
|
22
23
|
def on_send(node)
|
23
24
|
first_argument = node.first_argument
|
24
|
-
return unless first_argument.respond_to?(:
|
25
|
+
return unless first_argument.respond_to?(:binary_operation?) && first_argument.binary_operation?
|
26
|
+
|
27
|
+
operator = first_argument.to_a[1]
|
28
|
+
return if ALLOWED_OPERATORS.include?(operator)
|
25
29
|
|
26
30
|
new_arguments = build_new_arguments(node)
|
27
31
|
|
@@ -18,10 +18,14 @@ module RuboCop
|
|
18
18
|
|
19
19
|
MSG = 'Prefer using `refute_operator(%<new_arguments>s)`.'
|
20
20
|
RESTRICT_ON_SEND = %i[refute].freeze
|
21
|
+
ALLOWED_OPERATORS = [:[]].freeze
|
21
22
|
|
22
23
|
def on_send(node)
|
23
24
|
first_argument = node.first_argument
|
24
|
-
return unless first_argument.respond_to?(:
|
25
|
+
return unless first_argument.respond_to?(:binary_operation?) && first_argument.binary_operation?
|
26
|
+
|
27
|
+
operator = first_argument.to_a[1]
|
28
|
+
return if ALLOWED_OPERATORS.include?(operator)
|
25
29
|
|
26
30
|
new_arguments = build_new_arguments(node)
|
27
31
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-minitest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.32.
|
4
|
+
version: 0.32.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-09-
|
13
|
+
date: 2023-09-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rubocop
|