xamarin-automators-calabash 0.0.4 → 0.0.5

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: bfef701ce8c5ff998faa046d14817032a3f7b3cf
4
- data.tar.gz: 0b90548f99d694b8ea0c79c3e632bf42bf26b7a3
3
+ metadata.gz: 263fe676a787c7991045ec1713888aa0c8f90e06
4
+ data.tar.gz: 8b33fac6790b0e70999483068151ac81b3a09b93
5
5
  SHA512:
6
- metadata.gz: 61947e7448c4460ef259437091f19eb94f2c2c6c14ad866e09dd776592c3014ef6801836637d61c9d1a5c9391455fc6bcbf1dca069e83e12b428c169dd89ea85
7
- data.tar.gz: 2ca8be7ab7edd817221b7f38f4d93fa22334fa7896183ba8cc9e832db80ee834f6d7537bc5cac1c9741f243cebc2e2e9d1be32105d15c5fa762d270d9225b220
6
+ metadata.gz: 9112a652f4d6d9ee69cdcb88f25946758f18754375c60d2f23f4cbbcf6282fd8ed08f201e20d56886b294d72cf3cc2083f99b13b26748a34f4990c8b516bff43
7
+ data.tar.gz: 8d737f1a280c57182d4a8ad3f17bb88654d655d8f8e32f4aa3a0c37cbd43e00939e46b31fb7ec4d7590d80186f7b01a21f3cc3aa775e57082c57d4cd130bc18c
@@ -4,8 +4,8 @@ end
4
4
 
5
5
  def print_tree_recurse(query, node, indent, options={})
6
6
  indent.times { print " " }
7
- print "id: #{node["id"]} " unless node["id"].nil?
8
- print "text: #{node["text"]}" unless node["text"].nil?
7
+ print "id: #{green(node["id"])} " unless node["id"].nil?
8
+ print "text: #{cyan(node["text"])}" unless node["text"].nil?
9
9
  if options[:show_class]
10
10
  print "class: #{node["class"].split(/[$.]/).last}" if (node["id"].nil? and node["text"].nil?)
11
11
  else
@@ -16,4 +16,20 @@ def print_tree_recurse(query, node, indent, options={})
16
16
  (children.size).times do |i|
17
17
  print_tree_recurse("#{query} child * index:#{i}", children[i], indent+1, options)
18
18
  end
19
+ end
20
+
21
+ def colorize(text, color_code)
22
+ "\e[#{color_code}m#{text}\e[0m"
23
+ end
24
+
25
+ def cyan(text)
26
+ colorize(text, 36)
27
+ end
28
+
29
+ def green(text)
30
+ colorize(text, 31)
31
+ end
32
+
33
+ def red(text)
34
+ colorize(text, 32)
19
35
  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.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Austin Roos