solargraph 0.32.4 → 0.32.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbd602d256eb74600d1c4d980fd4fada6c6d87cf1da54aafb4220174608c1385
4
- data.tar.gz: ef0503dd777418feb68d7aa778bbbe57611405009006dfc5f3c65cfdc67e5e3a
3
+ metadata.gz: 8c99435136ad89666edbb8b132cd5715509cf0c7c365f1a0d3613db1579a718b
4
+ data.tar.gz: afc550f621504729249a88461a719d28440a5dc8dcc226a1bb99f87d6ae65b8d
5
5
  SHA512:
6
- metadata.gz: 4aaa0053dbde472621edfb160ba1d3f1d511211341cd4165631e73b9c84ffe2b00647fdfb83f471cd8684f34c5ec582edc055143de9cba94f4dba332d8ba4615
7
- data.tar.gz: a2180bbfcf9a8c3494c1f89d13aec8d3c01d0d652f49360d1de9bef47fe9d26827e768305dc630b9c95d31b18d735a859430c89c4d358c942dbe7ffe8744e97a
6
+ metadata.gz: a1396aec7a3ca2fb02a71d06a1c994f89c361c38cecdea08fde2d6cba02d73a824e1feca0d1ad886c59158fb52c4022d82e1e410847dbad85784e299e23c3b95
7
+ data.tar.gz: a6f1252139db4157a3a2fdb2a4322da06de9e16912cbd37c8450d51a921341071223fc10f24cf0e2d3798ba08e73c41dade0ccad20a704360ee2851640fc1e81
@@ -34,6 +34,10 @@ module Solargraph
34
34
  Logging.logger.info "Completion ignored invalid offset: #{params['textDocument']['uri']}, line #{line}, character #{col}"
35
35
  set_result empty_result
36
36
  end
37
+ rescue FileNotFoundError => e
38
+ Logging.logger.warn "[#{e.class}] #{e.message}"
39
+ Logging.logger.warn e.backtrace
40
+ set_result empty_result
37
41
  end
38
42
 
39
43
  # @param incomplete [Boolean]
@@ -1,31 +1,41 @@
1
1
  require 'uri'
2
2
  require 'htmlentities'
3
3
 
4
- module Solargraph::LanguageServer::Message::TextDocument
5
- class Hover < Base
6
- def process
7
- line = params['position']['line']
8
- col = params['position']['character']
9
- contents = []
10
- suggestions = host.definitions_at(params['textDocument']['uri'], line, col)
11
- last_link = nil
12
- suggestions.each do |pin|
13
- parts = []
14
- this_link = pin.link_documentation
15
- if !this_link.nil? and this_link != last_link
16
- parts.push this_link
4
+ module Solargraph
5
+ module LanguageServer
6
+ module Message
7
+ module TextDocument
8
+ class Hover < Base
9
+ def process
10
+ line = params['position']['line']
11
+ col = params['position']['character']
12
+ contents = []
13
+ suggestions = host.definitions_at(params['textDocument']['uri'], line, col)
14
+ last_link = nil
15
+ suggestions.each do |pin|
16
+ parts = []
17
+ this_link = pin.link_documentation
18
+ if !this_link.nil? and this_link != last_link
19
+ parts.push this_link
20
+ end
21
+ parts.push HTMLEntities.new.encode(pin.detail) unless pin.kind == Solargraph::Pin::NAMESPACE or pin.detail.nil?
22
+ parts.push pin.documentation unless pin.documentation.nil? or pin.documentation.empty?
23
+ contents.push parts.join("\n\n") unless parts.empty?
24
+ last_link = this_link unless this_link.nil?
25
+ end
26
+ set_result(
27
+ contents: {
28
+ kind: 'markdown',
29
+ value: contents.join("\n\n")
30
+ }
31
+ )
32
+ rescue FileNotFoundError => e
33
+ Logging.logger.warn "[#{e.class}] #{e.message}"
34
+ Logging.logger.warn e.backtrace
35
+ set_result nil
36
+ end
17
37
  end
18
- parts.push HTMLEntities.new.encode(pin.detail) unless pin.kind == Solargraph::Pin::NAMESPACE or pin.detail.nil?
19
- parts.push pin.documentation unless pin.documentation.nil? or pin.documentation.empty?
20
- contents.push parts.join("\n\n") unless parts.empty?
21
- last_link = this_link unless this_link.nil?
22
38
  end
23
- set_result(
24
- contents: {
25
- kind: 'markdown',
26
- value: contents.join("\n\n")
27
- }
28
- )
29
39
  end
30
40
  end
31
41
  end
@@ -1,3 +1,3 @@
1
1
  module Solargraph
2
- VERSION = '0.32.4'
2
+ VERSION = '0.32.5'
3
3
  end
@@ -36,7 +36,7 @@
36
36
  Parser Target Version: <%= Solargraph::Source.parser.version %>
37
37
  </li>
38
38
  <li>
39
- Using Bundler: <%= config['useBundler'] %>
39
+ Using Bundler: <%= ENV.key?('BUNDLE_GEMFILE') %>
40
40
  </li>
41
41
  </ul>
42
42
  <h2>
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.32.4
4
+ version: 0.32.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: 2019-05-28 00:00:00.000000000 Z
11
+ date: 2019-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backport