5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 06:31:42 +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 1c294d450e
commit 622d3b47db
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'))
@ -138,7 +138,7 @@ class DeployLocal < Deploy
end
def bundle(output: false)
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