5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-01 22:36:08 +00:00
panel/app/models/deploy_distributed_press.rb

36 lines
707 B
Ruby
Raw Normal View History

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
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,
'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