2022-10-05 21:44:23 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# Soportar Distributed Press APIv0
|
|
|
|
#
|
|
|
|
# No se realiza ninguna acción porque el deploy se hace desde el plugin
|
|
|
|
# local.
|
|
|
|
class DeployDistributedPress < Deploy
|
2022-11-18 18:56:59 +00:00
|
|
|
store :values, accessors: %i[api_url api_key hostname], coder: JSON
|
2022-10-05 21:44:23 +00:00
|
|
|
|
|
|
|
def deploy; end
|
|
|
|
|
|
|
|
def limit; end
|
|
|
|
|
|
|
|
def size
|
|
|
|
deploy_local.size
|
|
|
|
end
|
|
|
|
|
|
|
|
# TODO: Devolver hyper:// y otras
|
|
|
|
def url
|
|
|
|
"ipfs://#{hostname}/"
|
|
|
|
end
|
|
|
|
|
|
|
|
# Devuelve variables de entorno para enviarle a DeployLocal
|
|
|
|
#
|
|
|
|
# @return [Hash]
|
|
|
|
def local_env
|
|
|
|
{
|
|
|
|
'DISTRIBUTED_PRESS_PROJECT_DOMAIN' => hostname,
|
2022-11-18 18:56:59 +00:00
|
|
|
'DISTRIBUTED_PRESS_API_KEY' => api_key,
|
|
|
|
'DISTRIBUTED_PRESS_API_URL' => api_url
|
2022-10-05 21:44:23 +00:00
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
def destination; end
|
|
|
|
end
|