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:
parent
7ec98dadef
commit
a8f93b29e1
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue