ruby-jss 0.10.1a2 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ruby-jss might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGES.md +15 -0
- data/lib/jss/api_object/computer.rb +2 -2
- data/lib/jss/api_object/extendable.rb +1 -1
- data/lib/jss/validate.rb +2 -2
- data/lib/jss/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8413ec0bad98adf45203344dd416bdab4335115
|
4
|
+
data.tar.gz: 0f0c67258554cfb27981d355ea0157162402bb90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f7d893c3ad2796308371fa92271e2efeee409159ae1e7963021d21a5490f0efd5d317260413eadaeee8785aa51f41d3c52aa6257037f501c0bfc54783873aa6
|
7
|
+
data.tar.gz: fc90421670c65f21ec4d22c0bf50573fb88b4c43ff200cb89082027ef4b91a97d22eba38e104283d818458a94cb68bbfcc06874c9499d1d68afb4fc85d0e26a4
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
# Change History
|
2
2
|
|
3
|
+
## v 0.10.1 2017-11-08
|
4
|
+
|
5
|
+
- Add: Extension Attribute values that are populated by Script or LDAP can now be modified via Extendable#set_ext_attr.
|
6
|
+
|
7
|
+
Previously, attempts to set the value would raise an exception, because those values aren't modifiable in the WebUI.
|
8
|
+
However, the API itself allows such modification, so now ruby-jss does too.
|
9
|
+
|
10
|
+
- Add: If you have access to the JSS MySQL database, ruby-jss now provides acces to the 'object history' of all APIObject subclasses.
|
11
|
+
|
12
|
+
Unfortunately there is no way to get at this data via the API, but if you can connect to the MySQL database (JSS::DB_CNX.connect)
|
13
|
+
then you can call `#object_history` and `#add_object_history_entry` for individual object instances.
|
14
|
+
|
15
|
+
- Fix: Error when no storage device on a Computer is marked as the boot drive (Thanks @christopher.kemp!)
|
16
|
+
- Fix: A few lingering methods that weren't multi-APIConnection aware, are now aware
|
17
|
+
|
3
18
|
## v0.10.0 2017-10-09
|
4
19
|
|
5
20
|
- Improvement: Working with multiple APIConnections is now far more flexible!
|
@@ -1161,14 +1161,14 @@ module JSS
|
|
1161
1161
|
#
|
1162
1162
|
def serial_number=(new_val)
|
1163
1163
|
return nil if new_val == @serial_number
|
1164
|
-
@serial_number = new_val.empty? ? new_val : JSS::Validate.unique_identifier(JSS::Computer, :serial_number, new_val)
|
1164
|
+
@serial_number = new_val.empty? ? new_val : JSS::Validate.unique_identifier(JSS::Computer, :serial_number, new_val, api: api)
|
1165
1165
|
@need_to_update = true
|
1166
1166
|
end
|
1167
1167
|
|
1168
1168
|
#
|
1169
1169
|
def udid=(new_val)
|
1170
1170
|
return nil if new_val == @udid
|
1171
|
-
@udid = new_val.empty? ? new_val : JSS::Validate.unique_identifier(JSS::Computer, :udid, new_val)
|
1171
|
+
@udid = new_val.empty? ? new_val : JSS::Validate.unique_identifier(JSS::Computer, :udid, new_val, api: api)
|
1172
1172
|
@need_to_update = true
|
1173
1173
|
end
|
1174
1174
|
|
@@ -146,7 +146,7 @@ module JSS
|
|
146
146
|
@changed_eas = [] unless @need_to_update
|
147
147
|
|
148
148
|
# this will raise an exception if the name doesn't exist
|
149
|
-
ea_def = self.class::EXT_ATTRIB_CLASS.
|
149
|
+
ea_def = self.class::EXT_ATTRIB_CLASS.fetch name: name, api: api
|
150
150
|
|
151
151
|
if ea_def.input_type == 'Pop-up Menu' && (!ea_def.popup_choices.include? value.to_s)
|
152
152
|
raise JSS::UnsupportedError, "The value for #{name} must be one of: '#{ea_def.popup_choices.join("' '")}'"
|
data/lib/jss/validate.rb
CHANGED
@@ -75,8 +75,8 @@ module JSS
|
|
75
75
|
#
|
76
76
|
# @return [Object] the validated unique value
|
77
77
|
#
|
78
|
-
def self.unique_identifier(klass, identifier, val)
|
79
|
-
raise JSS::AlreadyExistsError, "A #{klass} already exists with #{identifier} '#{val}'" if klass.all.map { |i| i[identifier] }.include? val
|
78
|
+
def self.unique_identifier(klass, identifier, val, api: JSS.api)
|
79
|
+
raise JSS::AlreadyExistsError, "A #{klass} already exists with #{identifier} '#{val}'" if klass.all(:refresh, api: api).map { |i| i[identifier] }.include? val
|
80
80
|
val
|
81
81
|
end
|
82
82
|
|
data/lib/jss/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-jss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Lasell
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-11-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: plist
|
@@ -205,9 +205,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
205
205
|
version: 1.9.3
|
206
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
207
207
|
requirements:
|
208
|
-
- - "
|
208
|
+
- - ">="
|
209
209
|
- !ruby/object:Gem::Version
|
210
|
-
version:
|
210
|
+
version: '0'
|
211
211
|
requirements: []
|
212
212
|
rubyforge_project:
|
213
213
|
rubygems_version: 2.6.8
|