ruby-lsp-rspec 0.1.18 → 0.1.20

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: c3d538a0710e094d883741c214205396a1f9e5dedaa4bec86e67cddec760dfe4
4
- data.tar.gz: d691bbbd965a24925ce5d4e0fd417f8a81b921ce53ca1980bd55beb2f0f4c1fb
3
+ metadata.gz: bcc390efb4feaaae45f6debf661965c3065c479fe6519f53dfab3f52a076c80d
4
+ data.tar.gz: 3b427365fa10bae114a9cb3dbfb8d7f6e58ba4ac0612ce4e17854cdb7d548111
5
5
  SHA512:
6
- metadata.gz: e6407d4ed11b7d5dc20d05162b5ea5305cd5653a9e8c9cee845d48f82e70a2a5df0270db38445ddf0f53d695ea6856a26ccf927243c300812cec5fb0755f8806
7
- data.tar.gz: 2574e33ff311af3a0c160bc3dc38f9e16595a98aaea4b3a50c5f1acd83071747d3d26df62e82ee252504bcbb272d03f2ebab3a8674bcfaeeca23251f098f726d
6
+ metadata.gz: 7f71602ea415b7627ddb05f08cb5894e1a3454003e54d8b618791a301807b09615e71055d8792cd49b939e056803dc564f16d3de668290ad801cdf2b61b9e166
7
+ data.tar.gz: e7935a4470bbf7f0af4511b3bfae48d5d0e282b27f700f7d208a37a70a2f6ceca371cc81c1ac0c5471d78a4bf9737774698967bed8d4913171f50f582bfd9ab5
data/README.md CHANGED
@@ -15,6 +15,9 @@ group :development do
15
15
  end
16
16
  ```
17
17
 
18
+ > [!IMPORTANT]
19
+ > Make sure the relevant features are [enabled](https://github.com/Shopify/ruby-lsp/tree/main/vscode#enable-or-disable-features) under your VSCode's `rubyLsp.enabledFeatures` setting, such as `codeLens`.
20
+
18
21
  After running `bundle install`, restart Ruby LSP and you should start seeing CodeLens in your RSpec test files.
19
22
 
20
23
  ## Features
@@ -17,7 +17,6 @@ module RubyLsp
17
17
  sig { override.params(global_state: GlobalState, message_queue: Thread::Queue).void }
18
18
  def activate(global_state, message_queue)
19
19
  @index = T.let(global_state.index, T.nilable(RubyIndexer::Index))
20
- global_state.index.register_enhancement(IndexingEnhancement.new(global_state.index))
21
20
  end
22
21
 
23
22
  sig { override.void }
@@ -44,7 +44,7 @@ module RubyLsp
44
44
  next unless entry.file_path == @uri.to_standardized_path
45
45
 
46
46
  @response_builder << Interface::LocationLink.new(
47
- target_uri: URI::Generic.from_path(path: entry.file_path).to_s,
47
+ target_uri: entry.uri,
48
48
  target_range: range_from_location(entry.location),
49
49
  target_selection_range: range_from_location(entry.name_location),
50
50
  )
@@ -6,18 +6,8 @@ module RubyLsp
6
6
  class IndexingEnhancement < RubyIndexer::Enhancement
7
7
  extend T::Sig
8
8
 
9
- sig do
10
- override.params(
11
- owner: T.nilable(RubyIndexer::Entry::Namespace),
12
- node: Prism::CallNode,
13
- file_path: String,
14
- code_units_cache: T.any(
15
- T.proc.params(arg0: Integer).returns(Integer),
16
- Prism::CodeUnitsCache,
17
- ),
18
- ).void
19
- end
20
- def on_call_node_enter(owner, node, file_path, code_units_cache)
9
+ sig { override.params(node: Prism::CallNode).void }
10
+ def on_call_node_enter(node)
21
11
  return if node.receiver
22
12
 
23
13
  name = node.name
@@ -43,16 +33,7 @@ module RubyLsp
43
33
 
44
34
  return unless method_name
45
35
 
46
- @index.add(RubyIndexer::Entry::Method.new(
47
- method_name,
48
- file_path,
49
- RubyIndexer::Location.from_prism_location(block_node.location, code_units_cache),
50
- RubyIndexer::Location.from_prism_location(block_node.location, code_units_cache),
51
- nil,
52
- [RubyIndexer::Entry::Signature.new([])],
53
- RubyIndexer::Entry::Visibility::PUBLIC,
54
- owner,
55
- ))
36
+ @listener.add_method(method_name, block_node.location, [RubyIndexer::Entry::Signature.new([])])
56
37
  when :subject, :subject!
57
38
  block_node = node.block
58
39
  return unless block_node
@@ -76,16 +57,7 @@ module RubyLsp
76
57
 
77
58
  return unless method_name
78
59
 
79
- @index.add(RubyIndexer::Entry::Method.new(
80
- method_name,
81
- file_path,
82
- RubyIndexer::Location.from_prism_location(block_node.location, code_units_cache),
83
- RubyIndexer::Location.from_prism_location(block_node.location, code_units_cache),
84
- nil,
85
- [RubyIndexer::Entry::Signature.new([])],
86
- RubyIndexer::Entry::Visibility::PUBLIC,
87
- owner,
88
- ))
60
+ @listener.add_method(method_name, block_node.location, [RubyIndexer::Entry::Signature.new([])])
89
61
  end
90
62
  end
91
63
  end
@@ -3,6 +3,6 @@
3
3
 
4
4
  module RubyLsp
5
5
  module RSpec
6
- VERSION = "0.1.18"
6
+ VERSION = "0.1.20"
7
7
  end
8
8
  end
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.18
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stan Lo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-02 00:00:00.000000000 Z
11
+ date: 2025-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-lsp
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.21.0
19
+ version: 0.23.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.21.0
26
+ version: 0.23.0
27
27
  description: RSpec addon for ruby-lsp
28
28
  email:
29
29
  - stan001212@gmail.com