solargraph 0.28.0 → 0.28.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 68af7d3f5b6fca0126629ca8ed363004b4c12d2d8ef50a0fc01a571c6459d4cc
4
- data.tar.gz: 366bbc31b39be7794af1de27a6d63ee88771b22134622dbc6c4ffb146a227712
3
+ metadata.gz: d39e4aebe3e312f765cc5e4d00e7d1f5322732f680ec12f5c4e84fb96c83d6a9
4
+ data.tar.gz: 010fb32febe1de5ade25857c023efd821b5ae2db3d64ec7941d1f987b24720b1
5
5
  SHA512:
6
- metadata.gz: 6ffc365f1e42f0a9d17aa40f4721d5f753e94e6b24c0b8c72f43abfc583e740b6e289d7d1ec88b7388c837406e60d2cd1f0376c8c12f477eb3a7ea4de28d579d
7
- data.tar.gz: d999e3ef14ca1ee00beec4c5eac3906f4c86faccfa9742e1451e85aada0a969d818393b22dbe2be887a9d0346f0ca26810243a49cb6b3b694cead4e81b91cc5c
6
+ metadata.gz: ce1e56113f3c61ac8af9fc3d68edb676f23655ea2cbbab4f612088bff67a29abfdee671bd4644bb31864b52e3b8f28b67dc8c1009c998525eb231239517ffed6
7
+ data.tar.gz: e4d80e8e3a2d7d6bbc040482ad7a75796dffe98006c67ba59748eb2c3fd70ba5876ffff1f886d92c13404f5b5a9f49e2875d671ebea166bd824f0de48afb65c7
@@ -5,24 +5,7 @@ module Solargraph
5
5
  include YardMixin
6
6
 
7
7
  def initialize code_object, location
8
- superclass = nil
9
- # @todo This method of superclass detection is a bit of a hack. If
10
- # the superclass is a Proxy, it is assumed to be undefined in its
11
- # yardoc and converted to a fully qualified namespace.
12
- # if code_object.is_a?(YARD::CodeObjects::ClassObject) && code_object.superclass
13
- # if code_object.superclass.is_a?(YARD::CodeObjects::Proxy)
14
- # superclass = "::#{code_object.superclass}"
15
- # else
16
- # superclass = code_object.superclass.to_s
17
- # end
18
- # end
19
8
  super(location, code_object.namespace.to_s, code_object.name.to_s, comments_from(code_object), namespace_type(code_object), code_object.visibility)
20
- # code_object.class_mixins.each do |m|
21
- # extend_references.push Pin::Reference.new(location, path, m.path)
22
- # end
23
- # code_object.instance_mixins.each do |m|
24
- # include_references.push Pin::Reference.new(location, path, m.path)
25
- # end
26
9
  end
27
10
 
28
11
  private
@@ -1,3 +1,3 @@
1
1
  module Solargraph
2
- VERSION = '0.28.0'
2
+ VERSION = '0.28.1'
3
3
  end
@@ -121,6 +121,15 @@ module Solargraph
121
121
  location = object_location(code_object)
122
122
  if code_object.is_a?(YARD::CodeObjects::NamespaceObject)
123
123
  result.push Solargraph::Pin::YardPin::Namespace.new(code_object, location)
124
+ if code_object.is_a?(YARD::CodeObjects::ClassObject) and !code_object.superclass.nil?
125
+ result.push Solargraph::Pin::Reference::Superclass.new(location, code_object.path, code_object.superclass.path)
126
+ end
127
+ code_object.class_mixins.each do |m|
128
+ result.push Solargraph::Pin::Reference::Extend.new(location, code_object.path, m.path)
129
+ end
130
+ code_object.instance_mixins.each do |m|
131
+ result.push Solargraph::Pin::Reference::Include.new(location, code_object.path, m.path)
132
+ end
124
133
  elsif code_object.is_a?(YARD::CodeObjects::MethodObject)
125
134
  if code_object.name == :initialize && code_object.scope == :instance
126
135
  # @todo Check the visibility of <Class>.new
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.28.0
4
+ version: 0.28.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fred Snyder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-17 00:00:00.000000000 Z
11
+ date: 2018-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser