specific deactivation of rubocop DS/ApplicationName rule
This commit is contained in:
parent
c658428441
commit
7e085c657d
7 changed files with 16 additions and 0 deletions
|
@ -118,7 +118,9 @@ module DossierHelper
|
|||
private
|
||||
|
||||
def dinum_instance?
|
||||
# rubocop:disable DS/ApplicationName
|
||||
ENV['APP_HOST']&.ends_with?('demarches-simplifiees.fr')
|
||||
# rubocop:enable DS/ApplicationName
|
||||
end
|
||||
|
||||
def dossiers_with_lost_attachments_ids
|
||||
|
|
|
@ -93,6 +93,7 @@ class ApiEntreprise::API
|
|||
end
|
||||
|
||||
def self.params(siret_or_siren, procedure_id, user_id)
|
||||
# rubocop:disable DS/ApplicationName
|
||||
params = {
|
||||
context: "demarches-simplifiees.fr",
|
||||
recipient: siret_or_siren,
|
||||
|
@ -100,6 +101,7 @@ class ApiEntreprise::API
|
|||
non_diffusables: true,
|
||||
token: token_for_procedure(procedure_id)
|
||||
}
|
||||
# rubocop:enable DS/ApplicationName
|
||||
params[:user_id] = user_id if user_id.present?
|
||||
params
|
||||
end
|
||||
|
|
|
@ -259,10 +259,12 @@ class Dossier < ApplicationRecord
|
|||
scope :with_notifications, -> do
|
||||
# This scope is meant to be composed, typically with Instructeur.followed_dossiers, which means that the :follows table is already INNER JOINed;
|
||||
# it will fail otherwise
|
||||
# rubocop:disable DS/ApplicationName
|
||||
joined_dossiers = joins('LEFT OUTER JOIN "champs" ON "champs" . "dossier_id" = "dossiers" . "id" AND "champs" . "parent_id" IS NULL AND "champs" . "private" = FALSE AND "champs"."updated_at" > "follows"."demande_seen_at"')
|
||||
.joins('LEFT OUTER JOIN "champs" "champs_privates_dossiers" ON "champs_privates_dossiers" . "dossier_id" = "dossiers" . "id" AND "champs_privates_dossiers" . "parent_id" IS NULL AND "champs_privates_dossiers" . "private" = TRUE AND "champs_privates_dossiers"."updated_at" > "follows"."annotations_privees_seen_at"')
|
||||
.joins('LEFT OUTER JOIN "avis" ON "avis" . "dossier_id" = "dossiers" . "id" AND avis.updated_at > follows.avis_seen_at')
|
||||
.joins('LEFT OUTER JOIN "commentaires" ON "commentaires" . "dossier_id" = "dossiers" . "id" and commentaires.updated_at > follows.messagerie_seen_at and "commentaires"."email" != \'contact@tps.apientreprise.fr\' AND "commentaires"."email" != \'contact@demarches-simplifiees.fr\'')
|
||||
# rubocop:enable DS/ApplicationName
|
||||
|
||||
updated_demandes = joined_dossiers
|
||||
.where('champs.updated_at > follows.demande_seen_at OR groupe_instructeur_updated_at > follows.demande_seen_at')
|
||||
|
|
|
@ -26,7 +26,9 @@ shared_dirs = [
|
|||
|
||||
set :domain, ENV.fetch('domain')
|
||||
set :deploy_to, deploy_to
|
||||
# rubocop:disable DS/ApplicationName
|
||||
set :repository, 'https://github.com/betagouv/demarches-simplifiees.fr.git'
|
||||
# rubocop:enable DS/ApplicationName
|
||||
set :branch, ENV.fetch('branch')
|
||||
set :forward_agent, true
|
||||
set :user, 'ds'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# rubocop:disable DS/ApplicationName
|
||||
# todo: will be externally configurable
|
||||
if !defined?(CONTACT_EMAIL)
|
||||
CONTACT_EMAIL = "contact@demarches-simplifiees.fr"
|
||||
EQUIPE_EMAIL = "equipe@demarches-simplifiees.fr"
|
||||
|
@ -7,3 +9,4 @@ if !defined?(CONTACT_EMAIL)
|
|||
|
||||
OLD_CONTACT_EMAIL = "contact@tps.apientreprise.fr"
|
||||
end
|
||||
# rubocop:enable DS/ApplicationName
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# rubocop:disable DS/ApplicationName
|
||||
Rails.application.config.content_security_policy do |policy|
|
||||
# Whitelist image
|
||||
policy.img_src :self, "*.openstreetmap.org", "static.demarches-simplifiees.fr", "*.cloud.ovh.net", "stats.data.gouv.fr", "*", :data, :blob
|
||||
|
@ -20,3 +21,4 @@ Rails.application.config.content_security_policy do |policy|
|
|||
policy.connect_src(*policy.connect_src, "ws://localhost:3035", "http://localhost:3035")
|
||||
end
|
||||
end
|
||||
# rubocop:enable DS/ApplicationName
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# rubocop:disable DS/ApplicationName
|
||||
# API URLs
|
||||
API_CARTO_URL = ENV.fetch("API_CARTO_URL", "https://sandbox.geo.api.gouv.fr/apicarto")
|
||||
API_ENTREPRISE_URL = ENV.fetch("API_ENTREPRISE_URL", "https://entreprise.api.gouv.fr/v2")
|
||||
|
@ -40,3 +41,5 @@ FAQ_ERREUR_SIRET_URL = [FAQ_URL, "article", "4-erreur-siret"].join("/")
|
|||
|
||||
STATUS_PAGE_URL = ENV.fetch("STATUS_PAGE_URL", "https://status.demarches-simplifiees.fr")
|
||||
MATOMO_IFRAME_URL = "https://stats.data.gouv.fr/index.php?module=CoreAdminHome&action=optOut&language=fr&&fontColor=333333&fontSize=16px&fontFamily=Muli"
|
||||
|
||||
# rubocop:enable DS/ApplicationName
|
||||
|
|
Loading…
Reference in a new issue