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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b08371d65855d7e523b2d841425e9c06b337d44
4
- data.tar.gz: e1ccec1df09b89f8d641f7b06262c05b15ce46b9
3
+ metadata.gz: 1accb8013d09ab8b53a162324ac84f7f76bef978
4
+ data.tar.gz: 955d87a989be498fc0e861f0ac93cb1625640c55
5
5
  SHA512:
6
- metadata.gz: 2c9d81e460af1d37f6a1158cc826466b50cec4c9820f94cee029356abd296aa5b123134cbb0c8285e02e55a94209ce9d1894095cfee9a8599e6ce9fe231cd5b5
7
- data.tar.gz: 8a2f2cf83737a4ed58c5bafb8000e5c8cc9a245e1c08c9f8a64707a39bb182528754c38428cdef3b6314d3a44e1c9d9c279ace960139d02bfe268db758bb9821
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
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.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Austin Roos