ruby-jss 1.0.3b1 → 1.0.3b2
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 +344 -224
- data/lib/jss/api_connection.rb +26 -7
- data/lib/jss/api_object/computer.rb +12 -10
- data/lib/jss/api_object/extension_attribute/computer_extension_attribute.rb +0 -3
- data/lib/jss/api_object/policy.rb +1 -1
- data/lib/jss/api_object/script.rb +0 -3
- data/lib/jss/api_object/self_servable.rb +6 -4
- data/lib/jss/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35181174316ea72a856198f37dd2b18446f410fd010a35b54493d7f167d0ac56
|
4
|
+
data.tar.gz: 6348822a891239bb3b203b9e836a93ea700d82b8100f2f93cb75a611b4efab9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a58f64004baae260d475129a6fc549a17647e5447520785d791c51ef69486b48331b90acf6a22aa5db0e3dfe4cd1aa8716b68dc64dab72a3e3411e3cfd8a38ab
|
7
|
+
data.tar.gz: 0ca90f4abb2c58b5bd528e905ce10de32f668040d657ca1af7b49ac302faccbf6a37740bf3beb9cb262f2db9acc8689319e867d58a5f2a92fb7648efaf08ddf7
|
data/CHANGES.md
CHANGED
@@ -1,35 +1,69 @@
|
|
1
|
-
#
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
2
3
|
|
3
|
-
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
4
6
|
|
5
|
-
|
6
|
-
|
7
|
-
-
|
8
|
-
- fix Client.primary_console_user returns nil when at the loginwindow
|
9
|
-
- add: Client.homdir(user) and Client.do_not_disturb?(user)
|
10
|
-
- fix: Computer#certificates attribute is now readable
|
11
|
-
- add: Package.all_filenames, .orphaned_files, and .missing_files class methods. WARNING - these are very slow since they must instantiate every package.
|
12
|
-
- fix: error when SelfService icon is not available where expected, returns nil instead. (Thanks to @cybertunnel for finding this)
|
7
|
+
## [Unreleased]
|
8
|
+
### Added
|
9
|
+
- LDAPServer.server_for_user and .server_for_group class methods, return the id of the first LDAP server containing the given user or group
|
13
10
|
|
14
|
-
|
11
|
+
- Client.homdir(user) and Client.do_not_disturb?(user)
|
15
12
|
|
16
|
-
-
|
17
|
-
- add: Support for patch-related criterion comparisons "greater than", "less than", "greater than or equal", "less than or equal"
|
18
|
-
- fix: a couple lingering calls to `.new` on APIObject classes, now `.fetch`
|
13
|
+
- Package.all_filenames, .orphaned_files, and .missing_files class methods. WARNING - these are very slow since they must instantiate every package.
|
19
14
|
|
20
|
-
|
15
|
+
- The JSS::APIConnection.connect method, used for making all classic API connections, now takes a `server_path:` parameter.
|
16
|
+
If your JSS is not at the root of the server, e.g. if it's at
|
17
|
+
`https://myjss.myserver.edu:8443/dev_mgmt/jssweb/`
|
18
|
+
rather than
|
19
|
+
`https://myjss.myserver.edu:8443/`
|
20
|
+
then use this parameter to specify the path below the root e.g:
|
21
|
+
`JSS.api.connect server: 'myjss.myserver.edu', server_path: 'dev_mgmt/jssweb', port: 8443 [...]`
|
22
|
+
(Thanks @christopher.kemp!)
|
21
23
|
|
22
|
-
|
24
|
+
### Fixed
|
25
|
+
- default port number choice for on-prem vs. JamfCloud connections
|
23
26
|
|
24
|
-
|
27
|
+
- Client.primary_console_user returns nil when at the loginwindow
|
28
|
+
|
29
|
+
- Computer#certificates attribute is now readable (Thanks to @Nick Taylor and @Lulu-sheng)
|
30
|
+
|
31
|
+
- error when SelfService icon is not available where expected, returns nil instead. (Thanks to @cybertunnel for finding this)
|
32
|
+
|
33
|
+
- JSS::Script.category now returns category name, not nil. (Thanks @cybertunnel for this one too!)
|
34
|
+
|
35
|
+
### Changed
|
36
|
+
- This file reformatted based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
37
|
+
|
38
|
+
- use new(er) API resources for LDAP lookups, don't go directly to LDAP via net/ldap
|
39
|
+
|
40
|
+
## [1.0.2] - 2018-10-16
|
41
|
+
### Added
|
42
|
+
- Support for parentheses (opening_paren and closing_paren) in JSS::Criteriable::Criterion objects
|
43
|
+
|
44
|
+
- Support for patch-related criterion comparisons "greater than", "less than", "greater than or equal", "less than or equal"
|
45
|
+
|
46
|
+
### Fixed
|
47
|
+
- a couple lingering calls to `.new` on APIObject classes, now `.fetch`
|
48
|
+
|
49
|
+
## [1.0.1] - 2018-08-27
|
50
|
+
### Added
|
51
|
+
- `JSS::MobileDeviceApplication#version=` and `#bundle_id=` These two attributes are now settable and will be saved to the server if the application is hosted externally. Thanks to [ctaintor](https://github.com/ctaintor) for providing this patch.
|
52
|
+
|
53
|
+
## [1.0.0] - 2018-08-10
|
25
54
|
|
26
55
|
Finally we're going to version 1.0, which we should have done when we went opensource. Future releases will try to adhere to [Semantic Versioning](https://semver.org/) as described in the [rubygems.org guidelines](https://guides.rubygems.org/patterns/#semantic-versioning)
|
27
56
|
|
28
57
|
**IMPORTANT** This version is not backward compatible with 0.x version. Please read the details below and test your code before deploying widely.
|
29
58
|
|
30
|
-
|
59
|
+
### Changed
|
60
|
+
- Jamf Pro API version must be 10.4 or higher
|
61
|
+
|
62
|
+
- Better handling of http error responses
|
31
63
|
|
32
|
-
-
|
64
|
+
- JSS::Policy objects now have setters for the 'Maintenence' subset, e.g. recons ('update inventory'), reset_name, fix_byhost, etc.
|
65
|
+
|
66
|
+
- defaults to using TLSv1.2 for API connections.
|
33
67
|
|
34
68
|
As of Jamf Pro 10.5. the server requires TLSv1.2 and will not accept connections using TLSv1.
|
35
69
|
|
@@ -49,31 +83,31 @@ Finally we're going to version 1.0, which we should have done when we went opens
|
|
49
83
|
- install a newer openssl, then install a your own ruby using that openssl (both can be done with homebrew)
|
50
84
|
- do the above, then extract the openssl library and modify it to work with the built-in ruby.
|
51
85
|
|
52
|
-
|
53
86
|
If you have questions about this, feel free to reach out to ruby-jss@pixar.com, or in the #ruby or #jss-api channels in MacAdmins slack space, for some advice.
|
54
87
|
|
55
|
-
|
88
|
+
### Added
|
89
|
+
- JSS::PatchSource metaclass and the subclassses JSS::PatchInternalSource, and JSS::PatchExternalSource. These provide acecss to the patchavailabletitles enpoint, which is needed to acquire name_id's for creating/activating JSS::PatchTitles
|
56
90
|
|
57
|
-
-
|
91
|
+
- JSS::PatchTitle, which also gives access to the patchreports endpoint. Also uses the JSS::PatchTitle::Version class to handle patch versions within a title, and assign packages to them. **WARNING**: ruby-jss will not allow duplicate 'display names' (the #name of the JSS::PatchTitle instance) - but the Jamf Web UI will allow duplicates. If you have duplicates, and retrieve PatchTitles by name, which one gets returned to you is undefined.
|
58
92
|
|
59
93
|
- The 'source_id' and 'name_id' of a patch title are, when combined, a unique identifier in the JSS (i.e. name_id's are unique within sources) As such, the PatchTitle.all list provides a :source_name_id key, which is a String made by joining the two values with a '-', e.g. '1-GoogleChrome'. This value can be used as a lookup for .fetch, e.g. `JSS::PatchTitle.fetch source_name_id: '1-GoogleChrome'`. There is also a matching .all_source_name_ids method, and the .map_all_ids_to() method takes :source_name_id as a mapping parameter. You can also use .fetch and .make with both source: (id or name) and name_id: specified.
|
60
94
|
|
95
|
+
- JSS::PatchPolicy. PatchPolicies are creatable when providing an active PatchTitle and an appropriate PatchTitle::Version that has a package assigned to it.
|
61
96
|
|
62
|
-
-
|
63
|
-
|
64
|
-
- add: the Group metaclass now has a calculate_members option (bool) to the #create method. When true, the membership of the group will be updated in the existing ruby instance immediately after the group is created in the JSS. Doesn't do much for static groups, but is useful for smart groups. Defaults to true. If you don't care about the membership immediately, or don't want to wait for the membership to be calculated on the server, set this to false.
|
97
|
+
- the Group metaclass now has a calculate_members option (bool) to the #create method. When true, the membership of the group will be updated in the existing ruby instance immediately after the group is created in the JSS. Doesn't do much for static groups, but is useful for smart groups. Defaults to true. If you don't care about the membership immediately, or don't want to wait for the membership to be calculated on the server, set this to false.
|
65
98
|
|
66
|
-
-
|
99
|
+
- more generic data validation methods in JSS::Validate module, and more use of them throughout the code.
|
67
100
|
|
68
|
-
-
|
101
|
+
- 'support' in SelfServable for notifications - note that there are API bugs limiting the usefulness of this.
|
69
102
|
|
70
|
-
-
|
103
|
+
- regex options to JSS::Criteriable::Criterion objects
|
71
104
|
|
72
|
-
-
|
105
|
+
- there is now a, sort-of, spec/testing framework. While based on ruby's minitest specifications, it's wrapped in a very custom executable with a helper module. See the README in the test directory for details. Specs will be added slowly over time.
|
73
106
|
|
74
|
-
-
|
107
|
+
- JSS::Client now has a .management_action class method, which wraps around the 'Management Action.app' tool that comes with Jamf Pro and creates Notification Center notifications. At the moment support is minimal, and the notification type (alert vs. banner) is up to the User.
|
75
108
|
|
76
|
-
|
109
|
+
### Removed
|
110
|
+
- the .new class method on APIObject subclasses no longer works. Even though it's the standard ruby way to create instances of a class, `.new` for APIObjects was confusing, since it implied creating new objects in the JSS. Instead you must now use the `.fetch` class method to instantiate existing objects and the `.make` class method to instantiate local instances of objects to be created in the JSS. Both .fetch and .make have existed for some time.
|
77
111
|
|
78
112
|
**COMPATIBILITY:**
|
79
113
|
|
@@ -83,76 +117,65 @@ Finally we're going to version 1.0, which we should have done when we went opens
|
|
83
117
|
|
84
118
|
Note that the instance methods `#create` (create the current instance as a new object in the JSS) and `#update` (send changes in the current instance to the JSS) remain unchanged, and both continue handled by `#save`
|
85
119
|
|
86
|
-
|
87
|
-
|
88
|
-
- add: JSS::Client now has a .management_action class method, which wraps around the 'Management Action.app' tool that comes with Jamf Pro and creates Notification Center notifications. At the moment support is minimal, and the notification type (alert vs. banner) is up to the User.
|
89
|
-
|
90
|
-
- misc: as Apple says: various bugfixes and improvements.
|
91
|
-
|
92
|
-
## v 0.14.0, 2018-05-30
|
93
|
-
|
94
|
-
- Fix: RestClient no longer uses RestClient::Request::Unauthorized, only RestClient::Unauthorized
|
95
|
-
|
96
|
-
- Revert: RestClient 2.0x doesn't seem to play nicely with the version of openssl on macOS 10.10 and JamfPro 10.3 (at least in our environment). So the rest-client gem can be any version >= 1.8.0 and < 2.1. You may have to separately install the correct RestClient version as needed.
|
97
|
-
|
98
|
-
## v 0.13.0, 2018-05-30
|
99
|
-
|
100
|
-
- Update: Now requires rest-client gem v2.0 and up, and ruby v 2.0.0 and up. Thanks to HIMANSHU-ELIGIBLE @ github for catching & fixing this one.
|
120
|
+
### Fixed
|
121
|
+
- as Apple says: various bugfixes and improvements.
|
101
122
|
|
102
|
-
|
123
|
+
## [0.14.0] - 2018-05-30
|
124
|
+
### Fixed
|
125
|
+
- RestClient no longer uses RestClient::Request::Unauthorized, only RestClient::Unauthorized
|
103
126
|
|
104
|
-
|
127
|
+
- RestClient 2.0x doesn't seem to play nicely with the version of openssl on macOS 10.10 and JamfPro 10.3 (at least in our environment). So the rest-client gem can be any version >= 1.8.0 and < 2.1. You may have to separately install the correct RestClient version as needed.
|
105
128
|
|
106
|
-
|
129
|
+
## [0.13.0] - 2018-05-30
|
130
|
+
### Changed
|
131
|
+
- Now requires rest-client gem v2.0 and up, and ruby v 2.0.0 and up. Thanks to HIMANSHU-ELIGIBLE @ github for catching & fixing this one.
|
107
132
|
|
108
|
-
|
133
|
+
### Fixed
|
134
|
+
- a few minor bugs in JSS::Criteriable::Criterion
|
109
135
|
|
110
|
-
|
136
|
+
## [0.12.0] - 2018-04-16
|
137
|
+
### Changed
|
138
|
+
- when building .pkg's with JSS::Composer.mk_pkg, only two params are related to Package Signing: 'signing_identity:' the name of the signing identity to use, and and 'signing_options:' a string of all other signing-related CLI options that will be passed to the pkgbuild command, e.g. keychain locations, timestamps, certs, etc. For details, see `man pkgbuild`
|
111
139
|
|
112
|
-
-
|
140
|
+
- Now augmenting ruby Hashes with an embeded 'recursive-open-struct' version of themselves. This simplifies accessing values from deeply-nested Hash structures, e.g. JSS::Computer#hardware instead of `computer_instance.hardware[:storage].first[:partition][:percentage_full]` you can do `computer_instance.hardware.jss_ros.storage.first.partition.percentage_full`. See http://www.rubydoc.info/gems/ruby-jss/Hash for details. Uses the [recursive-open-struct gem](https://github.com/aetherknight/recursive-open-struct).
|
113
141
|
|
114
|
-
-
|
142
|
+
- the JSS::Computer class is now defined in multiple files. The single computer.rb file was getting far to unwieldy.
|
115
143
|
|
116
|
-
-
|
144
|
+
- JSS::MobileDeviceConfigurationProfile and JSS::OSXConfigurationProfile now share an abstract parent class, JSS::ConfigurationProfile, containing common code.
|
117
145
|
|
118
|
-
|
146
|
+
### Added
|
147
|
+
- The computerapplications/application endpoint is now implemented as the JSS::Computer.application_installs class method so you can query lists of computers that have certain apps installed.
|
119
148
|
|
120
|
-
-
|
149
|
+
- JSS::MobileDeviceConfigurationProfile is now more fleshed-out and is Updatable.
|
121
150
|
|
122
|
-
|
151
|
+
### Fixed
|
152
|
+
- Setting the first icon of a newly-created JSS::Policy now works. Thanks @christopher.kemp for reporting this one
|
123
153
|
|
124
|
-
|
154
|
+
- the SelfServable module was mis-handling 'user-removability' data for config profiles.
|
125
155
|
|
126
|
-
-
|
156
|
+
- Typo and missing method alias, caught by csfjeff @ github, issue #23
|
127
157
|
|
128
|
-
|
158
|
+
## [0.11.0] - 2018-03-12
|
159
|
+
### Changed
|
160
|
+
- Updated general attributes for computers and mobile devices
|
129
161
|
|
130
|
-
-
|
131
|
-
s
|
132
|
-
- Improvement: Computers and MobileDevices are now Creatable. Use the .make class method to create an unsaved instance, then .create/.save instance method to create the JSS record. Note: Mobile Devices need both a unique serial number and unique udid to be accepted by the API.
|
162
|
+
- Computers and MobileDevices are now Creatable. Use the .make class method to create an unsaved instance, then .create/.save instance method to create the JSS record. Note: Mobile Devices need both a unique serial number and unique udid to be accepted by the API.
|
133
163
|
|
134
|
-
-
|
164
|
+
- Handling of 'site' data is now done via the JSS::Sitable mixin module
|
135
165
|
|
136
|
-
-
|
166
|
+
- When the JSS server's hostname ends with 'jamfcloud.com' default to SSL port 443 (vs 8443 for locally hosted JSSs)
|
137
167
|
|
138
|
-
-
|
168
|
+
- now requires net-ldap v 0.16, for security fixes
|
139
169
|
|
140
|
-
-
|
141
|
-
|
142
|
-
- Add: All APIObject subclasses can be deleted without instantiating, via the .delete class method, providing an array of ids
|
143
|
-
|
144
|
-
- Improvement: All handling of MDM commands is in the JSS::MDM module, which is mixed in to Computer, ComputerGroup, MobileDevice, and MobileDeviceGroup
|
170
|
+
- All handling of MDM commands is in the JSS::MDM module, which is mixed in to Computer, ComputerGroup, MobileDevice, and MobileDeviceGroup
|
145
171
|
|
146
172
|
*WARNING* Due to the expanded functionality of MDM commands overall, the syntax for calling .send_mdm_command may have changed, depening on how you used it. Please test your code before updating.
|
147
173
|
|
148
|
-
-
|
149
|
-
|
150
|
-
- Improvement: 'devmode', use `JSS.devmode \[:on|:off]`` to set, and `JSS.devmode?`` to query. Useful for developers, esp. in `irb` who want, e.g. to have a method output some state when in devmode, instead of/as well as behaving normally. This is currently the case for `JSS::MDM.send_mdm_command`. When devmode? is true, the XML sent to the API for the command is printed to stdout before the command is sent to the target machine.
|
174
|
+
- 'devmode', use `JSS.devmode \[:on|:off]`` to set, and `JSS.devmode?`` to query. Useful for developers, esp. in `irb` who want, e.g. to have a method output some state when in devmode, instead of/as well as behaving normally. This is currently the case for `JSS::MDM.send_mdm_command`. When devmode? is true, the XML sent to the API for the command is printed to stdout before the command is sent to the target machine.
|
151
175
|
|
152
|
-
-
|
153
|
-
The instance methods remain, and they now just use the class methods.
|
176
|
+
- Computer app usage & mgmt data methods are now class methods, so can be used without instantiating the computer. The instance methods remain, and they now just use the class methods.
|
154
177
|
|
155
|
-
-
|
178
|
+
- All handling of management history for Computers and MobileDevices is in the new ManagementHistory module. The module
|
156
179
|
is mixed into JSS::Computer and JSS::MobileDevice, so its methods are available to those classes and their instances. Note that some
|
157
180
|
history events are only available in Computers or MobileDevices, and some are available in both.
|
158
181
|
|
@@ -172,36 +195,49 @@ s
|
|
172
195
|
*WARNING* these changes mean that the methods returning Arrays of ManagementHistory class instances are not backward compatible,
|
173
196
|
since the earlier versions returned Hashes
|
174
197
|
|
175
|
-
|
198
|
+
### Added
|
199
|
+
- ruby-jss now has a code of conduct for contributors.
|
176
200
|
|
177
|
-
|
201
|
+
- All APIObject subclasses can be deleted without instantiating, via the .delete class method, providing an array of ids
|
202
|
+
|
203
|
+
### Fixed
|
204
|
+
- NoMethod error when saving JSS::Policy was due to a typo in a method call.
|
178
205
|
|
206
|
+
- Initialization of Creatable objects using certain mixins (Extendable, Sitable, Categorizable) either failed, or errored when trying to set their values. Now fixed. Thanks @mylescarrick for reporting this one.
|
179
207
|
|
180
|
-
|
208
|
+
- Scope objects use the api connection of their container
|
181
209
|
|
182
|
-
|
210
|
+
### Deprecated
|
183
211
|
|
184
|
-
|
212
|
+
- The JSS::APIConnection convenience class methods .computer_history, .send_computer_mdm_command, and .send_computer_mdm_command.
|
185
213
|
|
186
|
-
|
214
|
+
These methods have been updated to work with the new methods in the MDM and ManagementHistory modules, but will be removed from JSS::APIConnection in a future release. Instead, call them directly from the JSS::Computer or JSS::MobileDevice classes, passing in the desired APIConnection if needed. Given the expansion of MDM commands and history details, maintaining the convenience methods in APIConnection is too prone to errors.
|
215
|
+
|
216
|
+
## [0.10.2] - 2018-02-16
|
217
|
+
### Fixed
|
218
|
+
- *IMPORTANT*: Updating JSS::Extendable objects with no changes to ext. attribs will no longer erase all ext attrib values. (!)
|
219
|
+
|
220
|
+
## [0.10.1] - 2017-11-08
|
221
|
+
### Added
|
222
|
+
- Extension Attribute values that are populated by Script or LDAP can now be modified via Extendable#set_ext_attr.
|
187
223
|
|
188
224
|
Previously, attempts to set the value would raise an exception, because those values aren't modifiable in the WebUI.
|
189
225
|
However, the API itself allows such modification, so now ruby-jss does too.
|
190
226
|
|
191
|
-
-
|
227
|
+
- If you have access to the JSS MySQL database, ruby-jss now provides acces to the 'object history' of all APIObject subclasses.
|
192
228
|
|
193
229
|
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)
|
194
230
|
then you can call `#object_history` and `#add_object_history_entry` for individual object instances.
|
195
231
|
|
196
|
-
|
197
|
-
|
198
|
-
- Fix: A few lingering methods that weren't multi-APIConnection aware, are now aware
|
199
|
-
|
200
|
-
## v0.10.0, 2017-10-09
|
232
|
+
### Fixed
|
233
|
+
- Error when no storage device on a Computer is marked as the boot drive (Thanks @christopher.kemp!)
|
201
234
|
|
202
|
-
-
|
235
|
+
- A few lingering methods that weren't multi-APIConnection aware, are now aware
|
203
236
|
|
204
|
-
|
237
|
+
## [0.10.0] - 2017-10-09
|
238
|
+
### Changed
|
239
|
+
- Working with multiple APIConnections is now far more flexible!
|
240
|
+
There are three ways to work with multiple simultaneous APIConnection instances:
|
205
241
|
1. Making a connection 'active', after which API calls go thru it (introduced in 0.9.0)
|
206
242
|
2. Passing an APIConnection instance to methods that use the API
|
207
243
|
3. Using an APIConnection instance itself to make API calls.
|
@@ -209,155 +245,219 @@ s
|
|
209
245
|
The default/active connection continues to work as always, so your existing code will be fine.
|
210
246
|
See the [documentation for the JSS::APIConnection class](http://www.rubydoc.info/gems/ruby-jss/JSS/APIConnection) for details.
|
211
247
|
|
212
|
-
-
|
248
|
+
- Improvement: Extendable module: only push changed EAs when `update` is called.
|
249
|
+
|
250
|
+
### Fixed
|
251
|
+
- Specifying port 443, as well as 8443, when connecting an APIConnection will default to using SSL. To force such a connection to NOT use SSL, provide the parameter `use_ssl: false`
|
252
|
+
|
253
|
+
- require 'English', rather than require 'english'. Thanks to HIMANSHU-ELIGIBLE @ github for catching & fixing this one.
|
213
254
|
|
214
|
-
-
|
255
|
+
- Popup extension attributes can always take a blank value.
|
215
256
|
|
216
|
-
-
|
257
|
+
- UserGroup members have a 'username' value, not 'name'
|
217
258
|
|
218
|
-
-
|
259
|
+
- APIConnection.map_all_ids wasn't honoring :refresh
|
219
260
|
|
220
|
-
|
261
|
+
### Added
|
262
|
+
- Two case-insentive string methods added to Array:
|
221
263
|
- Array#jss_ci_include_string? Takes a string, returns true if the Array contains the string without regard to case.
|
222
264
|
E.g. `['ThrAsHer'].jss_ci_include_string? 'thrasher' # => true`
|
223
265
|
- Array#jss_ci_fetch_string Takes a string and fetches it from the array, regardless of case. Nil if not found.
|
224
266
|
E.g. `['thrasher'].jss_ci_fetch_string 'ThrAsHer' # => 'thrasher'`
|
225
|
-
- Fix: APIConnection.map_all_ids wasn't honoring :refresh
|
226
|
-
|
227
|
-
- Improvement: Extendable module: only push changed EAs when `update` is called.
|
228
267
|
|
229
|
-
-
|
268
|
+
- Computer objects now have a `last_enrolled` attribute
|
230
269
|
|
231
|
-
##
|
232
|
-
|
233
|
-
-
|
270
|
+
## [0.9.3] - 2017-08-08
|
271
|
+
### Added
|
272
|
+
- JSS::Computer instance now allow you to modify mac_address, alt_mac_address, udid, and serial_number.
|
234
273
|
Note: even tho the WebUI doesn't allow editing of the serial_number, the API does and doing so can be useful
|
235
274
|
for dealing with duplicate SN's when a new logic board with a new udid creates a new computer entry.
|
236
275
|
|
237
|
-
-
|
276
|
+
- JSS::Validate module, to consoliday generic data-validation methods. Methods will be moved to it from
|
238
277
|
other places over time.
|
239
278
|
|
240
|
-
##
|
279
|
+
## [0.9.2] - 2017-07-25
|
280
|
+
### Fixed
|
281
|
+
- parsing of JSS versions > 9.99
|
282
|
+
|
283
|
+
## [0.9.0] - 2017-07-17
|
284
|
+
### Changed
|
285
|
+
- JSS::RestrictedSoftware class is now Creatable and Updatable.
|
286
|
+
|
287
|
+
- APIObject.fetch can be given a single value, which will be compared to the subclass's .all_ids,
|
288
|
+
.all_names, and other list methods for the various lookup keys, and if a match is found, the object is returned. E.g. instead of
|
289
|
+
JSS::Computer.fetch name: 'foo' you can just use JSS::Computer.fetch 'foo'.
|
290
|
+
Note that specifying the lookup key is always faster.
|
291
|
+
|
292
|
+
- the OTHER_LOOKUP_KEYS constants of APIObject subclasses can now reconize variations on a key, e.g. :serialnumber and
|
293
|
+
:serial_number, or :macaddress and :mac_address
|
294
|
+
|
295
|
+
- Support for multiple APIConnection instances - you can connect to more than one server at a time and switch between them.
|
296
|
+
|
297
|
+
- APIConnection connection settings come first from the #connect params, then from Configuration,
|
298
|
+
then from the Client setting (if the machine is a client), then from the module defaults
|
241
299
|
|
242
|
-
-
|
300
|
+
- APIConnection can now take an xml payload with #delete_rsrc
|
243
301
|
|
244
|
-
|
302
|
+
- JSS::Policy instances can now flush their logs
|
245
303
|
|
246
|
-
-
|
247
|
-
|
248
|
-
|
249
|
-
-
|
250
|
-
|
304
|
+
- JSS::Policy now has setters for server_side_activation and server_side_expriation.
|
305
|
+
|
306
|
+
### Added
|
307
|
+
- JSS::MobileDevice.all_apple_tvs class method
|
308
|
+
|
309
|
+
- JSS::MobileDevice.management_history method, and related methods in instances
|
310
|
+
|
311
|
+
- JSS::MobileDevice.send_mdm_command has been expanded to handle all MDM commands supported by the API *except* Wallpaper and PasscodeLockGracePeriod (some day soon hopefully)
|
312
|
+
|
313
|
+
- JSS::Server instances (as found in the JSS::APIConnection.server attribute) now have methods #activation_code and
|
251
314
|
#organization
|
252
|
-
|
315
|
+
|
316
|
+
- JSS::Computer now can send MDM commands to instances via #blank_push #device_lock #erase_device and #remove_mdm_profile, or to
|
253
317
|
arrays of computer identifiers using the JSS::Computer.send_mdm_command method.
|
254
|
-
|
318
|
+
|
319
|
+
- JSS::Computer now has class methods to retrieve the server-wide .inventory_collection_settings and
|
255
320
|
.checkin_settings
|
256
|
-
|
321
|
+
|
322
|
+
- JSS::Computer instances now have access to the data in the History tab of the computer details page in
|
257
323
|
the WebUI. Subset-specific methods are #usage_logs, #audits, #policy_logs, #completed_policies, #failed_policies, #casper_remote_logs, #screen_sharing_logs, #casper_imaging_logs, #user_location_history, and #app_store_history
|
258
|
-
|
324
|
+
|
325
|
+
- JSS::Computer instances now have an #application_usage method which takes a date range and returns an
|
259
326
|
array of usage data.
|
260
|
-
- Add: JSS::Computer instances now have access to their 'management data' (the stuff in the Management tab of
|
261
|
-
the Computer details in the WebUI). As well as the #management_data method, there are shortcut methods for the subsets: #smart_groups, #static_groups, & #patch_titles and in-scope items like: #policies, #configuration_profiles, #ebooks, #app_store_apps, #restricted_software
|
262
|
-
- Fix: issue with handling of params to APIObject.make
|
263
|
-
- Improvement: APIObject.fetch can be given a single value, which will be compared to the subclass's .all_ids,
|
264
|
-
.all_names, and other list methods for the various lookup keys, and if a match is found, the object is returned. E.g. instead of
|
265
|
-
JSS::Computer.fetch name: 'foo' you can just use JSS::Computer.fetch 'foo'.
|
266
|
-
Note that specifying the lookup key is always faster.
|
267
|
-
- Improvement: the OTHER_LOOKUP_KEYS constants of APIObject subclasses can now reconize variations on a key, e.g. :serialnumber and
|
268
|
-
:serial_number, or :macaddress and :mac_address
|
269
|
-
- Improvement: Support for multiple APIConnection instances - you can connect to more than one server at a time and switch between them.
|
270
|
-
- Improvement: APIConnection connection settings come first from the #connect params, then from Configuration,
|
271
|
-
then from the Client setting (if the machine is a client), then from the module defaults
|
272
|
-
- Improvement: APIConnection can now take an xml payload with #delete_rsrc
|
273
|
-
- Improvement: JSS::Policy instances can now flush their logs
|
274
|
-
- Improvement: JSS::Policy now has setters for server_side_activation and server_side_expriation.
|
275
327
|
|
276
|
-
|
328
|
+
- JSS::Computer instances now have access to their 'management data' (the stuff in the Management tab of
|
329
|
+
the Computer details in the WebUI). As well as the #management_data method, there are shortcut methods for the subsets: #smart_groups, #static_groups, & #patch_titles and in-scope items like: #policies, #configuration_profiles, #ebooks, #app_store_apps, #restricted_software
|
277
330
|
|
278
|
-
|
331
|
+
### Fixed
|
332
|
+
- issue with handling of params to APIObject.make
|
279
333
|
|
280
|
-
##
|
334
|
+
## [0.8.3] - 2017-06-07
|
335
|
+
### Fixed
|
336
|
+
- Version parsing: empty version parts default to 0, e.g. 10.2 parses as 10.2.0
|
281
337
|
|
282
|
-
|
283
|
-
|
338
|
+
## [0.8.2] - 2017-06-07
|
339
|
+
### Fixed
|
340
|
+
- Some objects failed to locate their 'main subset' (the chunk of API data that contains the object name and id) correctly.
|
284
341
|
|
342
|
+
- Some versions of Gem::Version don't like dashes (which are part of SemVers).
|
285
343
|
|
286
|
-
##
|
344
|
+
## [0.8.1] - 2017-06-05
|
345
|
+
### Changed
|
346
|
+
- Support for the new semantic versioning of Jamf products starting with Jamf Pro 9.99
|
287
347
|
|
288
|
-
- Improvement: Support for the new semantic versioning of Jamf products starting with Jamf Pro 9.99
|
289
348
|
- The alpha 'Webhooks framework' has been removed from ruby-jss and will reappear soon as it's own project with a new name.
|
290
|
-
|
291
|
-
-
|
292
|
-
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
-
|
300
|
-
|
301
|
-
-
|
302
|
-
|
303
|
-
-
|
304
|
-
|
305
|
-
-
|
306
|
-
|
307
|
-
-
|
308
|
-
|
309
|
-
-
|
310
|
-
|
311
|
-
|
349
|
+
|
350
|
+
- JSS::APIObject and subclasses now have .fetch and .make class methods which are wrappers for .new. .fetch is the preferred way to retrieve instances of existing API objects, and .make for making not-yet-existing objects to be created in the JSS. The .new class method still works as before, but is considered deprecated.
|
351
|
+
- JSS::APIConnection now has a #rest_url attribute that returns the base of the url for the current REST connection, e.g. "https://jamf.company.com:8443/JSSResource", or nil if not connected.
|
352
|
+
|
353
|
+
### Fixed
|
354
|
+
- JSS::Package uploading and zipping wasn't worked correctly, should be now.
|
355
|
+
|
356
|
+
## [0.8.0] - 2017-04-07
|
357
|
+
### Changed
|
358
|
+
- Lots of code cleanup to follow RuboCop guidelines (more of this comming)
|
359
|
+
|
360
|
+
- APIConnection class is no longer a singleton. The first step towards the ability to swap between multiple connections.
|
361
|
+
|
362
|
+
- Improved APIConnection's ability to figure out default connection settings
|
363
|
+
|
364
|
+
- APIObject mixin module parsing is now handled automatically by the APIObject superclass.
|
365
|
+
|
366
|
+
- APIObject subclasses have predicate methods to see if they have various mixed-in abilities, e.g. #creatable?, #locatable?
|
367
|
+
|
368
|
+
- All handling of Category data in non-Category objects is in a new Categorizable mixin module.
|
369
|
+
|
370
|
+
### Added
|
371
|
+
- #port, #protocol, and #last_http_response to APIConnection instances
|
372
|
+
|
373
|
+
- APIConnection#post_rsrc and #put_rsrc now catch and re-raise HTTP 409 Conflict errors as JSS::ConflictError with error message about what caused the conflict.
|
374
|
+
|
375
|
+
- JSS::MobileDeviceApplication class
|
376
|
+
|
377
|
+
- JSS::Icon class, handled by the improved SelfServable mixin module
|
378
|
+
|
379
|
+
- JSS::Client.jamf_helper method now takes arg_string:, output_file: and abandon_process: parameters.
|
380
|
+
|
381
|
+
- executable bin/jamfHelperBackgrounder, wrapper to run jamfHelper as a stand-alone process, allowing polcies to continue while a window is displayed
|
382
|
+
|
383
|
+
- explicitly require the standard library 'English', and start using it rather than cryptic globals like $! and $@
|
384
|
+
|
385
|
+
- first attempts at adding SSL/TLS support to the Webhooks framework.
|
312
386
|
- NOTE: the Webhooks framework is still 'alpha' code, and will be moved into a separate git repo eventually. It doesn't rely on ruby-jss.
|
313
387
|
|
314
|
-
|
388
|
+
### Fixed
|
389
|
+
- sometimes the port would default to 80 rather than 8443
|
390
|
+
|
391
|
+
- sometimes DB connections would double-disconnect, causing superfluous exceptions.
|
392
|
+
|
393
|
+
## [0.7.0] - 2017-02-01
|
394
|
+
### Changed
|
395
|
+
- subnet-update, the example command in the bin directory, has been renamed to negseg-update. It's also been cleaned up and uses the new functionality of JSS::NetworkSegment.
|
315
396
|
|
397
|
+
### Fixed
|
316
398
|
- JSS::NetworkSegment - many bugfixes and cleanup. I didn't really have a proper grasp of IP CIDR masks before and how they (don't) relate to the IP ranges used by Network Segments in the JSS. The CIDRs and full netmasks can still be used to set the ending addresses of NetworkSegment objects, but the #cidr method is gone, since it was meaningless for segments that didn't match subnet-ranges.
|
317
|
-
- subnect-update, the example command in the bin directory, has been renamed to negseg-update. It's also been cleaned up and uses the new functionality of JSS::NetworkSegment.
|
318
|
-
- JSS::DBConnection - fixed a bug where meaningless IO 'stream closed' errors would appear when closing the DB connection.
|
319
399
|
|
320
|
-
|
400
|
+
- JSS::DBConnection - fixed a bug where meaningless IO 'stream closed' errors would appear when closing the DB connection.
|
321
401
|
|
322
|
-
|
402
|
+
## [0.6.7] - 2017-01-03
|
403
|
+
### Added
|
404
|
+
- class JSS::WebHook, which requires Jamf Pro 9.97 or higher.
|
323
405
|
- NOTE: This is access to the WebHooks themselves as defined in Jamf Pro, and is separate from the WebHook-handling framework included in the previous release for testing.
|
324
406
|
|
325
|
-
##
|
407
|
+
## [0.6.6] - 2016-11-30
|
408
|
+
### Changed
|
409
|
+
- Change the mountpoint directory for JSS::DistributionPoint#mount to /tmp, because Sierra doesn't allow mounting in /Volumes except by root. (Thanks @LM2807! )
|
410
|
+
|
411
|
+
- Starting cleaning up code to better adhere to [RuboCop](http://rubocop.readthedocs.io/en/latest/) standards
|
412
|
+
|
413
|
+
- JSS::Policy, now creatable, and self-servable, and more attributes are updatable
|
326
414
|
|
327
|
-
- Added String#jss_to_pathname to convert Strings to Pathname instances in JSS::Configuration.
|
328
415
|
- JSS::DBConnection#connect now returns the server hostname, to match the behavior of JSS::APIConnection#connect
|
416
|
+
|
417
|
+
### Added
|
418
|
+
- String#jss_to_pathname to convert Strings to Pathname instances in JSS::Configuration.
|
419
|
+
|
329
420
|
- JSS::Client: added .console_user method
|
330
|
-
|
421
|
+
|
331
422
|
- JSS::SelfServable, finally getting this module functional, at least for policies
|
423
|
+
|
332
424
|
- JSS::Creatable, added #clone method - all creatable objects can be cloned easily.
|
425
|
+
|
333
426
|
- JSS::APIObject, added .exist? and .valid_id class methods and #to_s instance method
|
334
|
-
- Change the mountpoint directory for JSS::DistributionPoint#mount to /tmp, because Sierra doesn't allow mounting in /Volumes except by root. (Thanks @LM2807! )
|
335
|
-
- Starting cleaning up code to better adhere to [RuboCop](http://rubocop.readthedocs.io/en/latest/) standards
|
336
|
-
- Added alpha version of a JSS WebHooks framwork
|
337
427
|
|
338
|
-
|
428
|
+
- alpha version of a JSS WebHooks framwork
|
339
429
|
|
430
|
+
## [0.6.5] - 2016-08-10
|
431
|
+
### Changed
|
340
432
|
- Cleanup of redundant constants (Thanks @aurica!)
|
341
|
-
|
342
|
-
|
343
|
-
-
|
433
|
+
|
434
|
+
### Added
|
435
|
+
- JSS::ComputerInvitation class (Thanks @tostart-pickagreatname!)
|
436
|
+
- JSS::Account class (Thanks @JonPulsifer!)
|
437
|
+
- JSS::OSXConfigurationProfile class (Thanks @tostart-pickagreatname!)
|
344
438
|
- JSS::Computer: added methods #boot_drive, #filevault2_enabled?, and #filevault1_accounts
|
345
|
-
- Various small bugfixes & improvements
|
346
439
|
|
347
|
-
|
440
|
+
### Fixed
|
441
|
+
- Various small bugfixes & improvements
|
348
442
|
|
443
|
+
## [0.6.4] - 2016-03-24
|
444
|
+
### Changed
|
349
445
|
- JSS::Package#dlete can optionally delete the master file at the same time
|
350
|
-
|
351
|
-
- Various small bugfixes & improvements
|
446
|
+
|
352
447
|
- Updated the config file name to match the new gem name, maintaining backwards compatibility
|
448
|
+
|
353
449
|
- Improved error messages
|
354
450
|
|
355
|
-
|
451
|
+
### Added
|
452
|
+
- example ruby-jss.conf file with internal documentation
|
356
453
|
|
357
|
-
|
454
|
+
### Fixed
|
455
|
+
- Various small bugfixes & improvements
|
358
456
|
|
359
|
-
##
|
457
|
+
## [0.6.3] - 2016-03-09
|
458
|
+
Maintenence version bump to fix an issue uploading to rubygems.org
|
360
459
|
|
460
|
+
## [0.6.2] - 2016-03-08
|
361
461
|
As of v0.6.2, the github project, and rubygem have been renamed to 'ruby-jss'. The 'require' name is now 'jss'.
|
362
462
|
|
363
463
|
In part this was to make the name more in-line with other ruby gems, and also to get in line with Shea Craig's [python-jss](https://github.com/sheagcraig/python-jss) and Charles Edge's [swift-jss](https://github.com/krypted/swift-jss)
|
@@ -366,100 +466,120 @@ Yes we now have native API access in 3 languages!
|
|
366
466
|
|
367
467
|
The 'jss-api' gem has been updated one last time, also to v0.6.2. That gem has a dependency on ruby-jss v0.6.2 or greater, and if you require 'jss-api' with it, it merely requires 'jss' for you. While that will provide backward-compatibility, please update your code to require 'jss' directly, since the jss-api wrapper gem won't be around forever.
|
368
468
|
|
369
|
-
|
469
|
+
### Changed
|
470
|
+
- Project & gem name are now 'ruby-jss'
|
370
471
|
|
472
|
+
### Added
|
371
473
|
- JSS::Package#os_ok? and JSS::Package#processor_ok? methods can now check those things against the package settings, and not attempt to install if the machine isn't up to snuff.
|
372
|
-
- JSS::ExtensionAttribute#latest_values always now includes :username in the returned data.
|
373
474
|
|
374
|
-
|
475
|
+
- JSS::ExtensionAttribute#latest_values always now includes :username in the returned data.
|
375
476
|
|
477
|
+
#### Fixed
|
376
478
|
- JSS::stdin_lines no longer uses a constant to store incoming stdin data at load time, which causes hangs when there's no terminal on stdin. Now stdin is only read when the method is called, and data stored in a module variable.
|
377
|
-
- JSS::Composer::mk_dmg fix for building/indexing dmg's, no longer creates an unreadable .Trashes folder.
|
378
|
-
- Several small typos and other tiny bugs.
|
379
479
|
|
380
|
-
|
480
|
+
- JSS::Composer::mk_dmg fix for building/indexing dmg's, no longer creates an unreadable .Trashes folder.
|
381
481
|
|
382
|
-
|
482
|
+
- Several small typos and other tiny bugs.
|
383
483
|
|
484
|
+
## [0.6.1] - 2016-03-01
|
485
|
+
### Added
|
384
486
|
- JSS::Package#install now takes :alt_download_url argument.Can be used to specify a custom URL from which to download a pkg/dmg for installation with 'jamf install'. This allows the use of cloud distribution points.
|
385
|
-
- JSS::DistributionPoint: Added reachability methods, improved assessment of mount-success. #reachable_for_download? and #reachable_for_upload? will now return a boolean indicating if the DistPoint is reachable.
|
386
487
|
|
387
|
-
|
488
|
+
- JSS::DistributionPoint: Added reachability methods, improved assessment of mount-success. #reachable_for_download? and #reachable_for_upload? will now return a boolean indicating if the DistPoint is reachable.
|
388
489
|
|
490
|
+
## [0.6.0] - 2016-01-06
|
389
491
|
This version of the jss-api gem incorporates changes needed for the upcoming release of d3 (a.k.a. depot3),
|
390
492
|
a package/patch management system for Casper, which was the reason for the jss-api gem to begin with.
|
391
493
|
|
392
494
|
As such, while the JSS module will continue to be a separate git repo, specific commits of it will be
|
393
495
|
submodules of the depot3 git repo, starting with this one, or one shortly hereafter.
|
394
496
|
|
497
|
+
### Changed
|
498
|
+
- JSS::DistributionPoint: #mount now defaults to read-only unless :rw is passed
|
499
|
+
|
500
|
+
- lots of code cleanup
|
395
501
|
|
396
|
-
|
502
|
+
- JSS::Package#install now returns a boolean indicating success of installation.
|
503
|
+
The previous return value (the Process::Status of the 'jamf install' proceess) usually returned 0 exitstatus even if the pkg install failed.
|
504
|
+
Now the actual install command is examined, and if its exitstatus is zero, Package#install returns true, else false.
|
397
505
|
|
398
|
-
- new path to the jamf binary was corrected
|
399
|
-
- fixed the logic in using the :use_ssl arg to JSS::APIConnection::connect
|
400
|
-
- Composer module no longer adds redundant .pkg extensions
|
401
|
-
- JSS::DistributionPoint, bug fix when initializing with :id=>:master
|
402
|
-
- JSS::DistributionPoint: #mount now defaults to read-only unless :rw is passed
|
403
|
-
- String: added #jss_to_time to convertion strings to Time objects using JSS::parse_time
|
404
506
|
- JSS::Package: better handling of API values like "None" and "No category assigned"
|
405
|
-
- JSS::Package: added #type to return :pkg or :dmg
|
406
|
-
- JSS::Package: Changes to #install, including return value! See NOTES below.
|
407
|
-
- lots of code cleanup
|
408
507
|
|
409
|
-
####
|
508
|
+
#### Added
|
509
|
+
- String: added #jss_to_time to convertion strings to Time objects using JSS::parse_time
|
510
|
+
|
511
|
+
- JSS::Package: added #type to return :pkg or :dmg
|
410
512
|
|
411
513
|
- JSS::APIConnection and JSS::DBConnection determines server hostname via several means if not yet connected
|
514
|
+
|
412
515
|
- JSS::APIConnection and JSS::DBConnection can test validitiy of a server
|
516
|
+
|
413
517
|
- JSS::DBConnection now has a DEFAULT_PORT constant
|
414
518
|
|
519
|
+
### Fixed
|
520
|
+
- new path to the jamf binary was corrected
|
521
|
+
|
522
|
+
- fixed the logic in using the :use_ssl arg to JSS::APIConnection::connect
|
523
|
+
|
524
|
+
- Composer module no longer adds redundant .pkg extensions
|
415
525
|
|
416
|
-
|
526
|
+
- JSS::DistributionPoint, bug fix when initializing with :id=>:master
|
417
527
|
|
418
|
-
|
419
|
-
The previous return value (the Process::Status of the 'jamf install' proceess) usually returned 0 exitstatus even if the pkg install failed.
|
420
|
-
Now the actual install command is examined, and if its exitstatus is zero, Package#install returns true, else false.
|
528
|
+
- As of casper 9.72, the argument requirements have changed for 'jamf install' with http downloads. This is now handled correctly
|
421
529
|
|
422
|
-
|
530
|
+
## [0.5.8] - 2015-09-22
|
531
|
+
### Added
|
532
|
+
- client.rb: looks for the new ElCap+ location for the jamf binary, falls back to old location if not found.
|
423
533
|
|
534
|
+
- Locatable#clear_location public instance method added
|
424
535
|
|
425
|
-
|
536
|
+
- TimeoutError and AuthenticationError have been added to exceptions
|
426
537
|
|
427
|
-
|
538
|
+
- Policy objects now have a #run method - attempts to execute the policy locally.
|
428
539
|
|
540
|
+
### Fixed
|
429
541
|
- location.rb: location value setters are now properly converted to strings
|
542
|
+
|
430
543
|
- api_connection.rb: #connect now takes :use_ssl option (defaults to true)
|
431
|
-
- api_connection.rb: #connect will accept arbitrary ports when :use_ssl is true
|
432
544
|
|
433
|
-
|
545
|
+
- api_connection.rb: #connect will accept arbitrary ports when :use_ssl is true
|
434
546
|
|
435
|
-
|
436
|
-
|
437
|
-
-
|
438
|
-
- Policy objects now have a #run method - attempts to execute the policy locally.
|
547
|
+
## [0.5.7] - 2015-05-26
|
548
|
+
### Changed
|
549
|
+
- DBConnection.connect, and APIConnection.connect: include server name when prompting for password
|
439
550
|
|
440
|
-
|
551
|
+
- APIObject: auto-set @site and @category if applicable
|
441
552
|
|
442
|
-
|
553
|
+
- Package#upload_master_file: move autoupdate to appropriate location
|
443
554
|
|
555
|
+
### Fixed
|
444
556
|
- JSS.to_s_and_a now properly converts nils to "" and []
|
557
|
+
|
445
558
|
- DBConnection.connect gracefully handle reconnecting if the old connection went away
|
446
|
-
|
559
|
+
|
447
560
|
- Configuration: handle lack of ENV['HOME'] when trying to expand ~ to locate user-level config file.
|
561
|
+
|
448
562
|
- MobileDevice#unmanage_device: send_mdm_command is a class method, not an instance method
|
449
|
-
|
563
|
+
|
450
564
|
- Package: os_requirements default to empty array if unset in JSS
|
451
|
-
- Package#required_processor: remove buggy line of ancient, deprecated code
|
452
|
-
- Package#upload_master_file: move autoupdate to appropriate location
|
453
565
|
|
454
|
-
|
566
|
+
- Package#required_processor: remove buggy line of ancient, deprecated code
|
455
567
|
|
568
|
+
## [0.5.6] - 2014-11-04
|
569
|
+
### Changed
|
456
570
|
- now requires Ruby >= 1.9.3 and rest-client >= 1.7.0. Needed for Casper >= 9.61's lack of support for SSLv3.
|
571
|
+
|
457
572
|
- APIConnection now accepts :ssl_version option in the argument hash. Defaults to 'TLSv1'
|
573
|
+
|
458
574
|
- Configuration now supports the api_ssl_version key, used for the :ssl_version option of the APIConnection.
|
575
|
+
|
459
576
|
- the example programs have been moved to the bin directory, and are now included in the gem installation.
|
577
|
+
|
460
578
|
- many documentation updates as we adjust to being live
|
461
|
-
- minor bugfixes
|
462
579
|
|
463
|
-
|
580
|
+
### Fixed
|
581
|
+
- minor bugfixes
|
464
582
|
|
583
|
+
## [0.5.0] - 2014-10-23
|
584
|
+
### Changed
|
465
585
|
- first opensource release
|
data/lib/jss/api_connection.rb
CHANGED
@@ -344,6 +344,9 @@ module JSS
|
|
344
344
|
# @return [String] the hostname of the JSS to which we're connected.
|
345
345
|
attr_reader :server_host
|
346
346
|
|
347
|
+
# @return [String] any path in the URL below the hostname. See {#connect}
|
348
|
+
attr_reader :server_path
|
349
|
+
|
347
350
|
# @return [Integer] the port used for the connection
|
348
351
|
attr_reader :port
|
349
352
|
|
@@ -396,12 +399,20 @@ module JSS
|
|
396
399
|
# Instance Methods
|
397
400
|
#####################################
|
398
401
|
|
399
|
-
# Connect to the JSS API.
|
402
|
+
# Connect to the JSS Classic API.
|
400
403
|
#
|
401
404
|
# @param args[Hash] the keyed arguments for connection.
|
402
405
|
#
|
403
406
|
# @option args :server[String] the hostname of the JSS API server, required if not defined in JSS::CONFIG
|
404
407
|
#
|
408
|
+
# @option args :server_path[String] If your JSS is not at the root of the server, e.g.
|
409
|
+
# if it's at
|
410
|
+
# https://myjss.myserver.edu:8443/dev_mgmt/jssweb
|
411
|
+
# rather than
|
412
|
+
# https://myjss.myserver.edu:8443/
|
413
|
+
# then use this parameter to specify the path below the root e.g:
|
414
|
+
# server_path: 'dev_mgmt/jssweb'
|
415
|
+
#
|
405
416
|
# @option args :port[Integer] the port number to connect with, defaults to 8443
|
406
417
|
#
|
407
418
|
# @option args :use_ssl[Boolean] should the connection be made over SSL? Defaults to true.
|
@@ -1053,18 +1064,26 @@ module JSS
|
|
1053
1064
|
# @return [String] The URI encoded URL
|
1054
1065
|
#
|
1055
1066
|
def build_rest_url(args)
|
1067
|
+
@server_host = args[:server]
|
1068
|
+
@port = args[:port].to_i
|
1069
|
+
|
1070
|
+
if args[:server_path]
|
1071
|
+
# remove leading & trailing slashes in serverpath if any
|
1072
|
+
@server_path = args[:server_path].sub %r{^/*(.*?)/*$}, Regexp.last_match(1)
|
1073
|
+
# re-add single trailing slash
|
1074
|
+
@server_path << '/'
|
1075
|
+
end
|
1076
|
+
|
1056
1077
|
# we're using ssl if:
|
1057
1078
|
# 1) args[:use_ssl] is anything but false
|
1058
1079
|
# or
|
1059
|
-
# 2) the port is
|
1060
|
-
|
1080
|
+
# 2) the port is a known ssl port.
|
1081
|
+
args[:use_ssl] = args[:use_ssl] != false || SSL_PORTS.include?(@port)
|
1061
1082
|
|
1062
|
-
# and here's the URL
|
1063
1083
|
@protocol = 'http'
|
1064
1084
|
@protocol << 's' if args[:use_ssl]
|
1065
|
-
|
1066
|
-
@port
|
1067
|
-
URI.encode "#{@protocol}://#{@server_host}:#{@port}/#{RSRC_BASE}"
|
1085
|
+
# and here's the URL
|
1086
|
+
"#{@protocol}://#{@server_host}:#{@port}/#{@server_path}#{RSRC_BASE}"
|
1068
1087
|
end
|
1069
1088
|
|
1070
1089
|
# From whatever was given in args[:pw], figure out the real password
|
@@ -579,6 +579,18 @@ module JSS
|
|
579
579
|
#
|
580
580
|
attr_reader :configuration_profiles
|
581
581
|
|
582
|
+
# @return [Array<Hash>]
|
583
|
+
#
|
584
|
+
# A Hash for each Certificate on the computer
|
585
|
+
#
|
586
|
+
# The Hash keys are:
|
587
|
+
# * :common_name [String] the name of the cert
|
588
|
+
# * :identity [Boolean] Is this an identiry cert?
|
589
|
+
# * :expires [Time] the certificate expiration time
|
590
|
+
# * :name[String] Display name for the certificate, if any
|
591
|
+
#
|
592
|
+
attr_reader :certificates
|
593
|
+
|
582
594
|
# @return [Hash]
|
583
595
|
#
|
584
596
|
# Info about the local accts and ComputerGroups to which this machine beloings
|
@@ -718,16 +730,6 @@ module JSS
|
|
718
730
|
#
|
719
731
|
attr_reader :software
|
720
732
|
|
721
|
-
# @return [Array<Hash>] Data about all the certificates on the computer.
|
722
|
-
#
|
723
|
-
# Each Hash represents a certificate and has these keys:
|
724
|
-
# common_name: [String] the name of the cert
|
725
|
-
# identity: [Boolean] Is this an identiry cert?
|
726
|
-
# expires: [Time] the certificate expiration time
|
727
|
-
# name: [String] Display name for the certificate, if any
|
728
|
-
#
|
729
|
-
attr_reader :certificates
|
730
|
-
|
731
733
|
# Constructor
|
732
734
|
#####################################
|
733
735
|
|
@@ -307,9 +307,6 @@ module JSS
|
|
307
307
|
FROM extension_attribute_values eav JOIN reports r ON eav.report_id = r.report_id
|
308
308
|
WHERE r.computer_id = #{computer_id}
|
309
309
|
AND eav.extension_attribute_id = #{@id}
|
310
|
-
AND eav.value_on_client != ''
|
311
|
-
AND eav.value_on_client IS NOT NULL
|
312
|
-
AND eav.value_on_client != '(null)'
|
313
310
|
ORDER BY timestamp_epoch
|
314
311
|
END_Q
|
315
312
|
|
@@ -124,9 +124,6 @@ module JSS
|
|
124
124
|
### @return [String] the notes field for this script
|
125
125
|
attr_reader :notes
|
126
126
|
|
127
|
-
### @return [String] the category of this script, stored in the JSS as the id number from the categories table
|
128
|
-
attr_reader :category
|
129
|
-
|
130
127
|
### @return [Hash] script parameters 4-11. Parameters 1-3 are predefined as target drive, computer name, and username
|
131
128
|
attr_reader :parameters
|
132
129
|
|
@@ -177,10 +177,12 @@ module JSS
|
|
177
177
|
notifications_supported: :ssvc_and_nctr,
|
178
178
|
notification_reminders: true
|
179
179
|
},
|
180
|
-
JSS::MacApplication => {
|
181
|
-
in_self_service_data_path
|
182
|
-
|
183
|
-
|
180
|
+
JSS::MacApplication => {
|
181
|
+
# in_self_service_data_path was finally implemnted in JamfPro 10.9
|
182
|
+
# Jamf Product Issue [PI-003773]
|
183
|
+
in_self_service_data_path: [:general, :deployment_type],
|
184
|
+
in_self_service: MAKE_AVAILABLE,
|
185
|
+
not_in_self_service: AUTO_INSTALL_OR_PROMPT,
|
184
186
|
targets: [:macos],
|
185
187
|
payload: :app,
|
186
188
|
can_display_in_categories: true,
|
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: 1.0.
|
4
|
+
version: 1.0.3b2
|
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:
|
12
|
+
date: 2019-02-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: plist
|
@@ -267,7 +267,7 @@ files:
|
|
267
267
|
- test/specs/policy_spec.rb
|
268
268
|
homepage: http://pixaranimationstudios.github.io/ruby-jss/
|
269
269
|
licenses:
|
270
|
-
-
|
270
|
+
- NonStandard
|
271
271
|
metadata: {}
|
272
272
|
post_install_message:
|
273
273
|
rdoc_options:
|