ruby-lsp-rspec 0.1.17 → 0.1.19

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: 43af0ed802cbfedcb5157150ca7a532347bd61d7f672bd3a3c70decb6460422b
4
- data.tar.gz: 9a9a54650225821e7a5296090f6a546febfb4040eeecc3c8405040c3b8a390cd
3
+ metadata.gz: 78e208b90f3e9d6421fc1d0b2735a9573f26c607ad84e21677cdd450f44bb220
4
+ data.tar.gz: 4fa696bb29ddc3d7d1987a9b5dd291ab9a7930e182b33393e7c873821844e8c7
5
5
  SHA512:
6
- metadata.gz: 184b40befc64cc43c53eef48838cdab685422e97c1e92207a6abe042ba8fd1df7bf6d43584f400ee43b91c8aa8bab6f7dfbba6fbc2f5e26616e05850cdc6d0a7
7
- data.tar.gz: afc524ecaa9acdaaf1338828a8ebaee32bd5519473905d63ccd6715c6dfcac75da7db74c3e6a1b0534c3e58691f47e511ad5cb84f0712cf91461b3ed74993c14
6
+ metadata.gz: 8b9b18a56648062c2346ad09b4f9101c048cecd32eaa5e4d3f04dd504da4b976d79213299475ead4c4945ef3a0d179a8a59bcee979ee29e6bc30c35d8959a7a7
7
+ data.tar.gz: 841291308691a144c28b64f15b977976b46517db09b7287140fe67ac2d2ad0794c56730f32babd4314c53030624e027930a8f215ec0fd9c42ec184d27f76d3f0
@@ -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)
21
20
  end
22
21
 
23
22
  sig { override.void }
@@ -3,23 +3,11 @@
3
3
 
4
4
  module RubyLsp
5
5
  module RSpec
6
- class IndexingEnhancement
6
+ class IndexingEnhancement < RubyIndexer::Enhancement
7
7
  extend T::Sig
8
- include RubyIndexer::Enhancement
9
8
 
10
- sig do
11
- override.params(
12
- index: RubyIndexer::Index,
13
- owner: T.nilable(RubyIndexer::Entry::Namespace),
14
- node: Prism::CallNode,
15
- file_path: String,
16
- code_units_cache: T.any(
17
- T.proc.params(arg0: Integer).returns(Integer),
18
- Prism::CodeUnitsCache,
19
- ),
20
- ).void
21
- end
22
- def on_call_node(index, owner, node, file_path, code_units_cache)
9
+ sig { override.params(node: Prism::CallNode).void }
10
+ def on_call_node_enter(node)
23
11
  return if node.receiver
24
12
 
25
13
  name = node.name
@@ -45,16 +33,7 @@ module RubyLsp
45
33
 
46
34
  return unless method_name
47
35
 
48
- index.add(RubyIndexer::Entry::Method.new(
49
- method_name,
50
- file_path,
51
- RubyIndexer::Location.from_prism_location(block_node.location, code_units_cache),
52
- RubyIndexer::Location.from_prism_location(block_node.location, code_units_cache),
53
- nil,
54
- [RubyIndexer::Entry::Signature.new([])],
55
- RubyIndexer::Entry::Visibility::PUBLIC,
56
- owner,
57
- ))
36
+ @listener.add_method(method_name, block_node.location, [RubyIndexer::Entry::Signature.new([])])
58
37
  when :subject, :subject!
59
38
  block_node = node.block
60
39
  return unless block_node
@@ -78,16 +57,7 @@ module RubyLsp
78
57
 
79
58
  return unless method_name
80
59
 
81
- index.add(RubyIndexer::Entry::Method.new(
82
- method_name,
83
- file_path,
84
- RubyIndexer::Location.from_prism_location(block_node.location, code_units_cache),
85
- RubyIndexer::Location.from_prism_location(block_node.location, code_units_cache),
86
- nil,
87
- [RubyIndexer::Entry::Signature.new([])],
88
- RubyIndexer::Entry::Visibility::PUBLIC,
89
- owner,
90
- ))
60
+ @listener.add_method(method_name, block_node.location, [RubyIndexer::Entry::Signature.new([])])
91
61
  end
92
62
  end
93
63
  end
@@ -3,6 +3,6 @@
3
3
 
4
4
  module RubyLsp
5
5
  module RSpec
6
- VERSION = "0.1.17"
6
+ VERSION = "0.1.19"
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.17
4
+ version: 0.1.19
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-10-22 00:00:00.000000000 Z
11
+ date: 2024-11-27 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.20.1
19
+ version: 0.22.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.20.1
26
+ version: 0.22.0
27
27
  description: RSpec addon for ruby-lsp
28
28
  email:
29
29
  - stan001212@gmail.com