ruby-lsp 0.18.0 → 0.18.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/VERSION +1 -1
- data/lib/ruby_indexer/lib/ruby_indexer/entry.rb +7 -2
- data/lib/ruby_indexer/test/classes_and_modules_test.rb +14 -0
- 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: 42aef038c33d8c03d661dc1c39c745df320399ab86e6c558504c79c93bac4952
|
4
|
+
data.tar.gz: ff4ce59697e498c965a0db7b8df44de12e4c81cebb6ef84d50cc54664647f913
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a88854595b50bab0ede9aaaa40fe8d765afb6f8744246c8d3407769ad981d00579b20a52f61c4f2c929d8ecdd3578625093b41cf30f6c7224ac64117a201b39
|
7
|
+
data.tar.gz: 9093a75fbecd3349e0b6bd80bc899928ea40a4afb2c2a1ae64a5be1bde84bf800280a24910a35ff7eac3b7e470785a649a370214f9f51b8bbd898ede81e09903
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.18.
|
1
|
+
0.18.1
|
@@ -98,8 +98,13 @@ module RubyIndexer
|
|
98
98
|
# object is dropped, so this will not prevent updates
|
99
99
|
if correct_group
|
100
100
|
correct_group.filter_map do |comment|
|
101
|
-
content = comment.slice
|
102
|
-
|
101
|
+
content = comment.slice.chomp
|
102
|
+
|
103
|
+
if content.valid_encoding?
|
104
|
+
content.delete_prefix!("#")
|
105
|
+
content.delete_prefix!(" ")
|
106
|
+
content
|
107
|
+
end
|
103
108
|
end.join("\n")
|
104
109
|
else
|
105
110
|
""
|
@@ -605,5 +605,19 @@ module RubyIndexer
|
|
605
605
|
assert_entry("Foo::Bar", Entry::Class, "/fake/path/foo.rb:2-4:3-7")
|
606
606
|
assert_entry("Qux", Entry::Class, "/fake/path/foo.rb:5-4:6-7")
|
607
607
|
end
|
608
|
+
|
609
|
+
def test_lazy_comment_fetching_uses_correct_line_breaks_for_rendering
|
610
|
+
path = "lib/ruby_lsp/node_context.rb"
|
611
|
+
indexable = IndexablePath.new("#{Dir.pwd}/lib", path)
|
612
|
+
|
613
|
+
@index.index_single(indexable, collect_comments: false)
|
614
|
+
|
615
|
+
entry = @index["RubyLsp::NodeContext"].first
|
616
|
+
|
617
|
+
assert_equal(<<~COMMENTS.chomp, entry.comments)
|
618
|
+
This class allows listeners to access contextual information about a node in the AST, such as its parent,
|
619
|
+
its namespace nesting, and the surrounding CallNode (e.g. a method call).
|
620
|
+
COMMENTS
|
621
|
+
end
|
608
622
|
end
|
609
623
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-lsp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.18.
|
4
|
+
version: 0.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: language_server-protocol
|