Skip to content

Commit af2e492

Browse files
authored
Bump ruby-lsp to 0.13 (#15)
1 parent 9124b84 commit af2e492

30 files changed

+39544
-52234
lines changed

Gemfile.lock

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,42 @@ PATH
22
remote: .
33
specs:
44
ruby-lsp-rspec (0.1.7)
5-
ruby-lsp (~> 0.12.0)
5+
ruby-lsp (~> 0.13.0)
66

77
GEM
88
remote: https://rubygems.org/
99
specs:
1010
ast (2.4.2)
11-
base64 (0.1.1)
1211
debug (1.8.0)
1312
irb (>= 1.5.0)
1413
reline (>= 0.3.1)
1514
diff-lcs (1.5.0)
1615
erubi (1.12.0)
1716
io-console (0.6.0)
18-
irb (1.8.1)
17+
irb (1.9.1)
1918
rdoc
2019
reline (>= 0.3.8)
21-
json (2.6.3)
20+
json (2.7.0)
2221
language_server-protocol (3.17.0.3)
2322
netrc (0.11.0)
2423
parallel (1.23.0)
2524
parser (3.2.2.4)
2625
ast (~> 2.4.1)
2726
racc
2827
prettier_print (1.2.1)
29-
prism (0.15.1)
30-
psych (5.1.0)
28+
prism (0.18.0)
29+
psych (5.1.1.1)
3130
stringio
32-
racc (1.7.1)
31+
racc (1.7.3)
3332
rainbow (3.1.1)
34-
rake (13.0.6)
35-
rbi (0.1.1)
33+
rake (13.1.0)
34+
rbi (0.1.5)
35+
prism (>= 0.18.0, < 0.19)
3636
sorbet-runtime (>= 0.5.9204)
37-
yarp (>= 0.11.0)
38-
rdoc (6.5.0)
37+
rdoc (6.6.0)
3938
psych (>= 4.0.0)
40-
regexp_parser (2.8.1)
41-
reline (0.3.9)
39+
regexp_parser (2.8.2)
40+
reline (0.4.1)
4241
io-console (~> 0.5)
4342
rexml (3.2.6)
4443
rspec (3.12.0)
@@ -54,63 +53,61 @@ GEM
5453
diff-lcs (>= 1.2.0, < 2.0)
5554
rspec-support (~> 3.12.0)
5655
rspec-support (3.12.1)
57-
rubocop (1.56.4)
58-
base64 (~> 0.1.1)
56+
rubocop (1.58.0)
5957
json (~> 2.3)
6058
language_server-protocol (>= 3.17.0)
6159
parallel (~> 1.10)
62-
parser (>= 3.2.2.3)
60+
parser (>= 3.2.2.4)
6361
rainbow (>= 2.2.2, < 4.0)
6462
regexp_parser (>= 1.8, < 3.0)
6563
rexml (>= 3.2.5, < 4.0)
66-
rubocop-ast (>= 1.28.1, < 2.0)
64+
rubocop-ast (>= 1.30.0, < 2.0)
6765
ruby-progressbar (~> 1.7)
6866
unicode-display_width (>= 2.4.0, < 3.0)
69-
rubocop-ast (1.29.0)
67+
rubocop-ast (1.30.0)
7068
parser (>= 3.2.1.0)
7169
rubocop-rake (0.6.0)
7270
rubocop (~> 1.0)
7371
rubocop-shopify (2.14.0)
7472
rubocop (~> 1.51)
75-
rubocop-sorbet (0.7.4)
73+
rubocop-sorbet (0.7.5)
7674
rubocop (>= 0.90.0)
77-
ruby-lsp (0.12.0)
75+
ruby-lsp (0.13.0)
7876
language_server-protocol (~> 3.17.0)
79-
prism (>= 0.15.1, < 0.16)
77+
prism (>= 0.18.0, < 0.19)
8078
sorbet-runtime (>= 0.5.5685)
8179
ruby-progressbar (1.13.0)
82-
sorbet (0.5.11062)
83-
sorbet-static (= 0.5.11062)
84-
sorbet-runtime (0.5.11062)
85-
sorbet-static (0.5.11062-universal-darwin)
86-
sorbet-static (0.5.11062-x86_64-linux)
87-
sorbet-static-and-runtime (0.5.11062)
88-
sorbet (= 0.5.11062)
89-
sorbet-runtime (= 0.5.11062)
80+
sorbet (0.5.11144)
81+
sorbet-static (= 0.5.11144)
82+
sorbet-runtime (0.5.11144)
83+
sorbet-static (0.5.11144-universal-darwin)
84+
sorbet-static (0.5.11144-x86_64-linux)
85+
sorbet-static-and-runtime (0.5.11144)
86+
sorbet (= 0.5.11144)
87+
sorbet-runtime (= 0.5.11144)
9088
spoom (1.2.4)
9189
erubi (>= 1.10.0)
9290
sorbet-static-and-runtime (>= 0.5.10187)
9391
syntax_tree (>= 6.1.1)
9492
thor (>= 0.19.2)
95-
stringio (3.0.8)
93+
stringio (3.1.0)
9694
syntax_tree (6.2.0)
9795
prettier_print (>= 1.2.0)
98-
tapioca (0.11.9)
96+
tapioca (0.11.12)
9997
bundler (>= 2.2.25)
10098
netrc (>= 0.11.0)
10199
parallel (>= 1.21.0)
102-
rbi (~> 0.1.0, >= 0.1.0)
100+
rbi (>= 0.1.4, < 0.2)
103101
sorbet-static-and-runtime (>= 0.5.10187)
104102
spoom (~> 1.2.0, >= 1.2.0)
105103
thor (>= 1.2.0)
106104
yard-sorbet
107-
thor (1.2.2)
105+
thor (1.3.0)
108106
unicode-display_width (2.5.0)
109107
yard (0.9.34)
110108
yard-sorbet (0.8.1)
111109
sorbet-runtime (>= 0.5)
112110
yard (>= 0.9)
113-
yarp (0.13.0)
114111

115112
PLATFORMS
116113
arm64-darwin-22

lib/ruby_lsp/ruby_lsp_rspec/addon.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ module RSpec
1111
class Addon < ::RubyLsp::Addon
1212
extend T::Sig
1313

14-
sig { override.void }
15-
def activate; end
14+
sig { override.params(message_queue: Thread::Queue).void }
15+
def activate(message_queue); end
1616

1717
sig { override.void }
1818
def deactivate; end
@@ -22,13 +22,12 @@ def deactivate; end
2222
override.params(
2323
uri: URI::Generic,
2424
emitter: Prism::Dispatcher,
25-
message_queue: Thread::Queue,
2625
).returns(T.nilable(Listener[T::Array[Interface::CodeLens]]))
2726
end
28-
def create_code_lens_listener(uri, emitter, message_queue)
27+
def create_code_lens_listener(uri, emitter)
2928
return unless uri.to_standardized_path&.end_with?("_test.rb") || uri.to_standardized_path&.end_with?("_spec.rb")
3029

31-
CodeLens.new(uri, emitter, message_queue)
30+
CodeLens.new(uri, emitter)
3231
end
3332

3433
sig { override.returns(String) }

lib/ruby_lsp/ruby_lsp_rspec/code_lens.rb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ class CodeLens < ::RubyLsp::Listener
1414
sig { override.returns(ResponseType) }
1515
attr_reader :_response
1616

17-
sig { params(uri: URI::Generic, dispatcher: Prism::Dispatcher, message_queue: Thread::Queue).void }
18-
def initialize(uri, dispatcher, message_queue)
17+
sig { params(uri: URI::Generic, dispatcher: Prism::Dispatcher).void }
18+
def initialize(uri, dispatcher)
1919
@_response = T.let([], ResponseType)
2020
# Listener is only initialized if uri.to_standardized_path is valid
2121
@path = T.let(T.must(uri.to_standardized_path), String)
@@ -40,7 +40,7 @@ def initialize(uri, dispatcher, message_queue)
4040
String,
4141
)
4242

43-
super(dispatcher, message_queue)
43+
super(dispatcher)
4444
end
4545

4646
sig { params(node: Prism::CallNode).void }
@@ -50,7 +50,7 @@ def on_call_node_enter(node)
5050
name = generate_name(node)
5151
add_test_code_lens(node, name: name, kind: :example)
5252
when "context", "describe"
53-
return if node.receiver && node.receiver.name.to_s != "RSpec"
53+
return if node.receiver && node.receiver&.slice != "RSpec"
5454

5555
name = generate_name(node)
5656
add_test_code_lens(node, name: name, kind: :group)
@@ -64,16 +64,18 @@ def on_call_node_enter(node)
6464
def on_call_node_leave(node)
6565
case node.message
6666
when "context", "describe"
67-
return if node.receiver && node.receiver.name.to_s != "RSpec"
67+
return if node.receiver && node.receiver&.slice != "RSpec"
6868

6969
@group_id_stack.pop
7070
end
7171
end
7272

7373
sig { params(node: Prism::CallNode).returns(String) }
7474
def generate_name(node)
75-
if node.arguments
76-
argument = node.arguments.arguments.first
75+
arguments = node.arguments&.arguments
76+
77+
if arguments
78+
argument = arguments.first
7779

7880
case argument
7981
when Prism::StringNode

ruby-lsp-rspec.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ Gem::Specification.new do |spec|
4141
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
4242
spec.require_paths = ["lib"]
4343

44-
spec.add_dependency "ruby-lsp", "~> 0.12.0"
44+
spec.add_dependency "ruby-lsp", "~> 0.13.0"
4545
end

sorbet/rbi/gems/[email protected]

Lines changed: 0 additions & 172 deletions
This file was deleted.

0 commit comments

Comments
 (0)