applocate 0.0.3 → 0.1.0

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: 94a009e3aba558b43848450449190ae120735d4e
4
- data.tar.gz: 6a1c6123b9deb30cf84ddad9c31804b86d84964e
3
+ metadata.gz: 10f327a9fc2f547cb869c21618376e5c662a2c70
4
+ data.tar.gz: 2c76c3dc5669476eda765846c970409bf047698d
5
5
  SHA512:
6
- metadata.gz: aaf232eb71db7e8b7f5e7d3a56149f52cc482de04de0bab88fa1c116fe47bf35a6e55e778c8343c04bdcc3eeca472dddd89cc2effa6c392b9770f91a514d6165
7
- data.tar.gz: cda7033f429cce05eec92fd7051131263ceb74c8642fe3cb80ef3717263bf7e99e8cb00a52e1c7bd58ea58a1d19421e4353b03ce598efd8d144ff1d17093d194
6
+ metadata.gz: a333deccf831f24fa33867e7e304ba71792e9af6f03581300a5ab845c8cabe5ea8db1b160007536db9dbf6933a0a0b19ab1e0a2649d2fc8567f9f7747cadc2c2
7
+ data.tar.gz: 2554ec2cc52a3b7aa4a2f5db059f25c380ae6dfff507a935b571424afbab55b589756037a5740554dd2b78bc3fabdaf7e8d00bd5fb9e4ee1435c431be05f3e7a
data/README.md CHANGED
@@ -43,7 +43,7 @@ end
43
43
  Currently the following methods are supported:
44
44
 
45
45
  ```ruby
46
- # expected options -> { uuid: "ABCD-DCCDDC-12394812389-CDC" }
46
+ # expected options -> { uuid: "ABCD-DCCDDC-12394812389-CDC", restrictions: {"allowSafari" => false} }
47
47
  Applocate::API.restrict(options)
48
48
  # returns a list (Array) of UUIDs with their status from the command.
49
49
 
@@ -61,7 +61,8 @@ Applocate::API.install_app(options)
61
61
  Applocate::API.app_list(options)
62
62
  # returns a list (Array) of UUIDs with their apps.
63
63
 
64
- Applocate::API.register_device
64
+ # expected options -> { name: "the name your call the device (255 chars)", identifier: "INTERNAL_CORP_ID_UPTO_255CHAR" }
65
+ Applocate::API.register_device(options)
65
66
  # returns :id, :uuid, :enrollment_url
66
67
  # since the uuid comes from the device it will be nil until the device enrolls
67
68
 
data/lib/applocate/api.rb CHANGED
@@ -8,32 +8,33 @@ module Applocate
8
8
  format :plain
9
9
 
10
10
  # expected options { uuid: "ABCD-DCCDDC-12394812389-CDC" }
11
- def self.restrict(options)
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
16
  # expected options { uuid: "ABCD-DCCDDC-12394812389-CDC" }
17
- def self.unrestrict(options)
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
22
  # expected options { uuid: "ABCD-DCCDDC-12394812389-CDC", itunes_id: "284910350" }
23
- def self.install_app(options)
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
28
  # expected options { uuid: "ABCD-DCCDDC-12394812389-CDC" }
29
- def self.app_list(options)
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 []
32
32
  end
33
33
 
34
- # expected options { uuid: "ABCD-DCCDDC-12394812389-CDC", itunes_id: "284910350" }
35
- def self.register_device
36
- response = self.post('/api/devices', { headers: authentication })
34
+ # expected options { name: "Steve J's iPad Air", identifier: "XXX-123456 APPLE INC." }
35
+ def self.register_device(options = {})
36
+ options = { name: name, identifier: identifier }
37
+ response = self.post('/api/devices', { body: options.to_json, headers: authentication })
37
38
  JSON.parse response.body rescue []
38
39
  end
39
40
 
@@ -1,3 +1,3 @@
1
1
  module Applocate
2
- VERSION = "0.0.3"
2
+ VERSION = "0.1.0"
3
3
  end
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.0.3
4
+ version: 0.1.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-01-20 00:00:00.000000000 Z
11
+ date: 2015-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  requirements: []
127
127
  rubyforge_project:
128
- rubygems_version: 2.2.2
128
+ rubygems_version: 2.4.5
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Server API client for Applocate