solargraph-rspec 0.4.0 → 0.4.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/.rubocop.yml +7 -0
- data/Appraisals +9 -0
- data/CHANGELOG.md +6 -0
- data/gemfiles/.bundle/config +2 -0
- data/gemfiles/solargraph_0.50.gemfile +26 -0
- data/gemfiles/solargraph_0.50.gemfile.lock +274 -0
- data/gemfiles/solargraph_0.51.gemfile +26 -0
- data/gemfiles/solargraph_0.51.gemfile.lock +277 -0
- data/lib/solargraph/rspec/convention.rb +2 -2
- data/lib/solargraph/rspec/spec_walker/fake_let_method.rb +63 -19
- data/lib/solargraph/rspec/spec_walker.rb +15 -2
- data/lib/solargraph/rspec/version.rb +1 -1
- data/lib/solargraph-rspec.rb +0 -8
- metadata +15 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5246aadadd47bc9c4a53acbd1841f08187385c89b1a9a64bbb13d7d602f1522a
|
4
|
+
data.tar.gz: b1b8dac88f82644833f309e0e2816d1950fd69ccef0b1a52093305bf6f61a08c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 828b1fdd6923a9621fcbee693d32048e1625feed89b47d2a7ce9931fbe9ee6a2fa58f4fb6bc2a3558955ce422da86ba1c940fa028c01a9f3cee9032b8f6737cb
|
7
|
+
data.tar.gz: fd447792d52866c3e47bd0700d48630a390fcfe347d8f3e682a9c9dd29dd9c8f95e05a1ec02ecfba802a4883cb071f8c3db038d33fec7bb2f98913d235e282aa
|
data/.rubocop.yml
CHANGED
@@ -5,6 +5,13 @@ AllCops:
|
|
5
5
|
Style/StringLiterals:
|
6
6
|
Enabled: true
|
7
7
|
EnforcedStyle: single_quotes
|
8
|
+
Exclude:
|
9
|
+
- "gemfiles/**/*"
|
10
|
+
|
11
|
+
Style/FrozenStringLiteralComment:
|
12
|
+
Enabled: true
|
13
|
+
Exclude:
|
14
|
+
- "gemfiles/**/*"
|
8
15
|
|
9
16
|
Style/StringLiteralsInInterpolation:
|
10
17
|
Enabled: true
|
data/Appraisals
ADDED
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## v.0.4.1 - 2025-01-28
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
- (Hot)fix parsing and type inference for solargraph v0.51.x and ruby v3.4.x (008d3ea and 414bc8e)
|
15
|
+
|
10
16
|
## v.0.4.0 - 2024-08-25
|
11
17
|
|
12
18
|
### Added
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "appraisal"
|
6
|
+
gem "bundler"
|
7
|
+
gem "debug"
|
8
|
+
gem "profile-viewer"
|
9
|
+
gem "pry-byebug"
|
10
|
+
gem "rake"
|
11
|
+
gem "rspec"
|
12
|
+
gem "rubocop"
|
13
|
+
gem "simplecov"
|
14
|
+
gem "simplecov-cobertura"
|
15
|
+
gem "solargraph", "~> 0.50.0"
|
16
|
+
|
17
|
+
group :third_party_plugin_tests do
|
18
|
+
gem "actionmailer"
|
19
|
+
gem "airborne"
|
20
|
+
gem "rspec-rails"
|
21
|
+
gem "rspec-sidekiq"
|
22
|
+
gem "shoulda-matchers"
|
23
|
+
gem "webmock"
|
24
|
+
end
|
25
|
+
|
26
|
+
gemspec path: "../"
|
@@ -0,0 +1,274 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
solargraph-rspec (0.4.0)
|
5
|
+
solargraph (~> 0.49, >= 0.49.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actionmailer (6.1.7.10)
|
11
|
+
actionpack (= 6.1.7.10)
|
12
|
+
actionview (= 6.1.7.10)
|
13
|
+
activejob (= 6.1.7.10)
|
14
|
+
activesupport (= 6.1.7.10)
|
15
|
+
mail (~> 2.5, >= 2.5.4)
|
16
|
+
rails-dom-testing (~> 2.0)
|
17
|
+
actionpack (6.1.7.10)
|
18
|
+
actionview (= 6.1.7.10)
|
19
|
+
activesupport (= 6.1.7.10)
|
20
|
+
rack (~> 2.0, >= 2.0.9)
|
21
|
+
rack-test (>= 0.6.3)
|
22
|
+
rails-dom-testing (~> 2.0)
|
23
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
24
|
+
actionview (6.1.7.10)
|
25
|
+
activesupport (= 6.1.7.10)
|
26
|
+
builder (~> 3.1)
|
27
|
+
erubi (~> 1.4)
|
28
|
+
rails-dom-testing (~> 2.0)
|
29
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
30
|
+
activejob (6.1.7.10)
|
31
|
+
activesupport (= 6.1.7.10)
|
32
|
+
globalid (>= 0.3.6)
|
33
|
+
activesupport (6.1.7.10)
|
34
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
35
|
+
i18n (>= 1.6, < 2)
|
36
|
+
minitest (>= 5.1)
|
37
|
+
tzinfo (~> 2.0)
|
38
|
+
zeitwerk (~> 2.3)
|
39
|
+
addressable (2.8.7)
|
40
|
+
public_suffix (>= 2.0.2, < 7.0)
|
41
|
+
airborne (0.3.7)
|
42
|
+
activesupport
|
43
|
+
rack
|
44
|
+
rack-test (>= 1.1.0, < 2.0)
|
45
|
+
rest-client (>= 2.0.2, < 3.0)
|
46
|
+
rspec (~> 3.8)
|
47
|
+
appraisal (2.5.0)
|
48
|
+
bundler
|
49
|
+
rake
|
50
|
+
thor (>= 0.14.0)
|
51
|
+
ast (2.4.2)
|
52
|
+
backport (1.2.0)
|
53
|
+
benchmark (0.4.0)
|
54
|
+
bigdecimal (3.1.9)
|
55
|
+
builder (3.3.0)
|
56
|
+
byebug (11.1.3)
|
57
|
+
coderay (1.1.3)
|
58
|
+
concurrent-ruby (1.3.5)
|
59
|
+
connection_pool (2.5.0)
|
60
|
+
crack (1.0.0)
|
61
|
+
bigdecimal
|
62
|
+
rexml
|
63
|
+
crass (1.0.6)
|
64
|
+
date (3.4.1)
|
65
|
+
debug (1.8.0)
|
66
|
+
irb (>= 1.5.0)
|
67
|
+
reline (>= 0.3.1)
|
68
|
+
diff-lcs (1.5.1)
|
69
|
+
docile (1.4.1)
|
70
|
+
domain_name (0.5.20190701)
|
71
|
+
unf (>= 0.0.5, < 1.0.0)
|
72
|
+
e2mmap (0.1.0)
|
73
|
+
erubi (1.13.1)
|
74
|
+
globalid (1.2.1)
|
75
|
+
activesupport (>= 6.1)
|
76
|
+
hashdiff (1.1.2)
|
77
|
+
http-accept (1.7.0)
|
78
|
+
http-cookie (1.0.8)
|
79
|
+
domain_name (~> 0.5)
|
80
|
+
i18n (1.14.7)
|
81
|
+
concurrent-ruby (~> 1.0)
|
82
|
+
io-console (0.8.0)
|
83
|
+
irb (1.6.3)
|
84
|
+
reline (>= 0.3.0)
|
85
|
+
jaro_winkler (1.6.0)
|
86
|
+
json (2.7.6)
|
87
|
+
kramdown (2.5.1)
|
88
|
+
rexml (>= 3.3.9)
|
89
|
+
kramdown-parser-gfm (1.1.0)
|
90
|
+
kramdown (~> 2.0)
|
91
|
+
logger (1.6.5)
|
92
|
+
loofah (2.24.0)
|
93
|
+
crass (~> 1.0.2)
|
94
|
+
nokogiri (>= 1.12.0)
|
95
|
+
mail (2.8.1)
|
96
|
+
mini_mime (>= 0.1.1)
|
97
|
+
net-imap
|
98
|
+
net-pop
|
99
|
+
net-smtp
|
100
|
+
method_source (1.1.0)
|
101
|
+
mime-types (3.6.0)
|
102
|
+
logger
|
103
|
+
mime-types-data (~> 3.2015)
|
104
|
+
mime-types-data (3.2025.0107)
|
105
|
+
mini_mime (1.1.5)
|
106
|
+
minitest (5.25.4)
|
107
|
+
net-imap (0.3.7)
|
108
|
+
date
|
109
|
+
net-protocol
|
110
|
+
net-pop (0.1.2)
|
111
|
+
net-protocol
|
112
|
+
net-protocol (0.2.2)
|
113
|
+
timeout
|
114
|
+
net-smtp (0.5.0)
|
115
|
+
net-protocol
|
116
|
+
netrc (0.11.0)
|
117
|
+
nokogiri (1.13.10-arm64-darwin)
|
118
|
+
racc (~> 1.4)
|
119
|
+
optparse (0.6.0)
|
120
|
+
parallel (1.24.0)
|
121
|
+
parser (3.3.7.0)
|
122
|
+
ast (~> 2.4.1)
|
123
|
+
racc
|
124
|
+
profile-viewer (0.0.4)
|
125
|
+
optparse
|
126
|
+
webrick
|
127
|
+
pry (0.13.1)
|
128
|
+
coderay (~> 1.1)
|
129
|
+
method_source (~> 1.0)
|
130
|
+
pry-byebug (3.9.0)
|
131
|
+
byebug (~> 11.0)
|
132
|
+
pry (~> 0.13.0)
|
133
|
+
public_suffix (5.1.1)
|
134
|
+
racc (1.8.1)
|
135
|
+
rack (2.2.10)
|
136
|
+
rack-test (1.1.0)
|
137
|
+
rack (>= 1.0, < 3)
|
138
|
+
rails-dom-testing (2.2.0)
|
139
|
+
activesupport (>= 5.0.0)
|
140
|
+
minitest
|
141
|
+
nokogiri (>= 1.6)
|
142
|
+
rails-html-sanitizer (1.5.0)
|
143
|
+
loofah (~> 2.19, >= 2.19.1)
|
144
|
+
railties (6.1.7.10)
|
145
|
+
actionpack (= 6.1.7.10)
|
146
|
+
activesupport (= 6.1.7.10)
|
147
|
+
method_source
|
148
|
+
rake (>= 12.2)
|
149
|
+
thor (~> 1.0)
|
150
|
+
rainbow (3.1.1)
|
151
|
+
rake (13.2.1)
|
152
|
+
rbs (2.8.4)
|
153
|
+
redis (4.8.1)
|
154
|
+
regexp_parser (2.10.0)
|
155
|
+
reline (0.6.0)
|
156
|
+
io-console (~> 0.5)
|
157
|
+
rest-client (2.1.0)
|
158
|
+
http-accept (>= 1.7.0, < 2.0)
|
159
|
+
http-cookie (>= 1.0.2, < 2.0)
|
160
|
+
mime-types (>= 1.16, < 4.0)
|
161
|
+
netrc (~> 0.8)
|
162
|
+
reverse_markdown (2.1.1)
|
163
|
+
nokogiri
|
164
|
+
rexml (3.4.0)
|
165
|
+
rspec (3.13.0)
|
166
|
+
rspec-core (~> 3.13.0)
|
167
|
+
rspec-expectations (~> 3.13.0)
|
168
|
+
rspec-mocks (~> 3.13.0)
|
169
|
+
rspec-core (3.13.2)
|
170
|
+
rspec-support (~> 3.13.0)
|
171
|
+
rspec-expectations (3.13.3)
|
172
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
173
|
+
rspec-support (~> 3.13.0)
|
174
|
+
rspec-mocks (3.13.2)
|
175
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
176
|
+
rspec-support (~> 3.13.0)
|
177
|
+
rspec-rails (6.1.5)
|
178
|
+
actionpack (>= 6.1)
|
179
|
+
activesupport (>= 6.1)
|
180
|
+
railties (>= 6.1)
|
181
|
+
rspec-core (~> 3.13)
|
182
|
+
rspec-expectations (~> 3.13)
|
183
|
+
rspec-mocks (~> 3.13)
|
184
|
+
rspec-support (~> 3.13)
|
185
|
+
rspec-sidekiq (4.0.2)
|
186
|
+
rspec-core (~> 3.0)
|
187
|
+
rspec-expectations (~> 3.0)
|
188
|
+
rspec-mocks (~> 3.0)
|
189
|
+
sidekiq (>= 5, < 8)
|
190
|
+
rspec-support (3.13.2)
|
191
|
+
rubocop (1.50.2)
|
192
|
+
json (~> 2.3)
|
193
|
+
parallel (~> 1.10)
|
194
|
+
parser (>= 3.2.0.0)
|
195
|
+
rainbow (>= 2.2.2, < 4.0)
|
196
|
+
regexp_parser (>= 1.8, < 3.0)
|
197
|
+
rexml (>= 3.2.5, < 4.0)
|
198
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
199
|
+
ruby-progressbar (~> 1.7)
|
200
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
201
|
+
rubocop-ast (1.30.0)
|
202
|
+
parser (>= 3.2.1.0)
|
203
|
+
ruby-progressbar (1.13.0)
|
204
|
+
shoulda-matchers (5.3.0)
|
205
|
+
activesupport (>= 5.2.0)
|
206
|
+
sidekiq (6.5.12)
|
207
|
+
connection_pool (>= 2.2.5, < 3)
|
208
|
+
rack (~> 2.0)
|
209
|
+
redis (>= 4.5.0, < 5)
|
210
|
+
simplecov (0.22.0)
|
211
|
+
docile (~> 1.1)
|
212
|
+
simplecov-html (~> 0.11)
|
213
|
+
simplecov_json_formatter (~> 0.1)
|
214
|
+
simplecov-cobertura (2.1.0)
|
215
|
+
rexml
|
216
|
+
simplecov (~> 0.19)
|
217
|
+
simplecov-html (0.13.1)
|
218
|
+
simplecov_json_formatter (0.1.4)
|
219
|
+
solargraph (0.50.0)
|
220
|
+
backport (~> 1.2)
|
221
|
+
benchmark
|
222
|
+
bundler (~> 2.0)
|
223
|
+
diff-lcs (~> 1.4)
|
224
|
+
e2mmap
|
225
|
+
jaro_winkler (~> 1.5)
|
226
|
+
kramdown (~> 2.3)
|
227
|
+
kramdown-parser-gfm (~> 1.1)
|
228
|
+
parser (~> 3.0)
|
229
|
+
rbs (~> 2.0)
|
230
|
+
reverse_markdown (~> 2.0)
|
231
|
+
rubocop (~> 1.38)
|
232
|
+
thor (~> 1.0)
|
233
|
+
tilt (~> 2.0)
|
234
|
+
yard (~> 0.9, >= 0.9.24)
|
235
|
+
thor (1.3.2)
|
236
|
+
tilt (2.6.0)
|
237
|
+
timeout (0.4.3)
|
238
|
+
tzinfo (2.0.6)
|
239
|
+
concurrent-ruby (~> 1.0)
|
240
|
+
unf (0.2.0)
|
241
|
+
unicode-display_width (2.6.0)
|
242
|
+
webmock (3.24.0)
|
243
|
+
addressable (>= 2.8.0)
|
244
|
+
crack (>= 0.3.2)
|
245
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
246
|
+
webrick (1.9.1)
|
247
|
+
yard (0.9.37)
|
248
|
+
zeitwerk (2.6.18)
|
249
|
+
|
250
|
+
PLATFORMS
|
251
|
+
arm64-darwin-22
|
252
|
+
|
253
|
+
DEPENDENCIES
|
254
|
+
actionmailer
|
255
|
+
airborne
|
256
|
+
appraisal
|
257
|
+
bundler
|
258
|
+
debug
|
259
|
+
profile-viewer
|
260
|
+
pry-byebug
|
261
|
+
rake
|
262
|
+
rspec
|
263
|
+
rspec-rails
|
264
|
+
rspec-sidekiq
|
265
|
+
rubocop
|
266
|
+
shoulda-matchers
|
267
|
+
simplecov
|
268
|
+
simplecov-cobertura
|
269
|
+
solargraph (~> 0.50.0)
|
270
|
+
solargraph-rspec!
|
271
|
+
webmock
|
272
|
+
|
273
|
+
BUNDLED WITH
|
274
|
+
2.3.17
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "appraisal"
|
6
|
+
gem "bundler"
|
7
|
+
gem "debug"
|
8
|
+
gem "profile-viewer"
|
9
|
+
gem "pry-byebug"
|
10
|
+
gem "rake"
|
11
|
+
gem "rspec"
|
12
|
+
gem "rubocop"
|
13
|
+
gem "simplecov"
|
14
|
+
gem "simplecov-cobertura"
|
15
|
+
gem "solargraph", "~> 0.51.0"
|
16
|
+
|
17
|
+
group :third_party_plugin_tests do
|
18
|
+
gem "actionmailer"
|
19
|
+
gem "airborne"
|
20
|
+
gem "rspec-rails"
|
21
|
+
gem "rspec-sidekiq"
|
22
|
+
gem "shoulda-matchers"
|
23
|
+
gem "webmock"
|
24
|
+
end
|
25
|
+
|
26
|
+
gemspec path: "../"
|
@@ -0,0 +1,277 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
solargraph-rspec (0.4.0)
|
5
|
+
solargraph (~> 0.49, >= 0.49.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actionmailer (6.1.7.10)
|
11
|
+
actionpack (= 6.1.7.10)
|
12
|
+
actionview (= 6.1.7.10)
|
13
|
+
activejob (= 6.1.7.10)
|
14
|
+
activesupport (= 6.1.7.10)
|
15
|
+
mail (~> 2.5, >= 2.5.4)
|
16
|
+
rails-dom-testing (~> 2.0)
|
17
|
+
actionpack (6.1.7.10)
|
18
|
+
actionview (= 6.1.7.10)
|
19
|
+
activesupport (= 6.1.7.10)
|
20
|
+
rack (~> 2.0, >= 2.0.9)
|
21
|
+
rack-test (>= 0.6.3)
|
22
|
+
rails-dom-testing (~> 2.0)
|
23
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
24
|
+
actionview (6.1.7.10)
|
25
|
+
activesupport (= 6.1.7.10)
|
26
|
+
builder (~> 3.1)
|
27
|
+
erubi (~> 1.4)
|
28
|
+
rails-dom-testing (~> 2.0)
|
29
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
30
|
+
activejob (6.1.7.10)
|
31
|
+
activesupport (= 6.1.7.10)
|
32
|
+
globalid (>= 0.3.6)
|
33
|
+
activesupport (6.1.7.10)
|
34
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
35
|
+
i18n (>= 1.6, < 2)
|
36
|
+
minitest (>= 5.1)
|
37
|
+
tzinfo (~> 2.0)
|
38
|
+
zeitwerk (~> 2.3)
|
39
|
+
addressable (2.8.7)
|
40
|
+
public_suffix (>= 2.0.2, < 7.0)
|
41
|
+
airborne (0.3.7)
|
42
|
+
activesupport
|
43
|
+
rack
|
44
|
+
rack-test (>= 1.1.0, < 2.0)
|
45
|
+
rest-client (>= 2.0.2, < 3.0)
|
46
|
+
rspec (~> 3.8)
|
47
|
+
appraisal (2.5.0)
|
48
|
+
bundler
|
49
|
+
rake
|
50
|
+
thor (>= 0.14.0)
|
51
|
+
ast (2.4.2)
|
52
|
+
backport (1.2.0)
|
53
|
+
benchmark (0.4.0)
|
54
|
+
bigdecimal (3.1.9)
|
55
|
+
builder (3.3.0)
|
56
|
+
byebug (11.1.3)
|
57
|
+
coderay (1.1.3)
|
58
|
+
concurrent-ruby (1.3.5)
|
59
|
+
connection_pool (2.5.0)
|
60
|
+
crack (1.0.0)
|
61
|
+
bigdecimal
|
62
|
+
rexml
|
63
|
+
crass (1.0.6)
|
64
|
+
date (3.4.1)
|
65
|
+
debug (1.8.0)
|
66
|
+
irb (>= 1.5.0)
|
67
|
+
reline (>= 0.3.1)
|
68
|
+
diff-lcs (1.5.1)
|
69
|
+
docile (1.4.1)
|
70
|
+
domain_name (0.5.20190701)
|
71
|
+
unf (>= 0.0.5, < 1.0.0)
|
72
|
+
erubi (1.13.1)
|
73
|
+
globalid (1.2.1)
|
74
|
+
activesupport (>= 6.1)
|
75
|
+
hashdiff (1.1.2)
|
76
|
+
http-accept (1.7.0)
|
77
|
+
http-cookie (1.0.8)
|
78
|
+
domain_name (~> 0.5)
|
79
|
+
i18n (1.14.7)
|
80
|
+
concurrent-ruby (~> 1.0)
|
81
|
+
io-console (0.8.0)
|
82
|
+
irb (1.6.3)
|
83
|
+
reline (>= 0.3.0)
|
84
|
+
jaro_winkler (1.6.0)
|
85
|
+
json (2.7.6)
|
86
|
+
kramdown (2.5.1)
|
87
|
+
rexml (>= 3.3.9)
|
88
|
+
kramdown-parser-gfm (1.1.0)
|
89
|
+
kramdown (~> 2.0)
|
90
|
+
logger (1.6.5)
|
91
|
+
loofah (2.24.0)
|
92
|
+
crass (~> 1.0.2)
|
93
|
+
nokogiri (>= 1.12.0)
|
94
|
+
mail (2.8.1)
|
95
|
+
mini_mime (>= 0.1.1)
|
96
|
+
net-imap
|
97
|
+
net-pop
|
98
|
+
net-smtp
|
99
|
+
method_source (1.1.0)
|
100
|
+
mime-types (3.6.0)
|
101
|
+
logger
|
102
|
+
mime-types-data (~> 3.2015)
|
103
|
+
mime-types-data (3.2025.0107)
|
104
|
+
mini_mime (1.1.5)
|
105
|
+
minitest (5.25.4)
|
106
|
+
net-imap (0.3.7)
|
107
|
+
date
|
108
|
+
net-protocol
|
109
|
+
net-pop (0.1.2)
|
110
|
+
net-protocol
|
111
|
+
net-protocol (0.2.2)
|
112
|
+
timeout
|
113
|
+
net-smtp (0.5.0)
|
114
|
+
net-protocol
|
115
|
+
netrc (0.11.0)
|
116
|
+
nokogiri (1.13.10-arm64-darwin)
|
117
|
+
racc (~> 1.4)
|
118
|
+
observer (0.1.2)
|
119
|
+
optparse (0.6.0)
|
120
|
+
ostruct (0.6.1)
|
121
|
+
parallel (1.24.0)
|
122
|
+
parser (3.3.7.0)
|
123
|
+
ast (~> 2.4.1)
|
124
|
+
racc
|
125
|
+
profile-viewer (0.0.4)
|
126
|
+
optparse
|
127
|
+
webrick
|
128
|
+
pry (0.13.1)
|
129
|
+
coderay (~> 1.1)
|
130
|
+
method_source (~> 1.0)
|
131
|
+
pry-byebug (3.9.0)
|
132
|
+
byebug (~> 11.0)
|
133
|
+
pry (~> 0.13.0)
|
134
|
+
public_suffix (5.1.1)
|
135
|
+
racc (1.8.1)
|
136
|
+
rack (2.2.10)
|
137
|
+
rack-test (1.1.0)
|
138
|
+
rack (>= 1.0, < 3)
|
139
|
+
rails-dom-testing (2.2.0)
|
140
|
+
activesupport (>= 5.0.0)
|
141
|
+
minitest
|
142
|
+
nokogiri (>= 1.6)
|
143
|
+
rails-html-sanitizer (1.5.0)
|
144
|
+
loofah (~> 2.19, >= 2.19.1)
|
145
|
+
railties (6.1.7.10)
|
146
|
+
actionpack (= 6.1.7.10)
|
147
|
+
activesupport (= 6.1.7.10)
|
148
|
+
method_source
|
149
|
+
rake (>= 12.2)
|
150
|
+
thor (~> 1.0)
|
151
|
+
rainbow (3.1.1)
|
152
|
+
rake (13.2.1)
|
153
|
+
rbs (3.1.3)
|
154
|
+
redis (4.8.1)
|
155
|
+
regexp_parser (2.10.0)
|
156
|
+
reline (0.6.0)
|
157
|
+
io-console (~> 0.5)
|
158
|
+
rest-client (2.1.0)
|
159
|
+
http-accept (>= 1.7.0, < 2.0)
|
160
|
+
http-cookie (>= 1.0.2, < 2.0)
|
161
|
+
mime-types (>= 1.16, < 4.0)
|
162
|
+
netrc (~> 0.8)
|
163
|
+
reverse_markdown (3.0.0)
|
164
|
+
nokogiri
|
165
|
+
rexml (3.4.0)
|
166
|
+
rspec (3.13.0)
|
167
|
+
rspec-core (~> 3.13.0)
|
168
|
+
rspec-expectations (~> 3.13.0)
|
169
|
+
rspec-mocks (~> 3.13.0)
|
170
|
+
rspec-core (3.13.2)
|
171
|
+
rspec-support (~> 3.13.0)
|
172
|
+
rspec-expectations (3.13.3)
|
173
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
174
|
+
rspec-support (~> 3.13.0)
|
175
|
+
rspec-mocks (3.13.2)
|
176
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
177
|
+
rspec-support (~> 3.13.0)
|
178
|
+
rspec-rails (6.1.5)
|
179
|
+
actionpack (>= 6.1)
|
180
|
+
activesupport (>= 6.1)
|
181
|
+
railties (>= 6.1)
|
182
|
+
rspec-core (~> 3.13)
|
183
|
+
rspec-expectations (~> 3.13)
|
184
|
+
rspec-mocks (~> 3.13)
|
185
|
+
rspec-support (~> 3.13)
|
186
|
+
rspec-sidekiq (4.0.2)
|
187
|
+
rspec-core (~> 3.0)
|
188
|
+
rspec-expectations (~> 3.0)
|
189
|
+
rspec-mocks (~> 3.0)
|
190
|
+
sidekiq (>= 5, < 8)
|
191
|
+
rspec-support (3.13.2)
|
192
|
+
rubocop (1.50.2)
|
193
|
+
json (~> 2.3)
|
194
|
+
parallel (~> 1.10)
|
195
|
+
parser (>= 3.2.0.0)
|
196
|
+
rainbow (>= 2.2.2, < 4.0)
|
197
|
+
regexp_parser (>= 1.8, < 3.0)
|
198
|
+
rexml (>= 3.2.5, < 4.0)
|
199
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
200
|
+
ruby-progressbar (~> 1.7)
|
201
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
202
|
+
rubocop-ast (1.30.0)
|
203
|
+
parser (>= 3.2.1.0)
|
204
|
+
ruby-progressbar (1.13.0)
|
205
|
+
shoulda-matchers (5.3.0)
|
206
|
+
activesupport (>= 5.2.0)
|
207
|
+
sidekiq (6.5.12)
|
208
|
+
connection_pool (>= 2.2.5, < 3)
|
209
|
+
rack (~> 2.0)
|
210
|
+
redis (>= 4.5.0, < 5)
|
211
|
+
simplecov (0.22.0)
|
212
|
+
docile (~> 1.1)
|
213
|
+
simplecov-html (~> 0.11)
|
214
|
+
simplecov_json_formatter (~> 0.1)
|
215
|
+
simplecov-cobertura (2.1.0)
|
216
|
+
rexml
|
217
|
+
simplecov (~> 0.19)
|
218
|
+
simplecov-html (0.13.1)
|
219
|
+
simplecov_json_formatter (0.1.4)
|
220
|
+
solargraph (0.51.1)
|
221
|
+
backport (~> 1.2)
|
222
|
+
benchmark
|
223
|
+
bundler (~> 2.0)
|
224
|
+
diff-lcs (~> 1.4)
|
225
|
+
jaro_winkler (~> 1.6)
|
226
|
+
kramdown (~> 2.3)
|
227
|
+
kramdown-parser-gfm (~> 1.1)
|
228
|
+
logger (~> 1.6)
|
229
|
+
observer (~> 0.1)
|
230
|
+
ostruct (~> 0.6)
|
231
|
+
parser (~> 3.0)
|
232
|
+
rbs (~> 3.0)
|
233
|
+
reverse_markdown (>= 2.0, < 4)
|
234
|
+
rubocop (~> 1.38)
|
235
|
+
thor (~> 1.0)
|
236
|
+
tilt (~> 2.0)
|
237
|
+
yard (~> 0.9, >= 0.9.24)
|
238
|
+
thor (1.3.2)
|
239
|
+
tilt (2.6.0)
|
240
|
+
timeout (0.4.3)
|
241
|
+
tzinfo (2.0.6)
|
242
|
+
concurrent-ruby (~> 1.0)
|
243
|
+
unf (0.2.0)
|
244
|
+
unicode-display_width (2.6.0)
|
245
|
+
webmock (3.24.0)
|
246
|
+
addressable (>= 2.8.0)
|
247
|
+
crack (>= 0.3.2)
|
248
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
249
|
+
webrick (1.9.1)
|
250
|
+
yard (0.9.37)
|
251
|
+
zeitwerk (2.6.18)
|
252
|
+
|
253
|
+
PLATFORMS
|
254
|
+
arm64-darwin-22
|
255
|
+
|
256
|
+
DEPENDENCIES
|
257
|
+
actionmailer
|
258
|
+
airborne
|
259
|
+
appraisal
|
260
|
+
bundler
|
261
|
+
debug
|
262
|
+
profile-viewer
|
263
|
+
pry-byebug
|
264
|
+
rake
|
265
|
+
rspec
|
266
|
+
rspec-rails
|
267
|
+
rspec-sidekiq
|
268
|
+
rubocop
|
269
|
+
shoulda-matchers
|
270
|
+
simplecov
|
271
|
+
simplecov-cobertura
|
272
|
+
solargraph (~> 0.51.0)
|
273
|
+
solargraph-rspec!
|
274
|
+
webmock
|
275
|
+
|
276
|
+
BUNDLED WITH
|
277
|
+
2.3.17
|
@@ -100,7 +100,7 @@ module Solargraph
|
|
100
100
|
Solargraph.logger.debug "[RSpec] added requires #{requires}"
|
101
101
|
|
102
102
|
Environ.new(requires: requires, pins: pins)
|
103
|
-
rescue StandardError => e
|
103
|
+
rescue StandardError, SyntaxError => e
|
104
104
|
raise e if ENV['SOLARGRAPH_DEBUG']
|
105
105
|
|
106
106
|
Solargraph.logger.warn(
|
@@ -141,7 +141,7 @@ module Solargraph
|
|
141
141
|
end
|
142
142
|
|
143
143
|
Environ.new(requires: [], pins: pins)
|
144
|
-
rescue StandardError => e
|
144
|
+
rescue StandardError, SyntaxError => e
|
145
145
|
raise e if ENV['SOLARGRAPH_DEBUG']
|
146
146
|
|
147
147
|
Solargraph.logger.warn(
|
@@ -7,30 +7,74 @@ module Solargraph
|
|
7
7
|
MATCH_DO_END = /.*? do(.*)end/m.freeze
|
8
8
|
MATCH_CURLY = /{(.*)}/m.freeze
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
def #{method_name}
|
22
|
-
#{method_body}
|
10
|
+
class << self
|
11
|
+
# Transforms let block to method ast node
|
12
|
+
# @param block_ast [RubyVM::AbstractSyntaxTree::Node]
|
13
|
+
# @return [RubyVM::AbstractSyntaxTree::Node, ::Parser::AST::Node, nil]
|
14
|
+
def transform_block(block_ast, code, method_name = nil)
|
15
|
+
method_name ||= NodeTypes.let_method_name(block_ast)
|
16
|
+
|
17
|
+
if Solargraph::Parser.rubyvm?
|
18
|
+
rubyvm_transform_block(block_ast, code, method_name)
|
19
|
+
else
|
20
|
+
parser_transform_block(block_ast, code, method_name)
|
23
21
|
end
|
24
|
-
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
# @param block_ast [RubyVM::AbstractSyntaxTree::Node]
|
27
|
+
# @return [RubyVM::AbstractSyntaxTree::Node, nil]
|
28
|
+
def rubyvm_transform_block(block_ast, code, method_name = nil)
|
29
|
+
block_body = block_ast.children[1]
|
30
|
+
let_definition_code = code.lines[block_body.first_lineno - 1..block_body.last_lineno - 1].join
|
31
|
+
match_do_end = let_definition_code.match(MATCH_DO_END)&.captures&.first || ''
|
32
|
+
match_curly = let_definition_code.match(MATCH_CURLY)&.captures&.first || ''
|
33
|
+
method_body = [match_do_end, match_curly].max_by(&:length).strip
|
34
|
+
|
35
|
+
ast = RubyVM::AbstractSyntaxTree.parse <<~RUBY
|
36
|
+
def #{method_name}
|
37
|
+
#{method_body}
|
38
|
+
end
|
39
|
+
RUBY
|
40
|
+
|
41
|
+
ast.children[2]
|
42
|
+
rescue SyntaxError => e
|
43
|
+
Solargraph.logger.warn "[RSpec] Failed to build fake let method: #{e.message}, \
|
44
|
+
\n\nlet_definition_code: \n```\n#{let_definition_code}\n```, \
|
45
|
+
\n\nmethod_body: \n```\n#{method_body}\n```, \
|
46
|
+
\nast: #{block_ast.inspect}"
|
47
|
+
end
|
48
|
+
|
49
|
+
# @param block_ast [RubyVM::AbstractSyntaxTree::Node]
|
50
|
+
# @return [::Parser::AST::Node]
|
51
|
+
def parser_transform_block(block_ast, code, method_name = nil)
|
52
|
+
code_lines = code.split("\n")
|
53
|
+
# extract let definition block body code
|
54
|
+
first_line = code_lines[block_ast.first_lineno - 1]
|
55
|
+
last_line = code_lines[block_ast.last_lineno - 1]
|
56
|
+
code_lines[block_ast.first_lineno - 1] = first_line[(block_ast.first_column)..]
|
57
|
+
code_lines[block_ast.last_lineno - 1] = last_line[0..(block_ast.last_column)]
|
58
|
+
let_definition_code = code_lines[
|
59
|
+
(block_ast.first_lineno - 1)..(block_ast.last_lineno - 1)
|
60
|
+
].join("\n")
|
25
61
|
|
26
|
-
|
27
|
-
|
28
|
-
|
62
|
+
let_definition_ast = ::Parser::CurrentRuby.parse(let_definition_code)
|
63
|
+
method_body = let_definition_ast.children[2]
|
64
|
+
::Parser::AST::Node.new( # transform let block to a method ast node
|
65
|
+
:def,
|
66
|
+
[
|
67
|
+
method_name.to_sym,
|
68
|
+
::Parser::AST::Node.new(:args, []),
|
69
|
+
method_body
|
70
|
+
]
|
71
|
+
)
|
72
|
+
rescue SyntaxError => e
|
73
|
+
Solargraph.logger.warn "[RSpec] Failed to build fake let method: #{e.message}, \
|
29
74
|
\n\nlet_definition_code: \n```\n#{let_definition_code}\n```, \
|
30
75
|
\n\nmethod_body: \n```\n#{method_body}\n```, \
|
31
76
|
\nast: #{block_ast.inspect}"
|
32
|
-
|
33
|
-
nil
|
77
|
+
end
|
34
78
|
end
|
35
79
|
end
|
36
80
|
end
|
@@ -14,7 +14,7 @@ module Solargraph
|
|
14
14
|
def initialize(source_map:, config:)
|
15
15
|
@source_map = source_map
|
16
16
|
@config = config
|
17
|
-
@walker = Rspec::Walker.new(source_map
|
17
|
+
@walker = Rspec::Walker.new(ruby_vm_node(source_map))
|
18
18
|
@handlers = {
|
19
19
|
on_described_class: [],
|
20
20
|
on_let_method: [],
|
@@ -119,7 +119,7 @@ module Solargraph
|
|
119
119
|
method_name = NodeTypes.let_method_name(block_ast)
|
120
120
|
next unless method_name
|
121
121
|
|
122
|
-
fake_method_ast = FakeLetMethod.transform_block(block_ast, @source_map.source.code)
|
122
|
+
fake_method_ast = FakeLetMethod.transform_block(block_ast, @source_map.source.code, method_name)
|
123
123
|
|
124
124
|
@handlers[:on_let_method].each do |handler|
|
125
125
|
handler.call(method_name, PinFactory.build_location_range(block_ast.children[0]), fake_method_ast)
|
@@ -210,6 +210,19 @@ module Solargraph
|
|
210
210
|
next parent_namespace
|
211
211
|
end
|
212
212
|
end
|
213
|
+
|
214
|
+
# HACK: Make it work for ruby '>= 3.4.9' and solargraph '>= 0.51.0'
|
215
|
+
# https://github.com/castwide/solargraph/pull/739 disables the `rubyvm` for Ruby 3.4
|
216
|
+
# TODO: Implement SpecWalker with parser gem
|
217
|
+
# @param source_map [SourceMap]
|
218
|
+
# @return [RubyVM::AbstractSyntaxTree::Node]
|
219
|
+
def ruby_vm_node(source_map)
|
220
|
+
if Solargraph::Parser.rubyvm?
|
221
|
+
source_map.source.node
|
222
|
+
else
|
223
|
+
RubyVM::AbstractSyntaxTree.parse(source_map.source.code)
|
224
|
+
end
|
225
|
+
end
|
213
226
|
end
|
214
227
|
end
|
215
228
|
end
|
data/lib/solargraph-rspec.rb
CHANGED
@@ -6,13 +6,5 @@ require 'solargraph'
|
|
6
6
|
require_relative 'solargraph/rspec/version'
|
7
7
|
require_relative 'solargraph/rspec/convention'
|
8
8
|
|
9
|
-
module Solargraph
|
10
|
-
module Rspec
|
11
|
-
class NodeParser
|
12
|
-
extend Solargraph::Parser::Legacy::ClassMethods
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
9
|
Solargraph::Convention.register Solargraph::Rspec::Convention
|
18
10
|
# rubocop:enable Naming/FileName
|
metadata
CHANGED
@@ -1,35 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solargraph-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lekë Mula
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solargraph
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 0.49.0
|
20
17
|
- - "~>"
|
21
18
|
- !ruby/object:Gem::Version
|
22
19
|
version: '0.49'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.49.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - ">="
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 0.49.0
|
30
27
|
- - "~>"
|
31
28
|
- !ruby/object:Gem::Version
|
32
29
|
version: '0.49'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.49.0
|
33
33
|
description: RSpec is a testing tool of choice for many Ruby developers. This plugin
|
34
34
|
provides code completion and other features for RSpec files in Solargraph.
|
35
35
|
email:
|
@@ -40,6 +40,7 @@ extra_rdoc_files: []
|
|
40
40
|
files:
|
41
41
|
- ".rspec"
|
42
42
|
- ".rubocop.yml"
|
43
|
+
- Appraisals
|
43
44
|
- CHANGELOG.md
|
44
45
|
- CODE_OF_CONDUCT.md
|
45
46
|
- LICENSE.txt
|
@@ -50,6 +51,11 @@ files:
|
|
50
51
|
- doc/images/one_liners_demo.gif
|
51
52
|
- doc/images/vim_demo.gif
|
52
53
|
- doc/images/vscode_demo.gif
|
54
|
+
- gemfiles/.bundle/config
|
55
|
+
- gemfiles/solargraph_0.50.gemfile
|
56
|
+
- gemfiles/solargraph_0.50.gemfile.lock
|
57
|
+
- gemfiles/solargraph_0.51.gemfile
|
58
|
+
- gemfiles/solargraph_0.51.gemfile.lock
|
53
59
|
- lib/solargraph-rspec.rb
|
54
60
|
- lib/solargraph/rspec/annotations.rb
|
55
61
|
- lib/solargraph/rspec/config.rb
|
@@ -95,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
101
|
- !ruby/object:Gem::Version
|
96
102
|
version: '0'
|
97
103
|
requirements: []
|
98
|
-
rubygems_version: 3.
|
104
|
+
rubygems_version: 3.2.3
|
99
105
|
signing_key:
|
100
106
|
specification_version: 4
|
101
107
|
summary: Solargraph plugin supporting RSpec code completion
|