1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-18 07:52:23 +01:00

(quality) lint code

This commit is contained in:
Sylvain 2023-02-15 16:02:49 +01:00
parent 59a0c600f2
commit a179601b97
4 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
json.title t('.unknown_notification')
json.description t('.notification_ID_wrong_type_TYPE_unknown',
ID: notification.id,

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
json.totals @totals
json.notifications(@notifications) do |notification|
json.extract! notification, :id, :notification_type_id, :notification_type, :created_at, :is_read
@ -9,4 +11,4 @@ json.notifications(@notifications) do |notification|
json.partial! "/api/notifications/#{notification.notification_type}", notification: notification
end
end
end.delete_if {|n| n['id'] == nil }
end

View File

@ -312,7 +312,7 @@ fr:
notify_admin_when_project_published: "Un projet a été publié"
notify_admin_abuse_reported: "Un contenu abusif a été rapporté"
notify_admin_close_period_reminder: "Lexercice comptable arrive à échéance"
notify_admin_archive_complete: "Une archive est terminée"
notify_admin_archive_complete: "Une archive comptable est prête"
notify_admin_training_auto_cancelled: "Une formation a été automatiquement annulée"
notify_admin_export_complete: "Un export est disponible"
notify_user_when_invoice_ready: "Une facture est disponible"

View File

@ -110,12 +110,13 @@ config()
echo -e "\e[91m[ ❌ ] docker-compose.yml was not found in ${PWD}. Please run this script from the Fab-manager's installation folder. Exiting... \e[39m"
exit 1
fi
echo "Checking docker version..."
DOCKER_VERSION=$(docker -v | grep -oP "([0-9]{1,}\.)+[0-9]{1,}")
if verlt "$DOCKER_VERSION" 20.10; then
echo -e "\e[91m[ ❌ ] The installed docker version ($DOCKER_VERSION) is lower than the minimum required version (20.10). Exiting...\e[39m" && exit 1
fi
echo "Checking docker version..."
DOCKER_VERSION=$(docker -v | grep -oP "([0-9]{1,}\.)+[0-9]{1,}")
if verlt "$DOCKER_VERSION" 20.10; then
echo -e "\e[91m[ ❌ ] The installed docker version ($DOCKER_VERSION) is lower than the minimum required version (20.10). Exiting...\e[39m" && exit 1
fi
echo "Checking fabmanager service..."
SERVICE="$(yq eval '.services.*.image | select(. == "sleede/fab-manager*") | path | .[-2]' docker-compose.yml)"
YES_ALL=${Y:-false}
# COMMANDS, SCRIPTS and ENVIRONMENTS are set by parseparams