diff --git a/Gemfile.lock b/Gemfile.lock index 7f9b09a4..afb92f77 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -608,6 +608,7 @@ DEPENDENCIES jbuilder (~> 2.5) jekyll (~> 4.2.0) jekyll-commonmark (~> 1.4.0) + jekyll-data jekyll-images jekyll-include-cache kaminari diff --git a/app/models/site.rb b/app/models/site.rb index c9d8d47a..63c54050 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -602,10 +602,13 @@ class Site < ApplicationRecord @gemfile_lock_path ||= File.join(path, 'Gemfile.lock') end - # Detecta si el Gemfile.lock fue modificado + # Detecta si el Gemfile.lock fue modificado con respecto al sitio o al + # Gemfile. def gemfile_lock_updated? return false unless gemfile_lock_path? - updated_at < File.mtime(gemfile_lock_path) + [updated_at, File.mtime(File.join(path, 'Gemfile'))].any? do |compare| + compare < File.mtime(gemfile_lock_path) + end end end