optics-agent 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/optics-agent/normalization/query.rb +13 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f59e8f0e2858f85ede7fbc3410cc249e213326f8
|
4
|
+
data.tar.gz: dc667895f061a9edf99feb1d5bf44e1029ed0157
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5859a00a6d4f2e051948dc7e64357453c7327cff2195846732e2da0abf0c13344093aecc8f4b93157e275accec009c6977fc14a74cc4f5fac5277a492df1f4e8
|
7
|
+
data.tar.gz: 8c82ad95ee7d2363c76cfbc846323c23e87650aaf09f4e4ad00a5eda5785ecc46a2af5adf20b5fc6fbcdad7df23e3a77ee3b5a718646c746b1d4b4d4a2d19f8e
|
@@ -16,14 +16,20 @@ module OpticsAgent
|
|
16
16
|
visitor = Visitor.new(document)
|
17
17
|
|
18
18
|
stack = []
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
Nodes.constants.each do |constant|
|
20
|
+
mod = Nodes.const_get(constant)
|
21
|
+
next unless mod.is_a? Module
|
22
|
+
|
23
|
+
visitor[mod].enter << -> (_, _) do
|
24
|
+
stack.unshift(
|
25
|
+
arguments: [],
|
26
|
+
directives: [],
|
27
|
+
selections: []
|
28
|
+
)
|
29
|
+
end
|
30
|
+
|
31
|
+
visitor[mod].leave << -> (_, _) { current = stack.shift }
|
25
32
|
end
|
26
|
-
visitor.leave << -> (_, _) { current = stack.shift }
|
27
33
|
|
28
34
|
visitor[Nodes::Argument].leave << -> (node, parent) do
|
29
35
|
stack[0][:arguments] << "#{node.name}:#{genericize_type(node.value)}"
|