diff --git a/Gemfile b/Gemfile index 776b27607fc9f189eae1c96ba6d14b87daa351de..adac6511dd369e7771746f8528a8a8c48c5762b2 100644 --- a/Gemfile +++ b/Gemfile @@ -56,7 +56,7 @@ gem "omniauth-saml", "~> 2.0" gem "pexels", "~> 0.5.0" gem "pg", "~> 1.1" gem "puma" -gem "rails", "~> 7.0.8" +gem "rails", "~> 7.1.0" gem "rails-autocomplete", "~> 2.0" gem "rails-i18n" gem "roo", "~> 2.9" @@ -97,4 +97,4 @@ group :test do gem "simplecov", require: false end -gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby] \ No newline at end of file +gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby] diff --git a/Gemfile.lock b/Gemfile.lock index 423f6dc99ce4336812ed2f0c59242817089ec017..8d72018f91832b1b53835189aec1e39c675bff4e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -20,78 +20,86 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (7.0.8) - actionpack (= 7.0.8) - activesupport (= 7.0.8) + actioncable (7.1.1) + actionpack (= 7.1.1) + activesupport (= 7.1.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.8) - actionpack (= 7.0.8) - activejob (= 7.0.8) - activerecord (= 7.0.8) - activestorage (= 7.0.8) - activesupport (= 7.0.8) + zeitwerk (~> 2.6) + actionmailbox (7.1.1) + actionpack (= 7.1.1) + activejob (= 7.1.1) + activerecord (= 7.1.1) + activestorage (= 7.1.1) + activesupport (= 7.1.1) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.8) - actionpack (= 7.0.8) - actionview (= 7.0.8) - activejob (= 7.0.8) - activesupport (= 7.0.8) + actionmailer (7.1.1) + actionpack (= 7.1.1) + actionview (= 7.1.1) + activejob (= 7.1.1) + activesupport (= 7.1.1) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp - rails-dom-testing (~> 2.0) - actionpack (7.0.8) - actionview (= 7.0.8) - activesupport (= 7.0.8) - rack (~> 2.0, >= 2.2.4) + rails-dom-testing (~> 2.2) + actionpack (7.1.1) + actionview (= 7.1.1) + activesupport (= 7.1.1) + nokogiri (>= 1.8.5) + rack (>= 2.2.4) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.8) - actionpack (= 7.0.8) - activerecord (= 7.0.8) - activestorage (= 7.0.8) - activesupport (= 7.0.8) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.1) + actionpack (= 7.1.1) + activerecord (= 7.1.1) + activestorage (= 7.1.1) + activesupport (= 7.1.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.8) - activesupport (= 7.0.8) + actionview (7.1.1) + activesupport (= 7.1.1) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) active_storage_validations (1.0.4) activejob (>= 5.2.0) activemodel (>= 5.2.0) activestorage (>= 5.2.0) activesupport (>= 5.2.0) - activejob (7.0.8) - activesupport (= 7.0.8) + activejob (7.1.1) + activesupport (= 7.1.1) globalid (>= 0.3.6) - activemodel (7.0.8) - activesupport (= 7.0.8) - activerecord (7.0.8) - activemodel (= 7.0.8) - activesupport (= 7.0.8) - activestorage (7.0.8) - actionpack (= 7.0.8) - activejob (= 7.0.8) - activerecord (= 7.0.8) - activesupport (= 7.0.8) + activemodel (7.1.1) + activesupport (= 7.1.1) + activerecord (7.1.1) + activemodel (= 7.1.1) + activesupport (= 7.1.1) + timeout (>= 0.4.0) + activestorage (7.1.1) + actionpack (= 7.1.1) + activejob (= 7.1.1) + activerecord (= 7.1.1) + activesupport (= 7.1.1) marcel (~> 1.0) - mini_mime (>= 1.1.0) activestorage-scaleway-service (1.0.1) activestorage aws-sdk-s3 - activesupport (7.0.8) + activesupport (7.1.1) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) addressable (2.8.5) public_suffix (>= 2.0.2, < 6.0) @@ -103,7 +111,7 @@ GEM autoprefixer-rails (10.4.15.0) execjs (~> 2) aws-eventstream (1.2.0) - aws-partitions (1.834.0) + aws-partitions (1.835.0) aws-sdk-core (3.185.1) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) @@ -120,6 +128,7 @@ GEM aws-eventstream (~> 1, >= 1.0.2) base64 (0.1.1) bcrypt (3.1.19) + bigdecimal (3.1.4) bindex (0.8.1) bootsnap (1.16.0) msgpack (~> 1.2) @@ -161,6 +170,7 @@ GEM csl (~> 2.0) cocoon (1.2.15) concurrent-ruby (1.2.2) + connection_pool (2.4.1) countries (5.7.0) unaccent (~> 0.3) country_select (8.0.3) @@ -201,6 +211,8 @@ GEM docile (1.4.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) + drb (2.1.1) + ruby2_keywords encryptor (3.0.0) enum_help (0.0.19) activesupport (>= 3.0.0) @@ -285,6 +297,10 @@ GEM image_processing (1.12.2) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) + io-console (0.6.0) + irb (1.8.2) + rdoc + reline (>= 0.3.8) jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) @@ -340,7 +356,6 @@ GEM fastimage (~> 2.2) nesty (~> 1.0) nokogiri (~> 1.13) - method_source (1.0.0) mini_magick (4.12.0) mini_mime (1.1.5) minitest (5.20.0) @@ -349,6 +364,7 @@ GEM multipart-post (2.3.0) mustermann (3.0.0) ruby2_keywords (~> 0.0.1) + mutex_m (0.1.2) namae (1.1.1) nesty (1.0.2) net-http (0.3.2) @@ -401,6 +417,8 @@ GEM requests (~> 1.0.2) pg (1.5.4) popper_js (2.11.8) + psych (5.1.0) + stringio public_suffix (5.0.3) puma (6.4.0) nio4r (~> 2.0) @@ -410,22 +428,27 @@ GEM rack (>= 1.2.0) rack-protection (3.1.0) rack (~> 2.2, >= 2.2.4) + rack-session (1.0.1) + rack (< 3) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.8) - actioncable (= 7.0.8) - actionmailbox (= 7.0.8) - actionmailer (= 7.0.8) - actionpack (= 7.0.8) - actiontext (= 7.0.8) - actionview (= 7.0.8) - activejob (= 7.0.8) - activemodel (= 7.0.8) - activerecord (= 7.0.8) - activestorage (= 7.0.8) - activesupport (= 7.0.8) + rackup (1.0.0) + rack (< 3) + webrick + rails (7.1.1) + actioncable (= 7.1.1) + actionmailbox (= 7.1.1) + actionmailer (= 7.1.1) + actionpack (= 7.1.1) + actiontext (= 7.1.1) + actionview (= 7.1.1) + activejob (= 7.1.1) + activemodel (= 7.1.1) + activerecord (= 7.1.1) + activestorage (= 7.1.1) + activesupport (= 7.1.1) bundler (>= 1.15.0) - railties (= 7.0.8) + railties (= 7.1.1) rails-autocomplete (2.0.1) rails (>= 4.0) rails-dom-testing (2.2.0) @@ -438,19 +461,24 @@ GEM rails-i18n (7.0.8) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (7.0.8) - actionpack (= 7.0.8) - activesupport (= 7.0.8) - method_source + railties (7.1.1) + actionpack (= 7.1.1) + activesupport (= 7.1.1) + irb + rackup (>= 1.0.0) rake (>= 12.2) - thor (~> 1.0) - zeitwerk (~> 2.5) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) rake (13.0.6) randexp (0.1.7) rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) + rdoc (6.5.0) + psych (>= 4.0.0) regexp_parser (2.8.2) + reline (0.3.9) + io-console (~> 0.5) requests (1.0.2) require_all (3.0.0) responders (3.1.1) @@ -569,6 +597,7 @@ GEM addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) + webrick (1.8.1) websocket (1.2.10) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) @@ -641,7 +670,7 @@ DEPENDENCIES pg (~> 1.1) puma rack-mini-profiler (~> 2.0) - rails (~> 7.0.8) + rails (~> 7.1.0) rails-autocomplete (~> 2.0) rails-i18n roo (~> 2.9) diff --git a/app/models/communication/extranet/document/category.rb b/app/models/communication/extranet/document/category.rb index 42591e0d516aee9a86c8a65ccb490074d602c616..16cdc262a308fd180eab5f7c19edcd6e30c5a081 100644 --- a/app/models/communication/extranet/document/category.rb +++ b/app/models/communication/extranet/document/category.rb @@ -28,7 +28,7 @@ class Communication::Extranet::Document::Category < ApplicationRecord belongs_to :extranet, class_name: 'Communication::Extranet' has_many :communication_extranet_documents, class_name: "Communication::Extranet::Document" - alias_attribute :documents, :communication_extranet_documents + alias_method :documents, :communication_extranet_documents validates :name, presence: true diff --git a/app/models/communication/extranet/document/kind.rb b/app/models/communication/extranet/document/kind.rb index 36a3c9f6c29558113a22c59819aab06b03be364f..6c993fc15020b7451c04b6e6788a4e080d0c9b10 100644 --- a/app/models/communication/extranet/document/kind.rb +++ b/app/models/communication/extranet/document/kind.rb @@ -28,7 +28,7 @@ class Communication::Extranet::Document::Kind < ApplicationRecord belongs_to :extranet, class_name: 'Communication::Extranet' has_many :communication_extranet_documents, class_name: "Communication::Extranet::Document" - alias_attribute :documents, :communication_extranet_documents + alias_method :documents, :communication_extranet_documents validates :name, presence: true diff --git a/app/models/education/academic_year.rb b/app/models/education/academic_year.rb index 6a4658aed7ee0844aa9bbcff5ccd378d988ccda6..6a506bff1222048dc0f968725db2b9a64e902570 100644 --- a/app/models/education/academic_year.rb +++ b/app/models/education/academic_year.rb @@ -21,7 +21,7 @@ class Education::AcademicYear < ApplicationRecord has_many :education_cohorts, class_name: 'Education::Cohort' - alias_attribute :cohorts, :education_cohorts + alias_method :cohorts, :education_cohorts # Dénormalisation des alumni pour le faceted search has_and_belongs_to_many :university_people, diff --git a/app/models/education/cohort.rb b/app/models/education/cohort.rb index 86a19c4eef9fad4726f8adfabfc9748c0dc3e6f6..d5f6b87209611ebce8f96aab93cf49c29cb59a54 100644 --- a/app/models/education/cohort.rb +++ b/app/models/education/cohort.rb @@ -31,15 +31,15 @@ class Education::Cohort < ApplicationRecord belongs_to :school, class_name: 'Education::School' - alias_attribute :education_school, :school + alias_method :education_school, :school belongs_to :program, class_name: 'Education::Program' - alias_attribute :education_program, :program + alias_method :education_program, :program belongs_to :academic_year, class_name: 'Education::AcademicYear' - alias_attribute :education_academic_year, :academic_year + alias_method :education_academic_year, :academic_year has_and_belongs_to_many :people, class_name: 'University::Person', diff --git a/app/models/education/program/with_alumni.rb b/app/models/education/program/with_alumni.rb index d5a78ca60fba9d4f8e4d951545dfd6bdf4225f02..8e8c7997c9669c765c9c47a6ec5ad4c27b2705c2 100644 --- a/app/models/education/program/with_alumni.rb +++ b/app/models/education/program/with_alumni.rb @@ -4,22 +4,22 @@ module Education::Program::WithAlumni included do has_many :education_cohorts, class_name: 'Education::Cohort' - alias_attribute :cohorts, :education_cohorts + alias_method :cohorts, :education_cohorts has_many :alumni, through: :education_cohorts, source: :people - alias_attribute :university_person_alumni, :alumni + alias_method :university_person_alumni, :alumni has_many :alumni_experiences, -> { distinct }, through: :alumni, source: :experiences - alias_attribute :university_person_experiences, :alumni_experiences + alias_method :university_person_experiences, :alumni_experiences has_many :alumni_organizations, -> { distinct }, through: :alumni_experiences, source: :organization - alias_attribute :university_person_alumni_organizations, :alumni_organizations + alias_method :university_person_alumni_organizations, :alumni_organizations # Dénormalisation des alumni pour le faceted search has_and_belongs_to_many :university_people, @@ -38,7 +38,7 @@ module Education::Program::WithAlumni # class_name: 'Education::AcademicYear', # through: :education_cohorts, # source: :education_academic_year - # alias_attribute :education_academic_years, :academic_years + # alias_method :education_academic_years, :academic_years def academic_years Education::AcademicYear.where(id: education_cohorts.pluck(:academic_year_id)) diff --git a/app/models/education/school/with_alumni.rb b/app/models/education/school/with_alumni.rb index 3a55dadd78b031beb661c98ef637866320462677..ceca3e2ffcaa52a7e9e9d713200130eb88f296a2 100644 --- a/app/models/education/school/with_alumni.rb +++ b/app/models/education/school/with_alumni.rb @@ -6,30 +6,30 @@ module Education::School::WithAlumni has_many :education_cohorts, class_name: 'Education::Cohort', dependent: :destroy - alias_attribute :cohorts, :education_cohorts + alias_method :cohorts, :education_cohorts has_many :alumni, -> { distinct }, through: :education_cohorts, source: :people - alias_attribute :university_person_alumni, :alumni + alias_method :university_person_alumni, :alumni has_many :alumni_experiences, -> { distinct }, class_name: 'University::Person::Experience', through: :alumni, source: :experiences - alias_attribute :university_person_experiences, :alumni_experiences + alias_method :university_person_experiences, :alumni_experiences has_many :alumni_organizations, -> { distinct }, class_name: 'University::Organization', through: :alumni_experiences, source: :organization - alias_attribute :university_person_alumni_organizations, :alumni_organizations + alias_method :university_person_alumni_organizations, :alumni_organizations has_many :academic_years, -> { distinct }, class_name: 'Education::AcademicYear', through: :education_cohorts, source: :academic_year - alias_attribute :education_academic_years, :academic_years + alias_method :education_academic_years, :academic_years end end diff --git a/app/models/education/school/with_programs.rb b/app/models/education/school/with_programs.rb index 8f28ac269cb3576b1e2cb31acb75652706ffad49..e90efcffcb4e1ec251a3446a6b75476cbf8dd3d0 100644 --- a/app/models/education/school/with_programs.rb +++ b/app/models/education/school/with_programs.rb @@ -19,7 +19,7 @@ module Education::School::WithPrograms has_many :diplomas, -> { distinct }, through: :programs, source: :diploma - alias_attribute :education_diplomas, :diplomas + alias_method :education_diplomas, :diplomas end diff --git a/app/models/university/with_communication.rb b/app/models/university/with_communication.rb index 201635dd0b97705d7c19de58b7e670ba5b9161d6..88ae9478b3073b209d473baf3253d581cf519efc 100644 --- a/app/models/university/with_communication.rb +++ b/app/models/university/with_communication.rb @@ -5,12 +5,12 @@ module University::WithCommunication has_many :communication_extranets, class_name: 'Communication::Extranet', dependent: :destroy - alias_attribute :extranets, :communication_extranets + alias_method :extranets, :communication_extranets has_many :communication_websites, class_name: 'Communication::Website', dependent: :destroy - alias_attribute :websites, :communication_websites + alias_method :websites, :communication_websites has_many :communication_website_posts, class_name: 'Communication::Website::Post', @@ -19,11 +19,11 @@ module University::WithCommunication has_many :communication_blocks, class_name: 'Communication::Block', dependent: :destroy - alias_attribute :blocks, :communication_blocks + alias_method :blocks, :communication_blocks has_many :communication_block_headings, class_name: 'Communication::Block::Heading', dependent: :destroy - alias_attribute :headings, :communication_block_headings + alias_method :headings, :communication_block_headings end end diff --git a/app/models/university/with_education.rb b/app/models/university/with_education.rb index d6852f6242e9c4d40009c81113a307f35e389352..50e22d98986ff2cefb0726398aa2f12a71b1043d 100644 --- a/app/models/university/with_education.rb +++ b/app/models/university/with_education.rb @@ -5,26 +5,26 @@ module University::WithEducation has_many :education_cohorts, class_name: 'Education::Cohort', dependent: :destroy - alias_attribute :cohorts, :education_cohorts + alias_method :cohorts, :education_cohorts has_many :education_diplomas, class_name: 'Education::Diploma', dependent: :destroy - alias_attribute :diplomas, :education_diplomas + alias_method :diplomas, :education_diplomas has_many :education_programs, class_name: 'Education::Program', dependent: :destroy - alias_attribute :programs, :education_programs + alias_method :programs, :education_programs has_many :education_schools, class_name: 'Education::School', dependent: :destroy - alias_attribute :schools, :education_schools + alias_method :schools, :education_schools has_many :education_academic_years, class_name: 'Education::AcademicYear', dependent: :destroy - alias_attribute :academic_years, :education_academic_years + alias_method :academic_years, :education_academic_years end end diff --git a/app/models/university/with_people_and_organizations.rb b/app/models/university/with_people_and_organizations.rb index 512ff294b5b49569cee3a5505071deb92230f418..adf6627968d8cbcdaf879135cd1798dd7bca955e 100644 --- a/app/models/university/with_people_and_organizations.rb +++ b/app/models/university/with_people_and_organizations.rb @@ -5,27 +5,27 @@ module University::WithPeopleAndOrganizations has_many :university_people, class_name: 'University::Person', dependent: :destroy - alias_attribute :people, :university_people + alias_method :people, :university_people has_many :university_person_categories, class_name: 'University::Person::Category', dependent: :destroy - alias_attribute :person_categories, :university_person_categories + alias_method :person_categories, :university_person_categories has_many :university_organizations, class_name: 'University::Organization', dependent: :destroy - alias_attribute :organizations, :university_organizations + alias_method :organizations, :university_organizations has_many :university_organization_categories, class_name: 'University::Organization::Category', dependent: :destroy - alias_attribute :organization_categories, :university_organization_categories + alias_method :organization_categories, :university_organization_categories has_many :person_experiences, class_name: 'University::Person::Experience', dependent: :destroy - alias_attribute :university_person_experiences, :person_experiences + alias_method :university_person_experiences, :person_experiences end end diff --git a/bin/setup b/bin/setup index e7218aa34668deea4ee0e265f610e7bc553e88e0..fb96d74416dcea099e90b950eec2c571293f8ea0 100755 --- a/bin/setup +++ b/bin/setup @@ -5,7 +5,7 @@ require "fileutils" APP_ROOT = File.expand_path("..", __dir__) def system!(*args) - system(*args) || abort("\n== Command #{args} failed ==") + system(*args, exception: true) end FileUtils.chdir APP_ROOT do diff --git a/config/application.rb b/config/application.rb index 56211b00f7252de3bac6846edc79f6c25d99de1e..976a5578724769899c1df132e7a6324762dfde31 100644 --- a/config/application.rb +++ b/config/application.rb @@ -8,7 +8,7 @@ require "active_record/railtie" require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" -require "action_mailbox/engine" +# require "action_mailbox/engine" # require "action_text/engine" require "action_view/railtie" # require "action_cable/engine" @@ -22,7 +22,14 @@ Bundler.require(*Rails.groups) module Osuny class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 7.0 + config.load_defaults 7.1 + + # Please, add to the `ignore` list any other `lib` subdirectories that do + # not contain `.rb` files, or that should not be reloaded or eager loaded. + # Common ones are `templates`, `generators`, or `middleware`, for example. + config.autoload_lib(ignore: %w(assets tasks templates)) + + config.active_support.cache_format_version = 7.1 config.time_zone = 'Europe/Paris' diff --git a/config/environments/development.rb b/config/environments/development.rb index cb234a73290382d1c0fb0bce85b046e532d426f9..9b5995c674870ad7d15b4a8e2260d7a7a18e8b16 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -6,7 +6,7 @@ Rails.application.configure do # In the development environment your application's code is reloaded any time # it changes. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. - config.cache_classes = false + config.enable_reloading = true # Do not eager load code on boot. config.eager_load = false @@ -37,10 +37,10 @@ Rails.application.configure do # Store uploaded files on the local file system (see config/storage.yml for options). config.active_storage.service = :scaleway - # config.active_storage.service = :local # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false + config.action_mailer.perform_caching = false config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } @@ -64,6 +64,9 @@ Rails.application.configure do # number of complex assets. config.assets.debug = true + # Highlight code that enqueued background job in logs. + config.active_job.verbose_enqueue_logs = true + # Suppress logger output for asset requests. config.assets.quiet = true @@ -79,4 +82,7 @@ Rails.application.configure do # Uncomment if you wish to allow Action Cable access from any origin. # config.action_cable.disable_request_forgery_protection = true + + # Raise error when a before_action's only/except options reference missing actions + config.action_controller.raise_on_missing_callback_actions = false end diff --git a/config/environments/production.rb b/config/environments/production.rb index 1b0e68fabee608fdff9dcd54193e74b97474ec7a..ec867fd5c480372a9687ff98796c7b904a259a89 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -4,7 +4,7 @@ Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. - config.cache_classes = true + config.enable_reloading = false # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web servers @@ -16,13 +16,12 @@ Rails.application.configure do config.consider_all_requests_local = false config.action_controller.perform_caching = true - # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] - # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). + # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment + # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). # config.require_master_key = true - # Disable serving static files from the `/public` folder by default since - # Apache or NGINX already handles this. - config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? + # Enable static file serving from the `/public` folder (turn off if using NGINX/Apache for it). + config.public_file_server.enabled = true # Compress CSS using a preprocessor. # config.assets.css_compressor = :sass @@ -40,16 +39,26 @@ Rails.application.configure do # Store uploaded files on the local file system (see config/storage.yml for options). config.active_storage.service = :scaleway + # Assume all access to the app is happening through a SSL-terminating reverse proxy. + # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies. + # config.assume_ssl = true + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. config.force_ssl = true - # Include generic and useful information about system operation, but avoid logging too much - # information to avoid inadvertent exposure of personally identifiable information (PII). - config.log_level = :info + # Log to STDOUT by default + config.logger = ActiveSupport::Logger.new(STDOUT) + .tap { |logger| logger.formatter = ::Logger::Formatter.new } + .then { |logger| ActiveSupport::TaggedLogging.new(logger) } # Prepend all log lines with the following tags. config.log_tags = [ :request_id ] + # Info include generic and useful information about system operation, but avoids logging too much + # information to avoid inadvertent exposure of personally identifiable information (PII). If you + # want to log everything, set the level to "debug". + config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") + # Use a different cache store in production. # config.cache_store = :mem_cache_store @@ -67,28 +76,17 @@ Rails.application.configure do # the I18n.default_locale when a translation cannot be found). config.i18n.fallbacks = true - # Send deprecation notices to registered listeners. - config.active_support.deprecation = :notify - - # Log disallowed deprecations. - config.active_support.disallowed_deprecation = :log - - # Tell Active Support which deprecation messages to disallow. - config.active_support.disallowed_deprecation_warnings = [] - - # Use default logging formatter so that PID and timestamp are not suppressed. - config.log_formatter = ::Logger::Formatter.new - - # Use a different logger for distributed setups. - # require "syslog/logger" - # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") - - if ENV["RAILS_LOG_TO_STDOUT"].present? - logger = ActiveSupport::Logger.new(STDOUT) - logger.formatter = config.log_formatter - config.logger = ActiveSupport::TaggedLogging.new(logger) - end + # Don't log any deprecations. + config.active_support.report_deprecations = false # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false + + # Enable DNS rebinding protection and other `Host` header attacks. + # config.hosts = [ + # "example.com", # Allow requests from example.com + # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` + # ] + # Skip DNS rebinding protection for the default health check endpoint. + # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } end diff --git a/config/environments/test.rb b/config/environments/test.rb index 131f38a3aec4f4b92a7e7bdae165b951fc962a3f..769bc9d07b2670015d6905b0998a636c364d8130 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -8,12 +8,13 @@ require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. - # Turn false under Spring and add config.action_view.cache_template_loading = true. - config.cache_classes = true + # While tests run files are not watched, reloading is not necessary. + config.enable_reloading = false - # Eager loading loads your whole application. When running a single test locally, - # this probably isn't necessary. It's a good idea to do in a continuous integration - # system, or in some way before deploying your code. + # Eager loading loads your entire application. When running a single test locally, + # this is usually not necessary, and can slow down your test suite. However, it's + # recommended that you enable it in continuous integration systems to ensure eager + # loading is working properly before deploying your code. config.eager_load = ENV["CI"].present? # Configure public file server for tests with Cache-Control for performance. @@ -28,13 +29,11 @@ Rails.application.configure do config.cache_store = :null_store # Raise exceptions instead of rendering exception templates. - config.action_dispatch.show_exceptions = false + config.action_dispatch.show_exceptions = :rescuable # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false - config.active_record.verify_foreign_keys_for_fixtures = false - # Store uploaded files on the local file system in a temporary directory. config.active_storage.service = :test @@ -59,4 +58,7 @@ Rails.application.configure do # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true + + # Raise error when a before_action's only/except options reference missing actions + config.action_controller.raise_on_missing_callback_actions = false end diff --git a/config/initializers/active_storage.rb b/config/initializers/active_storage.rb index 7ecab59ed1031b3ed39753af3663515fdac24247..9d150045ab9405160c8bccb5f79d614fa4b1ace8 100644 --- a/config/initializers/active_storage.rb +++ b/config/initializers/active_storage.rb @@ -1,41 +1,37 @@ -require 'active_storage/record' -require 'active_storage/attachment' -require 'active_storage/filename' - -ActiveStorage::Engine.config.active_storage.content_types_to_serve_as_binary.delete('image/svg+xml') - -# Hook ActiveStorage::Attachment to add brand_id to attachments records -ActiveStorage::Attachment.class_eval do - after_save :denormalize_university_id_for_blob - - def denormalize_university_id_for_blob - university_id = case self.record.class.name - when 'University' - self.record.id - when 'ActiveStorage::VariantRecord' - self.record.blob.university_id - else - self.record.university_id +# https://stackoverflow.com/questions/8895103/how-can-i-keep-my-initializer-configuration-from-being-lost-in-development-mode +Rails.application.config.to_prepare do + ActiveStorage::Engine.config.active_storage.content_types_to_serve_as_binary.delete('image/svg+xml') + + # Hook ActiveStorage::Attachment to add brand_id to attachments records + ActiveStorage::Attachment.class_eval do + after_save :denormalize_university_id_for_blob, unless: :university_id + + def denormalize_university_id_for_blob + university_id = case self.record.class.name + when 'University' + self.record.id + when 'ActiveStorage::VariantRecord' + self.record.blob.university_id + else + self.record.university_id + end + + self.blob.update_column(:university_id, university_id) end - - self.blob.update_column(:university_id, university_id) end -end -# Override ActiveStorage::Filename#sanitized to remove accents and all special chars -# Base method: https://github.com/rails/rails/blob/v6.1.3/activestorage/app/models/active_storage/filename.rb#L57 -ActiveStorage::Filename.class_eval do - def sanitized - base_filename = base.encode(Encoding::UTF_8, invalid: :replace, undef: :replace, replace: "�") - .strip - .tr("\u{202E}%$|:;/\t\r\n\\", "-") - .parameterize(preserve_case: true) - [base_filename, extension_with_delimiter].join('') + # Override ActiveStorage::Filename#sanitized to remove accents and all special chars + # Base method: https://github.com/rails/rails/blob/v6.1.3/activestorage/app/models/active_storage/filename.rb#L57 + ActiveStorage::Filename.class_eval do + def sanitized + base_filename = base.encode(Encoding::UTF_8, invalid: :replace, undef: :replace, replace: "�") + .strip + .tr("\u{202E}%$|:;/\t\r\n\\", "-") + .parameterize(preserve_case: true) + [base_filename, extension_with_delimiter].join('') + end end -end -# https://stackoverflow.com/questions/8895103/how-can-i-keep-my-initializer-configuration-from-being-lost-in-development-mode -Rails.application.config.to_prepare do module ActiveStorageGitPathStatic extend ActiveSupport::Concern diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index 54f47cf15fe5026bede1bd6a9acb4ef815bf22ab..b3076b38fe14399a56099ba187b1cb21cac15f09 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -16,9 +16,9 @@ # # policy.report_uri "/csp-violation-report-endpoint" # end # -# # Generate session nonces for permitted importmap and inline scripts +# # Generate session nonces for permitted importmap, inline scripts, and inline styles. # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } -# config.content_security_policy_nonce_directives = %w(script-src) +# config.content_security_policy_nonce_directives = %w(script-src style-src) # # # Report violations without enforcing the policy. # # config.content_security_policy_report_only = true diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index a2a48ac35a91b989b22b63eb1e240d6b9e688070..86455790607b383a8ef5013f641a2900b9841a40 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -1,8 +1,8 @@ # Be sure to restart your server when you modify this file. -# Configure parameters to be filtered from the log file. Use this to limit dissemination of -# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported -# notations and behaviors. +# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. +# Use this to limit dissemination of sensitive information. +# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. Rails.application.config.filter_parameters += [ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :access_token ] diff --git a/config/initializers/permissions_policy.rb b/config/initializers/permissions_policy.rb index 00f64d71b03e029116af7b1713f450e9635fb10f..7db3b9577e6e56da5f1bf3681c0b458af7de6ed2 100644 --- a/config/initializers/permissions_policy.rb +++ b/config/initializers/permissions_policy.rb @@ -1,11 +1,13 @@ +# Be sure to restart your server when you modify this file. + # Define an application-wide HTTP permissions policy. For further -# information see https://developers.google.com/web/updates/2018/06/feature-policy -# -# Rails.application.config.permissions_policy do |f| -# f.camera :none -# f.gyroscope :none -# f.microphone :none -# f.usb :none -# f.fullscreen :self -# f.payment :self, "https://secure.example.com" +# information see: https://developers.google.com/web/updates/2018/06/feature-policy + +# Rails.application.config.permissions_policy do |policy| +# policy.camera :none +# policy.gyroscope :none +# policy.microphone :none +# policy.usb :none +# policy.fullscreen :self +# policy.payment :self, "https://secure.example.com" # end diff --git a/db/schema.rb b/db/schema.rb index 58b3335aac4511ecb9544f6e3bd7a91f054448f9..46cc6a150e72e54a6a7bcf632e4e8b9f011f889a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do +ActiveRecord::Schema[7.1].define(version: 2023_10_13_090313) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" @@ -78,7 +78,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.index ["criterion_id"], name: "index_administration_qualiopi_indicators_on_criterion_id" end - create_table "communication_block_headings", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_block_headings", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "about_type", null: false t.uuid "about_id", null: false @@ -106,8 +106,8 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.datetime "updated_at", null: false t.string "title" t.boolean "published", default: true - t.uuid "communication_website_id" t.uuid "heading_id" + t.uuid "communication_website_id" t.string "migration_identifier" t.index ["about_type", "about_id"], name: "index_communication_website_blocks_on_about" t.index ["communication_website_id"], name: "index_communication_blocks_on_communication_website_id" @@ -115,7 +115,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.index ["university_id"], name: "index_communication_blocks_on_university_id" end - create_table "communication_extranet_connections", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_extranet_connections", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "extranet_id", null: false t.string "object_type" @@ -127,7 +127,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.index ["university_id"], name: "index_communication_extranet_connections_on_university_id" end - create_table "communication_extranet_document_categories", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_extranet_document_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "extranet_id", null: false t.uuid "university_id", null: false t.string "name" @@ -139,7 +139,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.index ["university_id"], name: "extranet_document_categories_universities" end - create_table "communication_extranet_document_kinds", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_extranet_document_kinds", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "extranet_id", null: false t.uuid "university_id", null: false t.string "name" @@ -151,7 +151,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.index ["university_id"], name: "extranet_document_kinds_universities" end - create_table "communication_extranet_documents", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_extranet_documents", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.uuid "university_id", null: false t.uuid "extranet_id", null: false @@ -167,7 +167,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.index ["university_id"], name: "index_communication_extranet_documents_on_university_id" end - create_table "communication_extranet_post_categories", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_extranet_post_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.string "slug" t.uuid "extranet_id", null: false @@ -179,7 +179,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.index ["university_id"], name: "index_communication_extranet_post_categories_on_university_id" end - create_table "communication_extranet_posts", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_extranet_posts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "title" t.boolean "published", default: false t.datetime "published_at" @@ -229,12 +229,11 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.text "home_sentence" t.text "sass" t.text "css" - t.boolean "allow_experiences_modification", default: true t.index ["about_type", "about_id"], name: "index_communication_extranets_on_about" t.index ["university_id"], name: "index_communication_extranets_on_university_id" end - create_table "communication_website_agenda_events", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_agenda_events", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "title" t.text "summary" t.uuid "university_id", null: false @@ -295,7 +294,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.index ["communication_website_post_id", "communication_website_category_id"], name: "post_category" end - create_table "communication_website_connections", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_connections", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.string "indirect_object_type", null: false @@ -390,7 +389,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) 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 @@ -630,7 +629,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.index ["university_id"], name: "index_education_schools_on_university_id" end - create_table "emergency_messages", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "emergency_messages", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id" t.string "name" t.string "role" @@ -666,7 +665,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.string "summernote_locale" end - create_table "research_hal_authors", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "research_hal_authors", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "docid" t.string "form_identifier" t.string "person_identifier" @@ -692,7 +691,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.index ["university_person_id", "research_hal_author_id"], name: "hal_person_author" end - create_table "research_hal_publications", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "research_hal_publications", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "docid" t.jsonb "data" t.string "title" @@ -722,7 +721,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.index ["university_person_id", "research_hal_publication_id"], name: "index_person_publication" end - create_table "research_journal_paper_kinds", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "research_journal_paper_kinds", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "journal_id", null: false t.string "title" @@ -883,7 +882,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.index ["default_language_id"], name: "index_universities_on_default_language_id" end - create_table "university_apps", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "university_apps", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.uuid "university_id", null: false t.string "token" @@ -894,7 +893,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.index ["university_id"], name: "index_university_apps_on_university_id" end - create_table "university_organization_categories", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "university_organization_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.uuid "university_id", null: false t.datetime "created_at", null: false @@ -938,7 +937,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.index ["university_id"], name: "index_university_organizations_on_university_id" end - create_table "university_organizations_categories", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "university_organizations_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "organization_id", null: false t.uuid "category_id", null: false t.index ["category_id"], name: "index_university_organizations_categories_on_category_id" @@ -987,14 +986,14 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.index ["user_id"], name: "index_university_people_on_user_id" end - create_table "university_people_categories", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "university_people_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "person_id", null: false t.uuid "category_id", null: false t.index ["category_id"], name: "index_university_people_categories_on_category_id" t.index ["person_id"], name: "index_university_people_categories_on_person_id" end - create_table "university_person_categories", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "university_person_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.uuid "university_id", null: false t.datetime "created_at", null: false @@ -1043,7 +1042,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_13_090313) do t.index ["university_id"], name: "index_university_roles_on_university_id" end - create_table "user_favorites", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "user_favorites", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "user_id", null: false t.string "about_type", null: false t.uuid "about_id", null: false diff --git a/test/fixtures/communication/extranet/document/categories.yml b/test/fixtures/communication/extranet/document/categories.yml index 408048f8654703ae92ba6e88cb32ba40b40d39da..9e84af3636ef600fd7d2664f0000a62ed7e2f7ac 100644 --- a/test/fixtures/communication/extranet/document/categories.yml +++ b/test/fixtures/communication/extranet/document/categories.yml @@ -23,11 +23,11 @@ # one: - extranet: one - university: one - name: MyString + extranet: default_extranet + university: default_university + name: First category two: - extranet: two - university: two - name: MyString + extranet: default_extranet + university: default_university + name: Second category diff --git a/test/fixtures/communication/extranet/document/kinds.yml b/test/fixtures/communication/extranet/document/kinds.yml index 8e70f233729b7d4852995ad79296c8e27e6b18cf..d264807c657e0d79a0ea1959b8fa9e98d35e527d 100644 --- a/test/fixtures/communication/extranet/document/kinds.yml +++ b/test/fixtures/communication/extranet/document/kinds.yml @@ -23,11 +23,11 @@ # one: - extranet: one - university: one - name: MyString + extranet: default_extranet + university: default_university + name: First kind two: - extranet: two - university: two - name: MyString + extranet: default_extranet + university: default_university + name: Second kind diff --git a/test/fixtures/communication/extranet/documents.yml b/test/fixtures/communication/extranet/documents.yml index fb4fa23733ee89bef580ed42a2418d63d9d1b4cd..8bf4c25c860629b59f73752c2daa726caefd9e60 100644 --- a/test/fixtures/communication/extranet/documents.yml +++ b/test/fixtures/communication/extranet/documents.yml @@ -30,14 +30,14 @@ one: name: MyString - university: one - extranet: one + university: default_university + extranet: default_extranet published: false published_at: 2023-03-08 16:55:05 two: name: MyString - university: two - extranet: two + university: default_university + extranet: default_extranet published: false published_at: 2023-03-08 16:55:05 diff --git a/test/fixtures/communication/extranet/post/categories.yml b/test/fixtures/communication/extranet/post/categories.yml index 3fef9b12885806f6c433f538f5f7a06a97bb4ac4..398f696b47f02f7dcc50830b5519b1d246b0af8a 100644 --- a/test/fixtures/communication/extranet/post/categories.yml +++ b/test/fixtures/communication/extranet/post/categories.yml @@ -25,11 +25,11 @@ one: name: MyString slug: MyString - extranet: one - university: one + extranet: default_extranet + university: default_university two: name: MyString slug: MyString - extranet: two - university: two + extranet: default_extranet + university: default_university diff --git a/test/fixtures/communication/extranet/posts.yml b/test/fixtures/communication/extranet/posts.yml index 8a32ef0aa33745f14d129926818dadbf5ebbc646..49cb7c1a3281ea4e5f8030af764f7ef3a79a98c6 100644 --- a/test/fixtures/communication/extranet/posts.yml +++ b/test/fixtures/communication/extranet/posts.yml @@ -38,9 +38,9 @@ one: title: MyString published: false published_at: 2023-03-07 15:57:51 - author: one - extranet: one - university: one + author: pa + extranet: default_extranet + university: default_university featured_image_alt: MyString featured_image_credit: MyText slug: MyString @@ -50,9 +50,9 @@ two: title: MyString published: false published_at: 2023-03-07 15:57:51 - author: two - extranet: two - university: two + author: pa + extranet: default_extranet + university: default_university featured_image_alt: MyString featured_image_credit: MyText slug: MyString diff --git a/test/fixtures/university/apps.yml b/test/fixtures/university/apps.yml index 09f154e0b504b29af65474e4102fff684c7e4b81..de96963d78356c0f355281081e8432b49f959054 100644 --- a/test/fixtures/university/apps.yml +++ b/test/fixtures/university/apps.yml @@ -22,10 +22,10 @@ one: name: MyString - university: one + university: default_university token: MyString two: name: MyString - university: two + university: default_university token: MyOtherString diff --git a/test/fixtures/user/favorites.yml b/test/fixtures/user/favorites.yml index 8e2a7153d68f6ddd25efbaaf00bdce5e51cb0aa2..0ba389615c7bdad2881ad4a0a82d7f550f70c3a8 100644 --- a/test/fixtures/user/favorites.yml +++ b/test/fixtures/user/favorites.yml @@ -20,11 +20,9 @@ # one: - user: one - about: one - about_type: About + user: admin + about: website_with_github (Communication::Website) two: - user: two - about: two - about_type: About + user: admin + about: website_with_gitlab (Communication::Website)