solargraph 0.15.1 → 0.15.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4969bf107c351b4771cac3f9f8616dd350ad3a88
4
- data.tar.gz: ede2a7ac44868dbbd7653ea654a04097a1174ae9
3
+ metadata.gz: 2bdbd6d7185bb73e6b6514f5e544c78319643d3e
4
+ data.tar.gz: 2d11a5b505c083281d39315b49c4dc984c8ece8f
5
5
  SHA512:
6
- metadata.gz: a7e9dffba813adccd376e5394fb1fe046cb7a55f804d12c0f82f5c6f848a63ed7e9fbe4c46cb91e8dec94562a377de18c88a61afff96535d04167c7b7718bc07
7
- data.tar.gz: ee40fd976410c59e4d60831d4e337605bc41c741fb1e8ceeb007c2d68582bc45ed8a98be9c4e9fe904d81d5bb3da37bafbf58eab6ad0f93bcee1405a081ada59
6
+ metadata.gz: c20907913080fd29e47bd66218f4b44736985424a128e13e49ea595154ff6b4673a103fa29a97629fb0fb7f6081873d0f1a53737c377a861c76efcdfe527d2dc
7
+ data.tar.gz: 37091d44a903d2c0d9edf994e90b771465bfc5c8a464bb310c73f5cfa66231d274c6ccaf5959ac8fbd38cb0164d8fecf83bad8ec8bf7474a619dcf5d48951aa7
@@ -1,6 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'parser/current'
3
3
  require 'thread'
4
+ require 'set'
4
5
 
5
6
  module Solargraph
6
7
  class ApiMap
@@ -78,7 +79,7 @@ module Solargraph
78
79
  # @return [Solargraph::YardMap]
79
80
  def yard_map
80
81
  refresh
81
- if @yard_map.nil? || @yard_map.required != required
82
+ if @yard_map.nil? || @yard_map.required.to_set != required.to_set
82
83
  @yard_map = Solargraph::YardMap.new(required: required, workspace: workspace)
83
84
  end
84
85
  @yard_map
@@ -1,3 +1,3 @@
1
1
  module Solargraph
2
- VERSION = '0.15.1'
2
+ VERSION = '0.15.2'
3
3
  end
@@ -5,6 +5,7 @@ module Solargraph
5
5
  autoload :Cache, 'solargraph/yard_map/cache'
6
6
  autoload :CoreDocs, 'solargraph/yard_map/core_docs'
7
7
 
8
+ CoreDocs.require_minimum
8
9
  @@stdlib_yardoc = CoreDocs.yard_stdlib_file
9
10
  @@stdlib_namespaces = []
10
11
  YARD::Registry.load! @@stdlib_yardoc
@@ -18,7 +19,8 @@ module Solargraph
18
19
  def initialize required: [], workspace: nil
19
20
  @workspace = workspace
20
21
  used = []
21
- @required = required
22
+ # HACK: YardMap needs its own copy of this array
23
+ @required = required.clone
22
24
  @namespace_yardocs = {}
23
25
  @required.each do |r|
24
26
  if workspace.nil? or !File.exist?(File.join workspace, 'lib', "#{r}.rb")
@@ -15,8 +15,10 @@ module Solargraph
15
15
  @cache_dir ||= File.join(Dir.home, '.solargraph', 'cache')
16
16
  end
17
17
 
18
- # Solargraph installs Ruby 2.2.2 documentation to ensure minimum functionality.
18
+ # Ensure installation of minimum documentation.
19
+ #
19
20
  def require_minimum
21
+ return unless best_match.nil?
20
22
  FileUtils.mkdir_p cache_dir
21
23
  version_dir = File.join(cache_dir, '2.2.2')
22
24
  unless File.exist?(version_dir)
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.15.1
4
+ version: 0.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fred Snyder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-04 00:00:00.000000000 Z
11
+ date: 2017-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser