lowkey 0.7.0 → 0.7.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 +4 -4
- data/lib/queries/query.rb +4 -1
- data/lib/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5990301db8e248a6bc99c209512593b48d6e97c34070e8f9389b69648be06c2f
|
|
4
|
+
data.tar.gz: 4d7ce17a69589f2103b03f446d583bfc128089fe4224c9f4fa91aaa87ac75fb6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9feb9cc6d8e19325ada9fa42d043c3bcade1d3c6004f98c7c8febd74768c1dd84a822820edbfc82308409595322fb9c1d6c2c26d864c98431a535599cd23e826
|
|
7
|
+
data.tar.gz: 10328e823b9ff040080a0671794887207e9458173fba13db61552755b88c3237cf9376950b961df17cf2ac3b1e774494f2cf00c8c81b025dfe73b20e4bcfc812
|
data/lib/queries/query.rb
CHANGED
|
@@ -4,6 +4,9 @@ require 'prism'
|
|
|
4
4
|
|
|
5
5
|
module Lowkey
|
|
6
6
|
module Query
|
|
7
|
+
# Prism 2 renamed MissingNode to ErrorRecoveryNode.
|
|
8
|
+
MISSING_NODE = defined?(Prism::ErrorRecoveryNode) ? Prism::ErrorRecoveryNode : Prism::MissingNode
|
|
9
|
+
|
|
7
10
|
# TODO: Make name a keypath.
|
|
8
11
|
def query(node:, namespace:, name:) # rubocop:disable Lint/UnusedMethodArgument
|
|
9
12
|
node.breadth_first_search do |n|
|
|
@@ -30,7 +33,7 @@ module Lowkey
|
|
|
30
33
|
|
|
31
34
|
def resolve_namespace_path(node:, parent_map:)
|
|
32
35
|
# When inside RBX, Prism thinks we're defining a class because of "<".
|
|
33
|
-
return nil if node.respond_to?(:constant_path) && node.constant_path.is_a?(
|
|
36
|
+
return nil if node.respond_to?(:constant_path) && node.constant_path.is_a?(MISSING_NODE)
|
|
34
37
|
return '' if (parent = parent_map[node]).nil?
|
|
35
38
|
|
|
36
39
|
path = namespace_path(node: parent, parent_map:)
|
data/lib/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lowkey
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- maedi
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: prism
|
|
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
76
76
|
- !ruby/object:Gem::Version
|
|
77
77
|
version: '0'
|
|
78
78
|
requirements: []
|
|
79
|
-
rubygems_version:
|
|
79
|
+
rubygems_version: 4.0.6
|
|
80
80
|
specification_version: 4
|
|
81
81
|
summary: An API for accessing PRISM metadata easily and efficiently
|
|
82
82
|
test_files: []
|