Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Domaine osuny.site pour les sites pas encore en production #1458

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading