solargraph 0.38.4 → 0.38.5
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/lib/solargraph/api_map.rb +1 -7
- data/lib/solargraph/language_server/message/text_document/formatting.rb +2 -1
- data/lib/solargraph/language_server/transport/adapter.rb +0 -3
- data/lib/solargraph/pin/common.rb +1 -1
- data/lib/solargraph/source/chain/constant.rb +3 -1
- data/lib/solargraph/source_map/node_processor/base.rb +0 -10
- data/lib/solargraph/source_map/node_processor/def_node.rb +0 -1
- data/lib/solargraph/version.rb +1 -1
- data/lib/solargraph/yard_map.rb +3 -5
- 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: 5f5704121cc7b82b0999302bb964ff7d2a0973e724fcbff4f0c2be6b3d800848
|
4
|
+
data.tar.gz: b7341f99fa186eebc3803955912c34a841b0be13b77e4725a9f16f5af5b009d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9abc64fe7dff520bf58f3cb526013c9d2250adbae6ecd7eca22294d7eba4365c548bcd191c08974275186d13cbac421c9cc32cc53ddbe7fdedc549b00eacddd7
|
7
|
+
data.tar.gz: db55ce70f037c55a3da7b5f6b060f2bf51d996e78aa51c701e987de9eb1227dc30a99d06248ee88d1f318632d050e9a07cca4435bf8e91f60a21c630a6f27a31
|
data/lib/solargraph/api_map.rb
CHANGED
@@ -222,10 +222,6 @@ module Solargraph
|
|
222
222
|
visibility = [:public]
|
223
223
|
visibility.push :private if fqns == context
|
224
224
|
result.concat inner_get_constants(fqns, visibility, skip)
|
225
|
-
fqns = qualify(namespace, '')
|
226
|
-
visibility = [:public]
|
227
|
-
visibility.push :private if fqns == context
|
228
|
-
result.concat inner_get_constants(fqns, visibility, skip)
|
229
225
|
end
|
230
226
|
cache.set_constants(namespace, contexts, result)
|
231
227
|
result
|
@@ -516,9 +512,7 @@ module Solargraph
|
|
516
512
|
fqsup = qualify(sup)
|
517
513
|
cls = qualify(sub)
|
518
514
|
until fqsup.nil? || cls.nil?
|
519
|
-
|
520
|
-
# Object. The quick and dirty fix is to hardcode it here.
|
521
|
-
return true if fqsup == 'Object' || cls == fqsup
|
515
|
+
return true if cls == fqsup
|
522
516
|
cls = qualify(store.get_superclass(cls), cls)
|
523
517
|
end
|
524
518
|
false
|
@@ -14,7 +14,8 @@ module Solargraph
|
|
14
14
|
filename = uri_to_file(params['textDocument']['uri'])
|
15
15
|
# Make the temp file in the original file's directory so RuboCop
|
16
16
|
# detects the correct configuration
|
17
|
-
|
17
|
+
# the .rb extension is needed for ruby file without extension, else rubocop won't format
|
18
|
+
tempfile = File.join(File.dirname(filename), "_tmp_#{SecureRandom.hex(8)}_#{File.basename(filename)}.rb")
|
18
19
|
original = host.read_text(params['textDocument']['uri'])
|
19
20
|
File.write tempfile, original
|
20
21
|
begin
|
@@ -10,7 +10,9 @@ module Solargraph
|
|
10
10
|
|
11
11
|
def resolve api_map, name_pin, locals
|
12
12
|
return [Pin::ROOT_PIN] if word.empty?
|
13
|
+
rooted = false
|
13
14
|
if word.start_with?('::')
|
15
|
+
rooted = true
|
14
16
|
bottom = ''
|
15
17
|
gates = [word[2..-1].split('::')[0..-2].join('::')]
|
16
18
|
else
|
@@ -18,7 +20,7 @@ module Solargraph
|
|
18
20
|
gates = crawl_gates(name_pin)
|
19
21
|
end
|
20
22
|
result = api_map.get_constants(bottom, *gates)
|
21
|
-
result.select{ |p| p.path == word || "::#{p.path}" == word || p.path.end_with?("::#{word}") }
|
23
|
+
result.select{ |p| rooted ? p.path == word[2..-1] : p.path == word || "::#{p.path}" == word || p.path.end_with?("::#{word}") }
|
22
24
|
end
|
23
25
|
|
24
26
|
private
|
@@ -65,16 +65,6 @@ module Solargraph
|
|
65
65
|
pins.select{|pin| pin.is_a?(Pin::Closure) && pin.path && !pin.path.empty? && pin.location.range.contain?(position)}.last
|
66
66
|
end
|
67
67
|
|
68
|
-
# @todo Candidate for deprecation
|
69
|
-
def block_pin position
|
70
|
-
pins.select{|pin| pin.is_a?(Pin::Closure) && pin.location.range.contain?(position)}.last
|
71
|
-
end
|
72
|
-
|
73
|
-
# @todo Candidate for deprecation
|
74
|
-
def closure_pin position
|
75
|
-
pins.select{|pin| pin.is_a?(Pin::Closure) && pin.location.range.contain?(position)}.last
|
76
|
-
end
|
77
|
-
|
78
68
|
private
|
79
69
|
|
80
70
|
def method_args
|
data/lib/solargraph/version.rb
CHANGED
data/lib/solargraph/yard_map.rb
CHANGED
@@ -258,11 +258,9 @@ module Solargraph
|
|
258
258
|
result = []
|
259
259
|
(spec.dependencies - spec.development_dependencies).each do |dep|
|
260
260
|
begin
|
261
|
-
if @source_gems.include?(dep.name)
|
262
|
-
next
|
263
|
-
end
|
261
|
+
next if @source_gems.include?(dep.name) || @gem_paths.key?(dep.name)
|
264
262
|
depspec = Gem::Specification.find_by_name(dep.name)
|
265
|
-
next if depspec.nil?
|
263
|
+
next if depspec.nil?
|
266
264
|
@gem_paths[depspec.name] = depspec.full_gem_path
|
267
265
|
gy = yardoc_file_for_spec(depspec)
|
268
266
|
if gy.nil?
|
@@ -315,7 +313,7 @@ module Solargraph
|
|
315
313
|
spec = Gem::Specification.find_by_path(path) || Gem::Specification.find_by_name(path.split('/').first)
|
316
314
|
# Avoid loading the spec again if it's going to be skipped anyway
|
317
315
|
return spec if @source_gems.include?(spec.name)
|
318
|
-
# Avoid loading the spec again if it's
|
316
|
+
# Avoid loading the spec again if it's already the correct version
|
319
317
|
if @gemset[spec.name] && @gemset[spec.name] != spec.version
|
320
318
|
begin
|
321
319
|
return Gem::Specification.find_by_name(spec.name, "= #{@gemset[spec.name]}")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solargraph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.38.
|
4
|
+
version: 0.38.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fred Snyder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backport
|