ruby-jss 0.10.2a5 → 0.10.2

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.

Potentially problematic release.


This version of ruby-jss might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3439f66eb5d64245c13267b0b2bf255bde756902
4
- data.tar.gz: bd761be29af2f940eb8e9caa0afb4c2406e15d06
3
+ metadata.gz: ebd3ed57a6244c6f97239f18b8f297a1c638c333
4
+ data.tar.gz: c80c3542d2a455decccb50275ab772a3dc320776
5
5
  SHA512:
6
- metadata.gz: '0692041767fc9410b445fe249bc0bdbb734211c0c80bab8e0a0862596dba04d5a97deb5e547bc2bb76d41ac45fc416c4091242bc6e30d0bea1e70f777d60f63e'
7
- data.tar.gz: 51f3c376b1fed7a0ef481c777692f3849b73d3065a9ba2f908a1a7e5057446529f33e0921343fb97241418736dd39558eec3e67da7281229a2bb622bc4ac4045
6
+ metadata.gz: fb254e9ca0b1b5c990f503bc6a587e5d140b5406e785b74052bd0ad12ee4842695d41dc30dd4af8bc4def64900204e11293a5b27fccf6704ac76d48796b28fe2
7
+ data.tar.gz: f0ebc46ecef64a7cb2ceb13f4d29bdc68880db726ff527afe2f95fa78e817f0c45ae8d8051de2646ab5ef4fe8cd5da9efe20f2a52b898b3d67fc2616bfc68a1a
data/CHANGES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Change History
2
2
 
3
+ ## v 0.10.2, 2018-02-16
4
+
5
+ - *IMPORTANT BUG FIX*: Updating JSS::Extendable objects with no changes to ext. attribs will no longer erase all ext attrib values. (!)
6
+
7
+
3
8
  ## v 0.10.1 2017-11-08
4
9
 
5
10
  - Add: Extension Attribute values that are populated by Script or LDAP can now be modified via Extendable#set_ext_attr.
@@ -237,13 +237,11 @@ module JSS
237
237
  # prod2_victim_md = production_api2.fetch :MobileDevice, id: 832
238
238
  #
239
239
  # Here are the API calls you can make directly from an APIConnection object.
240
- # They behave practically identically to the same methods in the APIObject
241
- # subclasses, since they just call those methods, passing themselves in as the
242
- # APIConnection to use.
240
+ # Most of them behave identically to the same methods in the APIObject classes
243
241
  #
244
242
  # - {#all} The 'list' methods of the various APIObject classes. Use the 'only:'
245
243
  # parameter to specify one of the sub-list-methods, like #all_ids or
246
- # #all_laptops, e.g. `my_connection.all :computers, only: :id`
244
+ # #all_laptops
247
245
  # - {#map_all_ids} the equivalent of #map_all_ids_to in the APIObject classes
248
246
  # - {#valid_id} given a class and an identifier (like macaddress or udid)
249
247
  # return a valid id or nil
@@ -256,9 +254,6 @@ module JSS
256
254
  # - {#send_computer_mdm_command} same as {Computer.send_mdm_command}
257
255
  # - {#computer_checkin_settings} same as {Computer.checkin_settings}
258
256
  # - {#computer_inventory_collection_settings} same as {Computer.inventory_collection_settings}
259
- # - {#computer_application_usage} same as {Computer.application_usage}
260
- # - {#computer_management_data} same as {Computer.management_data}
261
- # - {#computer_history} same as {Computer.history}
262
257
  # - {#send_mobiledevice_mdm_command} same as {MobileDevice.send_mdm_command}
263
258
  # - {#master_distribution_point} same as {DistributionPoint.master_distribution_point}
264
259
  # - {#my_distribution_point} same as {DistributionPoint.my_distribution_point}
@@ -744,46 +739,23 @@ module JSS
744
739
  the_class.make args
745
740
  end
746
741
 
747
- # Call {JSS::Computer.checkin_settings} q.v., passing this API
742
+ # Call {JSS::Computer.checkin_settings} passing this API
748
743
  # connection
749
744
  #
745
+ # @return (see JSS::Computer.checkin_settings)
746
+ #
750
747
  def computer_checkin_settings
751
748
  JSS::Computer.checkin_settings api: self
752
749
  end
753
750
 
754
- # Call {JSS::Computer.inventory_collection_settings} q.v., passing this API
755
- # connection
756
- #
757
- def computer_inventory_collection_settings
758
- JSS::Computer.inventory_collection_settings api: self
759
- end
760
-
761
- # Call {JSS::Computer.application_usage} q.v., passing this API
762
- # connection
763
- #
764
- def computer_application_usage(ident, start_date, end_date = nil)
765
- JSS::Computer.application_usage ident, start_date, end_date, api: self
766
- end
767
-
768
- # Call {JSS::Computer.management_data} q.v., passing this API
769
- # connection
770
- #
771
- def computer_management_data(ident, subset: nil, only: nil)
772
- JSS::Computer.management_data ident, subset: subset, only: only, api: self
773
- end
774
751
 
775
- # Call {JSS::Computer.history} q.v., passing this API
752
+ # Call {JSS::Computer.inventory_collection_settings} passing this API
776
753
  # connection
777
754
  #
778
- def computer_history(ident, subset: nil)
779
- JSS::Computer.history ident, subset: subset, api: self
780
- end
781
-
782
- # Call {JSS::Computer.send_mdm_command} q.v., passing this API
783
- # connection
755
+ # @return (see JSS::Computer.checkin_settings)
784
756
  #
785
- def send_computer_mdm_command(targets, command, passcode = nil)
786
- JSS::Computer.send_mdm_command targets, command, passcode, api: self
757
+ def computer_inventory_collection_settings
758
+ JSS::Computer.inventory_collection_settings api: self
787
759
  end
788
760
 
789
761
  # Get the DistributionPoint instance for the master
@@ -862,7 +834,7 @@ module JSS
862
834
  #
863
835
  # @return [Array<Integer>] the ids of the NetworkSegments containing the given ip
864
836
  #
865
- def network_segments_for_ip(ip)
837
+ def network_segments_for_ip(ip, refresh = false)
866
838
  ok_ip = IPAddr.new(ip)
867
839
  matches = []
868
840
  network_ranges.each { |id, subnet| matches << id if subnet.include?(ok_ip) }
@@ -877,6 +849,15 @@ module JSS
877
849
  network_segments_for_ip JSS::Client.my_ip_address
878
850
  end
879
851
 
852
+ # Send an MDM command to one or more computers managed by
853
+ # this JSS
854
+ #
855
+ # see {JSS::Computer.send_mdm_command}
856
+ #
857
+ def send_computer_mdm_command(targets, command, passcode = nil)
858
+ JSS::Computer.send_mdm_command(targets, command, passcode, api: self)
859
+ end
860
+
880
861
  # Send an MDM command to one or more mobile devices managed by
881
862
  # this JSS
882
863
  #
@@ -60,16 +60,12 @@ module JSS
60
60
  include JSS::Creatable
61
61
  include JSS::Updatable
62
62
  include JSS::Criteriable
63
- include JSS::Sitable
64
63
 
65
64
  # Class Constants
66
65
  #####################################
67
66
 
68
67
  EXPORT_FORMATS = [:csv, :tab, :xml].freeze
69
68
 
70
- # Where is site data located in the API JSON?
71
- SITE_SUBSET = :top
72
-
73
69
  # Attributes
74
70
  #####################################
75
71
 
@@ -346,7 +342,7 @@ module JSS
346
342
 
347
343
  df = acs.add_element('display_fields')
348
344
  @display_fields.each { |f| df.add_element('display_field').add_element('name').text = f }
349
- add_site_to_xml(doc)
345
+
350
346
  doc.to_s
351
347
  end # rest xml
352
348