darlingtonia 3.0.2 → 3.0.3
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.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +15 -0
 - data/lib/darlingtonia/hyrax_record_importer.rb +4 -0
 - data/lib/darlingtonia/version.rb +1 -1
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: fccf4f74b294b16ddf86169a11cf05fa000acb4d76f2d3e0e53478570925ffbc
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: f572b72305be4c963cfeafd03375920740fc37b19c6eb9a9fe670c427a704cf7
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: afd4ad7a896b84d6b51a048cdbfb0d74beb87fc4296296625267741323804ba55e0b78aeb400195e930fcea6401c7323f534d3aba443989237ee783177eca593
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: d2297c4746b3b797ee90750baad25ec5fa326da33963bf67f73e05b31d1cb2655d0a34876dc3fbeba1e5e78838733699bae9442ce839d63161a685a6bc529bfe
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,3 +1,18 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            3.0.3 - Thu Feb 21, 2019
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            * Bug fix: Ensure there is no files metadata field passed
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
              If Hyrax (or perhaps some versions of Hyrax?) receives a metadata field called
         
     | 
| 
      
 6 
     | 
    
         
            +
              "files" it will not attach files correctly.
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
              It causes an exception like this:
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
              ```
         
     | 
| 
      
 11 
     | 
    
         
            +
              ActiveFedora::AssociationTypeMismatch:
         
     | 
| 
      
 12 
     | 
    
         
            +
                    Hydra::PCDM::File(#47055098949460) expected, got String(#47054999182880)
         
     | 
| 
      
 13 
     | 
    
         
            +
              ```
         
     | 
| 
      
 14 
     | 
    
         
            +
              This change removes any :files field from the metadata before submitting to Hyrax.
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
       1 
16 
     | 
    
         
             
            3.0.2 - Thu Feb 21, 2019
         
     | 
| 
       2 
17 
     | 
    
         | 
| 
       3 
18 
     | 
    
         
             
            * Bug fix: Do not fail to log errors if the record is missing a title
         
     | 
| 
         @@ -166,6 +166,10 @@ module Darlingtonia 
     | 
|
| 
       166 
166 
     | 
    
         
             
                    attrs = record.attributes.merge(additional_attrs)
         
     | 
| 
       167 
167 
     | 
    
         
             
                    attrs = attrs.merge(member_of_collections_attributes: { '0' => { id: collection_id } }) if collection_id
         
     | 
| 
       168 
168 
     | 
    
         | 
| 
      
 169 
     | 
    
         
            +
                    # Ensure nothing is passed in the files field,
         
     | 
| 
      
 170 
     | 
    
         
            +
                    # since this is reserved for Hyrax and is where uploaded_files will be attached
         
     | 
| 
      
 171 
     | 
    
         
            +
                    attrs.delete(:files)
         
     | 
| 
      
 172 
     | 
    
         
            +
             
     | 
| 
       169 
173 
     | 
    
         
             
                    based_near = attrs.delete(:based_near)
         
     | 
| 
       170 
174 
     | 
    
         
             
                    attrs = attrs.merge(based_near_attributes: based_near_attributes(based_near)) unless based_near.nil? || based_near.empty?
         
     | 
| 
       171 
175 
     | 
    
         | 
    
        data/lib/darlingtonia/version.rb
    CHANGED