rubocop-rspec 2.14.0 → 2.14.1
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 +5 -1
- data/lib/rubocop/cop/rspec/rails/inferred_spec_type.rb +14 -4
- 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: 740118ee4ac02188e4bc7a4f62e03b31a6dda33ab3017377d954718cb7b356b1
|
4
|
+
data.tar.gz: 7f17bb68eb575fb53dd8f0d2662afff8057bde7faeb19b6d94b0c3f1cb62f73d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18fa9f2be3305f4e6388756e5223ccabdd85e951534f64e881c31a96d77a37f435c06197cd39a7808fb1690f56825ba442386668cfabe4335e784879f57d6ef2
|
7
|
+
data.tar.gz: 1dd7abd8c281bb4c7ad6dd41bdb56c2de9be9e322935ae14d820863e7a64e2b39ad5f31e9603a88b77d52fb0ead146bae0c96297b2487831c2e263fe029244ec
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
## Master (Unreleased)
|
4
4
|
|
5
|
+
## 2.14.1 (2022-10-24)
|
6
|
+
|
7
|
+
- Fix an error for `RSpec/Rails/InferredSpecType` with redundant type before other Hash metadata. ([@ydah])
|
8
|
+
|
5
9
|
## 2.14.0 (2022-10-23)
|
6
10
|
|
7
11
|
- Add `require_implicit` style to `RSpec/ImplicitSubject`. ([@r7kamura])
|
@@ -16,7 +20,7 @@
|
|
16
20
|
- Update `config/default.yml` removing deprecated option to make the config correctable by users. ([@ignaciovillaverde])
|
17
21
|
- Do not attempt to auto-correct example groups with `include_examples` in `RSpec/LetBeforeExamples`. ([@pirj])
|
18
22
|
- Add new `RSpec/SortMetadata` cop. ([@leoarnold])
|
19
|
-
- Add support for subject! method to `RSpec/SubjectDeclaration`. ([@ydah]
|
23
|
+
- Add support for subject! method to `RSpec/SubjectDeclaration`. ([@ydah])
|
20
24
|
|
21
25
|
## 2.13.2 (2022-09-23)
|
22
26
|
|
@@ -89,11 +89,21 @@ module RuboCop
|
|
89
89
|
# @param [RuboCop::AST::Corrector] corrector
|
90
90
|
# @param [RuboCop::AST::Node] node
|
91
91
|
def autocorrect(corrector, node)
|
92
|
-
corrector.remove(
|
93
|
-
|
94
|
-
|
92
|
+
corrector.remove(remove_range(node))
|
93
|
+
end
|
94
|
+
|
95
|
+
# @param [RuboCop::AST::Node] node
|
96
|
+
# @return [Parser::Source::Range]
|
97
|
+
def remove_range(node)
|
98
|
+
if node.left_sibling
|
99
|
+
node.loc.expression.with(
|
100
|
+
begin_pos: node.left_sibling.loc.expression.end_pos
|
95
101
|
)
|
96
|
-
|
102
|
+
elsif node.right_sibling
|
103
|
+
node.loc.expression.with(
|
104
|
+
end_pos: node.right_sibling.loc.expression.begin_pos
|
105
|
+
)
|
106
|
+
end
|
97
107
|
end
|
98
108
|
|
99
109
|
# @param [RuboCop::AST::PairNode] node
|
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.14.
|
4
|
+
version: 2.14.1
|
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: 2022-10-
|
13
|
+
date: 2022-10-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rubocop
|