Merge branch 'dev' into 4482-echec-initilaisation-env-dev
This commit is contained in:
commit
8f5203cc2e
89 changed files with 1265 additions and 505 deletions
|
@ -23,7 +23,6 @@ FOG_OPENSTACK_IDENTITY_API_VERSION=""
|
|||
FOG_OPENSTACK_REGION=""
|
||||
FOG_DIRECTORY=""
|
||||
FOG_ENABLED=""
|
||||
CARRIERWAVE_CACHE_DIR="/tmp/tps-local-cache"
|
||||
DS_PROXY_URL=""
|
||||
|
||||
FC_PARTICULIER_ID=""
|
||||
|
@ -46,8 +45,14 @@ SENTRY_DSN_JS=""
|
|||
MATOMO_ENABLED="disabled"
|
||||
MATOMO_ID="73"
|
||||
|
||||
SENDINBLUE_ENABLED="disabled"
|
||||
SENDINBLUE_BALANCING=""
|
||||
SENDINBLUE_BALANCING_VALUE=""
|
||||
SENDINBLUE_ENABLED=""
|
||||
SENDINBLUE_CLIENT_KEY=""
|
||||
SENDINBLUE_SMTP_KEY=""
|
||||
SENDINBLUE_USER_NAME=""
|
||||
|
||||
|
||||
CRISP_ENABLED="disabled"
|
||||
CRISP_CLIENT_KEY=""
|
||||
|
||||
|
|
|
@ -45,14 +45,26 @@ Rails.application.configure do
|
|||
config.assets.raise_runtime_errors = true
|
||||
|
||||
# Action Mailer settings
|
||||
config.action_mailer.delivery_method = :letter_opener_web
|
||||
# Configure default root URL for generating URLs to routes
|
||||
config.action_mailer.default_url_options = {
|
||||
host: 'localhost',
|
||||
port: 3000
|
||||
}
|
||||
# Configure default root URL for email assets
|
||||
config.action_mailer.asset_host = "http://" + ENV['APP_HOST']
|
||||
|
||||
if ENV['SENDINBLUE_ENABLED'] == 'enabled'
|
||||
config.action_mailer.delivery_method = :smtp
|
||||
config.action_mailer.smtp_settings = {
|
||||
user_name: Rails.application.secrets.sendinblue[:username],
|
||||
password: Rails.application.secrets.sendinblue[:smtp_key],
|
||||
address: 'smtp-relay.sendinblue.com',
|
||||
domain: 'smtp-relay.sendinblue.com',
|
||||
port: '587',
|
||||
authentication: :cram_md5
|
||||
}
|
||||
else
|
||||
config.action_mailer.delivery_method = :letter_opener_web
|
||||
config.action_mailer.default_url_options = {
|
||||
host: 'localhost',
|
||||
port: 3000
|
||||
}
|
||||
|
||||
config.action_mailer.asset_host = "http://" + ENV['APP_HOST']
|
||||
end
|
||||
|
||||
Rails.application.routes.default_url_options = {
|
||||
host: 'localhost',
|
||||
|
|
|
@ -77,6 +77,16 @@ Rails.application.configure do
|
|||
port: '2525',
|
||||
authentication: :cram_md5
|
||||
}
|
||||
elsif ENV['SENDINBLUE_ENABLED'] == 'enabled'
|
||||
config.action_mailer.delivery_method = :smtp
|
||||
config.action_mailer.smtp_settings = {
|
||||
user_name: Rails.application.secrets.sendinblue[:username],
|
||||
password: Rails.application.secrets.sendinblue[:smtp_key],
|
||||
address: 'smtp-relay.sendinblue.com',
|
||||
domain: 'smtp-relay.sendinblue.com',
|
||||
port: '587',
|
||||
authentication: :cram_md5
|
||||
}
|
||||
else
|
||||
config.action_mailer.delivery_method = :mailjet
|
||||
end
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
Rails.application.config.content_security_policy do |policy|
|
||||
# En cas de non respect d'une des règles, faire un POST sur cette URL
|
||||
if Rails.env.production?
|
||||
policy.report_uri "https://demarchessimplifieestest.report-uri.com/r/d/csp/reportOnly"
|
||||
else
|
||||
policy.report_uri "http://#{ENV['APP_HOST']}/csp/" # ne pas notifier report-uri en dev/test
|
||||
if Rails.env.development?
|
||||
# les CSP ne sont pas appliquées en dev: on notifie cependant une url quelconque de la violation
|
||||
# pour détecter les erreurs lors de l'ajout d'une nouvelle brique externe durant le développement
|
||||
policy.report_uri "http://#{ENV['APP_HOST']}/csp/"
|
||||
end
|
||||
# Whitelist image
|
||||
policy.img_src :self, "*.openstreetmap.org", "static.demarches-simplifiees.fr", "*.cloud.ovh.net", "stats.data.gouv.fr", "*", :data
|
||||
|
|
1
config/initializers/dynamic_smtp_settings_interceptor.rb
Normal file
1
config/initializers/dynamic_smtp_settings_interceptor.rb
Normal file
|
@ -0,0 +1 @@
|
|||
ActionMailer::Base.register_interceptor "DynamicSmtpSettingsInterceptor"
|
79
config/initializers/graphiql.rb
Normal file
79
config/initializers/graphiql.rb
Normal file
|
@ -0,0 +1,79 @@
|
|||
DEFAULT_QUERY = "# La documentation officielle de la spécification (Anglais) : https://graphql.org/
|
||||
# Une introduction aux concepts et raisons d'être de GraphQL (Français) : https://blog.octo.com/graphql-et-pourquoi-faire/
|
||||
# Le schema GraphQL de demarches-simplifiees.fr : https://demarches-simplifiees-graphql.netlify.com
|
||||
# Le endpoint GraphQL de demarches-simplifiees.fr : https://demarches-simplifiees.fr/api/v2/graphql
|
||||
|
||||
query getDemarche($demarcheNumber: Int!) {
|
||||
demarche(number: $demarcheNumber) {
|
||||
id
|
||||
number
|
||||
title
|
||||
champDescriptors {
|
||||
id
|
||||
type
|
||||
label
|
||||
}
|
||||
dossiers(first: 3) {
|
||||
nodes {
|
||||
id
|
||||
number
|
||||
datePassageEnConstruction
|
||||
datePassageEnInstruction
|
||||
dateTraitement
|
||||
usager {
|
||||
email
|
||||
}
|
||||
champs {
|
||||
id
|
||||
label
|
||||
... on TextChamp {
|
||||
value
|
||||
}
|
||||
... on DecimalNumberChamp {
|
||||
value
|
||||
}
|
||||
... on IntegerNumberChamp {
|
||||
value
|
||||
}
|
||||
... on CheckboxChamp {
|
||||
value
|
||||
}
|
||||
... on DateChamp {
|
||||
value
|
||||
}
|
||||
... on DossierLinkChamp {
|
||||
dossier {
|
||||
id
|
||||
}
|
||||
}
|
||||
... on MultipleDropDownListChamp {
|
||||
values
|
||||
}
|
||||
... on LinkedDropDownListChamp {
|
||||
primaryValue
|
||||
secondaryValue
|
||||
}
|
||||
... on PieceJustificativeChamp {
|
||||
url
|
||||
}
|
||||
... on CarteChamp {
|
||||
geoAreas {
|
||||
source
|
||||
geometry {
|
||||
type
|
||||
coordinates
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
endCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
}"
|
||||
|
||||
GraphiQL::Rails.config.initial_query = DEFAULT_QUERY
|
||||
GraphiQL::Rails.config.title = 'demarches-simplifiees.fr'
|
|
@ -2,4 +2,5 @@ fr:
|
|||
activerecord:
|
||||
attributes:
|
||||
commentaire:
|
||||
body: 'Votre message'
|
||||
file: fichier
|
||||
|
|
8
config/locales/models/geo_area/fr.yml
Normal file
8
config/locales/models/geo_area/fr.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
fr:
|
||||
activerecord:
|
||||
attributes:
|
||||
geo_area:
|
||||
source:
|
||||
cadastre: Parcelle cadastrale
|
||||
quartier_prioritaire: Quartier prioritaire
|
||||
selection_utilisateur: Sélection utilisateur
|
|
@ -42,8 +42,6 @@ defaults: &defaults
|
|||
openstack_identity_api_version: "<%= ENV['FOG_OPENSTACK_IDENTITY_API_VERSION'] %>"
|
||||
openstack_region: <%= ENV['FOG_OPENSTACK_REGION'] %>
|
||||
directory: <%= ENV['FOG_DIRECTORY'] %>
|
||||
carrierwave:
|
||||
cache_dir: <%= ENV['CARRIERWAVE_CACHE_DIR'] %>
|
||||
mailtrap:
|
||||
username: <%= ENV['MAILTRAP_USERNAME'] %>
|
||||
password: <%= ENV['MAILTRAP_PASSWORD'] %>
|
||||
|
@ -54,7 +52,9 @@ defaults: &defaults
|
|||
webhook_secret: <%= ENV['HELPSCOUT_WEBHOOK_SECRET'] %>
|
||||
sendinblue:
|
||||
enabled: <%= ENV['SENDINBLUE_ENABLED'] == 'enabled' %>
|
||||
username: <%= ENV['SENDINBLUE_USER_NAME'] %>
|
||||
client_key: <%= ENV['SENDINBLUE_CLIENT_KEY'] %>
|
||||
smtp_key: <%= ENV['SENDINBLUE_SMTP_KEY'] %>
|
||||
api_v3_key: <%= ENV['SENDINBLUE_API_V3_KEY'] %>
|
||||
matomo:
|
||||
enabled: <%= ENV['MATOMO_ENABLED'] == 'enabled' %>
|
||||
|
@ -82,8 +82,6 @@ test:
|
|||
key: api_entreprise_test_key
|
||||
fog:
|
||||
directory: tps_dev
|
||||
carrierwave:
|
||||
cache_dir: /tmp/tps-test-cache
|
||||
pipedrive:
|
||||
key: pipedrive_test_key
|
||||
france_connect_particulier:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue