rubocop-rspec 2.23.1 → 2.23.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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/rubocop/cop/rspec/receive_messages.rb +5 -4
- data/lib/rubocop/cop/rspec/void_expect.rb +2 -1
- data/lib/rubocop/rspec/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2312779cc594656bb1473fc821f67c6a56ac6275c71ac536c5978a4ef4411384
|
4
|
+
data.tar.gz: 0a6419dba263c16228b454d84e25a6b066de368ebd96a98c0e2e9f66ff74f053
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ed0d4251d930a51e2214b200f5720fa7f75b839e40164a6461992ee01e22518e435d12f2cd3c626f0af24c47b435bfce4f80765eadc1540e848c993a97cfae9
|
7
|
+
data.tar.gz: a74d40480225c7b693f33ff4237a19eb44188f6b634ee60cbec96cf89d03b356b61fa5130c2939a17a23331390edbe0b9f7ed4f6a2e08606bbe88d69b9631bf0
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
## Master (Unreleased)
|
4
4
|
|
5
|
+
## 2.23.2 (2023-08-09)
|
6
|
+
|
7
|
+
- Fix an incorrect autocorrect for `RSpec/ReceiveMessages` when method is only non-word character. ([@marocchino])
|
8
|
+
- Fix a false positive for `RSpec/ReceiveMessages` when return with splat. ([@marocchino])
|
9
|
+
|
5
10
|
## 2.23.1 (2023-08-07)
|
6
11
|
|
7
12
|
- Mark to `Safe: false` for `RSpec/Rails/NegationBeValid` cop. ([@ydah])
|
@@ -843,6 +848,7 @@ Compatibility release so users can upgrade RuboCop to 0.51.0. No new features.
|
|
843
848
|
[@lokhi]: https://github.com/lokhi
|
844
849
|
[@luke-hill]: https://github.com/luke-hill
|
845
850
|
[@m-yamashita01]: https://github.com/M-Yamashita01
|
851
|
+
[@marocchino]: https://github.com/marocchino
|
846
852
|
[@miguelfteixeira]: https://github.com/miguelfteixeira
|
847
853
|
[@mkenyon]: https://github.com/mkenyon
|
848
854
|
[@mkrawc]: https://github.com/mkrawc
|
@@ -37,7 +37,7 @@ module RuboCop
|
|
37
37
|
|
38
38
|
# @!method allow_receive_message?(node)
|
39
39
|
def_node_matcher :allow_receive_message?, <<~PATTERN
|
40
|
-
(send (send nil? :allow ...) :to (send (send nil? :receive (sym _)) :and_return !#
|
40
|
+
(send (send nil? :allow ...) :to (send (send nil? :receive (sym _)) :and_return !#heredoc_or_splat?))
|
41
41
|
PATTERN
|
42
42
|
|
43
43
|
# @!method allow_argument(node)
|
@@ -147,12 +147,13 @@ module RuboCop
|
|
147
147
|
range_by_whole_lines(item.source_range, include_final_newline: true)
|
148
148
|
end
|
149
149
|
|
150
|
-
def
|
151
|
-
(node.str_type? || node.dstr_type?) && node.heredoc?
|
150
|
+
def heredoc_or_splat?(node)
|
151
|
+
(node.str_type? || node.dstr_type?) && node.heredoc? ||
|
152
|
+
node.splat_type?
|
152
153
|
end
|
153
154
|
|
154
155
|
def requires_quotes?(value)
|
155
|
-
value.match?(/^:".*?"
|
156
|
+
value.match?(/^:".*?"|=$|^\W+$/)
|
156
157
|
end
|
157
158
|
end
|
158
159
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.23.
|
4
|
+
version: 2.23.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Backus
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-08-
|
13
|
+
date: 2023-08-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rubocop
|