solargraph 0.19.0 → 0.19.1
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/version.rb +1 -1
- data/lib/solargraph/yard_map.rb +8 -1
- data/lib/yard-solargraph.rb +0 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 641234ab31a7a58d48d4f9ac92b50b7b7a648a48
|
4
|
+
data.tar.gz: 964eb2b062f2811e3365c3de84320996230f5ee3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6042457038382e3ee2cf52af10477b25fe4c43c8dd45925aaf21bbc1c762bdfa2e39aeaf02ef7acdedf41ee5134992f887c1e63ff2a0437d10a7f4a6e11bc2e8
|
7
|
+
data.tar.gz: ff40baf86a70fb9e5b6359ac175610123c307f16011d8d5a2f694df9ea49e16b4a82c40cb0cec01ca3b9275399b91a9f815cbf91ecf8d5f89b05f8caec8ad68a
|
data/lib/solargraph/version.rb
CHANGED
data/lib/solargraph/yard_map.rb
CHANGED
@@ -14,7 +14,10 @@ module Solargraph
|
|
14
14
|
@@stdlib_namespaces.push ns.path
|
15
15
|
end
|
16
16
|
|
17
|
+
# @return [Solargraph::Workspace]
|
17
18
|
attr_reader :workspace
|
19
|
+
|
20
|
+
# @return [Array<String>]
|
18
21
|
attr_reader :required
|
19
22
|
|
20
23
|
def initialize required: [], workspace: nil
|
@@ -353,9 +356,13 @@ module Solargraph
|
|
353
356
|
def process_requires
|
354
357
|
tried = []
|
355
358
|
required.each do |r|
|
359
|
+
# @todo Ignoring requires in the workspace's lib directory handles a lot of common cases.
|
360
|
+
next if !workspace.nil? and File.exist?(File.join(workspace.directory, "lib", "#{r}.rb"))
|
356
361
|
begin
|
357
362
|
name = r.split('/').first
|
358
363
|
next if name.nil?
|
364
|
+
# @todo Ignoring requires that match the workspace's gem name handles a few more.
|
365
|
+
next if !workspace.nil? and File.exist?(File.join(workspace.directory, "#{name}.gemspec"))
|
359
366
|
spec = Gem::Specification.find_by_name(name)
|
360
367
|
next if spec.nil?
|
361
368
|
ver = spec.version.to_s
|
@@ -365,7 +372,7 @@ module Solargraph
|
|
365
372
|
@gem_paths[spec.name] = spec.full_gem_path
|
366
373
|
yardocs.unshift yd unless yd.nil? or yardocs.include?(yd)
|
367
374
|
rescue Gem::LoadError => e
|
368
|
-
|
375
|
+
STDERR.puts "Required path #{r} could not be found in the workspace or gems"
|
369
376
|
end
|
370
377
|
end
|
371
378
|
end
|
data/lib/yard-solargraph.rb
CHANGED