solargraph 0.29.0 → 0.29.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
  SHA256:
3
- metadata.gz: c715438f197d1c368427a61e4b745993ce0cca12b3db96d647f922be67c39e90
4
- data.tar.gz: 1b82249c56fdb3014c69ec43e12cdac30b9f029cffb8d09896c4e19da7e24a81
3
+ metadata.gz: f4f5e9883da2bf043ec933e73742ac8c6978909a921363752cf5f2d169cde3b2
4
+ data.tar.gz: 04b1c7dd1ad9b07733203a9d9b4cdb055ddae3b50dc1cb6ef0866ea6de351951
5
5
  SHA512:
6
- metadata.gz: d9b8ed3db0337ef27ff07e1bb28c6bdac6e37bee655333b8465366a0ed3bf01c614dca4dcbaed4ddb1f535abd32639bd53553b3ab044fcb0b4311aa73778d732
7
- data.tar.gz: 83f8266b77ff13d9750a889f04bbda44b15c39d2a2dbe0dca975f5a5af1835d3d78ee06e806906b65d7fb66dba08a7d09756df0ecbc7e69a9bc13fab29340e47
6
+ metadata.gz: ba354000fecb790560b0daeb734ae82d83849a6f07b06e28b623c6db5138124606df8f1e101ad8d2ce8245f013d4690d1421b89c10a45cc279e815cc9eeb5e3d
7
+ data.tar.gz: 4619ea14518c56476503c6f19cb709cb2ad6ee8b5eb9071f471e8a37b589abddd8addcf2b1285099841a621375041e66aa7662cf798564dc9fcb644f11068042
@@ -3,15 +3,13 @@ module Solargraph
3
3
  module NodeProcessor
4
4
  class AliasNode < Base
5
5
  def process
6
- pin = pins.select{|p| p.name == node.children[1].children[0].to_s && p.namespace == region.namespace && p.scope == region.scope}.first
6
+ pin = pins.select{|p| [Solargraph::Pin::Method, Solargraph::Pin::Attribute].include?(p.class) && p.name == node.children[1].children[0].to_s && p.namespace == region.namespace && p.scope == region.scope}.first
7
7
  if pin.nil?
8
8
  pins.push Solargraph::Pin::MethodAlias.new(get_node_location(node), region.namespace, node.children[0].children[0].to_s, region.scope, node.children[1].children[0].to_s)
9
- else
10
- if pin.is_a?(Solargraph::Pin::Method)
11
- pins.push Solargraph::Pin::Method.new(get_node_location(node), pin.namespace, node.children[0].children[0].to_s, comments_for(node) || pin.comments, pin.scope, pin.visibility, pin.parameters, pin.node)
12
- elsif pin.is_a?(Solargraph::Pin::Attribute)
13
- pins.push Solargraph::Pin::Attribute.new(get_node_location(node), pin.namespace, node.children[0].children[0].to_s, comments_for(node) || pin.comments, pin.access, pin.scope, pin.visibility)
14
- end
9
+ elsif pin.is_a?(Solargraph::Pin::Method)
10
+ pins.push Solargraph::Pin::Method.new(get_node_location(node), pin.namespace, node.children[0].children[0].to_s, comments_for(node) || pin.comments, pin.scope, pin.visibility, pin.parameters, pin.node)
11
+ elsif pin.is_a?(Solargraph::Pin::Attribute)
12
+ pins.push Solargraph::Pin::Attribute.new(get_node_location(node), pin.namespace, node.children[0].children[0].to_s, comments_for(node) || pin.comments, pin.access, pin.scope, pin.visibility)
15
13
  end
16
14
  process_children
17
15
  end
@@ -119,7 +119,7 @@ module Solargraph
119
119
  end
120
120
 
121
121
  def process_alias_method
122
- pin = pins.select{|p| p.name == node.children[3].children[0].to_s && p.namespace == region.namespace && p.scope == region.scope}.first
122
+ pin = pins.select{|p| [Solargraph::Pin::Method, Solargraph::Pin::Attribute].include?(p.class) && p.name == node.children[3].children[0].to_s && p.namespace == region.namespace && p.scope == region.scope}.first
123
123
  if pin.nil?
124
124
  pins.push Solargraph::Pin::MethodAlias.new(get_node_location(node), region.namespace, node.children[2].children[0].to_s, region.scope, node.children[3].children[0].to_s)
125
125
  else
@@ -1,3 +1,3 @@
1
1
  module Solargraph
2
- VERSION = '0.29.0'
2
+ VERSION = '0.29.1'
3
3
  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.29.0
4
+ version: 0.29.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-11-29 00:00:00.000000000 Z
11
+ date: 2018-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine