mirror of
https://0xacab.org/sutty/sutty
synced 2025-02-21 12:01:47 +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'))
|
updated_at < File.mtime(File.join(path, 'Gemfile'))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# @return [String]
|
||||||
|
def gemfile_lock_path
|
||||||
|
@gemfile_lock_path ||= File.join(path, 'Gemfile.lock')
|
||||||
|
end
|
||||||
|
|
||||||
# Detecta si el Gemfile.lock fue modificado
|
# Detecta si el Gemfile.lock fue modificado
|
||||||
def gemfile_lock_updated?
|
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
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue