xamarin-automators-calabash 0.0.10 → 0.0.11
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 +21 -1
- 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: 1accb8013d09ab8b53a162324ac84f7f76bef978
|
4
|
+
data.tar.gz: 955d87a989be498fc0e861f0ac93cb1625640c55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4a1d4dba12f0f84b2b58ac8c6fe5ee9d52f9ca6d6da3a456a63430d1cc94204b310f0b3607a6cc4c6efc36247f7eb67add37517e7570ef7af2c69b089550e50
|
7
|
+
data.tar.gz: d1929e305e10009412351127efa9166ba9a70c763156f5fa59cff4ab1164d771e082a74639727e7a0ea44ffe879bf56ea95a2849e3796eb9fc0ef6efac78ad37
|
@@ -48,10 +48,30 @@ def red(text)
|
|
48
48
|
colorize(text, 31)
|
49
49
|
end
|
50
50
|
|
51
|
-
def diff(query, action)
|
51
|
+
def diff(query, action, options={removed:true, added:true})
|
52
52
|
items1 = query[]
|
53
53
|
action[]
|
54
|
+
sleep(1)
|
54
55
|
items2 = query[]
|
56
|
+
items1.map {|x| x.delete("description")}
|
57
|
+
items2.map {|x| x.delete("description")}
|
55
58
|
added = items2 - items1
|
56
59
|
removed = items1 - items2
|
60
|
+
if options[:added]
|
61
|
+
puts green("=====ITEMS ADDED=====")
|
62
|
+
awesome_print(added)
|
63
|
+
end
|
64
|
+
if options[:removed]
|
65
|
+
puts red("=====ITEMS REMOVED=====")
|
66
|
+
awesome_print(removed)
|
67
|
+
end
|
68
|
+
nil
|
69
|
+
end
|
70
|
+
|
71
|
+
def items_added(query, action)
|
72
|
+
diff(query, action, removed:false, added:true)
|
73
|
+
end
|
74
|
+
|
75
|
+
def items_removed(query, action)
|
76
|
+
diff(query, action, removed:true, added:false)
|
57
77
|
end
|