5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-18 14:46:21 +00:00

fixup! fix: detectar cambios de configuración por separado

This commit is contained in:
f 2023-04-21 12:18:06 -03:00
parent 49f19b59ab
commit 285539842f

View file

@ -49,14 +49,14 @@ class Site
#
# @return [Boolean]
def awaiting_publication?
waiting? && (post_publication_pending? || deploy_pending? || configuration_pending?)
waiting? && (post_pending? || deploy_pending? || configuration_pending?)
end
# Se modificaron artículos después de publicar el sitio por última
# vez
#
# @return [Boolean]
def post_publication_pending?
def post_pending?
last_indexed_post_time > last_publication_time
end
@ -71,7 +71,7 @@ class Site
#
# @return [Boolean]
def configuration_pending?
File.mtime(config.path) > last_publication_time
last_configuration_time > last_publication_time
end
private
@ -99,6 +99,13 @@ class Site
def last_publication_time
build_stats.jekyll.where(status: true).order(created_at: :desc).select(:created_at).first&.created_at || updated_at
end
# Fecha de última modificación de la configuración
#
# @return [Time]
def last_configuration_time
File.mtime(config.path)
end
end
end
end