5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-05 20:25:46 +00:00

fix: no usar :send #13428

This commit is contained in:
f 2023-05-13 17:42:14 -03:00
parent 907f9b8bc6
commit 779da676fc
2 changed files with 15 additions and 14 deletions

View file

@ -7,6 +7,18 @@ class DeployLocal < Deploy
before_destroy :remove_destination!
def git_lfs(output: false)
run %(git lfs fetch), output: output
run %(git lfs checkout), output: output
end
def bundle(output: false)
# 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="#{site.bundle_path}" --clean --without test development), output: output
end
# Realizamos la construcción del sitio usando Jekyll y un entorno
# limpio para no pasarle secretos
#
@ -121,11 +133,6 @@ class DeployLocal < Deploy
run 'pnpm install --production', output: output
end
def git_lfs(output: false)
run %(git lfs fetch), output: output
run %(git lfs checkout), output: output
end
def gem(output: false)
run %(gem install bundler --no-document), output: output
end
@ -137,13 +144,6 @@ class DeployLocal < Deploy
run 'yarn install --production', output: output
end
def bundle(output: false)
# 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="#{site.bundle_path}" --clean --without test development), output: output
end
def jekyll_build(output: false)
run %(bundle exec jekyll build --trace --profile --destination "#{escaped_destination}"), output: output
end

View file

@ -558,10 +558,11 @@ class Site < ApplicationRecord
def install_gems
return unless persisted?
deploys.find_by_type('DeployLocal').send(:git_lfs)
deploy_local = deploys.find_by_type('DeployLocal')
deploy_local.git_lfs
if !gem_dir? || gemfile_updated? || gemfile_lock_updated?
deploys.find_by_type('DeployLocal').send(:bundle)
deploy_local.bundle
touch
end
end