xamarin-automators-calabash 0.0.1 → 0.0.3
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/xamarin-automators-calabash.rb +8 -4
- 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: 347237d4dd4cb0bc353553c8f3b412acbfe09c3b
|
4
|
+
data.tar.gz: 9987307ee011f960a7b365a8149ace20702e2bf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99b3b475ae030f88a501fb13d5b46f97c6993b824d1ad9f9e7bc178c1cf69b861b2a3385e137055b5babe8fb7df7f343cd30940c83cd7c5a73f8e8c8879a658b
|
7
|
+
data.tar.gz: 37c8e277206caf0ad3325e7d4362f44a291af03597ebc0393249ef3315fdce730689c6c792ddf3f718d84d61322acd4cf56b18ebaeb80d87137f1a8560bd8293
|
@@ -1,15 +1,19 @@
|
|
1
|
-
def print_tree
|
1
|
+
def print_tree(options={})
|
2
2
|
print_tree_recurse("child * parent *", (query "* index:0").first, 0)
|
3
3
|
end
|
4
4
|
|
5
|
-
def print_tree_recurse(query, node, indent)
|
5
|
+
def print_tree_recurse(query, node, indent, options={})
|
6
6
|
indent.times { print " " }
|
7
7
|
print "id: #{node["id"]} " unless node["id"].nil?
|
8
8
|
print "text: #{node["text"]}" unless node["text"].nil?
|
9
|
-
|
9
|
+
if options[:show_class]
|
10
|
+
print "class: #{node["class"].split(/[$.]/).last}" if (node["id"].nil? and node["text"].nil?)
|
11
|
+
else
|
12
|
+
print "--" if (node["id"].nil? and node["text"].nil?)
|
13
|
+
end
|
10
14
|
print "\n"
|
11
15
|
children = query "#{query} child *"
|
12
16
|
(children.size).times do |i|
|
13
|
-
print_tree_recurse("#{query} child * index:#{i}", children[i], indent+1)
|
17
|
+
print_tree_recurse("#{query} child * index:#{i}", children[i], indent+1, options)
|
14
18
|
end
|
15
19
|
end
|