Skip to content

Commit

Permalink
Merge pull request #1458 from noesya/new-temporary-domain
Browse files Browse the repository at this point in the history
Domaine osuny.site pour les sites pas encore en production
  • Loading branch information
arnaudlevy committed Dec 1, 2023
2 parents b64e3ea + db547a3 commit 88d666e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
16 changes: 9 additions & 7 deletions app/models/communication/website/with_deuxfleurs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ def deuxfleurs_setup
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
Expand Down Expand Up @@ -52,11 +54,15 @@ def deuxfleurs_create_github_repository
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
Expand All @@ -70,10 +76,6 @@ def deuxfleurs_generate_certificate
# 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
Expand Down
4 changes: 0 additions & 4 deletions app/services/deuxfleurs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ def rename_bucket(host, new_identifier)
response.status == 200
end

def default_url_for(host)
"https://#{host}.web.deuxfleurs.fr"
end

protected

def client
Expand Down

0 comments on commit 88d666e

Please sign in to comment.