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

fix: no fallar si no existe el Gemfile.lock #13428

This commit is contained in:
f 2023-05-13 17:43:02 -03:00
parent 7ec98dadef
commit a8f93b29e1

View file

@ -587,8 +587,15 @@ class Site < ApplicationRecord
updated_at < File.mtime(File.join(path, 'Gemfile'))
end
# @return [String]
def gemfile_lock_path
@gemfile_lock_path ||= File.join(path, 'Gemfile.lock')
end
# Detecta si el Gemfile.lock fue modificado
def gemfile_lock_updated?
updated_at < File.mtime(File.join(path, 'Gemfile.lock'))
return false unless File.exist? gemfile_lock_path
updated_at < File.mtime(gemfile_lock_path)
end
end