ruby-lsp-rake 0.1.0 → 0.1.1

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: 1d62c520f6161c9188a81725ba3d7a0344b79ac6616e8f5067cb3c6bf53005f8
4
- data.tar.gz: 4e2d992c8cfe1707c989ecce92c766bed76b5a225897e92a0d1d24c3145446dc
3
+ metadata.gz: 976d5756a858ec00f96d80a76cdefacacc57d2bc9210f8889e94f5f96b8bd52f
4
+ data.tar.gz: 7d0e72fb3fc85340971f85c8cd26c4bc31456716e528d4373b3d9d2ab2ebc60a
5
5
  SHA512:
6
- metadata.gz: 04d0ee7602ec8ce503c8ebb9a5fb439efdc8825038a339eed233121e4df7bf232a5ae168bd5e3e4af5a566c7fde27de83fd2accf7ecf841a58b4b4d8a2ad366c
7
- data.tar.gz: c39ce4f0873a88375151e0e99559e65914fd4c168dd347691aabffb7778c3bf23743347a6802cc1e02056635866c22f4424a6609c0c961b176fe6b618ca41d74
6
+ metadata.gz: 8498585b5bd8c51fcbd141b3232af192f7b7da70def6938fda9e8f7abc5cef6064febffde159ff1c137c48b01862bc30d32aa345db95f841b9352da039a9a555
7
+ data.tar.gz: 62a419a5b3a46d64f66125f36ab7a647d34fd62c663ffa55fe6cb42fae5ddd52bebb898acac1897b3bc64f8d35a65034ea1de0344a36ae7e8305e2e69819866f
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ruby-lsp-rake
2
2
 
3
- A Ruby LSP addon that adds extra editor functionality for Rake.
3
+ A Ruby LSP addon that adds extra editor functionality for [Rake](https://github.com/ruby/rake).
4
4
 
5
5
  ## Installation
6
6
 
@@ -3,7 +3,7 @@
3
3
  module Ruby
4
4
  module Lsp
5
5
  module Rake
6
- VERSION = "0.1.0"
6
+ VERSION = "0.1.1"
7
7
  end
8
8
  end
9
9
  end
@@ -9,10 +9,19 @@ module RubyLsp
9
9
  @response_builder = response_builder
10
10
  @node_context = node_context
11
11
  dispatcher.register(self, :on_string_node_enter)
12
+ dispatcher.register(self, :on_symbol_node_enter)
12
13
  @index = index
13
14
  end
14
15
 
15
- def on_string_node_enter(node) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
16
+ def on_string_node_enter(node)
17
+ handle_prerequisite(node)
18
+ end
19
+
20
+ def on_symbol_node_enter(node)
21
+ handle_prerequisite(node)
22
+ end
23
+
24
+ def handle_prerequisite(node) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
16
25
  call_node_name = @node_context.call_node&.name
17
26
  return unless call_node_name == :task
18
27
 
@@ -34,7 +34,7 @@ module RubyLsp
34
34
  @listener.add_method(
35
35
  "task_#{name}",
36
36
  location,
37
- nil
37
+ []
38
38
  )
39
39
  end
40
40
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-lsp-rake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Koji NAKAMURA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-30 00:00:00.000000000 Z
11
+ date: 2024-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-lsp
@@ -36,7 +36,6 @@ files:
36
36
  - README.md
37
37
  - Rakefile
38
38
  - img/dependency_task_links_on_hover.png
39
- - lib/Rakefile
40
39
  - lib/ruby/lsp/rake.rb
41
40
  - lib/ruby/lsp/rake/version.rb
42
41
  - lib/ruby_lsp/ruby_lsp_rake/addon.rb
data/lib/Rakefile DELETED
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Following are task definitions for tests
4
-
5
- task default: %w[test]
6
-
7
- task :test do
8
- ruby "test/unittest.rb"
9
- end