dor-fetcher 1.1.1 → 1.1.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.
- checksums.yaml +8 -8
- data/lib/dor-fetcher.rb +8 -5
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,15 +1,15 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            !binary "U0hBMQ==":
         | 
| 3 3 | 
             
              metadata.gz: !binary |-
         | 
| 4 | 
            -
                 | 
| 4 | 
            +
                ZDIzMmIyMTY5NzNjZGQzYWExMzhmYWFhNDY0ZmVkZjE3ZGFkNGIwMw==
         | 
| 5 5 | 
             
              data.tar.gz: !binary |-
         | 
| 6 | 
            -
                 | 
| 6 | 
            +
                YzU5NDYyYTA2ZTVjOTMwNDBhYjBiNjg5YzNiYzM4MzIyZDdmOGUwNA==
         | 
| 7 7 | 
             
            SHA512:
         | 
| 8 8 | 
             
              metadata.gz: !binary |-
         | 
| 9 | 
            -
                 | 
| 10 | 
            -
                 | 
| 11 | 
            -
                 | 
| 9 | 
            +
                MDYzZGFmOWYzZGY5Mjk2ZTM5ZjU5ZDNhNGI1YTBjNGEzZWEzZDdjOTBiODgx
         | 
| 10 | 
            +
                MzBkOTdiYmE2N2ZlNDQxOWMyODg0MTI5OWUzZjc5MjEzYTE0NjliNGZhYzg1
         | 
| 11 | 
            +
                ZGM3MGRiY2Q5Mzg3YmUyOTIzNDEyNDRlM2E1ZDkxZTViZTc1M2M=
         | 
| 12 12 | 
             
              data.tar.gz: !binary |-
         | 
| 13 | 
            -
                 | 
| 14 | 
            -
                 | 
| 15 | 
            -
                 | 
| 13 | 
            +
                MmY0NzBlOTcyMWZjM2Y4NzJiZGExNmI0NWFkOTkzM2Y2OGI2OTZjMmYzOTE0
         | 
| 14 | 
            +
                MWJmYWY2M2VmNDNmNjI4MGE1Njk2NmYxNzdiNGY2NWViNWZlM2NmZDEwZjc5
         | 
| 15 | 
            +
                YjZmNjZlNDk4MWQwOGRlYzk2NjhhYmEzN2MzMjUzMDUwOTVmMjE=
         | 
    
        data/lib/dor-fetcher.rb
    CHANGED
    
    | @@ -104,14 +104,19 @@ module DorFetcher | |
| 104 104 | 
             
                #Method to parse full Hash into an array containing only the druids
         | 
| 105 105 | 
             
                #
         | 
| 106 106 | 
             
                #@param response [Hash] Hash as returned by query_api
         | 
| 107 | 
            +
                #@param no_prefix [boolean] if true (default), remove the druid: prefix on all druids, if false, leave alone
         | 
| 107 108 | 
             
                #@return [Array] the array listing all druids in the supplied Hash
         | 
| 108 | 
            -
                def druid_array(response)
         | 
| 109 | 
            +
                def druid_array(response,params={})
         | 
| 109 110 | 
             
                  return_list = []
         | 
| 110 111 | 
             
                  j = response
         | 
| 111 112 | 
             
                  j.keys.each do |key|
         | 
| 112 113 | 
             
                    if key != @@counts_key
         | 
| 113 114 | 
             
                      j[key].each do |item|
         | 
| 114 | 
            -
                         | 
| 115 | 
            +
                        if item['druid'] != nil
         | 
| 116 | 
            +
                          druid=item['druid'].downcase
         | 
| 117 | 
            +
                          druid.gsub!('druid:','') if params[:no_prefix]
         | 
| 118 | 
            +
                          return_list << druid
         | 
| 119 | 
            +
                        end
         | 
| 115 120 | 
             
                      end
         | 
| 116 121 | 
             
                    end
         | 
| 117 122 | 
             
                  end
         | 
| @@ -181,6 +186,4 @@ module DorFetcher | |
| 181 186 |  | 
| 182 187 | 
             
              end
         | 
| 183 188 |  | 
| 184 | 
            -
            end
         | 
| 185 | 
            -
             | 
| 186 | 
            -
             | 
| 189 | 
            +
            end
         |