lib/contentful/management/support.rb in contentful-management-1.5.0 vs lib/contentful/management/support.rb in contentful-management-1.6.0

- old
+ new

@@ -16,9 +16,13 @@ newval = newval.to_hash if newval.respond_to?(:to_hash) oldval.class.to_s == 'Hash' && newval.class.to_s == 'Hash' ? deep_hash_merge(oldval, newval) : newval end end + # If the query contains the :select operator, we enforce :sys properties. + # The SDK requires sys.type to function properly, but as other of our SDKs + # require more parts of the :sys properties, we decided that every SDK should + # include the complete :sys block to provide consistency accross our SDKs. def normalize_select!(parameters) return parameters unless parameters.key?(:select) parameters[:select] = parameters[:select].split(',').map(&:strip) if parameters[:select].is_a? String parameters[:select] = parameters[:select].reject { |p| p.start_with?('sys.') }