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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 337e9c7e621d4266d6168d47cf314d62f7a6399e
4
- data.tar.gz: 60e11706822def97e8507a60ee0d523a92df704a
3
+ metadata.gz: b06a91e9f854a99c1d2f7def4bfe61b5fd48cff4
4
+ data.tar.gz: 11ac7d37968d14fece7f1fe0576007f994999bbd
5
5
  SHA512:
6
- metadata.gz: 63a85aabd91faa936506e1e65688360454bce0406b226bd8a5c6bc70aca818f08b010edf66bf237e094d244ec3a52a4b92e0148c6b3da0aef843edd77334e8a4
7
- data.tar.gz: 6e0e44624e8b2a574540b041f956b80c62c0af056f94aacc9927bbfc81865d2380527c55d2f8ef31b2a4c5ea0a3c3b3a22dd7ad9481df581f6553240f57be346
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, roots)
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, roots)
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} child *"
52
- sub_root_children = query(sub_root_query)
53
- roots.delete(index)
54
- (sub_root_children.size).times do |j|
55
- @count += 1
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, roots)
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.2
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-07-01 00:00:00.000000000 Z
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