ruby-jss 1.0.3b2 → 1.0.3b3

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.

Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +5 -1
  3. data/README.md +31 -18
  4. data/bin/cgrouper +1 -1
  5. data/bin/jamfHelperBackgrounder +1 -1
  6. data/bin/netseg-update +1 -1
  7. data/data/ruby-jss.conf.example +24 -0
  8. data/lib/jss-api.rb +24 -0
  9. data/lib/jss.rb +1 -2
  10. data/lib/jss/api_connection.rb +7 -9
  11. data/lib/jss/api_object.rb +1 -1
  12. data/lib/jss/api_object/account.rb +1 -1
  13. data/lib/jss/api_object/advanced_search.rb +1 -1
  14. data/lib/jss/api_object/advanced_search/advanced_computer_search.rb +1 -1
  15. data/lib/jss/api_object/advanced_search/advanced_mobile_device_search.rb +1 -1
  16. data/lib/jss/api_object/advanced_search/advanced_user_search.rb +1 -1
  17. data/lib/jss/api_object/building.rb +1 -1
  18. data/lib/jss/api_object/categorizable.rb +1 -1
  19. data/lib/jss/api_object/category.rb +1 -1
  20. data/lib/jss/api_object/computer.rb +1 -1
  21. data/lib/jss/api_object/computer/application_installs.rb +1 -1
  22. data/lib/jss/api_object/computer_invitation.rb +1 -1
  23. data/lib/jss/api_object/configuration_profile.rb +1 -1
  24. data/lib/jss/api_object/configuration_profile/mobile_device_configuration_profile.rb +24 -0
  25. data/lib/jss/api_object/configuration_profile/osx_configuration_profile.rb +1 -1
  26. data/lib/jss/api_object/creatable.rb +1 -1
  27. data/lib/jss/api_object/criteriable.rb +1 -1
  28. data/lib/jss/api_object/criteriable/criteria.rb +1 -1
  29. data/lib/jss/api_object/criteriable/criterion.rb +1 -1
  30. data/lib/jss/api_object/department.rb +1 -1
  31. data/lib/jss/api_object/distribution_point.rb +1 -1
  32. data/lib/jss/api_object/ebook.rb +1 -1
  33. data/lib/jss/api_object/extendable.rb +1 -1
  34. data/lib/jss/api_object/extension_attribute.rb +1 -1
  35. data/lib/jss/api_object/extension_attribute/computer_extension_attribute.rb +1 -1
  36. data/lib/jss/api_object/extension_attribute/mobile_device_extension_attribute.rb +1 -1
  37. data/lib/jss/api_object/extension_attribute/user_extension_attribute.rb +1 -1
  38. data/lib/jss/api_object/group.rb +1 -1
  39. data/lib/jss/api_object/group/computer_group.rb +1 -1
  40. data/lib/jss/api_object/group/mobile_device_group.rb +1 -1
  41. data/lib/jss/api_object/group/user_group.rb +1 -1
  42. data/lib/jss/api_object/ldap_server.rb +1 -1
  43. data/lib/jss/api_object/locatable.rb +1 -1
  44. data/lib/jss/api_object/mac_application.rb +24 -0
  45. data/lib/jss/api_object/management_history.rb +1 -1
  46. data/lib/jss/api_object/management_history/audit_event.rb +24 -0
  47. data/lib/jss/api_object/management_history/casper_imaging_log.rb +24 -0
  48. data/lib/jss/api_object/management_history/casper_remote_log.rb +24 -0
  49. data/lib/jss/api_object/management_history/computer_usage_log.rb +24 -0
  50. data/lib/jss/api_object/management_history/ebook.rb +25 -0
  51. data/lib/jss/api_object/management_history/hashlike.rb +24 -0
  52. data/lib/jss/api_object/management_history/mac_app_store_app.rb +24 -0
  53. data/lib/jss/api_object/management_history/mdm_command.rb +24 -0
  54. data/lib/jss/api_object/management_history/mobile_device_app.rb +24 -0
  55. data/lib/jss/api_object/management_history/policy_log.rb +24 -0
  56. data/lib/jss/api_object/management_history/screen_sharing_log.rb +24 -0
  57. data/lib/jss/api_object/management_history/user_location_change.rb +24 -0
  58. data/lib/jss/api_object/matchable.rb +1 -1
  59. data/lib/jss/api_object/mdm.rb +1 -1
  60. data/lib/jss/api_object/mobile_device.rb +1 -1
  61. data/lib/jss/api_object/mobile_device_application.rb +1 -1
  62. data/lib/jss/api_object/netboot_server.rb +1 -1
  63. data/lib/jss/api_object/network_segment.rb +1 -1
  64. data/lib/jss/api_object/package.rb +1 -1
  65. data/lib/jss/api_object/patch_policy.rb +1 -1
  66. data/lib/jss/api_object/patch_source.rb +1 -1
  67. data/lib/jss/api_object/patch_source/patch_external_source.rb +1 -1
  68. data/lib/jss/api_object/patch_source/patch_internal_source.rb +1 -1
  69. data/lib/jss/api_object/patch_title.rb +1 -1
  70. data/lib/jss/api_object/patch_title/version.rb +1 -1
  71. data/lib/jss/api_object/peripheral.rb +1 -1
  72. data/lib/jss/api_object/peripheral_type.rb +1 -1
  73. data/lib/jss/api_object/policy.rb +1 -1
  74. data/lib/jss/api_object/purchasable.rb +1 -1
  75. data/lib/jss/api_object/removable_macaddr.rb +1 -1
  76. data/lib/jss/api_object/restricted_software.rb +24 -0
  77. data/lib/jss/api_object/scopable.rb +1 -1
  78. data/lib/jss/api_object/scopable/scope.rb +169 -155
  79. data/lib/jss/api_object/script.rb +1 -1
  80. data/lib/jss/api_object/self_servable.rb +1 -1
  81. data/lib/jss/api_object/self_servable/icon.rb +1 -1
  82. data/lib/jss/api_object/sitable.rb +1 -1
  83. data/lib/jss/api_object/site.rb +1 -1
  84. data/lib/jss/api_object/software_update_server.rb +1 -1
  85. data/lib/jss/api_object/updatable.rb +1 -1
  86. data/lib/jss/api_object/uploadable.rb +1 -1
  87. data/lib/jss/api_object/user.rb +1 -1
  88. data/lib/jss/api_object/vppable.rb +1 -1
  89. data/lib/jss/api_object/webhook.rb +1 -1
  90. data/lib/jss/client.rb +1 -1
  91. data/lib/jss/client/jamf_binary.rb +1 -1
  92. data/lib/jss/client/jamf_helper.rb +1 -1
  93. data/lib/jss/client/management_action.rb +1 -1
  94. data/lib/jss/compatibility.rb +1 -1
  95. data/lib/jss/composer.rb +1 -1
  96. data/lib/jss/configuration.rb +1 -1
  97. data/lib/jss/db_connection.rb +1 -1
  98. data/lib/jss/exceptions.rb +1 -1
  99. data/lib/jss/ruby_extensions.rb +1 -1
  100. data/lib/jss/ruby_extensions/array.rb +1 -1
  101. data/lib/jss/ruby_extensions/filetest.rb +1 -1
  102. data/lib/jss/ruby_extensions/hash.rb +1 -1
  103. data/lib/jss/ruby_extensions/ipaddr.rb +1 -1
  104. data/lib/jss/ruby_extensions/pathname.rb +1 -1
  105. data/lib/jss/ruby_extensions/string.rb +1 -1
  106. data/lib/jss/ruby_extensions/time.rb +1 -1
  107. data/lib/jss/server.rb +1 -1
  108. data/lib/jss/utility.rb +1 -1
  109. data/lib/jss/validate.rb +1 -1
  110. data/lib/jss/version.rb +2 -2
  111. data/lib/jss/xml_workaround.rb +1 -1
  112. data/lib/ruby-jss.rb +24 -0
  113. data/test/bin/runtests +1 -1
  114. data/test/lib/testhelper.rb +1 -1
  115. data/test/lib/testhelper/auth.rb +1 -1
  116. data/test/lib/testhelper/patch_mgmt.rb +1 -1
  117. data/test/specs/api_connection_spec.rb +1 -1
  118. data/test/specs/patch01_source_spec.rb +1 -1
  119. data/test/specs/patch02_internal_source_spec.rb +1 -1
  120. data/test/specs/patch03_external_source_spec.rb +1 -1
  121. data/test/specs/patch04_titles_spec.rb +1 -1
  122. data/test/specs/patch05_policies_spec.rb +1 -1
  123. data/test/specs/patch06_cleanup_spec.rb +1 -1
  124. data/test/specs/policy_spec.rb +1 -1
  125. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35181174316ea72a856198f37dd2b18446f410fd010a35b54493d7f167d0ac56
4
- data.tar.gz: 6348822a891239bb3b203b9e836a93ea700d82b8100f2f93cb75a611b4efab9a
3
+ metadata.gz: e023160e63bd4d2ae22316affa806e28ad38559d17c9cc8e2f6624f8a72e2c09
4
+ data.tar.gz: 24689091017132fb6a95e5fc6ea6ad36d771d660665df540bd82cd3856f05b3a
5
5
  SHA512:
6
- metadata.gz: a58f64004baae260d475129a6fc549a17647e5447520785d791c51ef69486b48331b90acf6a22aa5db0e3dfe4cd1aa8716b68dc64dab72a3e3411e3cfd8a38ab
7
- data.tar.gz: 0ca90f4abb2c58b5bd528e905ce10de32f668040d657ca1af7b49ac302faccbf6a37740bf3beb9cb262f2db9acc8689319e867d58a5f2a92fb7648efaf08ddf7
6
+ metadata.gz: 4200856d8cfdfa38e1dd3b6a4a86ea1aef995c9fd72e70bc5bf7205c86e817bc1edc9cc3cb06115b0b34ab5d117e73fac27dbc376152054dd9edb21649696a36
7
+ data.tar.gz: f9dc27ad6c8398b6743c2ea654331ab8efabf1a5ee22747ac555fc598d0276de955a94edbdc8d29802df68abad706e72902b33b47ba3c14e31f4fbd997bbd976
data/CHANGES.md CHANGED
@@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [Unreleased]
7
+ ## \[Unreleased]
8
8
  ### Added
9
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
10
10
 
@@ -37,6 +37,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
37
37
 
38
38
  - use new(er) API resources for LDAP lookups, don't go directly to LDAP via net/ldap
39
39
 
40
+ - Scopable::Scope objects now accept any valid identifier, not just names, when adding or removing items from scope.
41
+ Also, item keys don't need to be plural (e.g. `:network_segment` works as well as `:network_segments`)
42
+ (Thanks to @cybertunnel for pointing out that this was still not modernized)
43
+
40
44
  ## [1.0.2] - 2018-10-16
41
45
  ### Added
42
46
  - Support for parentheses (opening_paren and closing_paren) in JSS::Criteriable::Criterion objects
data/README.md CHANGED
@@ -99,7 +99,7 @@ ns.save
99
99
 
100
100
  Before you can work with JSS Objects via the API, you have to connect to it.
101
101
 
102
- The method `JSS.api` retruns the currently active connection to the API (an instance of a {JSS::APIConnection}, q.v.).
102
+ The method `JSS.api` returns the currently active connection to the API (an instance of a {JSS::APIConnection}, q.v.).
103
103
 
104
104
  When the JSS Module is first loaded, that connection object isn't connected to anything. To remedy that, use `JSS.api.connect`, passing it values for the connection. In this example, those values are stored in the local variables jss_user, jss_user_pw, and jss_server_hostname, and others are left as default.
105
105
 
@@ -145,7 +145,7 @@ Some Classes provide other ways to list objects, depending on the data available
145
145
 
146
146
  #### Retrieving Objects
147
147
 
148
- To retrieve a single object call the class's `.fetch` method and provide a name:, id:, or other valid identfier.
148
+ To retrieve a single object call the class's `.fetch` method and provide a name:, id:, or other valid identifier.
149
149
 
150
150
 
151
151
  ```ruby
@@ -238,17 +238,24 @@ Here's what we've implemented so far. See each Class's [documentation(http://www
238
238
  * {JSS::AdvancedUserSearch}
239
239
  * {JSS::Building}
240
240
  * {JSS::Category}
241
+ * {JSS::Computer}
241
242
  * {JSS::ComputerExtensionAttribute}
242
243
  * {JSS::ComputerGroup}
243
244
  * {JSS::Department}
244
245
  * {JSS::DistributionPoint}
246
+ * {JSS::MobileDevice}
245
247
  * {JSS::MobileDeviceApplication}
246
248
  * {JSS::MobileDeviceExtensionAttribute}
247
249
  * {JSS::MobileDeviceGroup}
248
250
  * {JSS::NetworkSegment}
249
251
  * {JSS::Package}
252
+ * {JSS::PatchTitle}
253
+ * {JSS::PatchTitle::Version}
254
+ * {JSS::PatchExternalSource}
255
+ * {JSS::PatchPolicy}
250
256
  * {JSS::Peripheral}
251
257
  * {JSS::PeripheralType}
258
+ * {JSS::Policy} (not fully implemented)
252
259
  * {JSS::RemovableMacAddress}
253
260
  * {JSS::RestrictedSoftware}
254
261
  * {JSS::Script}
@@ -257,19 +264,15 @@ Here's what we've implemented so far. See each Class's [documentation(http://www
257
264
  * {JSS::UserExtensionAttribute}
258
265
  * {JSS::UserGroup}
259
266
  * {JSS::WebHook}
260
- * {JSS::Computer}
261
- * {JSS::MobileDevice}
262
- * {JSS::Policy} (still not fully implemented)
263
- * {JSS::PatchInternalSource}
264
- * {JSS::PatchExternalSource}
265
- * {JSS::PatchTitle}
266
- * {JSS::PatchPolicy}
267
+
267
268
 
268
269
  **NOTE** Computer and Mobile Device data gathered by an Inventory Upate (a.k.a. 'recon') is not editable.
269
270
 
270
271
  ### Updatable, but must be created in the Web UI
271
272
 
272
273
  * {JSS::OSXConfigurationProfile}
274
+ * {JSS::MobileDeviceConfigurationProfile}
275
+ * {JSS::PatchInternalSource}
273
276
 
274
277
  ### Creatable only
275
278
 
@@ -288,7 +291,7 @@ These must be created and edited via the JSS WebApp
288
291
 
289
292
  All supported API Objects can be deleted
290
293
 
291
- Other useful classes & modules:
294
+ #### Other useful classes & modules:
292
295
 
293
296
  * {JSS::APIConnection} - An object representing the connection to the REST API
294
297
  * {JSS::DBConnection} - An object representing the connection to MySQL database, if used.
@@ -298,6 +301,19 @@ Other useful classes & modules:
298
301
  * {JSS::Scopable} - a module that handles Scope for those objects that can be scoped. It defines the Scope class used in those objects.
299
302
  * {JSS::MDM} - a module that handles sending MDM commands to Computers and Mobile Devices
300
303
 
304
+ ## Object-related API endpoints
305
+
306
+ The classic API provides many endpoints not just for objects stored in Jamd Pro, but also for accessing data *about* those objects or interacting with the machines they represent. Ruby-jss embeds access to those endpoints into their related classes.
307
+
308
+ For example:
309
+
310
+ * /computerapplications, /computerapplicationusage, /computerhardwaresoftwarereports, /computerhistory, etc.
311
+ - The data provided by these endpoints are accessible via class and instance methods for {JSS::Computer}
312
+ * /computercheckin, /computerinventorycollection
313
+ - These endpoints deal with server-wide settings regarding computer management, and are available via {JSS::Computer} class methods
314
+ * /computercommands, /mobiledevicecommands, /commandflush, etc.
315
+ - These endpoints provide access to the MDM infrastructure, and can be used to send MDM commands. Ruby-jss provides these as class and instance methods in {JSS::Computer}, {JSS::ComputerGroup}, {JSS::MobileDevice}, and {JSS::MobileDeviceGroup}
316
+
301
317
  ## CONFIGURATION
302
318
 
303
319
  The {JSS::Configuration} singleton class is used to read, write, and use site-specific defaults for the JSS module. When ruby-jss 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/ruby-jss.conf is examined if it exists, and the items in it are loaded into the attributes of {JSS::CONFIG}. The user-specific file ~/.ruby-hss.conf then is examined if it exists, and any items defined there will override those values from the system-wide file.
@@ -348,13 +364,13 @@ And here's an example of how to read a password from a web server and use it.
348
364
 
349
365
  ```ruby
350
366
  require 'open-uri'
351
- password = open('https://server.org.org/path/to/password').read
367
+ password = URI.parse('https://server.org.org/path/to/password').read
352
368
  JSS.api.connect pw: password # other arguments used from the config settings
353
369
  ```
354
370
 
355
371
  ## BEYOND THE API
356
372
 
357
- While the Jamf Pro Classic API provides access to object data in the JSS, this gem tries to use that data to provide more than just information exchange. Here are some examples of how we use the API data to provide functionality found in various Casper tools:
373
+ While the Jamf Pro Classic API provides access to object data in the JSS, ruby-jss tries to use that data to provide more than just information exchange. Here are some examples of how ruby-jss use the API to provide functionality found in various Casper tools:
358
374
 
359
375
  * Client Machine Access
360
376
  * The {JSS::Client} module provides the ability to run jamf binary commands, and access the local cache of package receipts
@@ -367,8 +383,6 @@ While the Jamf Pro Classic API provides access to object data in the JSS, this g
367
383
  * {JSS::Package} objects can upload their .pkg or .dmg files to the master distribution point ({JSS::Script} objects can also if you store them there.)
368
384
  * Reporting/AdvancedSearch exporting
369
385
  * {JSS::AdvancedSearch} subclasses can export their results to csv, tab, and xml files.
370
- * LDAP Access
371
- * {JSS::LDAPServer} objects can query the LDAP servers for user, group, and membership data.
372
386
  * MDM Commands
373
387
  * {JSS::MobileDevice}s (and eventually {JSS::Computer}s) can be sent MDM commands
374
388
  * Extension Attributes
@@ -376,7 +390,7 @@ While the Jamf Pro Classic API provides access to object data in the JSS, this g
376
390
 
377
391
  ## INSTALL
378
392
 
379
- NOTE: You may need to install XCode, and it's CLI tools, in order to install the required gems.
393
+ NOTE: You may need to install XCode, or it's CLI tools, in order to install the required gems.
380
394
 
381
395
  In general, you can install ruby-jss with this command:
382
396
 
@@ -406,7 +420,6 @@ There's a [wiki on the github page](https://github.com/PixarAnimationStudios/rub
406
420
 
407
421
  ## LICENSE
408
422
 
409
- Copyright 2018 Pixar
423
+ Copyright 2019 Pixar
410
424
 
411
- Licensed under the Apache License, Version 2.0 (the "Apache License") with
412
- modifications. See LICENSE.txt for details
425
+ Licensed under the Apache License, Version 2.0 (the "Apache License") with modifications. See LICENSE.txt for details
data/bin/cgrouper CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/ruby
2
2
 
3
- ### Copyright 2018 Pixar
3
+ ### Copyright 2019 Pixar
4
4
 
5
5
  ###
6
6
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/ruby
2
2
 
3
- ### Copyright 2018 Pixar
3
+ ### Copyright 2019 Pixar
4
4
 
5
5
  ###
6
6
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
data/bin/netseg-update CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/ruby
2
2
 
3
- ### Copyright 2018 Pixar
3
+ ### Copyright 2019 Pixar
4
4
 
5
5
  ###
6
6
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,3 +1,27 @@
1
+ ### Copyright 2019 Pixar
2
+
3
+ ###
4
+ ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
+ ### with the following modification; you may not use this file except in
6
+ ### compliance with the Apache License and the following modification to it:
7
+ ### Section 6. Trademarks. is deleted and replaced with:
8
+ ###
9
+ ### 6. Trademarks. This License does not grant permission to use the trade
10
+ ### names, trademarks, service marks, or product names of the Licensor
11
+ ### and its affiliates, except as required to comply with Section 4(c) of
12
+ ### the License and to reproduce the content of the NOTICE file.
13
+ ###
14
+ ### You may obtain a copy of the Apache License at
15
+ ###
16
+ ### http://www.apache.org/licenses/LICENSE-2.0
17
+ ###
18
+ ### Unless required by applicable law or agreed to in writing, software
19
+ ### distributed under the Apache License with the above modification is
20
+ ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
+ ### KIND, either express or implied. See the Apache License for the specific
22
+ ### language governing permissions and limitations under the Apache License.
23
+ ###
24
+
1
25
  #####################
2
26
  #
3
27
  # ruby-jss configuration.
data/lib/jss-api.rb CHANGED
@@ -1,2 +1,26 @@
1
+ ### Copyright 2019 Pixar
2
+
3
+ ###
4
+ ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
+ ### with the following modification; you may not use this file except in
6
+ ### compliance with the Apache License and the following modification to it:
7
+ ### Section 6. Trademarks. is deleted and replaced with:
8
+ ###
9
+ ### 6. Trademarks. This License does not grant permission to use the trade
10
+ ### names, trademarks, service marks, or product names of the Licensor
11
+ ### and its affiliates, except as required to comply with Section 4(c) of
12
+ ### the License and to reproduce the content of the NOTICE file.
13
+ ###
14
+ ### You may obtain a copy of the Apache License at
15
+ ###
16
+ ### http://www.apache.org/licenses/LICENSE-2.0
17
+ ###
18
+ ### Unless required by applicable law or agreed to in writing, software
19
+ ### distributed under the Apache License with the above modification is
20
+ ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
+ ### KIND, either express or implied. See the Apache License for the specific
22
+ ### language governing permissions and limitations under the Apache License.
23
+ ###
24
+
1
25
  # backward compatility for 'require "jss-api"'
2
26
  require 'jss'
data/lib/jss.rb CHANGED
@@ -1,4 +1,4 @@
1
- ### Copyright 2018 Pixar
1
+ ### Copyright 2019 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -162,7 +162,6 @@ module JSS
162
162
  class NetBootServer < JSS::APIObject; end
163
163
  class NetworkSegment < JSS::APIObject; end
164
164
  class Package < JSS::APIObject; end
165
- class Patch < JSS::APIObject; end
166
165
  class PatchPolicy < JSS::APIObject; end
167
166
  class PeripheralType < JSS::APIObject; end
168
167
  class Peripheral < JSS::APIObject; end
@@ -1,4 +1,4 @@
1
- ### Copyright 2018 Pixar
1
+ ### Copyright 2019 Pixar
2
2
  ###
3
3
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
4
4
  ### with the following modification; you may not use this file except in
@@ -439,6 +439,9 @@ module JSS
439
439
  args[:no_port_specified] = args[:port].to_s.empty?
440
440
  args = apply_connection_defaults args
441
441
 
442
+ # ensure an integer
443
+ args[:port] &&= args[:port].to_i
444
+
442
445
  # confirm we know basics
443
446
  verify_basic_args args
444
447
 
@@ -1113,17 +1116,12 @@ module JSS
1113
1116
  # @return [Type] description_of_returned_object
1114
1117
  #
1115
1118
  def verify_ssl(args)
1116
- # use SSL for those ports unless specifically told not to
1119
+ # use SSL for SSL ports unless specifically told not to
1117
1120
  if SSL_PORTS.include? args[:port]
1118
- args[:use_ssl] = true if args[:use_ssl].nil?
1121
+ args[:use_ssl] = true unless args[:use_ssl] == false
1119
1122
  end
1120
1123
  # if verify_cert is anything but false, we will verify
1121
- args[:verify_ssl] =
1122
- if args[:verify_cert] == false
1123
- OpenSSL::SSL::VERIFY_NONE
1124
- else
1125
- OpenSSL::SSL::VERIFY_PEER
1126
- end
1124
+ args[:verify_ssl] = args[:verify_cert] == false ? OpenSSL::SSL::VERIFY_NONE : OpenSSL::SSL::VERIFY_PEER
1127
1125
  end
1128
1126
 
1129
1127
  # Parses the HTTP body of a RestClient::ExceptionWithResponse
@@ -1,4 +1,4 @@
1
- ### Copyright 2018 Pixar
1
+ ### Copyright 2019 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2018 Pixar
1
+ ### Copyright 2019 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2018 Pixar
1
+ ### Copyright 2019 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2018 Pixar
1
+ ### Copyright 2019 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2018 Pixar
1
+ ### Copyright 2019 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2018 Pixar
1
+ ### Copyright 2019 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2018 Pixar
1
+ ### Copyright 2019 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2018 Pixar
1
+ ### Copyright 2019 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2018 Pixar
1
+ ### Copyright 2019 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2018 Pixar
1
+ ### Copyright 2019 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Pixar
1
+ # Copyright 2019 Pixar
2
2
 
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2018 Pixar
1
+ ### Copyright 2019 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Pixar
1
+ # Copyright 2019 Pixar
2
2
 
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,3 +1,27 @@
1
+ ### Copyright 2019 Pixar
2
+
3
+ ###
4
+ ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
+ ### with the following modification; you may not use this file except in
6
+ ### compliance with the Apache License and the following modification to it:
7
+ ### Section 6. Trademarks. is deleted and replaced with:
8
+ ###
9
+ ### 6. Trademarks. This License does not grant permission to use the trade
10
+ ### names, trademarks, service marks, or product names of the Licensor
11
+ ### and its affiliates, except as required to comply with Section 4(c) of
12
+ ### the License and to reproduce the content of the NOTICE file.
13
+ ###
14
+ ### You may obtain a copy of the Apache License at
15
+ ###
16
+ ### http://www.apache.org/licenses/LICENSE-2.0
17
+ ###
18
+ ### Unless required by applicable law or agreed to in writing, software
19
+ ### distributed under the Apache License with the above modification is
20
+ ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
+ ### KIND, either express or implied. See the Apache License for the specific
22
+ ### language governing permissions and limitations under the Apache License.
23
+ ###
24
+
1
25
  # This is just a stub for now.
2
26
 
3
27
  #
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Pixar
1
+ # Copyright 2019 Pixar
2
2
 
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2018 Pixar
1
+ ### Copyright 2019 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Pixar
1
+ # Copyright 2019 Pixar
2
2
 
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "Apache License")