From 58cb3a7bae46c83eabe9991882fbfd874f897f7b Mon Sep 17 00:00:00 2001 From: f Date: Mon, 27 Mar 2023 14:08:19 -0300 Subject: [PATCH 1/3] fix: typo --- app/models/deploy_local.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/deploy_local.rb b/app/models/deploy_local.rb index c512e0a8..9c0ba492 100644 --- a/app/models/deploy_local.rb +++ b/app/models/deploy_local.rb @@ -123,7 +123,7 @@ class DeployLocal < Deploy run 'yarn install --production', output: output end - def pnpm(output: output) + def pnpm(output: false) return true unless pnpm_lock? run %(pnpm config set store-dir "#{pnpm_cache_dir}"), output: output From 3b1b309b2a39c2db55586b863ae35e847add8868 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 27 Mar 2023 14:09:16 -0300 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20crear=20un=20registro=20para=20www?= =?UTF-8?q?=20tambi=C3=A9n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/deploy_distributed_press.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/deploy_distributed_press.rb b/app/models/deploy_distributed_press.rb index 679da09d..f26a72b5 100644 --- a/app/models/deploy_distributed_press.rb +++ b/app/models/deploy_distributed_press.rb @@ -136,6 +136,7 @@ class DeployDistributedPress < Deploy self.remote_info ||= {} self.remote_info['njalla'] = {} self.remote_info['njalla']['a'] = njalla.add_record(name: site.name, type: 'CNAME', content: "#{Site.domain}.").to_h + self.remote_info['njalla']['cname'] = njalla.add_record(name: "www.#{site.name}", type: 'CNAME', content: "#{Site.domain}.").to_h self.remote_info['njalla']['ns'] = njalla.add_record(name: "_dnslink.#{site.name}", type: 'NS', content: "#{publisher.hostname}.").to_h end rescue HTTParty::Error => e From fbb3a5166cd4f155d726c35b5faee40a21737db5 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 27 Mar 2023 14:10:35 -0300 Subject: [PATCH 3/3] fix: intentar crear siempre los registros en njalla --- app/models/deploy_distributed_press.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/models/deploy_distributed_press.rb b/app/models/deploy_distributed_press.rb index f26a72b5..a2e2e20a 100644 --- a/app/models/deploy_distributed_press.rb +++ b/app/models/deploy_distributed_press.rb @@ -30,7 +30,7 @@ class DeployDistributedPress < Deploy time_start create_remote_site! if remote_site_id.blank? - create_njalla_records! if remote_info['njalla'].blank? + create_njalla_records! save if remote_site_id.blank? || remote_info['njalla'].blank? @@ -134,10 +134,10 @@ class DeployDistributedPress < Deploy # que eliminarlo. unless site.name.end_with? '.' self.remote_info ||= {} - self.remote_info['njalla'] = {} - self.remote_info['njalla']['a'] = njalla.add_record(name: site.name, type: 'CNAME', content: "#{Site.domain}.").to_h - self.remote_info['njalla']['cname'] = njalla.add_record(name: "www.#{site.name}", type: 'CNAME', content: "#{Site.domain}.").to_h - self.remote_info['njalla']['ns'] = njalla.add_record(name: "_dnslink.#{site.name}", type: 'NS', content: "#{publisher.hostname}.").to_h + self.remote_info['njalla'] ||= {} + self.remote_info['njalla']['a'] ||= njalla.add_record(name: site.name, type: 'CNAME', content: "#{Site.domain}.").to_h + self.remote_info['njalla']['cname'] ||= njalla.add_record(name: "www.#{site.name}", type: 'CNAME', content: "#{Site.domain}.").to_h + self.remote_info['njalla']['ns'] ||= njalla.add_record(name: "_dnslink.#{site.name}", type: 'NS', content: "#{publisher.hostname}.").to_h end rescue HTTParty::Error => e ExceptionNotifier.notify_exception(e, data: { site: site.name })