xamarin-automators-calabash 0.0.1 → 0.0.3

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: 663abc983fb931256aeed2b1f7854c63fe3a70b9
4
- data.tar.gz: 2fce91dd9a1a8292a051e3f5f88d232fb2b3796c
3
+ metadata.gz: 347237d4dd4cb0bc353553c8f3b412acbfe09c3b
4
+ data.tar.gz: 9987307ee011f960a7b365a8149ace20702e2bf2
5
5
  SHA512:
6
- metadata.gz: 0eed0949f350b4d18422dfdfd972ccbd019690efe140d10ae4db368f2af186ecb83564ff8e447fbb62ca1bd056044d5d47509c4f4f369a8107b25550462b6cf4
7
- data.tar.gz: 0019754fdc3fedfe260c5b11cc29a707fda07764b3181e52baca6f53916687404950c99d0a0f6722b13c20ad9d7af2ef9c2363d3a1514501df0172c14f31bc8c
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
- print "class: #{node["class"].split(/[$.]/).last}" if (node["id"].nil? and node["text"].nil?)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xamarin-automators-calabash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Austin Roos