From 1fbfe0704e6e8a2272921942cc7c3e854a960e8d Mon Sep 17 00:00:00 2001 From: f Date: Thu, 30 Mar 2023 14:45:49 -0300 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20evitar=20m=C3=A9todos=20de=20publica?= =?UTF-8?q?ci=C3=B3n=20duplicados=20#12276?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/sites_controller.rb | 2 -- app/services/site_service.rb | 1 + app/views/sites/_form.haml | 3 --- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/controllers/sites_controller.rb b/app/controllers/sites_controller.rb index f0eff0dc..8d49fd8a 100644 --- a/app/controllers/sites_controller.rb +++ b/app/controllers/sites_controller.rb @@ -28,8 +28,6 @@ class SitesController < ApplicationController @site = Site.new authorize @site - - @site.deploys.build type: 'DeployLocal' end def create diff --git a/app/services/site_service.rb b/app/services/site_service.rb index 0ecccba4..bb76c6ac 100644 --- a/app/services/site_service.rb +++ b/app/services/site_service.rb @@ -14,6 +14,7 @@ SiteService = Struct.new(:site, :usuarie, :params, keyword_init: true) do self.site = Site.new params add_role temporal: false, rol: 'usuarie' + site.deploys.build type: 'DeployLocal' sync_nodes I18n.with_locale(usuarie.lang.to_sym || I18n.default_locale) do diff --git a/app/views/sites/_form.haml b/app/views/sites/_form.haml index 9a044c7f..7897d2ee 100644 --- a/app/views/sites/_form.haml +++ b/app/views/sites/_form.haml @@ -156,9 +156,6 @@ = f.fields_for :deploys do |deploy| = render "deploys/#{deploy.object.type.underscore}", deploy: deploy, site: site - - else - = f.fields_for :deploys do |deploy| - = deploy.hidden_field :type .form-group = f.submit submit, class: 'btn btn-lg btn-block' From 645e1703b7b9e17fc81defb2a27c0b7240c1fa4d Mon Sep 17 00:00:00 2001 From: f Date: Thu, 30 Mar 2023 14:53:34 -0300 Subject: [PATCH 2/2] feat: configurar la fuente de gemas del skel desde el panel --- app/models/deploy_local.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/deploy_local.rb b/app/models/deploy_local.rb index c031c7b9..bfde29f7 100644 --- a/app/models/deploy_local.rb +++ b/app/models/deploy_local.rb @@ -84,7 +84,8 @@ class DeployLocal < Deploy 'AIRBRAKE_PROJECT_KEY' => site.airbrake_api_key, 'JEKYLL_ENV' => Rails.env, 'LANG' => ENV['LANG'], - 'YARN_CACHE_FOLDER' => yarn_cache_dir + 'YARN_CACHE_FOLDER' => yarn_cache_dir, + 'GEMS_SOURCE' => ENV['GEMS_SOURCE'] }) end