def merge_hashes(links, before, after)
      if before.nil?
        return after
      end
      links.each do |link|
        if before.has_key?(link)
          after[link] = before[link]
        else
          if after.has_key?(link)
            after.delete(link)
          end
        end
      end
      return after
    end
def merge_hashes(links, before, after)
      if before.nil?
        return after
      end
      links.each do |link|
        if before.has_key?(link)
          after[link] = before[link]
        else
          if after.has_key?(link)
            after.delete(link)
          end
        end
      end
      return after
    end
Will merge the hashes of the Podfile.lock before a link and after a link

 @param links the installed links
 @param before the hash in the Podfile.lock before the link occurs
 @param after the hash after the link (includes new link that we want to filter out)

 @returns the merged hash replacing any links that were added with their previous value