diff --git a/Gemfile.lock b/Gemfile.lock index ff0e6e62953afed7180b45c6d2139b51f3b465b6..ec027c15b0cd75e4471a32408df703c6440ba8ad 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -20,47 +20,47 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (7.0.6) - actionpack (= 7.0.6) - activesupport (= 7.0.6) + actioncable (7.0.7.2) + actionpack (= 7.0.7.2) + activesupport (= 7.0.7.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.6) - actionpack (= 7.0.6) - activejob (= 7.0.6) - activerecord (= 7.0.6) - activestorage (= 7.0.6) - activesupport (= 7.0.6) + actionmailbox (7.0.7.2) + actionpack (= 7.0.7.2) + activejob (= 7.0.7.2) + activerecord (= 7.0.7.2) + activestorage (= 7.0.7.2) + activesupport (= 7.0.7.2) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.6) - actionpack (= 7.0.6) - actionview (= 7.0.6) - activejob (= 7.0.6) - activesupport (= 7.0.6) + actionmailer (7.0.7.2) + actionpack (= 7.0.7.2) + actionview (= 7.0.7.2) + activejob (= 7.0.7.2) + activesupport (= 7.0.7.2) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.6) - actionview (= 7.0.6) - activesupport (= 7.0.6) + actionpack (7.0.7.2) + actionview (= 7.0.7.2) + activesupport (= 7.0.7.2) rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.6) - actionpack (= 7.0.6) - activerecord (= 7.0.6) - activestorage (= 7.0.6) - activesupport (= 7.0.6) + actiontext (7.0.7.2) + actionpack (= 7.0.7.2) + activerecord (= 7.0.7.2) + activestorage (= 7.0.7.2) + activesupport (= 7.0.7.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.6) - activesupport (= 7.0.6) + actionview (7.0.7.2) + activesupport (= 7.0.7.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -70,30 +70,30 @@ GEM activemodel (>= 5.2.0) activestorage (>= 5.2.0) activesupport (>= 5.2.0) - activejob (7.0.6) - activesupport (= 7.0.6) + activejob (7.0.7.2) + activesupport (= 7.0.7.2) globalid (>= 0.3.6) - activemodel (7.0.6) - activesupport (= 7.0.6) - activerecord (7.0.6) - activemodel (= 7.0.6) - activesupport (= 7.0.6) - activestorage (7.0.6) - actionpack (= 7.0.6) - activejob (= 7.0.6) - activerecord (= 7.0.6) - activesupport (= 7.0.6) + activemodel (7.0.7.2) + activesupport (= 7.0.7.2) + activerecord (7.0.7.2) + activemodel (= 7.0.7.2) + activesupport (= 7.0.7.2) + activestorage (7.0.7.2) + actionpack (= 7.0.7.2) + activejob (= 7.0.7.2) + activerecord (= 7.0.7.2) + activesupport (= 7.0.7.2) marcel (~> 1.0) mini_mime (>= 1.1.0) activestorage-scaleway-service (1.0.1) activestorage aws-sdk-s3 - activesupport (7.0.6) + activesupport (7.0.7.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.4) + addressable (2.8.5) public_suffix (>= 2.0.2, < 6.0) angularjs-rails (1.8.0) annotate (3.2.0) @@ -103,8 +103,8 @@ GEM autoprefixer-rails (10.4.13.0) execjs (~> 2) aws-eventstream (1.2.0) - aws-partitions (1.790.0) - aws-sdk-core (3.178.0) + aws-partitions (1.809.0) + aws-sdk-core (3.181.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.5) @@ -112,8 +112,8 @@ GEM aws-sdk-kms (1.71.0) aws-sdk-core (~> 3, >= 3.177.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.131.0) - aws-sdk-core (~> 3, >= 3.177.0) + aws-sdk-s3 (1.133.0) + aws-sdk-core (~> 3, >= 3.181.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.6) aws-sigv4 (1.6.0) @@ -122,9 +122,9 @@ GEM bindex (0.8.1) bootsnap (1.16.0) msgpack (~> 1.2) - bootstrap (5.2.3) + bootstrap (5.3.1) autoprefixer-rails (>= 9.1.0) - popper_js (>= 2.11.6, < 3) + popper_js (>= 2.11.8, < 3) sassc-rails (>= 2.0.0) bootstrap5-kaminari-views (0.0.1) kaminari (>= 0.13) @@ -160,9 +160,9 @@ GEM csl (~> 2.0) cocoon (1.2.15) concurrent-ruby (1.2.2) - countries (5.5.0) + countries (5.6.0) unaccent (~> 0.3) - country_select (8.0.1) + country_select (8.0.2) countries (~> 5.0) crack (0.4.5) rexml @@ -232,7 +232,7 @@ GEM ffi (1.15.5) figaro (1.2.0) thor (>= 0.14.0, < 2) - font-awesome-sass (6.4.0) + font-awesome-sass (6.4.2) sassc (~> 2.0) front_matter_parser (1.0.1) geo_calc (0.7.8) @@ -334,8 +334,8 @@ GEM nokogiri (~> 1.13) method_source (1.0.0) mini_magick (4.12.0) - mini_mime (1.1.2) - minitest (5.18.1) + mini_mime (1.1.5) + minitest (5.19.0) msgpack (1.7.2) multi_xml (0.6.0) multipart-post (2.3.0) @@ -345,7 +345,7 @@ GEM nesty (1.0.2) net-http (0.3.2) uri - net-imap (0.3.6) + net-imap (0.3.7) date net-protocol net-pop (0.1.2) @@ -355,11 +355,11 @@ GEM net-smtp (0.3.3) net-protocol nio4r (2.5.9) - nokogiri (1.15.3-arm64-darwin) + nokogiri (1.15.4-arm64-darwin) racc (~> 1.4) - nokogiri (1.15.3-x86_64-darwin) + nokogiri (1.15.4-x86_64-darwin) racc (~> 1.4) - nokogiri (1.15.3-x86_64-linux) + nokogiri (1.15.4-x86_64-linux) racc (~> 1.4) oauth2 (2.0.9) faraday (>= 0.17.3, < 3.0) @@ -368,7 +368,7 @@ GEM rack (>= 1.2, < 4) snaky_hash (~> 2.0) version_gem (~> 1.1) - octokit (6.1.1) + octokit (7.0.0) faraday (>= 1, < 3) sawyer (~> 0.9) omniauth (2.1.1) @@ -392,47 +392,47 @@ GEM pexels (0.5.0) requests (~> 1.0.2) pg (1.5.3) - popper_js (2.11.7) + popper_js (2.11.8) public_suffix (5.0.3) - puma (6.3.0) + puma (6.3.1) nio4r (~> 2.0) racc (1.7.1) - rack (2.2.7) + rack (2.2.8) rack-mini-profiler (2.3.4) rack (>= 1.2.0) - rack-protection (3.0.6) - rack + rack-protection (3.1.0) + rack (~> 2.2, >= 2.2.4) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.6) - actioncable (= 7.0.6) - actionmailbox (= 7.0.6) - actionmailer (= 7.0.6) - actionpack (= 7.0.6) - actiontext (= 7.0.6) - actionview (= 7.0.6) - activejob (= 7.0.6) - activemodel (= 7.0.6) - activerecord (= 7.0.6) - activestorage (= 7.0.6) - activesupport (= 7.0.6) + rails (7.0.7.2) + actioncable (= 7.0.7.2) + actionmailbox (= 7.0.7.2) + actionmailer (= 7.0.7.2) + actionpack (= 7.0.7.2) + actiontext (= 7.0.7.2) + actionview (= 7.0.7.2) + activejob (= 7.0.7.2) + activemodel (= 7.0.7.2) + activerecord (= 7.0.7.2) + activestorage (= 7.0.7.2) + activesupport (= 7.0.7.2) bundler (>= 1.15.0) - railties (= 7.0.6) + railties (= 7.0.7.2) rails-autocomplete (2.0.1) rails (>= 4.0) - rails-dom-testing (2.1.1) + rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - rails-i18n (7.0.7) + rails-i18n (7.0.8) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (7.0.6) - actionpack (= 7.0.6) - activesupport (= 7.0.6) + railties (7.0.7.2) + actionpack (= 7.0.7.2) + activesupport (= 7.0.7.2) method_source rake (>= 12.2) thor (~> 1.0) @@ -448,7 +448,7 @@ GEM responders (3.1.0) actionpack (>= 5.2) railties (>= 5.2) - rexml (3.2.5) + rexml (3.2.6) roo (2.10.0) nokogiri (~> 1) rubyzip (>= 1.3.0, < 3.0.0) @@ -502,10 +502,10 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sinatra (3.0.6) + sinatra (3.1.0) mustermann (~> 3.0) rack (~> 2.2, >= 2.2.4) - rack-protection (= 3.0.6) + rack-protection (= 3.1.0) tilt (~> 2.0) snaky_hash (2.0.1) hashie @@ -518,7 +518,7 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - stringio (3.0.7) + stringio (3.0.8) sugar-high (0.7.3) sweetloader (0.1.6) activesupport (>= 3.0.1) @@ -553,21 +553,21 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webdrivers (5.2.0) + webdrivers (5.3.1) nokogiri (~> 1.6) rubyzip (>= 1.3.0) - selenium-webdriver (~> 4.0) + selenium-webdriver (~> 4.0, < 4.11) webmock (3.18.1) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) websocket (1.2.9) - websocket-driver (0.7.5) + websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.8) + zeitwerk (2.6.11) zlib (2.1.1) PLATFORMS diff --git a/app/controllers/admin/communication/websites_controller.rb b/app/controllers/admin/communication/websites_controller.rb index 647071049e6f1974eb2b60f7bc98b9f9f3f423c8..fa3362e8f5b0e5aa775ce04fe5c1d52b776be0a5 100644 --- a/app/controllers/admin/communication/websites_controller.rb +++ b/app/controllers/admin/communication/websites_controller.rb @@ -85,7 +85,8 @@ class Admin::Communication::WebsitesController < Admin::Communication::Websites: def website_params attribute_names = [ :name, :url, :repository, :about_type, :about_id, :in_production, - :git_provider, :git_endpoint, :git_branch, :plausible_url, :deployment_status_badge, language_ids: [] + :git_provider, :git_endpoint, :git_branch, :plausible_url, + :deployment_status_badge, :autoupdate_theme, language_ids: [] ] attribute_names << :access_token unless params[:communication_website][:access_token].blank? # For now, default language can't be changed, too many implications, especially around special pages. diff --git a/app/controllers/api/osuny/communication/websites_controller.rb b/app/controllers/api/osuny/communication/websites_controller.rb new file mode 100644 index 0000000000000000000000000000000000000000..a6d4a480946862ded51a537e7d21147f1056a1ad --- /dev/null +++ b/app/controllers/api/osuny/communication/websites_controller.rb @@ -0,0 +1,7 @@ +class Api::Osuny::Communication::WebsitesController < Api::ApplicationController + + def index + @websites = current_university.communication_websites.in_production + end + +end diff --git a/app/controllers/api/osuny/communication_controller.rb b/app/controllers/api/osuny/communication_controller.rb new file mode 100644 index 0000000000000000000000000000000000000000..597ec060fd44c983375bd75e6d909159830f2557 --- /dev/null +++ b/app/controllers/api/osuny/communication_controller.rb @@ -0,0 +1,4 @@ +class Api::Osuny::CommunicationController < Api::ApplicationController + def index + end +end diff --git a/app/controllers/api/osuny/server/websites_controller.rb b/app/controllers/api/osuny/server/websites_controller.rb new file mode 100644 index 0000000000000000000000000000000000000000..bc5c1f1f8e6c7ee6aa3d406ad84a674e95bd8ffd --- /dev/null +++ b/app/controllers/api/osuny/server/websites_controller.rb @@ -0,0 +1,13 @@ +class Api::Osuny::Server::WebsitesController < Api::ApplicationController + + def index + @websites = Communication::Website.in_production + end + + def theme_released + render_forbidden unless params[:secret_key].present? && params[:secret_key] == ENV['OSUNY_API_AUTOUPDATE_THEME_KEY'] + Communication::Website.with_automatic_update.find_each do |website| + website.update_theme_version + end + end +end diff --git a/app/controllers/api/osuny/server_controller.rb b/app/controllers/api/osuny/server_controller.rb new file mode 100644 index 0000000000000000000000000000000000000000..3b59a6e157a1e90880c63543d7d01ad1c2dcae21 --- /dev/null +++ b/app/controllers/api/osuny/server_controller.rb @@ -0,0 +1,4 @@ +class Api::Osuny::ServerController < Api::ApplicationController + def index + end +end diff --git a/app/controllers/api/osuny_controller.rb b/app/controllers/api/osuny_controller.rb new file mode 100644 index 0000000000000000000000000000000000000000..242733459c5d02383c94f113479bf85b55f0d1b8 --- /dev/null +++ b/app/controllers/api/osuny_controller.rb @@ -0,0 +1,4 @@ +class Api::OsunyController < Api::ApplicationController + def index + end +end diff --git a/app/controllers/server/websites_controller.rb b/app/controllers/server/websites_controller.rb index 2c73354976e21218825ee704f50d4c2333904ec4..b066c006ef10bc3ebd5c3980a872f0f20ff0f7a6 100644 --- a/app/controllers/server/websites_controller.rb +++ b/app/controllers/server/websites_controller.rb @@ -3,6 +3,7 @@ class Server::WebsitesController < Server::ApplicationController has_scope :for_theme_version has_scope :for_production + has_scope :for_update has_scope :for_search_term def index diff --git a/app/models/communication/website.rb b/app/models/communication/website.rb index 34ca7bdccb365a2c034a66e6baa09ec11e018ab0..c35d720f68f9efe0df5435776528de4f9f203a13 100644 --- a/app/models/communication/website.rb +++ b/app/models/communication/website.rb @@ -5,6 +5,7 @@ # id :uuid not null, primary key # about_type :string indexed => [about_id] # access_token :string +# autoupdate_theme :boolean default(TRUE) # deployment_status_badge :text # git_branch :string # git_endpoint :string @@ -72,6 +73,7 @@ class Communication::Website < ApplicationRecord unaccent(communication_websites.url) ILIKE unaccent(:term) ", term: "%#{sanitize_sql_like(term)}%") } + scope :for_update, -> (autoupdate) { where(autoupdate_theme: autoupdate) } def to_s "#{name}" diff --git a/app/models/communication/website/configs/base.rb b/app/models/communication/website/configs/base.rb index b14fd096b81c949010d47183ce85d759c7d77704..e653b3ff703f5029f06fa06632ef8db842f5797e 100644 --- a/app/models/communication/website/configs/base.rb +++ b/app/models/communication/website/configs/base.rb @@ -5,6 +5,7 @@ # id :uuid not null, primary key # about_type :string indexed => [about_id] # access_token :string +# autoupdate_theme :boolean default(TRUE) # deployment_status_badge :text # git_branch :string # git_endpoint :string diff --git a/app/models/communication/website/configs/default_languages.rb b/app/models/communication/website/configs/default_languages.rb index 14a78fdd45b56d6b550a0f92d44e07ba14d9e8fb..ee08fe55fb5c1a4dc86a03f33a00e2f4685926d1 100644 --- a/app/models/communication/website/configs/default_languages.rb +++ b/app/models/communication/website/configs/default_languages.rb @@ -5,6 +5,7 @@ # id :uuid not null, primary key # about_type :string indexed => [about_id] # access_token :string +# autoupdate_theme :boolean default(TRUE) # deployment_status_badge :text # git_branch :string # git_endpoint :string diff --git a/app/models/communication/website/configs/default_permalinks.rb b/app/models/communication/website/configs/default_permalinks.rb index 9251792cd61b14941324c492b084fa49375a5ae0..eaaaafc83e24d692acebbd79ccf2a32de22e6d13 100644 --- a/app/models/communication/website/configs/default_permalinks.rb +++ b/app/models/communication/website/configs/default_permalinks.rb @@ -5,6 +5,7 @@ # id :uuid not null, primary key # about_type :string indexed => [about_id] # access_token :string +# autoupdate_theme :boolean default(TRUE) # deployment_status_badge :text # git_branch :string # git_endpoint :string diff --git a/app/models/communication/website/configs/development_config.rb b/app/models/communication/website/configs/development_config.rb index b6f29a2359c48289a1d05ee59e224840199e9e87..0bfeb9540e76bb5e5eca67bf0dea65881d701e1c 100644 --- a/app/models/communication/website/configs/development_config.rb +++ b/app/models/communication/website/configs/development_config.rb @@ -5,6 +5,7 @@ # id :uuid not null, primary key # about_type :string indexed => [about_id] # access_token :string +# autoupdate_theme :boolean default(TRUE) # deployment_status_badge :text # git_branch :string # git_endpoint :string diff --git a/app/models/communication/website/configs/production_config.rb b/app/models/communication/website/configs/production_config.rb index 0761e697239a98038c5d61ce351f47e37fc5dab5..4e69ac120788f5a1b64428fe89cb76354401b878 100644 --- a/app/models/communication/website/configs/production_config.rb +++ b/app/models/communication/website/configs/production_config.rb @@ -5,6 +5,7 @@ # id :uuid not null, primary key # about_type :string indexed => [about_id] # access_token :string +# autoupdate_theme :boolean default(TRUE) # deployment_status_badge :text # git_branch :string # git_endpoint :string diff --git a/app/models/communication/website/with_theme.rb b/app/models/communication/website/with_theme.rb index ab6b6e332e5f85c4b80b9f9476ac7850718b0f33..022d669bf0ca380047fb78560b8d67ce5fdd6e09 100644 --- a/app/models/communication/website/with_theme.rb +++ b/app/models/communication/website/with_theme.rb @@ -1,5 +1,10 @@ module Communication::Website::WithTheme extend ActiveSupport::Concern + + included do + scope :with_automatic_update, -> { where(autoupdate_theme: true) } + scope :with_manual_update, -> { where(autoupdate_theme: false) } + end def get_current_theme_version! self.update_column :theme_version, current_theme_version diff --git a/app/services/filters/server/websites.rb b/app/services/filters/server/websites.rb index 67e33bff2a4bea872c73e451bc413bbce050eea4..6d8ad83d5db1a8aa0f56e80171bdd4145c075c92 100644 --- a/app/services/filters/server/websites.rb +++ b/app/services/filters/server/websites.rb @@ -9,6 +9,9 @@ module Filters add :for_production, [{ to_s: I18n.t('true'), id: 'true' }, { to_s: I18n.t('false'), id: 'false' }], 'Filtrer par état de production' + add :for_update, + [{ to_s: 'Automatique', id: 'true' }, { to_s: 'Manuelle', id: 'false' }], + 'Filtrer par mode de mise à jour' end end end diff --git a/app/views/admin/communication/websites/_form.html.erb b/app/views/admin/communication/websites/_form.html.erb index f04769bcfb45a43894693d042af8a8b80c3a62f3..b7f8864b504e8cc91faecbcbed87060e4ca2a2b2 100644 --- a/app/views/admin/communication/websites/_form.html.erb +++ b/app/views/admin/communication/websites/_form.html.erb @@ -17,6 +17,7 @@ <%= osuny_panel t('communication.website.git') do %> <div class="row"> <div class="col-xl-6"> + <%= f.input :autoupdate_theme %> <%= f.input :git_provider, include_blank: false %> <%= f.input :git_endpoint %> <%= f.input :deployment_status_badge, diff --git a/app/views/api/dashboard/index.html.erb b/app/views/api/dashboard/index.html.erb index b7731499703bb51b791f2f76644488d760a55707..52a32b899107be824825a08914bd9b3d2a29e0f0 100644 --- a/app/views/api/dashboard/index.html.erb +++ b/app/views/api/dashboard/index.html.erb @@ -1,17 +1,21 @@ <% content_for :title, 'API' %> -<h2>Lhéo</h2> - <div class="row"> - <div class="col-lg-6"> + <div class="col-lg-6 mb-5"> + <h2>Osuny</h2> <p> - Lhéo est un <a href="http://lheo.gouv.fr/" target="_blank" rel=" - "> - Langage Harmonisé d'Échange d'informations sur l'Offre de formation. - </a>. L'API Osuny Lhéo met à disposition toute l'offre de formation à ce format. + L'API Osuny permet d'interagir avec une instance. + L'implémentation est très rudimentaire, n'hésitez pas à ouvrir <a href="https://github.com/noesya/osuny/issues" target="_blank" rel="noreferrer">une issue sur Github</a> pour signaler un manque. </p> + <%= link_to 'API', api_osuny_path, class: 'btn btn-primary' %> </div> - <div class="col-lg-6"> - <%= link_to 'Accéder à l\'API Lhéo', api_lheo_path, class: 'btn btn-primary' %> + <div class="col-lg-6 mb-5"> + <h2>LHÉO</h2> + <p> + LHÉO est le <a href="http://lheo.gouv.fr/" target="_blank" rel="noreferrer">Langage Harmonisé d'Échange d'informations sur l'Offre de formation.</a>. + L'API Osuny LHÉO met à disposition toute l'offre de formation à ce format. + L'implémentation est incomplète, n'hésitez pas à ouvrir <a href="https://github.com/noesya/osuny/issues" target="_blank" rel="noreferrer">une issue sur Github</a> pour signaler un manque. + </p> + <%= link_to 'API', api_lheo_path, class: 'btn btn-primary' %> </div> </div> diff --git a/app/views/api/osuny/communication/index.json.jbuilder b/app/views/api/osuny/communication/index.json.jbuilder new file mode 100644 index 0000000000000000000000000000000000000000..6e43450bc45a4f9a93cf2f740f8ef984d84f5ae2 --- /dev/null +++ b/app/views/api/osuny/communication/index.json.jbuilder @@ -0,0 +1,3 @@ +json.websites do + json.url api_osuny_communication_websites_path +end diff --git a/app/views/api/osuny/communication/websites/index.json.jbuilder b/app/views/api/osuny/communication/websites/index.json.jbuilder new file mode 100644 index 0000000000000000000000000000000000000000..1cec4fd718c3698393101e64daa51321f0c82bb8 --- /dev/null +++ b/app/views/api/osuny/communication/websites/index.json.jbuilder @@ -0,0 +1,4 @@ +json.array! @websites.each do |website| + json.name website.name + json.url website.url +end diff --git a/app/views/api/osuny/index.json.jbuilder b/app/views/api/osuny/index.json.jbuilder new file mode 100644 index 0000000000000000000000000000000000000000..933e295d1805cbefe9142a91c303154494459d9d --- /dev/null +++ b/app/views/api/osuny/index.json.jbuilder @@ -0,0 +1,6 @@ +json.communication do + json.url api_osuny_communication_path +end +json.server do + json.url api_osuny_server_path +end diff --git a/app/views/api/osuny/server/index.json.jbuilder b/app/views/api/osuny/server/index.json.jbuilder new file mode 100644 index 0000000000000000000000000000000000000000..e14674d74d3eb6caa9b7e5916dc7736b8437f779 --- /dev/null +++ b/app/views/api/osuny/server/index.json.jbuilder @@ -0,0 +1,3 @@ +json.websites do + json.url api_osuny_server_websites_path +end diff --git a/app/views/api/osuny/server/websites/index.json.jbuilder b/app/views/api/osuny/server/websites/index.json.jbuilder new file mode 100644 index 0000000000000000000000000000000000000000..1cec4fd718c3698393101e64daa51321f0c82bb8 --- /dev/null +++ b/app/views/api/osuny/server/websites/index.json.jbuilder @@ -0,0 +1,4 @@ +json.array! @websites.each do |website| + json.name website.name + json.url website.url +end diff --git a/app/views/api/osuny/server/websites/theme_released.json.jbuilder b/app/views/api/osuny/server/websites/theme_released.json.jbuilder new file mode 100644 index 0000000000000000000000000000000000000000..9860c147a54cf386a98102c5fc54bfff6ce07801 --- /dev/null +++ b/app/views/api/osuny/server/websites/theme_released.json.jbuilder @@ -0,0 +1 @@ +json.status 'ok' \ No newline at end of file diff --git a/app/views/server/websites/_list.html.erb b/app/views/server/websites/_list.html.erb index f28b91765cde003c6e6517db9879b921b5ba7664..3e9ec4a2ed1126e0806d24f460b941031996b76c 100644 --- a/app/views/server/websites/_list.html.erb +++ b/app/views/server/websites/_list.html.erb @@ -3,7 +3,6 @@ <thead> <tr> <th><%= Communication::Website.human_attribute_name('name') %></th> - <th><%= Communication::Website.human_attribute_name('admin') %></th> <th><%= Communication::Website.human_attribute_name('url') %></th> <th><%= Communication::Website.human_attribute_name('status') %></th> <th><%= University.model_name.human %></th> @@ -14,14 +13,19 @@ <tbody> <% websites.ordered.each do |website| %> <tr id="website-<%= website.id %>"> - <td><%= website.name %></td> - <td><%= link_to 'Admin', admin_communication_website_url(website, host: website.university.url), target: :_blank %></td> <td> - <%= link_to website.url, website.url, target: :_blank if website.url.present? %> + <%= website.name %> <% if website.in_production %> <span class="badge bg-success">Prod</span> <% end %> </td> + <td> + <%= link_to website.url, website.url, target: :_blank if website.url.present? %> + <%= link_to 'Admin', + admin_communication_website_url(website, host: website.university.url), + target: :_blank, + class: 'btn btn-xs btn-light' %> + </td> <td><%= image_tag website.deployment_status_badge, alt: '' if website.deployment_status_badge.present? %></td> <td><%= link_to website.university, [:server, website.university] %></td> <td> diff --git a/config/application.sample.yml b/config/application.sample.yml index 5e3269d246b7d2fdc8139cd4d3f24f1bced034be..2cd58ec221e6b9b33726f8293592326b466df439 100644 --- a/config/application.sample.yml +++ b/config/application.sample.yml @@ -15,6 +15,7 @@ OSUNY_DEVELOPMENT_DBNAME: OSUNY_STAGING_APP_NAME: OSUNY_STAGING_PG_ADDON_ID: +OSUNY_API_AUTOUPDATE_THEME_KEY: OTP_SECRET_ENCRYPTION_KEY: diff --git a/config/locales/communication/en.yml b/config/locales/communication/en.yml index f240022a67847e4b6a7fad3a4c1d0b0fc38c3ff2..7695c76d012982b79ba1aeb485f4a8f9f0261f60 100644 --- a/config/locales/communication/en.yml +++ b/config/locales/communication/en.yml @@ -130,6 +130,7 @@ en: about_Research::Journal: Journal website about_Research::Laboratory: Laboratory website about_type: About + autoupdate_theme: Automatically update Osuny theme access_token: Access token created_at: Creation default_language: Default language diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml index 6058f74fe659bbe6de61b19f59a113e8bf49fdc1..aa22bd93608d2eda2009034bcb58de65aec084cc 100644 --- a/config/locales/communication/fr.yml +++ b/config/locales/communication/fr.yml @@ -130,6 +130,7 @@ fr: about_Research::Journal: Site de revue scientifique about_Research::Laboratory: Site de laboratoire about_type: Type de site + autoupdate_theme: Mise à jour automatique du thème Osuny access_token: Jeton d'accès created_at: Création default_language: Langue par défaut diff --git a/config/routes/api.rb b/config/routes/api.rb index d711265d1559894b2bd9cff91f21fd78ab154abe..45b8a12697656e0efcd632765092a1b46ebc8b97 100644 --- a/config/routes/api.rb +++ b/config/routes/api.rb @@ -1,4 +1,16 @@ namespace :api do get 'lheo' => 'lheo#index', defaults: { format: :xml } + get 'osuny' => 'osuny#index', defaults: { format: :json } + namespace :osuny, defaults: { format: :json } do + get 'communication' => 'communication#index' + namespace :communication do + get 'websites' => 'websites#index' + end + get 'server' => 'server#index' + namespace :server do + get 'websites' => 'websites#index' + post 'websites/theme-released' => 'websites#theme_released' + end + end root to: 'dashboard#index' end diff --git a/db/migrate/20230822071011_add_autoupdate_theme_to_communication_websites.rb b/db/migrate/20230822071011_add_autoupdate_theme_to_communication_websites.rb new file mode 100644 index 0000000000000000000000000000000000000000..c4dfffbb86b7984bf3c5c1a00131d869049de7e1 --- /dev/null +++ b/db/migrate/20230822071011_add_autoupdate_theme_to_communication_websites.rb @@ -0,0 +1,5 @@ +class AddAutoupdateThemeToCommunicationWebsites < ActiveRecord::Migration[7.0] + def change + add_column :communication_websites, :autoupdate_theme, :boolean, default: true + end +end diff --git a/db/schema.rb b/db/schema.rb index 54fb009141a2ffcc6a34bb525b484eae31686532..5d7e86936780de8441e17e8762824569f73ce5cd 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,13 +10,13 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do +ActiveRecord::Schema[7.0].define(version: 2023_08_22_071011) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" enable_extension "unaccent" - create_table "action_text_rich_texts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "action_text_rich_texts", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "name", null: false t.text "body" t.string "record_type", null: false @@ -26,7 +26,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["record_type", "record_id", "name"], name: "index_action_text_rich_texts_uniqueness", unique: true end - create_table "active_storage_attachments", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "active_storage_attachments", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "name", null: false t.string "record_type", null: false t.uuid "record_id", null: false @@ -36,7 +36,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true end - create_table "active_storage_blobs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "active_storage_blobs", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "key", null: false t.string "filename", null: false t.string "content_type" @@ -50,13 +50,13 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_active_storage_blobs_on_university_id" end - create_table "active_storage_variant_records", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "active_storage_variant_records", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "blob_id", null: false t.string "variation_digest", null: false t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true end - create_table "administration_qualiopi_criterions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "administration_qualiopi_criterions", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.integer "number" t.text "name" t.text "description" @@ -64,7 +64,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.datetime "updated_at", null: false end - create_table "administration_qualiopi_indicators", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "administration_qualiopi_indicators", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "criterion_id", null: false t.integer "number" t.text "name" @@ -94,7 +94,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_communication_block_headings_on_university_id" end - create_table "communication_blocks", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_blocks", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "about_type" t.uuid "about_id" @@ -195,7 +195,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_communication_extranet_posts_on_university_id" end - create_table "communication_extranets", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_extranets", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.uuid "university_id", null: false t.string "host" @@ -227,7 +227,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_communication_extranets_on_university_id" end - create_table "communication_website_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_categories", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "name" @@ -275,7 +275,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["website_id"], name: "index_communication_website_connections_on_website_id" end - create_table "communication_website_git_files", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_git_files", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "previous_path" t.string "about_type", null: false t.uuid "about_id", null: false @@ -287,7 +287,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["website_id"], name: "index_communication_website_git_files_on_website_id" end - create_table "communication_website_imported_authors", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_authors", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "author_id" @@ -303,7 +303,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["website_id"], name: "idx_communication_website_imported_auth_on_website" end - create_table "communication_website_imported_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_categories", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "category_id" @@ -321,7 +321,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["website_id"], name: "idx_communication_website_imported_cat_on_website" end - create_table "communication_website_imported_media", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_media", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "identifier" t.jsonb "data" t.text "file_url" @@ -336,7 +336,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["website_id"], name: "index_communication_website_imported_media_on_website_id" end - create_table "communication_website_imported_pages", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_pages", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "page_id" @@ -360,7 +360,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["website_id"], name: "index_communication_website_imported_pages_on_website_id" end - create_table "communication_website_imported_posts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_posts", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "post_id" @@ -385,7 +385,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["website_id"], name: "index_communication_website_imported_posts_on_website_id" end - create_table "communication_website_imported_websites", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_websites", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.integer "status", default: 0 @@ -395,7 +395,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["website_id"], name: "index_communication_website_imported_websites_on_website_id" end - create_table "communication_website_menu_items", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_menu_items", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "menu_id", null: false @@ -415,7 +415,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["website_id"], name: "index_communication_website_menu_items_on_website_id" end - create_table "communication_website_menus", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_menus", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "title" @@ -431,7 +431,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_communication_website_menus_on_university_id" end - create_table "communication_website_pages", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_pages", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "title" @@ -445,10 +445,10 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.boolean "published", default: false t.string "featured_image_alt" t.text "text" + t.text "summary" t.string "breadcrumb_title" t.text "header_text" t.integer "kind" - t.text "summary" t.string "bodyclass" t.uuid "language_id", null: false t.text "featured_image_credit" @@ -462,7 +462,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_communication_website_pages_on_university_id" end - create_table "communication_website_permalinks", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_permalinks", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.string "about_type", null: false @@ -476,7 +476,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["website_id"], name: "index_communication_website_permalinks_on_website_id" end - create_table "communication_website_posts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_posts", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "title" @@ -501,7 +501,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_communication_website_posts_on_university_id" end - create_table "communication_websites", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_websites", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.string "url" @@ -521,6 +521,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.uuid "default_language_id", null: false t.string "theme_version", default: "NA" t.text "deployment_status_badge" + t.boolean "autoupdate_theme", default: true t.index ["about_type", "about_id"], name: "index_communication_websites_on_about" t.index ["default_language_id"], name: "index_communication_websites_on_default_language_id" t.index ["university_id"], name: "index_communication_websites_on_university_id" @@ -554,7 +555,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["priority", "run_at"], name: "delayed_jobs_priority" end - create_table "education_academic_years", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "education_academic_years", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.integer "year" t.datetime "created_at", null: false @@ -569,7 +570,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_person_id", "education_academic_year_id"], name: "index_person_academic_year" end - create_table "education_cohorts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "education_cohorts", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "program_id", null: false t.uuid "academic_year_id", null: false @@ -590,7 +591,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_person_id", "education_cohort_id"], name: "index_person_cohort" end - create_table "education_diplomas", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "education_diplomas", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.string "short_name" t.integer "level", default: 0 @@ -604,7 +605,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_education_diplomas_on_university_id" end - create_table "education_programs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "education_programs", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.integer "capacity" @@ -664,7 +665,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["education_program_id", "user_id"], name: "index_education_programs_users_on_program_id_and_user_id" end - create_table "education_schools", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "education_schools", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.string "address" @@ -695,7 +696,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_emergency_messages_on_university_id", where: "(university_id IS NOT NULL)" end - create_table "imports", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "imports", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.integer "number_of_lines" t.jsonb "processing_errors" t.integer "kind" @@ -708,7 +709,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["user_id"], name: "index_imports_on_user_id" end - create_table "languages", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "languages", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.string "iso_code" t.datetime "created_at", null: false @@ -782,7 +783,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_research_journal_paper_kinds_on_university_id" end - create_table "research_journal_papers", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "research_journal_papers", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "title" t.datetime "published_at", precision: nil t.uuid "university_id", null: false @@ -819,7 +820,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["researcher_id"], name: "index_research_journal_papers_researchers_on_researcher_id" end - create_table "research_journal_volumes", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "research_journal_volumes", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "research_journal_id", null: false t.string "title" @@ -839,7 +840,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_research_journal_volumes_on_university_id" end - create_table "research_journals", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "research_journals", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "title" t.text "meta_description" @@ -850,7 +851,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_research_journals_on_university_id" end - create_table "research_laboratories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "research_laboratories", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.string "address" @@ -862,7 +863,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_research_laboratories_on_university_id" end - create_table "research_laboratory_axes", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "research_laboratory_axes", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "research_laboratory_id", null: false t.string "name" @@ -876,7 +877,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_research_laboratory_axes_on_university_id" end - create_table "research_theses", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "research_theses", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "research_laboratory_id", null: false t.uuid "author_id", null: false @@ -894,7 +895,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_research_theses_on_university_id" end - create_table "universities", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "universities", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.string "identifier" t.string "address" @@ -930,7 +931,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_university_organization_categories_on_university_id" end - create_table "university_organizations", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "university_organizations", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.string "long_name" @@ -972,7 +973,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["organization_id"], name: "index_university_organizations_categories_on_organization_id" end - create_table "university_people", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "university_people", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "user_id" t.string "last_name" @@ -1028,7 +1029,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_university_person_categories_on_university_id" end - create_table "university_person_experiences", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "university_person_experiences", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "person_id", null: false t.uuid "organization_id", null: false @@ -1042,7 +1043,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_university_person_experiences_on_university_id" end - create_table "university_person_involvements", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "university_person_involvements", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "person_id", null: false t.integer "kind" @@ -1057,7 +1058,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["university_id"], name: "index_university_person_involvements_on_university_id" end - create_table "university_roles", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "university_roles", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "target_type" t.uuid "target_id" @@ -1079,7 +1080,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_22_054450) do t.index ["user_id"], name: "index_user_favorites_on_user_id" end - create_table "users", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "users", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "first_name" t.string "last_name" diff --git a/test/fixtures/communication/websites.yml b/test/fixtures/communication/websites.yml index 1a331e18999b2829449964614d8d0c01ffb3b5fb..190b521781ce653383118e3a3afd01a499f8576b 100644 --- a/test/fixtures/communication/websites.yml +++ b/test/fixtures/communication/websites.yml @@ -5,6 +5,7 @@ # id :uuid not null, primary key # about_type :string indexed => [about_id] # access_token :string +# autoupdate_theme :boolean default(TRUE) # deployment_status_badge :text # git_branch :string # git_endpoint :string