mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 10:01:41 +00:00
fix: deprecar Site#run_in_path #13428
ya no es necesario y Dir.chdir no es concurrente, con lo que nos ahorramos posibles bugs.
This commit is contained in:
parent
e473de6a4e
commit
1c294d450e
1 changed files with 4 additions and 14 deletions
|
@ -212,11 +212,9 @@ class Site < ApplicationRecord
|
|||
# Trae los datos del directorio _data dentro del sitio
|
||||
def data
|
||||
unless jekyll.data.present?
|
||||
run_in_path do
|
||||
jekyll.reader.read_data
|
||||
jekyll.data['layouts'] ||= {}
|
||||
end
|
||||
end
|
||||
|
||||
jekyll.data
|
||||
end
|
||||
|
@ -225,9 +223,7 @@ class Site < ApplicationRecord
|
|||
# colecciones.
|
||||
def collections
|
||||
unless @read
|
||||
run_in_path do
|
||||
jekyll.reader.read_collections
|
||||
end
|
||||
|
||||
@read = true
|
||||
end
|
||||
|
@ -322,10 +318,8 @@ class Site < ApplicationRecord
|
|||
#
|
||||
# @return [Hash]
|
||||
def theme_layouts
|
||||
run_in_path do
|
||||
jekyll.reader.read_layouts
|
||||
end
|
||||
end
|
||||
|
||||
# Trae todos los valores disponibles para un campo
|
||||
#
|
||||
|
@ -550,10 +544,6 @@ class Site < ApplicationRecord
|
|||
I18n.t('activerecord.errors.models.site.attributes.design_id.layout_incompatible.error'))
|
||||
end
|
||||
|
||||
def run_in_path(&block)
|
||||
Dir.chdir path, &block
|
||||
end
|
||||
|
||||
# Instala las gemas cuando es necesario:
|
||||
#
|
||||
# * El sitio existe
|
||||
|
|
Loading…
Reference in a new issue