ruby-lsp-rspec 0.1.4 → 0.1.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52e1c8cb1ca3e54b0f8ffc4431f2a3b9193d60e530ed2ef375768dd4dba1594c
|
4
|
+
data.tar.gz: a23b9805e5ec053fa305d193e23c84cf85f4c1835206e9c1218649c007485caa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f84c03e348ed98af6c14cebb31333a5e4300e2ae90e2470ca852b4234accf9957e11e6a92e0c02fa20cbad7682f26e48ab09c8edc4482f5d324ca773d84b2c36
|
7
|
+
data.tar.gz: 4fcb8195d12d181b12ad9e1b765a99c1992e8be4508fd5c050a2e191be18e88eaf6586192636ba6cc7e8c6b3bdd6e661f41aab50385920083ae3dd1282baa80e
|
@@ -26,6 +26,8 @@ module RubyLsp
|
|
26
26
|
).returns(T.nilable(Listener[T::Array[Interface::CodeLens]]))
|
27
27
|
end
|
28
28
|
def create_code_lens_listener(uri, emitter, message_queue)
|
29
|
+
return unless uri.to_standardized_path&.end_with?("_test.rb") || uri.to_standardized_path&.end_with?("_spec.rb")
|
30
|
+
|
29
31
|
CodeLens.new(uri, emitter, message_queue)
|
30
32
|
end
|
31
33
|
|
@@ -17,7 +17,8 @@ module RubyLsp
|
|
17
17
|
sig { params(uri: URI::Generic, dispatcher: Prism::Dispatcher, message_queue: Thread::Queue).void }
|
18
18
|
def initialize(uri, dispatcher, message_queue)
|
19
19
|
@_response = T.let([], ResponseType)
|
20
|
-
|
20
|
+
# Listener is only initialized if uri.to_standardized_path is valid
|
21
|
+
@path = T.let(T.must(uri.to_standardized_path), String)
|
21
22
|
dispatcher.register(self, :on_call_node_enter)
|
22
23
|
|
23
24
|
@base_command = T.let(
|
@@ -78,8 +79,6 @@ module RubyLsp
|
|
78
79
|
|
79
80
|
sig { params(node: Prism::Node, name: String, kind: Symbol).void }
|
80
81
|
def add_test_code_lens(node, name:, kind:)
|
81
|
-
return unless @path
|
82
|
-
|
83
82
|
line_number = node.location.start_line
|
84
83
|
command = "#{@base_command} #{@path}:#{line_number}"
|
85
84
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-lsp-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stan Lo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-lsp
|