ruby-jss 0.6.6 → 0.6.7
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 +5 -0
- data/README.md +13 -1
- data/bin/cgrouper +2 -1
- data/bin/subnet-update +2 -1
- data/lib/jss.rb +3 -1
- data/lib/jss/api_connection.rb +2 -1
- data/lib/jss/api_object.rb +4 -1
- data/lib/jss/api_object/account.rb +2 -1
- data/lib/jss/api_object/advanced_search.rb +2 -1
- data/lib/jss/api_object/advanced_search/advanced_computer_search.rb +2 -1
- data/lib/jss/api_object/advanced_search/advanced_mobile_device_search.rb +2 -1
- data/lib/jss/api_object/advanced_search/advanced_user_search.rb +2 -1
- data/lib/jss/api_object/building.rb +2 -1
- data/lib/jss/api_object/category.rb +2 -1
- data/lib/jss/api_object/computer.rb +2 -1
- data/lib/jss/api_object/computer_invitation.rb +2 -1
- data/lib/jss/api_object/creatable.rb +8 -8
- data/lib/jss/api_object/criteriable.rb +2 -1
- data/lib/jss/api_object/criteriable/criteria.rb +2 -1
- data/lib/jss/api_object/criteriable/criterion.rb +2 -1
- data/lib/jss/api_object/department.rb +2 -1
- data/lib/jss/api_object/distribution_point.rb +2 -1
- data/lib/jss/api_object/extendable.rb +2 -1
- data/lib/jss/api_object/extension_attribute.rb +2 -1
- data/lib/jss/api_object/extension_attribute/computer_extension_attribute.rb +2 -1
- data/lib/jss/api_object/extension_attribute/mobile_device_extension_attribute.rb +2 -1
- data/lib/jss/api_object/extension_attribute/user_extension_attribute.rb +2 -1
- data/lib/jss/api_object/group.rb +2 -1
- data/lib/jss/api_object/group/computer_group.rb +2 -1
- data/lib/jss/api_object/group/mobile_device_group.rb +2 -1
- data/lib/jss/api_object/group/user_group.rb +2 -1
- data/lib/jss/api_object/ldap_server.rb +2 -1
- data/lib/jss/api_object/locatable.rb +2 -1
- data/lib/jss/api_object/matchable.rb +2 -1
- data/lib/jss/api_object/mobile_device.rb +2 -1
- data/lib/jss/api_object/netboot_server.rb +2 -1
- data/lib/jss/api_object/network_segment.rb +2 -1
- data/lib/jss/api_object/osx_configuration_profile.rb +2 -1
- data/lib/jss/api_object/package.rb +2 -1
- data/lib/jss/api_object/peripheral.rb +2 -1
- data/lib/jss/api_object/peripheral_type.rb +2 -1
- data/lib/jss/api_object/policy.rb +2 -1
- data/lib/jss/api_object/purchasable.rb +2 -1
- data/lib/jss/api_object/removable_macaddr.rb +2 -1
- data/lib/jss/api_object/scopable.rb +2 -1
- data/lib/jss/api_object/scopable/scope.rb +2 -1
- data/lib/jss/api_object/script.rb +2 -1
- data/lib/jss/api_object/self_servable.rb +2 -1
- data/lib/jss/api_object/site.rb +2 -1
- data/lib/jss/api_object/software_update_server.rb +2 -1
- data/lib/jss/api_object/updatable.rb +2 -1
- data/lib/jss/api_object/uploadable.rb +2 -1
- data/lib/jss/api_object/user.rb +2 -1
- data/lib/jss/api_object/webhook.rb +242 -0
- data/lib/jss/client.rb +2 -1
- data/lib/jss/compatibility.rb +2 -1
- data/lib/jss/composer.rb +2 -1
- data/lib/jss/configuration.rb +2 -1
- data/lib/jss/db_connection.rb +2 -1
- data/lib/jss/exceptions.rb +2 -1
- data/lib/jss/ruby_extensions.rb +2 -1
- data/lib/jss/ruby_extensions/filetest.rb +2 -1
- data/lib/jss/ruby_extensions/hash.rb +2 -1
- data/lib/jss/ruby_extensions/ipaddr.rb +2 -1
- data/lib/jss/ruby_extensions/pathname.rb +2 -1
- data/lib/jss/ruby_extensions/string.rb +2 -1
- data/lib/jss/ruby_extensions/time.rb +2 -1
- data/lib/jss/server.rb +2 -1
- data/lib/jss/utility.rb +2 -1
- data/lib/jss/version.rb +3 -2
- data/lib/jss/webhooks.rb +2 -1
- data/lib/jss/webhooks/configuration.rb +2 -1
- data/lib/jss/webhooks/data/sample_handlers/RestAPIOperation-executable +2 -1
- data/lib/jss/webhooks/data/sample_handlers/RestAPIOperation.rb +2 -1
- data/lib/jss/webhooks/event.rb +2 -1
- data/lib/jss/webhooks/event/computer_added.rb +2 -1
- data/lib/jss/webhooks/event/computer_check_in.rb +2 -1
- data/lib/jss/webhooks/event/computer_inventory_completed.rb +2 -1
- data/lib/jss/webhooks/event/computer_policy_finished.rb +2 -1
- data/lib/jss/webhooks/event/computer_push_capability_changed.rb +2 -1
- data/lib/jss/webhooks/event/handlers.rb +2 -1
- data/lib/jss/webhooks/event/jss_shutdown.rb +2 -1
- data/lib/jss/webhooks/event/jss_startup.rb +2 -1
- data/lib/jss/webhooks/event/mobile_device_check_in.rb +2 -1
- data/lib/jss/webhooks/event/mobile_device_command_completed.rb +2 -1
- data/lib/jss/webhooks/event/mobile_device_enrolled.rb +2 -1
- data/lib/jss/webhooks/event/mobile_device_push_sent.rb +2 -1
- data/lib/jss/webhooks/event/mobile_device_unenrolled.rb +2 -1
- data/lib/jss/webhooks/event/patch_software_title_updated.rb +2 -1
- data/lib/jss/webhooks/event/push_sent.rb +2 -1
- data/lib/jss/webhooks/event/rest_api_operation.rb +2 -1
- data/lib/jss/webhooks/event/scep_challenge.rb +2 -1
- data/lib/jss/webhooks/event/smart_group_computer_membership_change.rb +2 -1
- data/lib/jss/webhooks/event/smart_group_mobile_device_membership_change.rb +2 -1
- data/lib/jss/webhooks/event/webhook.rb +2 -1
- data/lib/jss/webhooks/event_objects.rb +2 -1
- data/lib/jss/webhooks/event_objects/computer.rb +2 -1
- data/lib/jss/webhooks/event_objects/jss.rb +2 -1
- data/lib/jss/webhooks/event_objects/mobile_device.rb +2 -1
- data/lib/jss/webhooks/event_objects/patch_software_title_update.rb +2 -1
- data/lib/jss/webhooks/event_objects/push.rb +2 -1
- data/lib/jss/webhooks/event_objects/rest_api_operation.rb +2 -1
- data/lib/jss/webhooks/event_objects/scep_challenge.rb +2 -1
- data/lib/jss/webhooks/event_objects/smart_group.rb +2 -1
- data/lib/jss/webhooks/server_app.rb +2 -1
- data/lib/jss/webhooks/server_app/routes.rb +2 -1
- data/lib/jss/webhooks/server_app/routes/handle_webhook_event.rb +2 -1
- data/lib/jss/webhooks/server_app/routes/home.rb +2 -1
- data/lib/jss/webhooks/server_app/self_signed_cert.rb +2 -1
- data/lib/jss/webhooks/server_app/server.rb +2 -1
- data/lib/jss/webhooks/version.rb +2 -1
- metadata +21 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84de41e5f3101ed3bf86feb96016d34cb92ed9f7
|
4
|
+
data.tar.gz: 3dcde380f730a98fa04dfa64e8af60a7dda3c1eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4566f6731f57ea24c99814fe43552fc20816a941e57155d1d6c9012af5ab74e7f81849287f53f514eff179e5e4dd7b94c57cd8c9f4c30b5391c88735a831771b
|
7
|
+
data.tar.gz: 1d04c57374e60a2c1d8989e302196aef07468ba6a6d3b6d467043c2b08d6c218801ce072b61fc1bcedea84a2689725d1a22e00335f917415ead177cb01f6c8f9
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Change History
|
2
2
|
|
3
|
+
## v0.6.7 2017-01-03
|
4
|
+
|
5
|
+
- Added class JSS::WebHook, which requires Jamf Pro 9.97 or higher.
|
6
|
+
- 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.
|
7
|
+
|
3
8
|
## v0.6.6 2016-11-30
|
4
9
|
|
5
10
|
- Added String#jss_to_pathname to convert Strings to Pathname instances in JSS::Configuration.
|
data/README.md
CHANGED
@@ -233,9 +233,11 @@ See each Class's documentation for details.
|
|
233
233
|
* {JSS::PeripheralType}
|
234
234
|
* {JSS::RemovableMacAddress}
|
235
235
|
* {JSS::Script}
|
236
|
+
* {JSS::Site}
|
236
237
|
* {JSS::User}
|
237
238
|
* {JSS::UserExtensionAttribute}
|
238
239
|
* {JSS::UserGroup}
|
240
|
+
* {JSS::WebHook}
|
239
241
|
|
240
242
|
### Updatable but not Creatable
|
241
243
|
|
@@ -258,10 +260,17 @@ See each Class's documentation for details.
|
|
258
260
|
* enabled
|
259
261
|
* category
|
260
262
|
* triggers
|
263
|
+
* packages
|
264
|
+
* scripts
|
261
265
|
* file & process actions
|
266
|
+
* {JSS::OSXConfigurationProfile}
|
262
267
|
|
263
268
|
**NOTE** Even in the API and the WebApp, Computer and Mobile Device data gathered by an Inventory Upate (a.k.a. 'recon') is not editable.
|
264
269
|
|
270
|
+
### Creatable only
|
271
|
+
|
272
|
+
* {JSS::ComputerInvitation}
|
273
|
+
|
265
274
|
### Read-Only
|
266
275
|
|
267
276
|
These must be created and edited via the JSS WebApp
|
@@ -277,9 +286,12 @@ All supported API Objects can be deleted
|
|
277
286
|
|
278
287
|
Other useful classes:
|
279
288
|
|
280
|
-
* {JSS::
|
289
|
+
* {JSS::APIConnect} - An object representing the connection to the REST API
|
290
|
+
* {JSS::DBConnection} - An object representing the connection to MySQL database, if used
|
291
|
+
* {JSS::Server} - An encapsulation of some info about the JamfPro server, such as the version and license. An instance is available as an attribute of the {JSS::APIConnection} singleton.
|
281
292
|
* {JSS::Client} - An object representing the local machine as a Casper-managed client, and JAMF-related info and methods
|
282
293
|
|
294
|
+
|
283
295
|
## CONFIGURATION
|
284
296
|
|
285
297
|
The {JSS::Configuration} singleton class is used to read, write, and use site-specific defaults for the JSS module. When the Module is required, the single instance of {JSS::Configuration} is created and stored in the constant {JSS::CONFIG}. At that time the system-wide file /etc/jss_gem.conf is examined if it exists, and the items in it are loaded into the attributes of {JSS::CONFIG}. The user-specific file ~/.jss_gem.conf then is examined if it exists, and any items defined there will override those values from the system-wide file.
|
data/bin/cgrouper
CHANGED
data/bin/subnet-update
CHANGED
data/lib/jss.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
### Copyright
|
1
|
+
### Copyright 2017 Pixar
|
2
|
+
|
2
3
|
###
|
3
4
|
### Licensed under the Apache License, Version 2.0 (the "Apache License")
|
4
5
|
### with the following modification; you may not use this file except in
|
@@ -167,6 +168,7 @@ module JSS
|
|
167
168
|
class Site < JSS::APIObject; end
|
168
169
|
class SoftwareUpdateServer < JSS::APIObject; end
|
169
170
|
class User < JSS::APIObject; end
|
171
|
+
class WebHook < JSS::APIObject; end
|
170
172
|
|
171
173
|
end # module JSS
|
172
174
|
|
data/lib/jss/api_connection.rb
CHANGED
data/lib/jss/api_object.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
### Copyright
|
1
|
+
### Copyright 2017 Pixar
|
2
|
+
|
2
3
|
###
|
3
4
|
### Licensed under the Apache License, Version 2.0 (the "Apache License")
|
4
5
|
### with the following modification; you may not use this file except in
|
@@ -427,6 +428,7 @@ module JSS
|
|
427
428
|
if args[:data]
|
428
429
|
|
429
430
|
@init_data = args[:data]
|
431
|
+
|
430
432
|
### Does this data come in subsets?
|
431
433
|
@got_subsets = @init_data[:general].is_a?(Hash)
|
432
434
|
|
@@ -642,3 +644,4 @@ require 'jss/api_object/script'
|
|
642
644
|
require 'jss/api_object/site'
|
643
645
|
require 'jss/api_object/software_update_server'
|
644
646
|
require 'jss/api_object/user'
|
647
|
+
require 'jss/api_object/webhook'
|
@@ -1,4 +1,5 @@
|
|
1
|
-
### Copyright
|
1
|
+
### Copyright 2017 Pixar
|
2
|
+
|
2
3
|
###
|
3
4
|
### Licensed under the Apache License, Version 2.0 (the "Apache License")
|
4
5
|
### with the following modification; you may not use this file except in
|
@@ -40,19 +41,18 @@ module JSS
|
|
40
41
|
### When a JSS::APIObject subclass includes this module, that subclass
|
41
42
|
### can be instantiated with :id => :new, and :name => "some_new_name".
|
42
43
|
###
|
44
|
+
###
|
45
|
+
### Classes mixing this module *must* provide a #rest_xml instance method that returns the XML
|
46
|
+
### String to be submitted to the API for object creation.
|
47
|
+
###
|
43
48
|
### The instance can be used to set desired values for the new object, and
|
44
49
|
### once everything's good, use #create to create it in the JSS.
|
45
50
|
###
|
46
51
|
### If a Creatable object requires more data than just a :name for creation,
|
47
52
|
### the subclass may want to redefine #initialize to require those data before
|
48
|
-
### calling super
|
49
|
-
###
|
50
|
-
### Some subclasses may want to redefine #create to check
|
53
|
+
### calling super, or may want to redefine #create or #rest_xml to check
|
51
54
|
### the data for consistency, and then call super
|
52
|
-
###
|
53
|
-
###
|
54
|
-
### Classes mixing this module *must* provide a #rest_xml instance method that returns the XML
|
55
|
-
### String to be submitted to the API for object creation.
|
55
|
+
### It is also wise to have the individual setter methods do data validation
|
56
56
|
###
|
57
57
|
### @see APIObject#save
|
58
58
|
###
|
data/lib/jss/api_object/group.rb
CHANGED