mirror of
https://0xacab.org/sutty/sutty
synced 2025-02-22 21:01:51 +00:00
fixup! fix: detectar cambios de configuración por separado
This commit is contained in:
parent
49f19b59ab
commit
285539842f
1 changed files with 10 additions and 3 deletions
|
@ -49,14 +49,14 @@ class Site
|
||||||
#
|
#
|
||||||
# @return [Boolean]
|
# @return [Boolean]
|
||||||
def awaiting_publication?
|
def awaiting_publication?
|
||||||
waiting? && (post_publication_pending? || deploy_pending? || configuration_pending?)
|
waiting? && (post_pending? || deploy_pending? || configuration_pending?)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Se modificaron artículos después de publicar el sitio por última
|
# Se modificaron artículos después de publicar el sitio por última
|
||||||
# vez
|
# vez
|
||||||
#
|
#
|
||||||
# @return [Boolean]
|
# @return [Boolean]
|
||||||
def post_publication_pending?
|
def post_pending?
|
||||||
last_indexed_post_time > last_publication_time
|
last_indexed_post_time > last_publication_time
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ class Site
|
||||||
#
|
#
|
||||||
# @return [Boolean]
|
# @return [Boolean]
|
||||||
def configuration_pending?
|
def configuration_pending?
|
||||||
File.mtime(config.path) > last_publication_time
|
last_configuration_time > last_publication_time
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -99,6 +99,13 @@ class Site
|
||||||
def last_publication_time
|
def last_publication_time
|
||||||
build_stats.jekyll.where(status: true).order(created_at: :desc).select(:created_at).first&.created_at || updated_at
|
build_stats.jekyll.where(status: true).order(created_at: :desc).select(:created_at).first&.created_at || updated_at
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Fecha de última modificación de la configuración
|
||||||
|
#
|
||||||
|
# @return [Time]
|
||||||
|
def last_configuration_time
|
||||||
|
File.mtime(config.path)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue