ruby-lsp-rake 0.1.3 → 0.1.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf8328d935d374570d5da89ecdf66a791f731e5fefb9a10e2c8338c5f22b6fa3
|
4
|
+
data.tar.gz: 86cdb9a4c43c22a7027f284b8e32b0f18c62daa0b9bb8a7f2648b741a7cd0ae6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ea090a9fd5e15947adedc3a70c0baab2847e7857946a91cd25cac24dad3f295a0d637dee8bde10bfd58e4c1a67c9cfa2ddc8f1fdaddc749604651e2178824e4
|
7
|
+
data.tar.gz: 7196a513486c450f53877cca1de1980793aedaa34196f23527dbd999138d634e1ae79bafc82607cb0cc667caa7af228527d79597034653ecb1dca928e1a0ab20
|
Binary file
|
@@ -10,7 +10,7 @@ module RubyLsp
|
|
10
10
|
class Addon < ::RubyLsp::Addon # rubocop:disable Style/Documentation
|
11
11
|
def activate(global_state, _message_queue)
|
12
12
|
@index = global_state.index
|
13
|
-
@index.configuration.apply_config({ "included_patterns" => ["**/Rakefile"] })
|
13
|
+
@index.configuration.apply_config({ "included_patterns" => ["**/Rakefile", "lib/../Rakefile"] })
|
14
14
|
end
|
15
15
|
|
16
16
|
def deactivate; end
|
@@ -32,7 +32,34 @@ module RubyLsp
|
|
32
32
|
node.value
|
33
33
|
end
|
34
34
|
|
35
|
-
|
35
|
+
arg = @node_context.call_node.arguments&.arguments&.first
|
36
|
+
case arg
|
37
|
+
when Prism::KeywordHashNode
|
38
|
+
kh = arg.child_nodes.first
|
39
|
+
case kh
|
40
|
+
when Prism::AssocNode
|
41
|
+
v = kh.value
|
42
|
+
case v
|
43
|
+
when Prism::StringNode
|
44
|
+
return unless name == v.content
|
45
|
+
when Prism::SymbolNode
|
46
|
+
return unless name == v.value
|
47
|
+
when Prism::ArrayNode
|
48
|
+
return unless v.elements.find do |node|
|
49
|
+
name == case node
|
50
|
+
when Prism::StringNode
|
51
|
+
node.content
|
52
|
+
when Prism::SymbolNode
|
53
|
+
node.value
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
else
|
59
|
+
return
|
60
|
+
end
|
61
|
+
|
62
|
+
task_name = "task:#{name}"
|
36
63
|
return unless @index.indexed? task_name
|
37
64
|
|
38
65
|
# refer to: https://github.com/Shopify/ruby-lsp/blob/896617a0c5f7a22ebe12912a481bf1b59db14c12/lib/ruby_lsp/requests/support/common.rb#L83
|
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.
|
4
|
+
version: 0.1.4
|
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-12-
|
11
|
+
date: 2024-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-lsp
|