mirror of
https://0xacab.org/sutty/sutty
synced 2025-02-21 11:11:51 +00:00
implementar la misma api en todos los deploys
This commit is contained in:
parent
b9b11b20b8
commit
193ba69a5f
6 changed files with 18 additions and 6 deletions
|
@ -14,7 +14,7 @@ class Deploy < ApplicationRecord
|
|||
|
||||
DEPENDENCIES = []
|
||||
|
||||
def deploy
|
||||
def deploy(**)
|
||||
raise NotImplementedError
|
||||
end
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ class DeployAlternativeDomain < Deploy
|
|||
DEPENDENCIES = %i[deploy_local]
|
||||
|
||||
# Generar un link simbólico del sitio principal al alternativo
|
||||
def deploy
|
||||
def deploy(**)
|
||||
File.symlink?(destination) ||
|
||||
File.symlink(site.hostname, destination).zero?
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Genera una versión onion
|
||||
class DeployHiddenService < DeployWww
|
||||
def deploy
|
||||
def deploy(**)
|
||||
return true if fqdn.blank?
|
||||
|
||||
super
|
||||
|
|
12
app/models/deploy_localized_domain.rb
Normal file
12
app/models/deploy_localized_domain.rb
Normal file
|
@ -0,0 +1,12 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Soportar dominios localizados
|
||||
class DeployLocalizedDomain < DeployAlternativeDomain
|
||||
store :values, accessors: %i[hostname locale], coder: JSON
|
||||
|
||||
# Generar un link simbólico del sitio principal al alternativo
|
||||
def deploy(**)
|
||||
File.symlink?(destination) ||
|
||||
File.symlink(File.join(site.hostname, locale), destination).zero?
|
||||
end
|
||||
end
|
|
@ -7,8 +7,8 @@
|
|||
# jekyll-private-data
|
||||
class DeployPrivate < DeployLocal
|
||||
# No es necesario volver a instalar dependencias
|
||||
def deploy
|
||||
jekyll_build
|
||||
def deploy(output: false)
|
||||
jekyll_build(output: output)
|
||||
end
|
||||
|
||||
# Hacer el deploy a un directorio privado
|
||||
|
|
|
@ -8,7 +8,7 @@ class DeployWww < Deploy
|
|||
|
||||
before_destroy :remove_destination!
|
||||
|
||||
def deploy
|
||||
def deploy(**)
|
||||
File.symlink?(destination) ||
|
||||
File.symlink(site.hostname, destination).zero?
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue