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 +4 -4
- data/lib/xamarin-automators-calabash.rb +18 -2
- 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: 263fe676a787c7991045ec1713888aa0c8f90e06
|
4
|
+
data.tar.gz: 8b33fac6790b0e70999483068151ac81b3a09b93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|