solargraph 0.35.1 → 0.35.2

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
  SHA256:
3
- metadata.gz: e6e65af0d45e5656d2bc17c0670ef5e308e3fb6f64be8db0ec1891e2203a81d6
4
- data.tar.gz: 47e21df5e48d43ed40281d37ae3c50ddf6aaf643dff49da07b849d917f3fcf16
3
+ metadata.gz: d8036332dcdfd3db5e87daff4f720ec35f7f6872b9f8830e7bf1393dd0c471ee
4
+ data.tar.gz: 82e22e32d17d27fb3500e8366e1aeac95afa199c179f02b29f3367f3185b7cf7
5
5
  SHA512:
6
- metadata.gz: 39b7b5fb39ce59ccf93c62775e3f685f0e71409aa791f76bf61a44202cb21d1501452961d267f07b40fb4dbbba8a82a2ebc349cea6857dc9e3b9796af9c8e510
7
- data.tar.gz: 584f2110a4faf9cd98edd37bed4167b59f119b66168786d1faa0ad774d3180d66a0408e195d4a669f62cbd9252db75d0aa442fc6e4640f403eccd227b6320062
6
+ metadata.gz: bdda954fdbb8e7e071f96f004027646387529a3df7af0706ea7f5a0839ac32436582f9c57fb94c3ff5f1a962cce7cbe7140dc40b278a4d715e6ab4a59eb2f02c
7
+ data.tar.gz: 891e88524fb9d45190b326a29dabb36eff73c0ea1e9993a58b0cc443e7ee0c7b0265af9a74fe3beb3ca75e8c1ce833684ebbf6616e26507d94c8e495640b8f5f
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
- --color
2
- --require spec_helper
1
+ --color
2
+ --require spec_helper
@@ -11,6 +11,14 @@ module Solargraph
11
11
  # is true, notify the client when the gem is up to date.
12
12
  #
13
13
  class CheckGemVersion < Base
14
+ def self.fetcher
15
+ @fetcher ||= Gem::SpecFetcher.new
16
+ end
17
+
18
+ def self.fetcher= obj
19
+ @fetcher = obj
20
+ end
21
+
14
22
  GEM_ZERO = Gem::Version.new('0.0.0')
15
23
 
16
24
  def initialize host, request, current: Gem::Version.new(Solargraph::VERSION), available: nil
@@ -58,8 +66,7 @@ module Solargraph
58
66
  @fetched = true
59
67
  begin
60
68
  @available ||= begin
61
- fetcher = Gem::SpecFetcher.new
62
- tuple = fetcher.search_for_dependency(Gem::Dependency.new('solargraph')).flatten.first
69
+ tuple = CheckGemVersion.fetcher.search_for_dependency(Gem::Dependency.new('solargraph')).flatten.first
63
70
  if tuple.nil?
64
71
  @error = 'An error occurred fetching the gem data'
65
72
  GEM_ZERO
@@ -25,13 +25,6 @@ module Solargraph
25
25
  def nearly? other
26
26
  super && binder == other.binder
27
27
  end
28
-
29
- def try_merge! pin
30
- return false unless super
31
- @assignment = pin.assignment
32
- @return_type = pin.return_type
33
- true
34
- end
35
28
  end
36
29
  end
37
30
  end
@@ -69,10 +69,8 @@ module Solargraph
69
69
  # @return [ComplexType]
70
70
  def infer api_map, name_pin, locals
71
71
  rebind_block name_pin, api_map, locals
72
- type = ComplexType::UNDEFINED
73
72
  pins = define(api_map, name_pin, locals)
74
- type = infer_first_defined(pins, links.last.last_context, api_map)
75
- type
73
+ infer_first_defined(pins, links.last.last_context, api_map)
76
74
  end
77
75
 
78
76
  # @return [Boolean]
@@ -5,7 +5,7 @@ module Solargraph
5
5
  class Chain
6
6
  class BlockVariable < Link
7
7
  def resolve api_map, name_pin, locals
8
- Pin::ProxyType.anonymous('Proc')
8
+ [Pin::ProxyType.anonymous(ComplexType.try_parse('Proc'))]
9
9
  end
10
10
  end
11
11
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Solargraph
4
- VERSION = '0.35.1'
4
+ VERSION = '0.35.2'
5
5
  end
data/solargraph.gemspec CHANGED
@@ -34,4 +34,5 @@ Gem::Specification.new do |s|
34
34
  s.add_development_dependency 'pry', '~> 0.11.3'
35
35
  s.add_development_dependency 'rspec', '~> 3.5', '>= 3.5.0'
36
36
  s.add_development_dependency 'simplecov', '~> 0.14'
37
+ s.add_development_dependency 'webmock'
37
38
  end
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.35.1
4
+ version: 0.35.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: 2019-07-29 00:00:00.000000000 Z
11
+ date: 2019-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backport
@@ -230,6 +230,20 @@ dependencies:
230
230
  - - "~>"
231
231
  - !ruby/object:Gem::Version
232
232
  version: '0.14'
233
+ - !ruby/object:Gem::Dependency
234
+ name: webmock
235
+ requirement: !ruby/object:Gem::Requirement
236
+ requirements:
237
+ - - ">="
238
+ - !ruby/object:Gem::Version
239
+ version: '0'
240
+ type: :development
241
+ prerelease: false
242
+ version_requirements: !ruby/object:Gem::Requirement
243
+ requirements:
244
+ - - ">="
245
+ - !ruby/object:Gem::Version
246
+ version: '0'
233
247
  description: IDE tools for code completion, inline documentation, and static analysis
234
248
  email: admin@castwide.com
235
249
  executables: