idevices 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/idevices.rb +7 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d51b2120980b95bcf3fe6446eeec923bdbb8536
4
- data.tar.gz: a06e4f5baa5b97487c23c05f497704c217bf006a
3
+ metadata.gz: 9b060072c1de9a8f7aa90a19c0520fcb050140fd
4
+ data.tar.gz: ea960660d760c1a62835a4b9825a4fdbfb5f6952
5
5
  SHA512:
6
- metadata.gz: 1aa7658aac5893095b288ae01e582ab385ebb8b8a367ead68fc0505d93b7e663b13ed82a4e7d4ea6ba8473a75c124e076f4fd96b3e3673839090aaa487514703
7
- data.tar.gz: 19a1d171ea62880fa13d6cd6882fb2b532c464ee2be23c160ddae92bb3d0d3cf42cd12d19ea1e609ad05e42c166bd505c83d39dbefc1cddf8a17b1b54ceea3f5
6
+ metadata.gz: 5374f6f7ad09cfb3a3689dffaf31db5d1239baa88ab75579eefde33dac62ae66fa468966a632f344600f4568febe712d5153112a8f1f1aa46d383de075db0b2c
7
+ data.tar.gz: 2db61e426575b1fe4fbddea0766e13b160a8b7c1caf3dcfc5c25e6a6e7ac50389b3cffe2c2cba8704eaff0df0941f909b594e8abea04435f3555681679da0154
data/lib/idevices.rb CHANGED
@@ -53,10 +53,12 @@ module Idevices
53
53
  wifi_address = /WiFiAddress: (.*)\n/.match(device_info_raw)[1]
54
54
  wifi_ip_raw = `arp -a | grep #{wifi_address.gsub('0', '')}`
55
55
  wifi_ip_address = 'unknown'
56
+ wifi_ip_raw = `arp -a | grep #{device_name.downcase + '.'}` if wifi_ip_raw == ''
57
+
56
58
  if wifi_ip_raw == ''
57
59
  warn "Can't find device #{udid} ip by MAC, try to reconnect wifi"
58
60
  else
59
- wifi_ip_address = /\((.*)\)/.match(wifi_ip_raw)[1]
61
+ wifi_ip_address = /\((.*?)\)/.match(wifi_ip_raw)[1]
60
62
  end
61
63
  {
62
64
  device_name => {
@@ -75,4 +77,8 @@ module Idevices
75
77
  `ideviceinstall -u #{udid} #{app}`
76
78
  end
77
79
 
80
+ def uninstall_app(udid, app)
81
+ `ideviceinstall -u #{udid} -U #{app}`
82
+ end
83
+
78
84
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idevices
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yi MIN
@@ -37,7 +37,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
37
37
  version: '0'
38
38
  requirements: []
39
39
  rubyforge_project:
40
- rubygems_version: 2.4.8
40
+ rubygems_version: 2.5.1
41
41
  signing_key:
42
42
  specification_version: 4
43
43
  summary: idevices