simplemdm 1.1.2 → 1.1.3
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 +6 -1
- data/lib/simplemdm/app.rb +25 -3
- 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: 450a6e83352102b742d03a7ebb14ce5414e7cf1c
|
4
|
+
data.tar.gz: 06edd1f7ee71fea449ce78ab6c57cef65bc525c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77622d9c6fb8e71f498faed61cd33bfbf0d2e223980e11287a4eb749fee0b2a2bb27b6e71af8a72662146b7c4100867f53bcb0a0824aa00b56add35578e36f6b
|
7
|
+
data.tar.gz: 6fa0fa9a769cf91a9ff6885d0b272935429c73824e70421a5da9560bb27968416856389ecfbdaacb99493354202c0ae2f1270417a9eb2ea44efd8cac07cf1b5d
|
data/CHANGELOG.md
CHANGED
@@ -15,4 +15,9 @@
|
|
15
15
|
- Gem properly declares 'Hashie' gem dependency now.
|
16
16
|
|
17
17
|
## [0.1.0] - 2015-10-20
|
18
|
-
- Initial release
|
18
|
+
- Initial release
|
19
|
+
|
20
|
+
## [1.1.3] - 2016-9-29
|
21
|
+
### Fixed
|
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.
|
data/lib/simplemdm/app.rb
CHANGED
@@ -1,9 +1,19 @@
|
|
1
1
|
module SimpleMDM
|
2
2
|
class App < Base
|
3
3
|
|
4
|
+
# overwrite base class
|
5
|
+
def initialize(source_hash = nil, default = nil, &blk)
|
6
|
+
if source_hash && source_hash.kind_of?(Hash) && binary = source_hash[:binary]
|
7
|
+
self.binary = binary
|
8
|
+
source_hash.delete(:binary)
|
9
|
+
end
|
10
|
+
|
11
|
+
super(source_hash, detault, &blk)
|
12
|
+
end
|
13
|
+
|
4
14
|
def build(hash = nil)
|
5
15
|
@dirty = false
|
6
|
-
@
|
16
|
+
@binary_file = nil
|
7
17
|
|
8
18
|
super
|
9
19
|
end
|
@@ -27,9 +37,21 @@ module SimpleMDM
|
|
27
37
|
@binary_file = val
|
28
38
|
end
|
29
39
|
|
40
|
+
def name=(val)
|
41
|
+
if val != self.name
|
42
|
+
@dirty = true
|
43
|
+
end
|
44
|
+
|
45
|
+
self['name'] = val
|
46
|
+
end
|
47
|
+
|
30
48
|
def save
|
31
|
-
|
32
|
-
|
49
|
+
raise "binary must be set before saving" if new? && @binary_file.nil?
|
50
|
+
|
51
|
+
if @dirty || new?
|
52
|
+
params = {}
|
53
|
+
params[:name] = self.name unless self.name.nil?
|
54
|
+
params[:binary] = @binary_file if @binary_file
|
33
55
|
|
34
56
|
if new?
|
35
57
|
hash, code = fetch("apps", :post, params)
|
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.1.
|
4
|
+
version: 1.1.3
|
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-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|