5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-01 11:36:07 +00:00

BREAKING CHANGE: deprecar Deploy#gems_dir por Site#bundle_path #13428

This commit is contained in:
f 2023-05-13 17:41:00 -03:00
parent b50cca1d75
commit 907f9b8bc6
3 changed files with 7 additions and 7 deletions

View file

@ -50,11 +50,6 @@ class Deploy < ApplicationRecord
site.path
end
# XXX: Ver DeployLocal#bundle
def gems_dir
@gems_dir ||= Rails.root.join('_storage', 'gems', site.name)
end
# Corre un comando, lo registra en la base de datos y devuelve el
# estado.
#

View file

@ -55,7 +55,7 @@ class DeployLocal < Deploy
#
# @return [nil]
def cleanup!
FileUtils.rm_rf(gems_dir)
FileUtils.rm_rf(site.bundle_path)
FileUtils.rm_rf(yarn_cache_dir)
FileUtils.rm_rf(File.join(site.path, 'node_modules'))
FileUtils.rm_rf(File.join(site.path, '.sass-cache'))
@ -141,7 +141,7 @@ class DeployLocal < Deploy
# XXX: Desde que ya no compartimos el directorio de gemas, tenemos
# que hacer limpieza después de instalar.
run %(bundle install --deployment --no-cache --path="#{gems_dir}" --clean --without test development), output: output
run %(bundle install --deployment --no-cache --path="#{site.bundle_path}" --clean --without test development), output: output
end
def jekyll_build(output: false)

View file

@ -453,6 +453,11 @@ class Site < ApplicationRecord
@docs = nil
end
# @return [Pathname]
def bundle_path
@bundle_path ||= Rails.root.join('_storage', 'gems', name)
end
private
# Asegurarse que el sitio tenga una llave privada