applocate 0.1.5 → 0.2.0
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.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/applocate/api.rb +8 -7
- data/lib/applocate/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4a5da7d48fce1ed57c9b508867070ce08cf3557
|
4
|
+
data.tar.gz: e8d0264e157c1e8ddc296d9aa83ed64e85201142
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2866253d459cd947ba353a65a976db2acec48c8d6943df292a663d44425eb53f5dbdad4652135ef4898800dc80ec4233c71e85faa225be6602b8938419912989
|
7
|
+
data.tar.gz: ff3b0e9423d4b3d901c6c23595c1e343ad8c233e3c1108337b35a1efc02e8c28f8b9c0643b8102560c38e4ec2e4e9fd9e4c3b316c897646e75e2a132c05dc534
|
data/README.md
CHANGED
@@ -71,7 +71,9 @@ Applocate::API.list_devices
|
|
71
71
|
# return an array of devices containing :id, :udid, :enrollment_url
|
72
72
|
# once the device has enrolled it will have a :udid but no :enrollment_url
|
73
73
|
|
74
|
-
|
74
|
+
# expected options -> { udid: "ABCD-DCCDDC-12394812389-CDC" }
|
75
|
+
# OR -> { id: 1234567 }
|
76
|
+
Applocate::API.delete_device(options)
|
75
77
|
# delete a device with a given id
|
76
78
|
|
77
79
|
```
|
data/lib/applocate/api.rb
CHANGED
@@ -7,25 +7,25 @@ module Applocate
|
|
7
7
|
headers 'Content-Type' => "application/json"
|
8
8
|
format :plain
|
9
9
|
|
10
|
-
# expected options {
|
10
|
+
# expected options { udid: "ABCD-DCCDDC-12394812389-CDC" }
|
11
11
|
def self.restrict(options = {})
|
12
12
|
response = self.post('/deploy/profile', { body: options.to_json, headers: authentication })
|
13
13
|
JSON.parse response.body rescue []
|
14
14
|
end
|
15
15
|
|
16
|
-
# expected options {
|
16
|
+
# expected options { udid: "ABCD-DCCDDC-12394812389-CDC" }
|
17
17
|
def self.unrestrict(options = {})
|
18
18
|
response = self.delete('/deploy/profile', { body: options.to_json, headers: authentication })
|
19
19
|
JSON.parse response.body rescue []
|
20
20
|
end
|
21
21
|
|
22
|
-
# expected options {
|
22
|
+
# expected options { udid: "ABCD-DCCDDC-12394812389-CDC", itunes_id: "284910350" }
|
23
23
|
def self.install_app(options = {})
|
24
24
|
response = self.post('/deploy/app', { body: options.to_json, headers: authentication })
|
25
25
|
JSON.parse response.body rescue []
|
26
26
|
end
|
27
27
|
|
28
|
-
# expected options {
|
28
|
+
# expected options { udid: "ABCD-DCCDDC-12394812389-CDC" }
|
29
29
|
def self.app_list(options = {})
|
30
30
|
response = self.post('/deploy/app_list', { body: options.to_json, headers: authentication })
|
31
31
|
JSON.parse response.body rescue []
|
@@ -42,9 +42,10 @@ module Applocate
|
|
42
42
|
JSON.parse response.body rescue []
|
43
43
|
end
|
44
44
|
|
45
|
-
# expected
|
46
|
-
|
47
|
-
|
45
|
+
# expected options { device_id: 12345 }
|
46
|
+
# OR { udid: "ABCD-DCCDDC-12394812389-CDC" }
|
47
|
+
def self.delete_device(options)
|
48
|
+
response = self.delete("/api/devices", { body: options.to_json, headers: authentication })
|
48
49
|
response.code == 200
|
49
50
|
end
|
50
51
|
|
data/lib/applocate/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: applocate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Madsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|