def merge_dependencies(links, before, after)
      links.each do |link|
        before_index = find_dependency_index before, link
        after_index = find_dependency_index after, link
        unless before_index.nil? || after_index.nil?
          after[after_index] = before[before_index]
        end
      end
      return after
    end
def merge_dependencies(links, before, after)
      links.each do |link|
        before_index = find_dependency_index before, link
        after_index = find_dependency_index after, link
        unless before_index.nil? || after_index.nil?
          after[after_index] = before[before_index]
        end
      end
      return after
    end
Will merge the DEPENDENCIES of the Podfile.lock before a link and after a link

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

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