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:
parent
8d9328cd66
commit
5d8c1556a8
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