findmyiphone 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/findmyiphone.gemspec +1 -1
- data/lib/findmyiphone.rb +6 -2
- metadata +1 -1
data/findmyiphone.gemspec
CHANGED
data/lib/findmyiphone.rb
CHANGED
@@ -25,7 +25,11 @@ class FindMyIphone
|
|
25
25
|
}
|
26
26
|
|
27
27
|
page = @agent.post(devicesurl)
|
28
|
-
@thedevices = page.content.
|
28
|
+
if @thedevices = page.content.match(/tDeviceMgmt.deviceIdMap\['[0-9+]'\] = '([^']+)'/)
|
29
|
+
@thedevices = @thedevices.captures
|
30
|
+
else
|
31
|
+
raise "No registered devices could be found"
|
32
|
+
end
|
29
33
|
end
|
30
34
|
return @thedevices
|
31
35
|
end
|
@@ -52,7 +56,7 @@ class FindMyIphone
|
|
52
56
|
|
53
57
|
def send(url,data)
|
54
58
|
uri = URI.parse(url)
|
55
|
-
json =
|
59
|
+
json = data.to_json
|
56
60
|
|
57
61
|
http = Net::HTTP.new(uri.host, uri.port)
|
58
62
|
http.use_ssl = true
|