xamarin-automators-calabash 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xamarin-automators-calabash.rb +6 -6
- 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: 8b08371d65855d7e523b2d841425e9c06b337d44
|
4
|
+
data.tar.gz: e1ccec1df09b89f8d641f7b06262c05b15ce46b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c9d81e460af1d37f6a1158cc826466b50cec4c9820f94cee029356abd296aa5b123134cbb0c8285e02e55a94209ce9d1894095cfee9a8599e6ce9fe231cd5b5
|
7
|
+
data.tar.gz: 8a2f2cf83737a4ed58c5bafb8000e5c8cc9a245e1c08c9f8a64707a39bb182528754c38428cdef3b6314d3a44e1c9d9c279ace960139d02bfe268db758bb9821
|
@@ -1,22 +1,22 @@
|
|
1
1
|
require 'awesome_print'
|
2
2
|
|
3
|
-
def print_tree(
|
4
|
-
print_tree_recurse("child * parent * index:0", (query "* index:0").first, 0)
|
3
|
+
def print_tree(show_class=false)
|
4
|
+
print_tree_recurse("child * parent * index:0", (query "* index:0").first, 0, show_class)
|
5
5
|
end
|
6
6
|
|
7
|
-
def print_tree_recurse(query, node, indent,
|
7
|
+
def print_tree_recurse(query, node, indent, show_class)
|
8
8
|
indent.times { print " " }
|
9
9
|
print "id: #{green(node["id"])} " unless node["id"].nil?
|
10
10
|
print "text: #{cyan(node["text"])}" unless node["text"].nil?
|
11
|
-
if
|
12
|
-
print "class: #{node["class"].split(/[$.]/).last}" if (node["id"].nil? and node["text"].nil?)
|
11
|
+
if show_class
|
12
|
+
print "class: #{yellow(node["class"].split(/[$.]/).last)}" if (node["id"].nil? and node["text"].nil?)
|
13
13
|
else
|
14
14
|
print "--" if (node["id"].nil? and node["text"].nil?)
|
15
15
|
end
|
16
16
|
print "\n"
|
17
17
|
children = query "#{query} child *"
|
18
18
|
(children.size).times do |i|
|
19
|
-
print_tree_recurse("#{query} child * index:#{i}", children[i], indent+1,
|
19
|
+
print_tree_recurse("#{query} child * index:#{i}", children[i], indent+1, show_class)
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|