5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 21:51:43 +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 8d9328cd66
commit 5d8c1556a8

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