def equivalent?(other_uri)
      other = Gitable::URI.parse_when_valid(other_uri)
      return false unless other
      return false unless normalized_host.to_s == other.normalized_host.to_s

      if github? || bitbucket?
        # github doesn't care about relative vs absolute paths in scp uris
        org_project == other.org_project
      else
        # if the path is absolute, we can assume it's the same for all users (so the user doesn't have to match).
        normalized_path.sub(/\/$/,'') == other.normalized_path.sub(/\/$/,'') &&
          (path[0] == '/' || normalized_user == other.normalized_user)
      end
    end
def equivalent?(other_uri)
      other = Gitable::URI.parse_when_valid(other_uri)
      return false unless other
      return false unless normalized_host.to_s == other.normalized_host.to_s

      if github? || bitbucket?
        # github doesn't care about relative vs absolute paths in scp uris
        org_project == other.org_project
      else
        # if the path is absolute, we can assume it's the same for all users (so the user doesn't have to match).
        normalized_path.sub(/\/$/,'') == other.normalized_path.sub(/\/$/,'') &&
          (path[0] == '/' || normalized_user == other.normalized_user)
      end
    end
Detect if two URIs are equivalent versions of the same uri.

 When both uris are github repositories, uses a more lenient matching
 system is used that takes github's repository organization into account.

 For non-github URIs this method requires the two URIs to have the same
 host, equivalent paths, and either the same user or an absolute path.

 @return [Boolean] true if the URI probably indicates the same repository.