From db547a38a673579f2eafc7b68e5ee412a73f4f41 Mon Sep 17 00:00:00 2001 From: Arnaud Levy <contact@arnaudlevy.com> Date: Fri, 1 Dec 2023 09:17:35 +0100 Subject: [PATCH] Not tested yet --- .../communication/website/with_deuxfleurs.rb | 16 +++++++++------- app/services/deuxfleurs.rb | 4 ---- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/app/models/communication/website/with_deuxfleurs.rb b/app/models/communication/website/with_deuxfleurs.rb index 9eba9c139..bf16cc778 100644 --- a/app/models/communication/website/with_deuxfleurs.rb +++ b/app/models/communication/website/with_deuxfleurs.rb @@ -17,11 +17,13 @@ module Communication::Website::WithDeuxfleurs return unless deuxfleurs_hosting? if repository.blank? deuxfleurs_create_github_repository + sleep 10 end if deuxfleurs_identifier.blank? deuxfleurs_create_bucket + sleep 10 deuxfleurs_generate_certificate - sleep 30 + sleep 10 save end end @@ -52,11 +54,15 @@ module Communication::Website::WithDeuxfleurs end def deuxfleurs_default_identifier - "#{university.identifier}-#{to_s.parameterize}" + "#{to_s.parameterize}.#{university.identifier}.osuny.site" + end + + def deuxfleurs_default_url + "https://#{deuxfleurs_default_identifier}" end def deuxfleurs_default_github_repository - "noesya/#{deuxfleurs_default_identifier}" + "noesya/#{university.identifier}-#{to_s.parameterize}" end def deuxfleurs_default_badge_url @@ -70,10 +76,6 @@ module Communication::Website::WithDeuxfleurs # This first call will generate it end - def deuxfleurs_default_url - deuxfleurs.default_url_for(deuxfleurs_default_identifier) - end - def deuxfleurs @deuxfleurs ||= Deuxfleurs.new end diff --git a/app/services/deuxfleurs.rb b/app/services/deuxfleurs.rb index 468bb77da..c773cd741 100644 --- a/app/services/deuxfleurs.rb +++ b/app/services/deuxfleurs.rb @@ -12,10 +12,6 @@ class Deuxfleurs response.status == 200 end - def default_url_for(host) - "https://#{host}.web.deuxfleurs.fr" - end - protected def client -- GitLab