diff --git a/README.md b/README.md index 64ee442a3..c10a5e4b1 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,6 @@ Le projet utilise plusieurs linters pour vérifier la lisibilité et la qualité ## Régénérer les binstubs bundle binstub railties --force - bundle binstub unicorn --force bin/rake rails:update:bin ## Tâches Super Admin diff --git a/app/controllers/accessibilite_controller.rb b/app/controllers/accessibilite_controller.rb deleted file mode 100644 index 1d2c7c4c3..000000000 --- a/app/controllers/accessibilite_controller.rb +++ /dev/null @@ -1,6 +0,0 @@ -class AccessibiliteController < ApplicationController - layout "new_application" - - def index - end -end diff --git a/app/controllers/demandes_controller.rb b/app/controllers/demandes_controller.rb index ead68d3fc..571233896 100644 --- a/app/controllers/demandes_controller.rb +++ b/app/controllers/demandes_controller.rb @@ -18,7 +18,7 @@ class DemandesController < ApplicationController demande_params[:deadline] ) flash.notice = 'Votre demande a bien été enregistrée, nous vous contacterons rapidement.' - redirect_to administration_path + redirect_to administration_path(formulaire_demande_compte_admin_submitted: true) end private diff --git a/app/controllers/root_controller.rb b/app/controllers/root_controller.rb index d285f2104..fee41a2fb 100644 --- a/app/controllers/root_controller.rb +++ b/app/controllers/root_controller.rb @@ -56,6 +56,12 @@ class RootController < ApplicationController @dossier = Dossier.new(champs: all_champs) end + def accessibilite + end + def suivi end + + def tour_de_france + end end diff --git a/app/controllers/support_controller.rb b/app/controllers/support_controller.rb index 0b073a96f..310a62c2e 100644 --- a/app/controllers/support_controller.rb +++ b/app/controllers/support_controller.rb @@ -13,7 +13,7 @@ class SupportController < ApplicationController elsif create_conversation flash.notice = "Votre message a été envoyé." - redirect_to root_path + redirect_to root_path(formulaire_contact_general_submitted: true) else setup_context flash.now.alert = "Une erreur est survenue. Vous pouvez nous contactez à #{helpers.mail_to(CONTACT_EMAIL)}." diff --git a/app/controllers/tour_de_france_controller.rb b/app/controllers/tour_de_france_controller.rb deleted file mode 100644 index 872db9ada..000000000 --- a/app/controllers/tour_de_france_controller.rb +++ /dev/null @@ -1,6 +0,0 @@ -class TourDeFranceController < ApplicationController - layout 'new_application' - - def index - end -end diff --git a/app/services/clamav_service.rb b/app/services/clamav_service.rb index 3ebf065af..02c559601 100644 --- a/app/services/clamav_service.rb +++ b/app/services/clamav_service.rb @@ -1,9 +1,7 @@ class ClamavService def self.safe_file?(file_path) if Rails.env == 'development' - if CLAMAV[:mock?] - return CLAMAV[:response] - end + return true end FileUtils.chmod 0666, file_path diff --git a/app/views/gestionnaire_mailer/user_to_gestionnaire.html.haml b/app/views/gestionnaire_mailer/user_to_gestionnaire.html.haml new file mode 100644 index 000000000..fdc0a3925 --- /dev/null +++ b/app/views/gestionnaire_mailer/user_to_gestionnaire.html.haml @@ -0,0 +1,12 @@ +%p + Bonjour, + +%p + Vous venez d'être nommé instructeur sur demarches-simplifiees.fr. + = "Votre compte (#{@email}) vous donnera désormais aussi accès à l’espace instructeur." + +%p + Bonne journée, + +%p + L'équipe demarches-simplifiees.fr diff --git a/app/views/gestionnaire_mailer/user_to_gestionnaire.text.haml b/app/views/gestionnaire_mailer/user_to_gestionnaire.text.haml deleted file mode 100644 index 6fc539af7..000000000 --- a/app/views/gestionnaire_mailer/user_to_gestionnaire.text.haml +++ /dev/null @@ -1,8 +0,0 @@ -Bienvenue sur demarches-simplifiees.fr, -\ -Vous venez d'être nommé instructeur sur demarches-simplifiees.fr. -Votre compte (#{@email}) vous donnera désormais aussi accès à l’espace instructeur. -\ -Bonne journée, -\ -L'équipe demarches-simplifiees.fr diff --git a/app/views/new_gestionnaire/avis/instruction.html.haml b/app/views/new_gestionnaire/avis/instruction.html.haml index 35e545155..1cdeba6d6 100644 --- a/app/views/new_gestionnaire/avis/instruction.html.haml +++ b/app/views/new_gestionnaire/avis/instruction.html.haml @@ -8,7 +8,7 @@ %h2.claimant Demandeur : %span.email= @avis.claimant.email - %span.date Demande d'avis envoyée le #{I18n.l(@avis.created_at, format: '%d/%m/%y')} + %span.date Demande d'avis envoyée le #{l(@avis.created_at, format: '%d/%m/%y')} %p.introduction= @avis.introduction = form_for @avis, url: gestionnaire_avis_path(@avis), html: { class: 'form' } do |f| diff --git a/app/views/new_gestionnaire/shared/avis/_list.html.haml b/app/views/new_gestionnaire/shared/avis/_list.html.haml index 8bbc4654d..3de3b5040 100644 --- a/app/views/new_gestionnaire/shared/avis/_list.html.haml +++ b/app/views/new_gestionnaire/shared/avis/_list.html.haml @@ -15,7 +15,7 @@ confidentiel %span.icon.lock{ title: "Cet avis n'est pas affiché avec les autres experts consultés" } %span.date{ class: highlight_if_unseen_class(avis_seen_at, avis.created_at) } - Demande d'avis envoyée le #{I18n.l(avis.created_at, format: '%d/%m/%y à %H:%M')} + Demande d'avis envoyée le #{l(avis.created_at, format: '%d/%m/%y à %H:%M')} %p= avis.introduction .answer.flex.align-start @@ -25,7 +25,7 @@ = (avis.email_to_display == current_gestionnaire.email) ? 'Vous' : avis.email_to_display - if avis.answer.present? %span.date{ class: highlight_if_unseen_class(avis_seen_at, avis.updated_at) } - Réponse donnée le #{I18n.l(avis.updated_at, format: '%d/%m/%y à %H:%M')} + Réponse donnée le #{l(avis.updated_at, format: '%d/%m/%y à %H:%M')} - else %span.waiting En attente de réponse %p= avis.answer diff --git a/app/views/new_user/dossiers/_general_footer_row.html.haml b/app/views/new_user/dossiers/_general_footer_row.html.haml index de46e2cc4..f0cf078d3 100644 --- a/app/views/new_user/dossiers/_general_footer_row.html.haml +++ b/app/views/new_user/dossiers/_general_footer_row.html.haml @@ -1,4 +1,4 @@ -= link_to "Accessibilité", accessibilite_index_path, :class => "footer-link" += link_to "Accessibilité", accessibilite_path, :class => "footer-link" – = link_to "CGU", CGU_URL, :class => "footer-link", :target => "_blank", rel: "noopener noreferrer" – diff --git a/app/views/root/_footer.html.haml b/app/views/root/_footer.html.haml index aa831d74c..6f763833f 100644 --- a/app/views/root/_footer.html.haml +++ b/app/views/root/_footer.html.haml @@ -40,4 +40,4 @@ %li.footer-link = link_to "FAQ", FAQ_URL, :class => "footer-link", :target => "_blank", rel: "noopener noreferrer" %li.footer-link - = link_to "Accessibilité", accessibilite_index_path, :class => "footer-link" + = link_to "Accessibilité", accessibilite_path, :class => "footer-link" diff --git a/app/views/accessibilite/index.html.haml b/app/views/root/accessibilite.html.haml similarity index 100% rename from app/views/accessibilite/index.html.haml rename to app/views/root/accessibilite.html.haml diff --git a/app/views/tour_de_france/index.html.haml b/app/views/root/tour_de_france.html.haml similarity index 100% rename from app/views/tour_de_france/index.html.haml rename to app/views/root/tour_de_france.html.haml diff --git a/bin/unicorn b/bin/unicorn deleted file mode 100755 index d3f6570b5..000000000 --- a/bin/unicorn +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -# -# This file was generated by Bundler. -# -# The application 'unicorn' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require "pathname" -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -bundle_binstub = File.expand_path("../bundle", __FILE__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require "rubygems" -require "bundler/setup" - -load Gem.bin_path("unicorn", "unicorn") diff --git a/bin/unicorn_rails b/bin/unicorn_rails deleted file mode 100755 index 2a7368546..000000000 --- a/bin/unicorn_rails +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -# -# This file was generated by Bundler. -# -# The application 'unicorn_rails' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require "pathname" -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -bundle_binstub = File.expand_path("../bundle", __FILE__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require "rubygems" -require "bundler/setup" - -load Gem.bin_path("unicorn", "unicorn_rails") diff --git a/config/initializers/clamav.rb b/config/initializers/clamav.rb deleted file mode 100644 index 758359382..000000000 --- a/config/initializers/clamav.rb +++ /dev/null @@ -1,4 +0,0 @@ -CLAMAV = Hashie::Mash.new ({ - mock?: true, - response: true -}) diff --git a/config/routes.rb b/config/routes.rb index cf427f12d..244e6cd8f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -109,7 +109,6 @@ Rails.application.routes.draw do # root 'root#index' - get '/tour-de-france' => 'tour_de_france#index' get '/administration' => 'root#administration' get 'users' => 'users#index' @@ -117,7 +116,6 @@ Rails.application.routes.draw do get '/stats' => 'stats#index' get '/stats/download' => 'stats#download' - resources :accessibilite, only: [:index] resources :demandes, only: [:new, :create] namespace :france_connect do @@ -131,7 +129,9 @@ Rails.application.routes.draw do post ':position/carte', to: 'carte#show', as: :carte end + get 'tour-de-france' => 'root#tour_de_france' get "patron" => "root#patron" + get "accessibilite" => "root#accessibilite" get "suivi" => "root#suivi" get "contact", to: "support#index" @@ -149,8 +149,6 @@ Rails.application.routes.draw do post '/carte/zones' => 'carte#zones' get '/carte' => 'carte#show' post '/carte' => 'carte#save' - - put '/archive' => 'dossiers#archive' end # Redirection of legacy "/users/dossiers" route to "/dossiers" diff --git a/public/500.html b/public/500.html index 94a21f21b..43761a561 100644 --- a/public/500.html +++ b/public/500.html @@ -29,7 +29,7 @@ } .new-h1{color:#333333;text-align:center;font-weight:bold;margin-bottom:60px;font-size:41px;margin-top:60px;} /*! CSS Used fontfaces */ - @font-face{font-family:"Muli";src:url(/fonts/muli-bold/Muli-Regular.woff) format("woff");font-weight:normal;font-style:normal;} + @font-face{font-family:"Muli";src:url(/fonts/muli/Muli-Regular.woff) format("woff");font-weight:normal;font-style:normal;} diff --git a/public/data/TPS_Trois_volets.pdf b/public/data/TPS_Trois_volets.pdf deleted file mode 100644 index bbe0059b8..000000000 Binary files a/public/data/TPS_Trois_volets.pdf and /dev/null differ diff --git a/public/data/TPS_documentations_v1_1.pdf b/public/data/TPS_documentations_v1_1.pdf deleted file mode 100644 index aca8271b1..000000000 Binary files a/public/data/TPS_documentations_v1_1.pdf and /dev/null differ diff --git a/public/fonts/muli-bold/Muli-Regular.woff b/public/fonts/muli/Muli-Regular.woff similarity index 100% rename from public/fonts/muli-bold/Muli-Regular.woff rename to public/fonts/muli/Muli-Regular.woff diff --git a/spec/controllers/support_controller_spec.rb b/spec/controllers/support_controller_spec.rb index 438abdb9d..abf9a8187 100644 --- a/spec/controllers/support_controller_spec.rb +++ b/spec/controllers/support_controller_spec.rb @@ -61,7 +61,7 @@ describe SupportController, type: :controller do } expect(flash[:notice]).to match('Votre message a été envoyé.') - expect(response).to redirect_to root_path + expect(response).to redirect_to root_path(formulaire_contact_general_submitted: true) end context "with dossier" do @@ -80,7 +80,7 @@ describe SupportController, type: :controller do } expect(flash[:notice]).to match('Votre message a été envoyé.') - expect(response).to redirect_to root_path + expect(response).to redirect_to root_path(formulaire_contact_general_submitted: true) end context "en_construction" do