rubocop-minitest 0.32.1 → 0.32.2

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: '08c9b3f5ddb92c5f5b813bc30191e4a217e84625fd306708d119fa8214a386d9'
4
- data.tar.gz: 864f4e6170234aea432a9b8d14e7fb940c35aa0acb4297871382f75768e686bc
3
+ metadata.gz: ce290f7a13faed25c00a17d9daf8bcaf17e187599a075323fc99f8494c29c2bb
4
+ data.tar.gz: 9def860d52f65aed4e8923bcf2fd851a5188485986c7ad5bce44a9dc0d79b2d3
5
5
  SHA512:
6
- metadata.gz: c6d46818eda0dfcfb3307e5f5d648ce695fcc9054bda0c59ea61a4f894434a57185facdd8a6d44810515a249487c4007ae9424bcc188686fa2e2e0838792ed65
7
- data.tar.gz: e64bd49fc78e749da4b3e6422387e8bfe8c5ab7c56d9f64376d3b860adfeb2c6a5c1822ead7bbc282527908e7511e90a72a962f77c9cc9adbd31bb6454e8ed2c
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?(:operator_method?) && first_argument.operator_method?
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?(:operator_method?) && first_argument.operator_method?
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
 
@@ -4,7 +4,7 @@ module RuboCop
4
4
  module Minitest
5
5
  # This module holds the RuboCop Minitest version information.
6
6
  module Version
7
- STRING = '0.32.1'
7
+ STRING = '0.32.2'
8
8
 
9
9
  def self.document_version
10
10
  STRING.match('\d+\.\d+').to_s
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.1
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-24 00:00:00.000000000 Z
13
+ date: 2023-09-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rubocop