solargraph 0.19.0 → 0.19.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
  SHA1:
3
- metadata.gz: 7584a4d20d5562279e2e86887fe56a448776ba91
4
- data.tar.gz: bd353cd7bf5140f80f0a53155bfc03cb0dc1d73b
3
+ metadata.gz: 641234ab31a7a58d48d4f9ac92b50b7b7a648a48
4
+ data.tar.gz: 964eb2b062f2811e3365c3de84320996230f5ee3
5
5
  SHA512:
6
- metadata.gz: eb78c3e91842800f4646fc5c9f96371914226c17a6b3350b1bf4f5ec2e4e9b00801fa39034b52c859ee63613abef3d453aa87d0a18235e6bcb1093d62573de1a
7
- data.tar.gz: 4cef990fe1e4935f478cac2a4b24067ca668f2c83de44ffb9d09e5b3faf46179ef4c2ec9fccd88681f07a4921fb58b6d2dba1ce06fb500e04ac9ab77522e71ee
6
+ metadata.gz: 6042457038382e3ee2cf52af10477b25fe4c43c8dd45925aaf21bbc1c762bdfa2e39aeaf02ef7acdedf41ee5134992f887c1e63ff2a0437d10a7f4a6e11bc2e8
7
+ data.tar.gz: ff40baf86a70fb9e5b6359ac175610123c307f16011d8d5a2f694df9ea49e16b4a82c40cb0cec01ca3b9275399b91a9f815cbf91ecf8d5f89b05f8caec8ad68a
@@ -1,3 +1,3 @@
1
1
  module Solargraph
2
- VERSION = '0.19.0'
2
+ VERSION = '0.19.1'
3
3
  end
@@ -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
- # STDERR.puts "LoadError on #{r}"
375
+ STDERR.puts "Required path #{r} could not be found in the workspace or gems"
369
376
  end
370
377
  end
371
378
  end
@@ -6,4 +6,3 @@ require 'yard/templates/helpers/html_helper'
6
6
  YARD::Tags::Library.define_tag("Type", :type, :with_types_and_name)
7
7
  # Define a @yieldself tag for documenting block contexts
8
8
  YARD::Tags::Library.define_tag("Yieldself", :yieldself, :with_types)
9
- Solargraph
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solargraph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.19.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fred Snyder