def artifact_for(artifact)
      md5  = artifact.respond_to?(:metadata) ? artifact.metadata[:md5] : digest(artifact.path, :md5)
      sha1 = artifact.respond_to?(:metadata) ? artifact.metadata[:sha1] : digest(artifact.path, :sha1)

      Artifactory::Resource::Artifact.new(
        local_path: artifact.path,
        client:     client,
        checksums: {
          "md5" => md5,
          "sha1" => sha1,
        }
      )
    end
def artifact_for(artifact)
      md5  = artifact.respond_to?(:metadata) ? artifact.metadata[:md5] : digest(artifact.path, :md5)
      sha1 = artifact.respond_to?(:metadata) ? artifact.metadata[:sha1] : digest(artifact.path, :sha1)

      Artifactory::Resource::Artifact.new(
        local_path: artifact.path,
        client:     client,
        checksums: {
          "md5" => md5,
          "sha1" => sha1,
        }
      )
    end
The artifact object that corresponds to this package.

 @param [Package,Metadata] artifact
   the package or metadata file to create the artifact from

 @return [Artifactory::Resource::Artifact]