ruby-lsp-rspec 0.1.25 → 0.1.26
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e9f95b8526c6e5f7c239bb7d732c8138fc38acbee91a522022ab535a7f5b335
|
4
|
+
data.tar.gz: d10141bd0eb29c2f103a1fca27444eaadb9d046762bf6dc32c5bbd34f8027f22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 518b4fe4b168402d0fd8f8defa8ef834837ac4ea1cb68ae72dee6077dad3e0962503fa2bc36b74678705eb88e258a66b07a382dbb1c62bf6795c7073a58106aa
|
7
|
+
data.tar.gz: f9ac11f6390660c734dedcd598a05a68f616878fd25dbbe6d14f1cdc67f71e6ef6947edd85311e7397e6292243fa460d3c0d69baae33a8143a828d9e3e742446
|
@@ -45,7 +45,10 @@ module RubyLsp
|
|
45
45
|
example = notification.example
|
46
46
|
uri = uri_for(example)
|
47
47
|
id = generate_id(example)
|
48
|
-
|
48
|
+
message = notification.message_lines.join("\n")
|
49
|
+
message << "\n\n"
|
50
|
+
message << notification.formatted_backtrace.map(&method(:adjust_backtrace)).map { |s| "# " + s }.join("\n")
|
51
|
+
RubyLsp::LspReporter.instance.record_fail(id: id, message: message, uri: uri)
|
49
52
|
end
|
50
53
|
|
51
54
|
def example_pending(notification)
|
@@ -69,6 +72,12 @@ module RubyLsp
|
|
69
72
|
def generate_id(example)
|
70
73
|
[example, *example.example_group.parent_groups].reverse.map(&:location).join("::")
|
71
74
|
end
|
75
|
+
|
76
|
+
def adjust_backtrace(backtrace)
|
77
|
+
# Correct the backtrace entry so that vscode recognized it as a link to open
|
78
|
+
parts = backtrace.split(":", 3)
|
79
|
+
parts[0].sub(/^\./, "file://" + File.expand_path(".")) + ":" + parts[1] + " : " + parts[2]
|
80
|
+
end
|
72
81
|
end
|
73
82
|
end
|
74
83
|
end
|
@@ -48,21 +48,22 @@ module RubyLsp
|
|
48
48
|
|
49
49
|
private
|
50
50
|
|
51
|
-
#: (Prism::CallNode) -> String
|
51
|
+
#: (Prism::CallNode) -> String
|
52
52
|
def extract_description(node)
|
53
|
-
# Try to extract the description from
|
53
|
+
# Try to extract the description from the argument
|
54
54
|
first_arg = node.arguments&.arguments&.first
|
55
|
-
return "example at #{relative_location(node)}" if first_arg.nil?
|
56
55
|
|
57
56
|
case first_arg
|
58
57
|
when Prism::StringNode
|
59
58
|
first_arg.content
|
60
59
|
when Prism::SymbolNode
|
61
|
-
first_arg.value
|
60
|
+
first_arg.value.to_s
|
62
61
|
when Prism::ConstantReadNode
|
63
62
|
first_arg.name.to_s
|
64
63
|
when Prism::ConstantPathNode
|
65
64
|
first_arg.full_name
|
65
|
+
else
|
66
|
+
"example at #{relative_location(node)}"
|
66
67
|
end
|
67
68
|
end
|
68
69
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
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.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stan Lo
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-07-19 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: ruby-lsp
|
@@ -15,14 +15,14 @@ dependencies:
|
|
15
15
|
requirements:
|
16
16
|
- - "~>"
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: 0.
|
18
|
+
version: 0.25.0
|
19
19
|
type: :runtime
|
20
20
|
prerelease: false
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
22
22
|
requirements:
|
23
23
|
- - "~>"
|
24
24
|
- !ruby/object:Gem::Version
|
25
|
-
version: 0.
|
25
|
+
version: 0.25.0
|
26
26
|
description: RSpec addon for ruby-lsp
|
27
27
|
email:
|
28
28
|
- stan001212@gmail.com
|