ruby-jss 1.2.6 → 1.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +31 -0
  3. data/README.md +1 -1
  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 +1 -1
  8. data/lib/jamf.rb +1 -1
  9. data/lib/jamf/api/abstract_classes/advanced_search.rb +1 -1
  10. data/lib/jamf/api/abstract_classes/collection_resource.rb +17 -9
  11. data/lib/jamf/api/abstract_classes/generic_reference.rb +1 -1
  12. data/lib/jamf/api/abstract_classes/json_object.rb +1 -1
  13. data/lib/jamf/api/abstract_classes/prestage.rb +1 -1
  14. data/lib/jamf/api/abstract_classes/prestage_skip_setup_items.rb +1 -1
  15. data/lib/jamf/api/abstract_classes/resource.rb +1 -1
  16. data/lib/jamf/api/abstract_classes/singleton_resource.rb +1 -1
  17. data/lib/jamf/api/attribute_classes/ip_address.rb +1 -1
  18. data/lib/jamf/api/attribute_classes/timestamp.rb +1 -1
  19. data/lib/jamf/api/connection.rb +1 -1
  20. data/lib/jamf/api/connection/api_error.rb +1 -1
  21. data/lib/jamf/api/connection/api_error_styleguide.rb +1 -1
  22. data/lib/jamf/api/connection/token.rb +1 -1
  23. data/lib/jamf/api/json_objects/account_prefs.rb +1 -1
  24. data/lib/jamf/api/json_objects/android_details.rb +1 -1
  25. data/lib/jamf/api/json_objects/appletv_details.rb +1 -1
  26. data/lib/jamf/api/json_objects/attachment.rb +1 -1
  27. data/lib/jamf/api/json_objects/cellular_network.rb +1 -1
  28. data/lib/jamf/api/json_objects/change_log_entry.rb +1 -1
  29. data/lib/jamf/api/json_objects/computer_prestage_skip_setup_items.rb +1 -1
  30. data/lib/jamf/api/json_objects/country.rb +1 -1
  31. data/lib/jamf/api/json_objects/criterion.rb +1 -1
  32. data/lib/jamf/api/json_objects/device_enrollment_device.rb +1 -1
  33. data/lib/jamf/api/json_objects/device_enrollment_sync_status.rb +1 -1
  34. data/lib/jamf/api/json_objects/extension_attribute_value.rb +1 -1
  35. data/lib/jamf/api/json_objects/installed_application.rb +1 -1
  36. data/lib/jamf/api/json_objects/installed_certificate.rb +1 -1
  37. data/lib/jamf/api/json_objects/installed_configuration_profile.rb +1 -1
  38. data/lib/jamf/api/json_objects/installed_ebook.rb +1 -1
  39. data/lib/jamf/api/json_objects/installed_provisioning_profile.rb +1 -1
  40. data/lib/jamf/api/json_objects/inventory_preload_extension_attribute.rb +1 -1
  41. data/lib/jamf/api/json_objects/ios_details.rb +1 -1
  42. data/lib/jamf/api/json_objects/location.rb +1 -1
  43. data/lib/jamf/api/json_objects/md_prestage_name.rb +1 -1
  44. data/lib/jamf/api/json_objects/md_prestage_names.rb +1 -1
  45. data/lib/jamf/api/json_objects/md_prestage_skip_setup_items.rb +1 -1
  46. data/lib/jamf/api/json_objects/mobile_device_details.rb +1 -1
  47. data/lib/jamf/api/json_objects/mobile_device_security.rb +1 -1
  48. data/lib/jamf/api/json_objects/prestage_assignment.rb +1 -1
  49. data/lib/jamf/api/json_objects/prestage_location.rb +1 -1
  50. data/lib/jamf/api/json_objects/prestage_purchasing_data.rb +1 -1
  51. data/lib/jamf/api/json_objects/prestage_scope.rb +1 -1
  52. data/lib/jamf/api/json_objects/prestage_sync_status.rb +1 -1
  53. data/lib/jamf/api/json_objects/purchasing_data.rb +1 -1
  54. data/lib/jamf/api/mixins/abstract.rb +1 -1
  55. data/lib/jamf/api/mixins/bulk_deletable.rb +1 -1
  56. data/lib/jamf/api/mixins/change_log.rb +1 -1
  57. data/lib/jamf/api/mixins/extendable.rb +1 -1
  58. data/lib/jamf/api/mixins/immutable.rb +1 -1
  59. data/lib/jamf/api/mixins/locatable.rb +1 -1
  60. data/lib/jamf/api/mixins/lockable.rb +1 -1
  61. data/lib/jamf/api/mixins/referable.rb +1 -1
  62. data/lib/jamf/api/mixins/searchable.rb +1 -1
  63. data/lib/jamf/api/mixins/uncreatable.rb +1 -1
  64. data/lib/jamf/api/mixins/undeletable.rb +1 -1
  65. data/lib/jamf/api/resources/collection_resources/account.rb +1 -1
  66. data/lib/jamf/api/resources/collection_resources/advanced_mobile_device_search.rb +1 -1
  67. data/lib/jamf/api/resources/collection_resources/advanced_user_search.rb +1 -1
  68. data/lib/jamf/api/resources/collection_resources/building.rb +1 -1
  69. data/lib/jamf/api/resources/collection_resources/category.rb +1 -1
  70. data/lib/jamf/api/resources/collection_resources/computer.rb +1 -1
  71. data/lib/jamf/api/resources/collection_resources/computer_prestage.rb +1 -1
  72. data/lib/jamf/api/resources/collection_resources/department.rb +1 -1
  73. data/lib/jamf/api/resources/collection_resources/device_enrollment.rb +1 -1
  74. data/lib/jamf/api/resources/collection_resources/extension_attribute.rb +1 -1
  75. data/lib/jamf/api/resources/collection_resources/inventory_preload_record.rb +1 -1
  76. data/lib/jamf/api/resources/collection_resources/mobile_device.rb +1 -1
  77. data/lib/jamf/api/resources/collection_resources/mobile_device_prestage.rb +1 -1
  78. data/lib/jamf/api/resources/collection_resources/script.rb +1 -1
  79. data/lib/jamf/api/resources/collection_resources/site.rb +1 -1
  80. data/lib/jamf/api/resources/collection_resources/time_zone.rb +1 -1
  81. data/lib/jamf/api/resources/singleton_resources/app_store_country_codes.rb +1 -1
  82. data/lib/jamf/api/resources/singleton_resources/authorization.rb +1 -1
  83. data/lib/jamf/api/resources/singleton_resources/client_checkin_settings.rb +1 -1
  84. data/lib/jamf/api/resources/singleton_resources/reenrollment_settings.rb +1 -1
  85. data/lib/jamf/client.rb +1 -1
  86. data/lib/jamf/client/jamf_binary.rb +1 -1
  87. data/lib/jamf/client/jamf_helper.rb +1 -1
  88. data/lib/jamf/client/management_action.rb +1 -1
  89. data/lib/jamf/compatibility.rb +1 -1
  90. data/lib/jamf/composer.rb +1 -1
  91. data/lib/jamf/configuration.rb +1 -1
  92. data/lib/jamf/exceptions.rb +1 -1
  93. data/lib/jamf/ruby_extensions.rb +1 -1
  94. data/lib/jamf/ruby_extensions/array.rb +1 -1
  95. data/lib/jamf/ruby_extensions/array/predicates.rb +1 -1
  96. data/lib/jamf/ruby_extensions/array/utils.rb +1 -1
  97. data/lib/jamf/ruby_extensions/filetest.rb +1 -1
  98. data/lib/jamf/ruby_extensions/filetest/predicates.rb +1 -1
  99. data/lib/jamf/ruby_extensions/hash.rb +1 -1
  100. data/lib/jamf/ruby_extensions/hash/backports.rb +2 -2
  101. data/lib/jamf/ruby_extensions/ipaddr.rb +1 -1
  102. data/lib/jamf/ruby_extensions/ipaddr/utils.rb +1 -1
  103. data/lib/jamf/ruby_extensions/object.rb +1 -1
  104. data/lib/jamf/ruby_extensions/object/predicates.rb +1 -1
  105. data/lib/jamf/ruby_extensions/pathname.rb +1 -1
  106. data/lib/jamf/ruby_extensions/pathname/predicates.rb +1 -1
  107. data/lib/jamf/ruby_extensions/pathname/utils.rb +1 -1
  108. data/lib/jamf/ruby_extensions/string.rb +1 -1
  109. data/lib/jamf/ruby_extensions/string/backports.rb +1 -1
  110. data/lib/jamf/ruby_extensions/string/conversions.rb +1 -1
  111. data/lib/jamf/ruby_extensions/string/predicates.rb +14 -4
  112. data/lib/jamf/utility.rb +1 -1
  113. data/lib/jamf/validate.rb +1 -1
  114. data/lib/jamf/version.rb +1 -1
  115. data/lib/jpapi.rb +1 -1
  116. data/lib/jss-api.rb +1 -1
  117. data/lib/jss.rb +1 -1
  118. data/lib/jss/api_connection.rb +1 -1
  119. data/lib/jss/api_object.rb +1 -1
  120. data/lib/jss/api_object/account.rb +1 -1
  121. data/lib/jss/api_object/advanced_search.rb +1 -1
  122. data/lib/jss/api_object/advanced_search/advanced_computer_search.rb +1 -1
  123. data/lib/jss/api_object/advanced_search/advanced_mobile_device_search.rb +1 -1
  124. data/lib/jss/api_object/advanced_search/advanced_user_search.rb +1 -1
  125. data/lib/jss/api_object/building.rb +1 -1
  126. data/lib/jss/api_object/categorizable.rb +1 -1
  127. data/lib/jss/api_object/category.rb +1 -1
  128. data/lib/jss/api_object/computer.rb +7 -5
  129. data/lib/jss/api_object/computer/application_installs.rb +1 -1
  130. data/lib/jss/api_object/computer_invitation.rb +1 -1
  131. data/lib/jss/api_object/configuration_profile.rb +4 -2
  132. data/lib/jss/api_object/configuration_profile/mobile_device_configuration_profile.rb +1 -1
  133. data/lib/jss/api_object/configuration_profile/osx_configuration_profile.rb +1 -1
  134. data/lib/jss/api_object/creatable.rb +1 -1
  135. data/lib/jss/api_object/criteriable.rb +1 -1
  136. data/lib/jss/api_object/criteriable/criteria.rb +1 -1
  137. data/lib/jss/api_object/criteriable/criterion.rb +1 -1
  138. data/lib/jss/api_object/department.rb +1 -1
  139. data/lib/jss/api_object/distribution_point.rb +1 -1
  140. data/lib/jss/api_object/ebook.rb +1 -1
  141. data/lib/jss/api_object/extendable.rb +16 -13
  142. data/lib/jss/api_object/extension_attribute.rb +1 -1
  143. data/lib/jss/api_object/extension_attribute/computer_extension_attribute.rb +1 -1
  144. data/lib/jss/api_object/extension_attribute/mobile_device_extension_attribute.rb +1 -1
  145. data/lib/jss/api_object/extension_attribute/user_extension_attribute.rb +1 -1
  146. data/lib/jss/api_object/group.rb +1 -1
  147. data/lib/jss/api_object/group/computer_group.rb +1 -1
  148. data/lib/jss/api_object/group/mobile_device_group.rb +1 -1
  149. data/lib/jss/api_object/group/user_group.rb +1 -1
  150. data/lib/jss/api_object/ibeacon.rb +1 -1
  151. data/lib/jss/api_object/ldap_server.rb +1 -1
  152. data/lib/jss/api_object/locatable.rb +1 -1
  153. data/lib/jss/api_object/mac_application.rb +1 -1
  154. data/lib/jss/api_object/management_history.rb +1 -1
  155. data/lib/jss/api_object/management_history/audit_event.rb +1 -1
  156. data/lib/jss/api_object/management_history/casper_imaging_log.rb +1 -1
  157. data/lib/jss/api_object/management_history/casper_remote_log.rb +1 -1
  158. data/lib/jss/api_object/management_history/computer_usage_log.rb +1 -1
  159. data/lib/jss/api_object/management_history/ebook.rb +1 -1
  160. data/lib/jss/api_object/management_history/hashlike.rb +1 -1
  161. data/lib/jss/api_object/management_history/mac_app_store_app.rb +1 -1
  162. data/lib/jss/api_object/management_history/mdm_command.rb +1 -1
  163. data/lib/jss/api_object/management_history/mobile_device_app.rb +1 -1
  164. data/lib/jss/api_object/management_history/policy_log.rb +1 -1
  165. data/lib/jss/api_object/management_history/screen_sharing_log.rb +1 -1
  166. data/lib/jss/api_object/management_history/user_location_change.rb +1 -1
  167. data/lib/jss/api_object/matchable.rb +1 -1
  168. data/lib/jss/api_object/mdm.rb +1 -1
  169. data/lib/jss/api_object/mobile_device.rb +9 -6
  170. data/lib/jss/api_object/mobile_device_application.rb +1 -1
  171. data/lib/jss/api_object/netboot_server.rb +1 -1
  172. data/lib/jss/api_object/network_segment.rb +1 -1
  173. data/lib/jss/api_object/package.rb +1 -1
  174. data/lib/jss/api_object/patch_policy.rb +1 -1
  175. data/lib/jss/api_object/patch_source.rb +1 -1
  176. data/lib/jss/api_object/patch_source/patch_external_source.rb +1 -1
  177. data/lib/jss/api_object/patch_source/patch_internal_source.rb +1 -1
  178. data/lib/jss/api_object/patch_title.rb +1 -1
  179. data/lib/jss/api_object/patch_title/version.rb +1 -1
  180. data/lib/jss/api_object/peripheral.rb +1 -1
  181. data/lib/jss/api_object/peripheral_type.rb +1 -1
  182. data/lib/jss/api_object/policy.rb +1 -1
  183. data/lib/jss/api_object/purchasable.rb +1 -1
  184. data/lib/jss/api_object/removable_macaddr.rb +1 -1
  185. data/lib/jss/api_object/restricted_software.rb +1 -1
  186. data/lib/jss/api_object/scopable.rb +1 -1
  187. data/lib/jss/api_object/scopable/scope.rb +1 -1
  188. data/lib/jss/api_object/script.rb +1 -1
  189. data/lib/jss/api_object/self_servable.rb +7 -7
  190. data/lib/jss/api_object/self_servable/icon.rb +1 -1
  191. data/lib/jss/api_object/sitable.rb +1 -1
  192. data/lib/jss/api_object/site.rb +1 -1
  193. data/lib/jss/api_object/software_update_server.rb +1 -1
  194. data/lib/jss/api_object/updatable.rb +1 -1
  195. data/lib/jss/api_object/uploadable.rb +1 -1
  196. data/lib/jss/api_object/user.rb +1 -1
  197. data/lib/jss/api_object/vppable.rb +1 -1
  198. data/lib/jss/api_object/webhook.rb +1 -1
  199. data/lib/jss/client.rb +1 -1
  200. data/lib/jss/client/jamf_binary.rb +1 -1
  201. data/lib/jss/client/jamf_helper.rb +1 -1
  202. data/lib/jss/client/management_action.rb +1 -1
  203. data/lib/jss/compatibility.rb +1 -1
  204. data/lib/jss/composer.rb +1 -1
  205. data/lib/jss/configuration.rb +1 -1
  206. data/lib/jss/db_connection.rb +1 -1
  207. data/lib/jss/exceptions.rb +1 -1
  208. data/lib/jss/ruby_extensions.rb +1 -1
  209. data/lib/jss/ruby_extensions/array.rb +1 -1
  210. data/lib/jss/ruby_extensions/filetest.rb +1 -1
  211. data/lib/jss/ruby_extensions/hash.rb +1 -1
  212. data/lib/jss/ruby_extensions/ipaddr.rb +1 -1
  213. data/lib/jss/ruby_extensions/pathname.rb +1 -1
  214. data/lib/jss/ruby_extensions/string.rb +1 -1
  215. data/lib/jss/ruby_extensions/string/backports.rb +1 -1
  216. data/lib/jss/ruby_extensions/string/conversions.rb +1 -1
  217. data/lib/jss/ruby_extensions/string/predicates.rb +14 -4
  218. data/lib/jss/ruby_extensions/time.rb +1 -1
  219. data/lib/jss/server.rb +1 -1
  220. data/lib/jss/utility.rb +1 -1
  221. data/lib/jss/validate.rb +1 -1
  222. data/lib/jss/version.rb +2 -2
  223. data/lib/jss/xml_workaround.rb +1 -1
  224. data/lib/ruby-jss.rb +1 -1
  225. data/test/bin/runtests +1 -1
  226. data/test/lib/testhelper.rb +1 -1
  227. data/test/lib/testhelper/auth.rb +1 -1
  228. data/test/lib/testhelper/patch_mgmt.rb +1 -1
  229. data/test/specs/api_connection_spec.rb +1 -1
  230. data/test/specs/patch01_source_spec.rb +1 -1
  231. data/test/specs/patch02_internal_source_spec.rb +1 -1
  232. data/test/specs/patch03_external_source_spec.rb +1 -1
  233. data/test/specs/patch04_titles_spec.rb +1 -1
  234. data/test/specs/patch05_policies_spec.rb +1 -1
  235. data/test/specs/patch06_cleanup_spec.rb +1 -1
  236. data/test/specs/policy_spec.rb +1 -1
  237. metadata +2 -2
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Pixar
1
+ # Copyright 2020 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
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Pixar
1
+ # Copyright 2020 Pixar
2
2
 
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
data/lib/jss.rb CHANGED
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 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
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1035,23 +1035,25 @@ module JSS
1035
1035
  end
1036
1036
 
1037
1037
  def asset_tag=(new_val)
1038
- new_val = '' if new_val.nil?
1038
+ new_val = new_val.to_s.strip
1039
1039
  return nil if @asset_tag.to_s == new_val
1040
- new_val.strip!
1040
+
1041
1041
  @asset_tag = new_val
1042
1042
  @need_to_update = true
1043
1043
  end
1044
1044
 
1045
1045
  def barcode1=(new_val)
1046
+ new_val = new_val.strip
1046
1047
  return nil if @barcode1 == new_val
1047
- new_val.strip!
1048
+
1048
1049
  @barcode1 = new_val
1049
1050
  @need_to_update = true
1050
1051
  end
1051
1052
 
1052
1053
  def barcode2=(new_val)
1054
+ new_val = new_val.strip
1053
1055
  return nil if @barcode2 == new_val
1054
- new_val.strip!
1056
+
1055
1057
  @barcode2 = new_val
1056
1058
  @need_to_update = true
1057
1059
  end
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Pixar
1
+ # Copyright 2020 Pixar
2
2
 
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Pixar
1
+ # Copyright 2020 Pixar
2
2
 
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -105,8 +105,10 @@ module JSS
105
105
  # @return [void]
106
106
  #
107
107
  def description=(new_val)
108
+ new_val = new_val.strip
108
109
  return nil if @self_service_description == new_val
109
- @description = new_val.strip!
110
+
111
+ @description = new_val
110
112
  @need_to_update = true
111
113
  end # @param new_val[String] how should this be distributed to clients?
112
114
 
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Pixar
1
+ # Copyright 2020 Pixar
2
2
 
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Pixar
1
+ # Copyright 2020 Pixar
2
2
 
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Pixar
1
+ # Copyright 2020 Pixar
2
2
 
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Pixar
1
+ # Copyright 2020 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
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Pixar
1
+ # Copyright 2020 Pixar
2
2
 
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -186,18 +186,21 @@ module JSS
186
186
  value ||= JSS::BLANK
187
187
  validate_popup_value(name, value, refresh) if validate_popup_choice
188
188
 
189
- case ea_types[name]
190
- when JSS::ExtensionAttribute::DATA_TYPE_DATE
191
- raise JSS::InvalidDataError, "The value for #{name} must be a date, cannot be blank" if value == JSS::BLANK
192
-
193
- value = JSS.parse_datetime value
194
-
195
- when *JSS::ExtensionAttribute::NUMERIC_TYPES
196
- raise JSS::InvalidDataError, "The value for #{name} must be an integer" unless value.is_a? Integer
197
-
198
- else # String
199
- value = value.to_s
200
- end # case
189
+ value =
190
+ case ea_types[name]
191
+ when JSS::ExtensionAttribute::DATA_TYPE_DATE # date
192
+ JSS.parse_datetime(value).to_s
193
+ when *JSS::ExtensionAttribute::NUMERIC_TYPES # integer
194
+ if value.is_a? Integer
195
+ value
196
+ elsif value.to_s.jss_integer?
197
+ value.to_s.to_i
198
+ else
199
+ raise JSS::InvalidDataError, "The value for #{name} must be an integer"
200
+ end # if
201
+ else # string
202
+ value.to_s
203
+ end # case
201
204
 
202
205
  # update this ea hash in the @extension_attributes array
203
206
  @extension_attributes.each { |ea| ea[:value] = value if ea[:name] == name }
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Pixar
1
+ # Copyright 2020 Pixar
2
2
 
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Pixar
1
+ # Copyright 2020 Pixar
2
2
 
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Pixar
1
+ # Copyright 2020 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
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Pixar
1
+ # Copyright 2020 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
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Pixar
1
+ # Copyright 2020 Pixar
2
2
 
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Pixar
1
+ # Copyright 2020 Pixar
2
2
 
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -1,4 +1,4 @@
1
- ### Copyright 2019 Pixar
1
+ ### Copyright 2020 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")