From d674ccdb0fab626900f41f95305ab5222c7612a0 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 25 Sep 2023 14:52:59 -0300 Subject: [PATCH] fix: el gemfile.lock puede modificar luego del gemfile #14352 --- app/models/site.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/models/site.rb b/app/models/site.rb index 24644b9c..2958db9a 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -583,8 +583,11 @@ class Site < ApplicationRecord updated_at < File.mtime(File.join(path, 'Gemfile')) 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? - updated_at < File.mtime(File.join(path, 'Gemfile.lock')) + [updated_at, File.mtime(File.join(path, 'Gemfile'))].any? do |compare| + compare < File.mtime(File.join(path, 'Gemfile.lock')) + end end end