simplemdm 1.1.3 → 1.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/CHANGELOG.md +9 -1
- data/README.md +3 -3
- data/lib/simplemdm/app_group.rb +1 -1
- data/lib/simplemdm/device.rb +19 -0
- data/lib/simplemdm/installed_app.rb +15 -0
- data/lib/simplemdm/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: bd6300abfc864d55d51d9d315847e667ffd483fe
|
4
|
+
data.tar.gz: 60f7d7d4d0ed8a89914d856c6a724b14b8f8af1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ea0fba1a4b220ab613784a50cc4d3146d88431964f4a4367947e9bb9b877fdbdac88d9ce0f3b71111348fe392628e6f5711e1b379b853bf249b4724ece0fdc2
|
7
|
+
data.tar.gz: d7a080dcc2508ea310dcde358b2d835a13f6b9413541f8eaa32237db2ad5b7a90e738fe4892722d4fd97a5469c3fca171dbd59c7caa09ad622e1e8c477252d42
|
data/CHANGELOG.md
CHANGED
@@ -20,4 +20,12 @@
|
|
20
20
|
## [1.1.3] - 2016-9-29
|
21
21
|
### Fixed
|
22
22
|
- New App objects failed to save when 'binary' was declared as an initialization argument.
|
23
|
-
- App objects were not able to update their 'name' attribute.
|
23
|
+
- App objects were not able to update their 'name' attribute.
|
24
|
+
|
25
|
+
## [1.2.0] - 2016-10-25
|
26
|
+
### Added
|
27
|
+
- Create new devices
|
28
|
+
- Uninstall installed, managed apps from devices
|
29
|
+
|
30
|
+
### Fixed
|
31
|
+
- App groups could not be deleted
|
data/README.md
CHANGED
@@ -38,9 +38,9 @@ device.lock message: "This device has been locked. Please call the number p
|
|
38
38
|
|
39
39
|
# upload an enterprise app and deploy it to a group of devices
|
40
40
|
|
41
|
-
|
42
|
-
app
|
43
|
-
|
41
|
+
data = File.open('surfreport2.2.ipa')
|
42
|
+
app = SimpleMDM::App.new name: "Surf Report",
|
43
|
+
binary: data
|
44
44
|
app.save
|
45
45
|
|
46
46
|
app_group = SimpleMDM::AppGroup.find(37)
|
data/lib/simplemdm/app_group.rb
CHANGED
data/lib/simplemdm/device.rb
CHANGED
@@ -13,6 +13,25 @@ module SimpleMDM
|
|
13
13
|
build hash['data']
|
14
14
|
end
|
15
15
|
|
16
|
+
def save
|
17
|
+
unless new?
|
18
|
+
raise "You can only save new device objects"
|
19
|
+
end
|
20
|
+
|
21
|
+
params = {}
|
22
|
+
params[:name] = self.name unless self.name.nil?
|
23
|
+
params[:group_id] = self.group_id unless self.group_id.nil?
|
24
|
+
|
25
|
+
hash, code = fetch("devices", :post, params)
|
26
|
+
|
27
|
+
self.id = hash['data']['id']
|
28
|
+
self.merge!(hash['data']['attributes'])
|
29
|
+
|
30
|
+
@dirty = false
|
31
|
+
|
32
|
+
self
|
33
|
+
end
|
34
|
+
|
16
35
|
def installed_apps
|
17
36
|
raise "You cannot retrieve installed apps for a device that hasn't been created yet." if new?
|
18
37
|
|
@@ -1,4 +1,19 @@
|
|
1
1
|
module SimpleMDM
|
2
2
|
class InstalledApp < Base
|
3
|
+
|
4
|
+
def self.find(id)
|
5
|
+
hash, code = fetch("installed_apps/#{id}")
|
6
|
+
|
7
|
+
build hash['data']
|
8
|
+
end
|
9
|
+
|
10
|
+
def uninstall
|
11
|
+
raise "You cannot uninstall an unmanaged app" if !self.managed
|
12
|
+
|
13
|
+
hash, code = fetch("installed_apps/#{id}", :delete)
|
14
|
+
|
15
|
+
code == 202
|
16
|
+
end
|
17
|
+
|
3
18
|
end
|
4
19
|
end
|
data/lib/simplemdm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplemdm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taylor Boyko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|