xamarin-automators-calabash 0.1.2 → 0.1.4
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 +18 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b06a91e9f854a99c1d2f7def4bfe61b5fd48cff4
|
4
|
+
data.tar.gz: 11ac7d37968d14fece7f1fe0576007f994999bbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56bc0d4ad465eb465c4b4157becb6334a76eefa7b6345a2a7d7b3f5c04fac50e368ead7dc9e9792119edd241018574d948375d2e35ead942bf3b71c8ea07a9b6
|
7
|
+
data.tar.gz: 3e1046a8104056a0de29684480c2871deedee21c75e8c06743bd1e4e00b705121e99d819613b521581d3306e0136bbcb12608062cd726f7f85ce9f6e38843fc4
|
@@ -26,15 +26,20 @@ end
|
|
26
26
|
|
27
27
|
def print_tree(show_class=false)
|
28
28
|
puts "Finding roots..."
|
29
|
-
roots = get_roots
|
29
|
+
@roots = get_roots
|
30
30
|
@count = 1
|
31
|
-
main_root = roots[0]
|
32
|
-
roots.delete(0)
|
33
|
-
print_tree_recurse("* index:0", (query "* index:0").first, 0, show_class
|
31
|
+
main_root = @roots[0]
|
32
|
+
@roots.delete(0)
|
33
|
+
print_tree_recurse("* index:0", (query "* index:0").first, 0, show_class)
|
34
|
+
@roots.each do |key, value|
|
35
|
+
@count += 1
|
36
|
+
puts "#{magenta("** Parent off of screen **")}"
|
37
|
+
print_tree_recurse("* index:#{key}", (query "* index:#{key}").first, 0, show_class)
|
38
|
+
end
|
34
39
|
"Found #{@count} nodes"
|
35
40
|
end
|
36
41
|
|
37
|
-
def print_tree_recurse(query, node, indent, show_class
|
42
|
+
def print_tree_recurse(query, node, indent, show_class)
|
38
43
|
node.delete("description")
|
39
44
|
indent.times { print " " }
|
40
45
|
print "id: #{green(node["id"])} " unless node["id"].nil?
|
@@ -46,19 +51,17 @@ def print_tree_recurse(query, node, indent, show_class, roots)
|
|
46
51
|
end
|
47
52
|
print "\n"
|
48
53
|
children = query("#{query} child *")
|
49
|
-
if roots.has_value?(node)
|
50
|
-
index = roots.key(node)
|
51
|
-
sub_root_query = "* index:#{index}
|
52
|
-
|
53
|
-
roots.delete(index)
|
54
|
-
|
55
|
-
|
56
|
-
print_tree_recurse(sub_root_query + " index:#{j}", sub_root_children[j], indent+1, show_class, roots)
|
57
|
-
end
|
54
|
+
if @roots.has_value?(node)
|
55
|
+
index = @roots.key(node)
|
56
|
+
sub_root_query = "* index:#{index}"
|
57
|
+
sub_root = query(sub_root_query).first
|
58
|
+
@roots.delete(index)
|
59
|
+
@count += 1
|
60
|
+
print_tree_recurse(sub_root_query, sub_root, indent+1, show_class)
|
58
61
|
end
|
59
62
|
(children.size).times do |i|
|
60
63
|
@count += 1
|
61
|
-
print_tree_recurse("#{query} child * index:#{i}", children[i], indent+1, show_class
|
64
|
+
print_tree_recurse("#{query} child * index:#{i}", children[i], indent+1, show_class)
|
62
65
|
end
|
63
66
|
end
|
64
67
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xamarin-automators-calabash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Austin Roos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A collection of helper functions for calabash-android
|
14
14
|
email: austin.roos@xamarin.com
|