From ea6c8421afab19663620863bbcb97591a8a46913 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 14:31:51 +0100 Subject: [PATCH 001/109] New translations app.logged.en.yml (French) --- config/locales/app.logged.fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.logged.fr.yml b/config/locales/app.logged.fr.yml index d2b7b0a97..50659d645 100644 --- a/config/locales/app.logged.fr.yml +++ b/config/locales/app.logged.fr.yml @@ -160,7 +160,7 @@ fr: #book a training trainings_reserve: trainings_planning: "Planning formations" - planning_of: "Planning of " #eg. Planning of 3d printer training + planning_of: "Planning de la " #eg. Planning of 3d printer training all_trainings: "Toutes les formations" cancel_my_selection: "Annuler ma sélection" i_change: "Je change" From 71d7d7b79347b34803df8af8ff33f1e560d72ac9 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 14:31:55 +0100 Subject: [PATCH 002/109] New translations mails.en.yml (French) --- config/locales/mails.fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/mails.fr.yml b/config/locales/mails.fr.yml index 65b868278..fefa687e1 100644 --- a/config/locales/mails.fr.yml +++ b/config/locales/mails.fr.yml @@ -267,7 +267,7 @@ fr: subject: "Mise à jour de la Politique de confidentialité" body: content_html: "

Nous souhaitons vous signaler que nous venons de mettre à jour notre politique de confidentialité.

Nous pouvons apporter régulièrement des modifications à notre politique de confidentialité. Conformément à la réglementation, une notification vous sera envoyée à chaque mise à jour.

En accédant ou en utilisant nos services après la mise à jour de la Politique de confidentialité, nous considérerons que vous acceptez les termes de celle-ci, mises à jour comprises.

" - link_to_policy: "Cliquez ici pour consultez la politique de confidentialité." + link_to_policy: "Cliquez ici pour consulter la politique de confidentialité." notify_admin_refund_created: subject: "Un avoir a été généré" body: From fdc2f2c6ef5b9c9a0c5c9bfe9237efea29768579 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 14:35:38 +0100 Subject: [PATCH 003/109] fix untranslated string --- config/locales/mails.en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/mails.en.yml b/config/locales/mails.en.yml index 71868dee3..5cfb2d6ed 100644 --- a/config/locales/mails.en.yml +++ b/config/locales/mails.en.yml @@ -267,7 +267,7 @@ en: subject: "Privacy policy updated" body: content_html: "

We wish to inform you that we have just updated our privacy policy.

We may change our privacy policy regularly. In accordance with the regulations, you will receive a notification for each update.

By accessing or using our services after the privacy policy update, we will consider that you agree its terms, updates included.

" - link_to_policy: "Cliquez ici pour consultez la politique de confidentialité." + link_to_policy: "Click here to view the privacy policy." notify_admin_refund_created: subject: "A refund has been generated" body: From 0c0fbd0babacb4c981a951ff4ccec8ef19d46cb3 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 14:44:34 +0100 Subject: [PATCH 004/109] New translations app.shared.en.yml (French) --- config/locales/app.shared.fr.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/locales/app.shared.fr.yml b/config/locales/app.shared.fr.yml index 93765dbc2..01403caeb 100644 --- a/config/locales/app.shared.fr.yml +++ b/config/locales/app.shared.fr.yml @@ -186,9 +186,9 @@ fr: as_part_of_a_partner_subscription_some_notifications_may_be_sent_to_this_user: "Dans le cadre d'un abonnement partenaire, certaines notifications pourront être adressées à cet utilisateur." new_partner: "Nouveau partenaire" first_name: "Prénom" - first_name_is_required: "Le prénom est requis" + first_name_is_required: "Le prénom est requis." surname: "Nom" - surname_is_required: "le nom est requis" + surname_is_required: "Le nom est requis." email_address: "Adresse de courriel" email_address_is_required: "L'adresse e-mail est requise." disabled: "Désactiver l'abonnement" @@ -319,12 +319,12 @@ fr: debit_subscription: "Payer un abonnement" debit_reservation_training: "Payer un reservation de formation" debit_reservation_machine: "Payer un reservation de machine" - debit_reservation_event: "Payer un reservation d'évenement" + debit_reservation_event: "Payer une réservation d’événement" warning_uneditable_credit: "Attention : une fois validé, le montant crédité ne sera plus modifiable." #promotional coupon (creation/edition form) coupon: name: "Nom" - name_is_required: "le nom est requis." + name_is_required: "Le nom est requis." code: "Code" code_is_required: "Le code est requis." code_must_be_composed_of_capital_letters_digits_and_or_dashes: "Le code doit être composé de lettres majuscules, de chiffres et/ou de tirets." @@ -355,7 +355,7 @@ fr: unable_to_apply_the_coupon_because_sold_out: "Impossible d'appliquer la réduction : ce code promo a atteint son quota." unable_to_apply_the_coupon_because_already_used: "Impossible d'appliquer la réduction : vous avez déjà utilisé ce code promo par le passé." unable_to_apply_the_coupon_because_amount_exceeded: "Impossible d'appliquer la réduction : la réduction dépasse le total de cet achat." - unable_to_apply_the_coupon_because_undefined: "Impossible d'appliquer la réduction : une erreur inattendue s'est produite, veuillez contacter le gestionnaire du Fablab." + unable_to_apply_the_coupon_because_undefined: "Impossible d'appliquer la réduction : une erreur inattendue s'est produite, veuillez contacter le gestionnaire du FabLab." unable_to_apply_the_coupon_because_rejected: "Ce code promo n'existe pas." #form to create/edit a space space: From 3f342dc1812cc41a23990815ece1e835fcf52689 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 14:44:36 +0100 Subject: [PATCH 005/109] New translations app.public.en.yml (French) --- config/locales/app.public.fr.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/locales/app.public.fr.yml b/config/locales/app.public.fr.yml index 5727cbbf0..0c4124c2c 100644 --- a/config/locales/app.public.fr.yml +++ b/config/locales/app.public.fr.yml @@ -143,9 +143,9 @@ fr: #next events summary on the home page fablab_s_next_events: "Les prochains évènements du Fab Lab" every_events: "Tous les évènements" - from_date_to_date: "du {START} au {END}" - on_the_date: "le {DATE}" - from_time_to_time: "de {START} à {END}" + from_date_to_date: "Du {START} au {END}" + on_the_date: "Le {DATE}" + from_time_to_time: "De {START} à {END}" free_entry: "Accès libre" free_admission: "Entrée gratuite" full_price: "Plein tarif : " @@ -379,7 +379,7 @@ fr: content: "

Une soirée porte ouverte ou un stage pour fabriquer sa lampe de bureau ? C'est par ici !

Les évènements peuvent être gratuits ou payants (avec plusieurs tarifs), avec ou sans réservation.

Ici encore, les membres peuvent accéder à cette page et réserver eux-mêmes des places pour des évènements gratuits, ou payants si le paiement par carte bancaire est activé.

" calendar: title: "Agenda" - content: "Visualisez en un clin d'oeil tout ce qui est prévu au programme des prochaines semaines (évènements, formations, machines disponibles, etc.)." + content: "Visualisez en un clin d’œil tout ce qui est prévu au programme des prochaines semaines (événements, formations, machines disponibles, etc.)." projects: title: "Projets" content: "

Documentez et partagez toutes vos réalisations avec la communauté.

Si vous utilisez OpenLab, vous pourrez également consulter les projets de l'ensemble du réseau Fab-manager. Contactez-nous pour obtenir votre accès, c'est gratuit !

" @@ -402,7 +402,7 @@ fr: title: "Les brèves" content: "

Cet espace vous permet d'afficher les dernières actualités de votre structure.

Vous pouvez facilement changer son contenu depuis « Personnalisation », « Page d'accueil ».

" last_projects: - title: "les derniers projets" + title: "Les derniers projets" content: "

Ce carousel fait défiler les derniers projets documentés par vos membres.

" last_tweet: title: "Dernier tweet" From 1115ba064b7dc1df65629c20cca5abed5ea84396 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 14:45:58 +0100 Subject: [PATCH 006/109] fixes some translation --- CHANGELOG.md | 2 ++ config/locales/app.public.en.yml | 2 +- config/locales/app.shared.en.yml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 875eab565..73f6335e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog Fab-manager +- Updated translations + ## v4.3.2 2020 March 11 - Secure the session cookie diff --git a/config/locales/app.public.en.yml b/config/locales/app.public.en.yml index 7cce3e890..84ea109e3 100644 --- a/config/locales/app.public.en.yml +++ b/config/locales/app.public.en.yml @@ -357,7 +357,7 @@ en: tour: conclusion: title: "Thank you for your attention" - content: "

If you want to restart this contextual help, press F1 at any time or click on [? Help] from the user's menu.

If you need additional help, you can check the user guide (only in French for now).

The Fab-manager's team also provides personalized support (help with getting started, help with installation, customization, etc.), contact-us for more info.

" + content: "

If you want to restart this contextual help, press F1 at any time or click on « ? Help » from the user's menu.

If you need additional help, you can check the user guide (only in French for now).

The Fab-manager's team also provides personalized support (help with getting started, help with installation, customization, etc.), contact-us for more info.

" welcome: welcome: title: "Welcome to Fab-manager" diff --git a/config/locales/app.shared.en.yml b/config/locales/app.shared.en.yml index 05358f586..1c21c3474 100644 --- a/config/locales/app.shared.en.yml +++ b/config/locales/app.shared.en.yml @@ -307,7 +307,7 @@ en: will_appear_on_the_refund_invoice: "Will appear on the refund invoice." to_credit: 'Credit' wallet_credit_successfully: "Wallet of user is credited successfully." - a_problem_occurred_for_wallet_credit: "A problem is occurred while taking the credit of wallet" + a_problem_occurred_for_wallet_credit: "A problem is occurred while taking the credit of wallet." amount_is_required: "The amount is required." amount_minimum_1: "The amount minimum is 1" amount_confirm_is_required: "The amount confirmation is required." From 163edc50c04aa7a3c54c28ac3364035062c31440 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 15:04:13 +0100 Subject: [PATCH 007/109] New translations app.public.en.yml (Acholi) --- config/locales/app.public.ach.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.public.ach.yml b/config/locales/app.public.ach.yml index d29404b25..cafee8408 100644 --- a/config/locales/app.public.ach.yml +++ b/config/locales/app.public.ach.yml @@ -357,7 +357,7 @@ ach: tour: conclusion: title: "crwdns19646:0crwdne19646:0" - content: "crwdns20176:0crwdne20176:0" + content: "crwdns20270:0crwdne20270:0" welcome: welcome: title: "crwdns19650:0crwdne19650:0" From dc4795d5135d005dfeb2a531f0be6364cce3b85c Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 15:04:16 +0100 Subject: [PATCH 008/109] New translations mails.en.yml (Acholi) --- config/locales/mails.ach.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/mails.ach.yml b/config/locales/mails.ach.yml index 1f8bed984..5be3afeaa 100644 --- a/config/locales/mails.ach.yml +++ b/config/locales/mails.ach.yml @@ -267,7 +267,7 @@ ach: subject: "crwdns4209:0crwdne4209:0" body: content_html: "crwdns4211:0crwdne4211:0" - link_to_policy: "crwdns4213:0crwdne4213:0" + link_to_policy: "crwdns20268:0crwdne20268:0" notify_admin_refund_created: subject: "crwdns4565:0crwdne4565:0" body: From 73a558dfcde95576b7a66a3adb359beed6515bea Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 15:04:19 +0100 Subject: [PATCH 009/109] New translations app.shared.en.yml (Spanish) --- config/locales/app.shared.es.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.shared.es.yml b/config/locales/app.shared.es.yml index 61b31decc..b15b26494 100644 --- a/config/locales/app.shared.es.yml +++ b/config/locales/app.shared.es.yml @@ -307,7 +307,7 @@ es: will_appear_on_the_refund_invoice: "Aparecerá en el informe de devolución." to_credit: 'Credito' wallet_credit_successfully: "La cartera del usuario ha sido acreditada con éxito." - a_problem_occurred_for_wallet_credit: "Ocurrió un problema mientras se acreditaba la cartera" + a_problem_occurred_for_wallet_credit: "A problem is occurred while taking the credit of wallet." amount_is_required: "Se requiere la cantidad." amount_minimum_1: "La cantidad mínima es 1" amount_confirm_is_required: "Debe confirmarse la cantidad." From 6531d99d5d26d8d35e1e4c78aa1a068c22c5c3bd Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 15:04:21 +0100 Subject: [PATCH 010/109] New translations app.public.en.yml (Spanish) --- config/locales/app.public.es.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.public.es.yml b/config/locales/app.public.es.yml index dc3a9de4e..ef55e6759 100644 --- a/config/locales/app.public.es.yml +++ b/config/locales/app.public.es.yml @@ -357,7 +357,7 @@ es: tour: conclusion: title: "Thank you for your attention" - content: "

If you want to restart this contextual help, press F1 at any time or click on [? Help] from the user's menu.

If you need additional help, you can check the user guide (only in French for now).

The Fab-manager's team also provides personalized support (help with getting started, help with installation, customization, etc.), contact-us for more info.

" + content: "

If you want to restart this contextual help, press F1 at any time or click on « ? Help » from the user's menu.

If you need additional help, you can check the user guide (only in French for now).

The Fab-manager's team also provides personalized support (help with getting started, help with installation, customization, etc.), contact-us for more info.

" welcome: welcome: title: "Welcome to Fab-manager" From b19e49fdc4a43443cdf1b0e577e14ad12f261e1d Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 15:04:25 +0100 Subject: [PATCH 011/109] New translations mails.en.yml (Spanish) --- config/locales/mails.es.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/mails.es.yml b/config/locales/mails.es.yml index ca43a34db..277c57788 100644 --- a/config/locales/mails.es.yml +++ b/config/locales/mails.es.yml @@ -267,7 +267,7 @@ es: subject: "Privacy policy updated" body: content_html: "

We wish to inform you that we have just updated our privacy policy.

We may change our privacy policy regularly. In accordance with the regulations, you will receive a notification for each update.

By accessing or using our services after the privacy policy update, we will consider that you agree its terms, updates included.

" - link_to_policy: "Cliquez ici pour consultez la politique de confidentialité." + link_to_policy: "Click here to view the privacy policy." notify_admin_refund_created: subject: "A refund has been generated" body: From c6ea6fcfea01b6ce3c26f99c6f7bf0e9cd7307f2 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 15:04:30 +0100 Subject: [PATCH 012/109] New translations app.shared.en.yml (Portuguese) --- config/locales/app.shared.pt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.shared.pt.yml b/config/locales/app.shared.pt.yml index 756dedb03..cbb22cc02 100755 --- a/config/locales/app.shared.pt.yml +++ b/config/locales/app.shared.pt.yml @@ -307,7 +307,7 @@ pt: will_appear_on_the_refund_invoice: "Aparecerá na fatura de reembolso." to_credit: 'Crédito' wallet_credit_successfully: "Carteira de usuário creditada com sucesso." - a_problem_occurred_for_wallet_credit: "Um erro ocorreu ao creditar a carteira" + a_problem_occurred_for_wallet_credit: "A problem is occurred while taking the credit of wallet." amount_is_required: "A quantia é obrigatório." amount_minimum_1: "A quantia mínima é 1" amount_confirm_is_required: "A confirmação da quantia é obrigatório." From 11fd0460f0025eaa396a55eb9ff6455cef283027 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 15:04:32 +0100 Subject: [PATCH 013/109] New translations app.public.en.yml (Portuguese) --- config/locales/app.public.pt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.public.pt.yml b/config/locales/app.public.pt.yml index b1a62ab02..0804af9be 100755 --- a/config/locales/app.public.pt.yml +++ b/config/locales/app.public.pt.yml @@ -357,7 +357,7 @@ pt: tour: conclusion: title: "Thank you for your attention" - content: "

If you want to restart this contextual help, press F1 at any time or click on [? Help] from the user's menu.

If you need additional help, you can check the user guide (only in French for now).

The Fab-manager's team also provides personalized support (help with getting started, help with installation, customization, etc.), contact-us for more info.

" + content: "

If you want to restart this contextual help, press F1 at any time or click on « ? Help » from the user's menu.

If you need additional help, you can check the user guide (only in French for now).

The Fab-manager's team also provides personalized support (help with getting started, help with installation, customization, etc.), contact-us for more info.

" welcome: welcome: title: "Welcome to Fab-manager" From e5ba914108039cd0508258b63823129b488b5097 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 15:04:35 +0100 Subject: [PATCH 014/109] New translations mails.en.yml (Portuguese) --- config/locales/mails.pt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/mails.pt.yml b/config/locales/mails.pt.yml index 22d86666d..fbb618a16 100755 --- a/config/locales/mails.pt.yml +++ b/config/locales/mails.pt.yml @@ -267,7 +267,7 @@ pt: subject: "Privacy policy updated" body: content_html: "

We wish to inform you that we have just updated our privacy policy.

We may change our privacy policy regularly. In accordance with the regulations, you will receive a notification for each update.

By accessing or using our services after the privacy policy update, we will consider that you agree its terms, updates included.

" - link_to_policy: "Cliquez ici pour consultez la politique de confidentialité." + link_to_policy: "Click here to view the privacy policy." notify_admin_refund_created: subject: "A refund has been generated" body: From d0abc2f757e5bff30e72bcaca22ebc23e9916a03 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 15:04:40 +0100 Subject: [PATCH 015/109] New translations app.shared.en.yml (French) --- config/locales/app.shared.fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.shared.fr.yml b/config/locales/app.shared.fr.yml index 01403caeb..9c6e79c4d 100644 --- a/config/locales/app.shared.fr.yml +++ b/config/locales/app.shared.fr.yml @@ -307,7 +307,7 @@ fr: will_appear_on_the_refund_invoice: "Apparaîtra sur la facture de remboursement." to_credit: 'Créditer' wallet_credit_successfully: "Le porte-monnaie de l'utilisateur a été chargé avec succès." - a_problem_occurred_for_wallet_credit: "Un problème est survenu lors du chargement du porte-monnaie." + a_problem_occurred_for_wallet_credit: "A problem is occurred while taking the credit of wallet." amount_is_required: "Le montant est requis." amount_minimum_1: "Le montant minimum est de 1" amount_confirm_is_required: "La confirmation du montant est requise." From e2b43f37ed4276396a88ecdb4b14f4d25f8b1d00 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 15:04:41 +0100 Subject: [PATCH 016/109] New translations app.public.en.yml (French) --- config/locales/app.public.fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.public.fr.yml b/config/locales/app.public.fr.yml index 0c4124c2c..c6c003178 100644 --- a/config/locales/app.public.fr.yml +++ b/config/locales/app.public.fr.yml @@ -357,7 +357,7 @@ fr: tour: conclusion: title: "Merci de votre attention" - content: "

Si vous souhaitez relancer cette aide contextuelle, appuyez sur F1 à n'importe quel moment ou cliquez sur [? Aide] depuis le menu utilisateur.

Si vous avez besoin d'aide supplémentaire, vous pouvez consulter le guide d'utilisation disponible en Français.

L'équipe de Fab-manager propose également du support personnalisé (aide à la prise en main, aide à l'installation, personnalisation, etc.), contactez-nous pour plus d'informations.

" + content: "

If you want to restart this contextual help, press F1 at any time or click on « ? Help » from the user's menu.

If you need additional help, you can check the user guide (only in French for now).

The Fab-manager's team also provides personalized support (help with getting started, help with installation, customization, etc.), contact-us for more info.

" welcome: welcome: title: "Bienvenue dans Fab-manager" From 77f1f8f6158461212f04751a64b6f92529be2087 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 15:04:44 +0100 Subject: [PATCH 017/109] New translations mails.en.yml (French) --- config/locales/mails.fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/mails.fr.yml b/config/locales/mails.fr.yml index fefa687e1..1b4897dc0 100644 --- a/config/locales/mails.fr.yml +++ b/config/locales/mails.fr.yml @@ -267,7 +267,7 @@ fr: subject: "Mise à jour de la Politique de confidentialité" body: content_html: "

Nous souhaitons vous signaler que nous venons de mettre à jour notre politique de confidentialité.

Nous pouvons apporter régulièrement des modifications à notre politique de confidentialité. Conformément à la réglementation, une notification vous sera envoyée à chaque mise à jour.

En accédant ou en utilisant nos services après la mise à jour de la Politique de confidentialité, nous considérerons que vous acceptez les termes de celle-ci, mises à jour comprises.

" - link_to_policy: "Cliquez ici pour consulter la politique de confidentialité." + link_to_policy: "Click here to view the privacy policy." notify_admin_refund_created: subject: "Un avoir a été généré" body: From a25f3bef3cc2ff91666cf3cf3294d9c37584f581 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 15:04:46 +0100 Subject: [PATCH 018/109] New translations app.shared.en.yml (Acholi) --- config/locales/app.shared.ach.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.shared.ach.yml b/config/locales/app.shared.ach.yml index cfde25a14..8353e9dc7 100644 --- a/config/locales/app.shared.ach.yml +++ b/config/locales/app.shared.ach.yml @@ -307,7 +307,7 @@ ach: will_appear_on_the_refund_invoice: "crwdns9903:0crwdne9903:0" to_credit: 'crwdns9905:0crwdne9905:0' wallet_credit_successfully: "crwdns9907:0crwdne9907:0" - a_problem_occurred_for_wallet_credit: "crwdns9909:0crwdne9909:0" + a_problem_occurred_for_wallet_credit: "crwdns20272:0crwdne20272:0" amount_is_required: "crwdns20222:0crwdne20222:0" amount_minimum_1: "crwdns9913:0crwdne9913:0" amount_confirm_is_required: "crwdns20224:0crwdne20224:0" From 838a23f9d295672f6e1b7b9ebd72f8a5d551c63b Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 15:27:19 +0100 Subject: [PATCH 019/109] New translations app.shared.en.yml (Spanish) --- config/locales/app.shared.es.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.shared.es.yml b/config/locales/app.shared.es.yml index b15b26494..41e64ad94 100644 --- a/config/locales/app.shared.es.yml +++ b/config/locales/app.shared.es.yml @@ -307,7 +307,7 @@ es: will_appear_on_the_refund_invoice: "Aparecerá en el informe de devolución." to_credit: 'Credito' wallet_credit_successfully: "La cartera del usuario ha sido acreditada con éxito." - a_problem_occurred_for_wallet_credit: "A problem is occurred while taking the credit of wallet." + a_problem_occurred_for_wallet_credit: "Ocurrió un problema mientras se acreditaba la cartera." amount_is_required: "Se requiere la cantidad." amount_minimum_1: "La cantidad mínima es 1" amount_confirm_is_required: "Debe confirmarse la cantidad." From 7722533c733a826d7c569bf42ee3341751ad22ca Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 15:27:25 +0100 Subject: [PATCH 020/109] New translations mails.en.yml (Spanish) --- config/locales/mails.es.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/mails.es.yml b/config/locales/mails.es.yml index 277c57788..36654d9d3 100644 --- a/config/locales/mails.es.yml +++ b/config/locales/mails.es.yml @@ -267,7 +267,7 @@ es: subject: "Privacy policy updated" body: content_html: "

We wish to inform you that we have just updated our privacy policy.

We may change our privacy policy regularly. In accordance with the regulations, you will receive a notification for each update.

By accessing or using our services after the privacy policy update, we will consider that you agree its terms, updates included.

" - link_to_policy: "Click here to view the privacy policy." + link_to_policy: "Haga clic aquí para ver la política de privacidad." notify_admin_refund_created: subject: "A refund has been generated" body: From 643937770d0d8848e603ac58b206b2ce6d1fa02e Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 15:27:28 +0100 Subject: [PATCH 021/109] New translations app.shared.en.yml (Portuguese) --- config/locales/app.shared.pt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.shared.pt.yml b/config/locales/app.shared.pt.yml index cbb22cc02..577b81657 100755 --- a/config/locales/app.shared.pt.yml +++ b/config/locales/app.shared.pt.yml @@ -307,7 +307,7 @@ pt: will_appear_on_the_refund_invoice: "Aparecerá na fatura de reembolso." to_credit: 'Crédito' wallet_credit_successfully: "Carteira de usuário creditada com sucesso." - a_problem_occurred_for_wallet_credit: "A problem is occurred while taking the credit of wallet." + a_problem_occurred_for_wallet_credit: "Um erro ocorreu ao creditar a carteira." amount_is_required: "A quantia é obrigatório." amount_minimum_1: "A quantia mínima é 1" amount_confirm_is_required: "A confirmação da quantia é obrigatório." From ebefd721fdac3a0dbfdbf53cfcd6c8698295f2a0 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 15:27:36 +0100 Subject: [PATCH 022/109] New translations app.shared.en.yml (French) --- config/locales/app.shared.fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.shared.fr.yml b/config/locales/app.shared.fr.yml index 9c6e79c4d..01403caeb 100644 --- a/config/locales/app.shared.fr.yml +++ b/config/locales/app.shared.fr.yml @@ -307,7 +307,7 @@ fr: will_appear_on_the_refund_invoice: "Apparaîtra sur la facture de remboursement." to_credit: 'Créditer' wallet_credit_successfully: "Le porte-monnaie de l'utilisateur a été chargé avec succès." - a_problem_occurred_for_wallet_credit: "A problem is occurred while taking the credit of wallet." + a_problem_occurred_for_wallet_credit: "Un problème est survenu lors du chargement du porte-monnaie." amount_is_required: "Le montant est requis." amount_minimum_1: "Le montant minimum est de 1" amount_confirm_is_required: "La confirmation du montant est requise." From 154b0269751ee50fdb4de84b56f42531a90d1f20 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 15:27:41 +0100 Subject: [PATCH 023/109] New translations mails.en.yml (French) --- config/locales/mails.fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/mails.fr.yml b/config/locales/mails.fr.yml index 1b4897dc0..fefa687e1 100644 --- a/config/locales/mails.fr.yml +++ b/config/locales/mails.fr.yml @@ -267,7 +267,7 @@ fr: subject: "Mise à jour de la Politique de confidentialité" body: content_html: "

Nous souhaitons vous signaler que nous venons de mettre à jour notre politique de confidentialité.

Nous pouvons apporter régulièrement des modifications à notre politique de confidentialité. Conformément à la réglementation, une notification vous sera envoyée à chaque mise à jour.

En accédant ou en utilisant nos services après la mise à jour de la Politique de confidentialité, nous considérerons que vous acceptez les termes de celle-ci, mises à jour comprises.

" - link_to_policy: "Click here to view the privacy policy." + link_to_policy: "Cliquez ici pour consulter la politique de confidentialité." notify_admin_refund_created: subject: "Un avoir a été généré" body: From f4e8150a2245b22e3eb0f4785bb1b2a96e8ac00a Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 15:57:12 +0100 Subject: [PATCH 024/109] fixes translation string --- config/locales/en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 511a38bbd..39f4fd0ec 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -257,7 +257,7 @@ en: notify_member_slot_is_modified: your_reservation_slot_was_successfully_changed: "Your reservation slot was successfully changed." notify_member_subscribed_plan: - you_have_subscribed_to_PLAN_html: "You have subscribed tp %{PLAN}." + you_have_subscribed_to_PLAN_html: "You have subscribed to %{PLAN}." notify_member_subscribed_plan_is_changed: you_have_changed_your_subscription_to_PLAN_html: "You have changed your subscription to %{PLAN}." notify_member_subscription_canceled: From 50d43c61ec96d23c680ad546ea46501ed233e448 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Mar 2020 16:33:22 +0100 Subject: [PATCH 025/109] New translations en.yml (Spanish) --- config/locales/es.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/config/locales/es.yml b/config/locales/es.yml index 7371471fa..67187fb0e 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -83,11 +83,11 @@ es: one: "Una entrada de precio completo" other: "%{count} entradas de precio completo" other_rate_ticket: - one: "un %{NAME} entrada" + one: "Un %{NAME} entrada" other: "%{count} %{NAME} entradas" reservation_other: "Reserva (other)" coupon_CODE_discount_of_DISCOUNT: "Cupón {CODE}: descuento de {DISCOUNT}{TYPE, select, percent_off{%} other{}}" #messageFormat interpolation - total_including_all_taxes: "total impuestos incluidos" + total_including_all_taxes: "Total impuestos incluidos" including_VAT_RATE: "Incluyendo IVA %{RATE}%" including_total_excluding_taxes: "Excluyendo IVA" including_amount_payed_on_ordering: "Incluyendo cantidad pagada en el pedido" @@ -166,11 +166,11 @@ es: projects: "Proyectos" facebook: "Facebook" twitter: "Twitter" - echo_sciences: "Ecociencia" + echo_sciences: "Echociences" organization: "Organización" organization_address: "Dirección de la organización" - man: "hombre" - woman: "mujer" + man: "Hombre" + woman: "Mujer" without_subscriptions: "Sin suscripciones" #machines/trainings/events reservations list to EXCEL format export_reservations: @@ -178,10 +178,10 @@ es: customer_id: "Identificación del cliente" customer: "Cliente" email: "Correo electrónico" - reservation_date: "fecha de reserva" - reservation_type: "tipo de reserva" - reservation_object: "objetivo de reserva" - slots_number_hours_tickets: "espacios reservados (horas/entradas)" + reservation_date: "Fecha de reserva" + reservation_type: "Tipo de reserva" + reservation_object: "Objetivo de reserva" + slots_number_hours_tickets: "Espacios reservados (horas/entradas)" payment_method: "Método de pago" local_payment: "Pago en recepción" online_payment: "Pago online" @@ -231,11 +231,11 @@ es: notify_admin_subscribed_plan: subscription_PLAN_has_been_subscribed_by_USER_html: "La suscripción %{PLAN} ha sido solicitada por %{USER}." notify_admin_subscription_canceled: - USER_s_subscription_has_been_cancelled: "La suscripción de %{USER}ha sido cancelada." + USER_s_subscription_has_been_cancelled: "La suscripción de %{USER} ha sido cancelada." notify_admin_subscription_extended: subscription_PLAN_of_the_member_USER_has_been_extended_FREE_until_DATE_html: "La suscripción {PLAN} de {USER} se ha extendido {FREE, select, true{for free} other{}} hasta {DATE}." #messageFormat interpolation notify_admin_subscription_is_expired: - USER_s_subscription_has_expired: "%La suscripción de {USER} ha expirado." + USER_s_subscription_has_expired: "La suscripción de %{USER} ha expirado." notify_admin_subscription_will_expire_in_7_days: USER_s_subscription_will_expire_in_7_days: "La suscripción de %{USER} expirará en 7 días." notify_admin_user_group_changed: From 00d52f2db28b8f3affe6ba2bf94ecf2aaa899d0d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 14 Mar 2020 23:17:03 +0000 Subject: [PATCH 026/109] Bump acorn from 6.0.4 to 6.4.1 Bumps [acorn](https://github.com/acornjs/acorn) from 6.0.4 to 6.4.1. - [Release notes](https://github.com/acornjs/acorn/releases) - [Commits](https://github.com/acornjs/acorn/compare/6.0.4...6.4.1) Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5d68aff6f..940df88ea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -40,9 +40,9 @@ acorn-jsx@^5.0.0: integrity sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg== acorn@^6.0.2: - version "6.0.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.4.tgz#77377e7353b72ec5104550aa2d2097a2fd40b754" - integrity sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg== + version "6.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" + integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== ajv@^6.5.3: version "6.5.5" From 1baa2a179eb41130e232c8c43c04858e6be607f7 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 23 Mar 2020 15:03:09 +0100 Subject: [PATCH 027/109] Updated instructions to setup a development environment --- CHANGELOG.md | 1 + config/application.yml.default | 6 +- config/database.yml.default | 4 +- doc/archlinux_readme.md | 17 ---- doc/development_readme.md | 119 ++++++++------------------ docker/development/docker-compose.yml | 62 ++++++++++++++ docker/development/hosts | 10 +++ 7 files changed, 113 insertions(+), 106 deletions(-) delete mode 100644 doc/archlinux_readme.md create mode 100644 docker/development/docker-compose.yml create mode 100644 docker/development/hosts diff --git a/CHANGELOG.md b/CHANGELOG.md index 73f6335e8..0c22f4b86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog Fab-manager +- Updated instructions to setup a development environment - Updated translations ## v4.3.2 2020 March 11 diff --git a/config/application.yml.default b/config/application.yml.default index 9213e4032..83d64de33 100644 --- a/config/application.yml.default +++ b/config/application.yml.default @@ -1,10 +1,10 @@ # Add application configuration variables here, as shown below. # Databases -POSTGRES_HOST: localhost +POSTGRES_HOST: fabmanager-postgres POSTGRES_PASSWORD: -REDIS_HOST: localhost -ELASTICSEARCH_HOST: localhost +REDIS_HOST: fabmanager-redis +ELASTICSEARCH_HOST: fabmanager-elastic # Stripe SECRET_KEY_BASE: 83daf5e7b80d990f037407bab78dff9904aaf3c195a50f84fa8695a22287e707dfbd9524b403b1dcf116ae1d8c06844c3d7ed942564e5b46be6ae3ead93a9d30 diff --git a/config/database.yml.default b/config/database.yml.default index 55839e171..00edc7d10 100644 --- a/config/database.yml.default +++ b/config/database.yml.default @@ -3,7 +3,7 @@ development: adapter: postgresql - host: localhost + host: fabmanager-postgres encoding: unicode database: fabmanager_development pool: 25 @@ -15,7 +15,7 @@ development: # Do not set this db to the same as development or production. test: adapter: postgresql - host: localhost + host: fabmanager-postgres encoding: unicode database: fabmanager_test pool: 25 diff --git a/doc/archlinux_readme.md b/doc/archlinux_readme.md deleted file mode 100644 index e17c964ac..000000000 --- a/doc/archlinux_readme.md +++ /dev/null @@ -1,17 +0,0 @@ -# Specific instructions concerning installation on ArchLinux - -## Ruby 2.3.0 -Ruby 2.3.0 has a known issue with openSSL version > 1.0 (which is ArchLinux default). -To overpass this problem, you must install ruby with special indication of the openSSL installation to use. - -```bash -# first, install GCC 5 from AUR (https://aur.archlinux.org/packages/gcc5/) -# you can use pacaur, yaourt or whatever you want ... -pacaur -S gcc5 -# then, install openssl-1.0 (in addition of 1.1) -sudo pacman -S openssl-1.0 -# finally, install ruby 2.3 using the bindings -CC=/usr/bin/gcc-5 PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig:/usr/lib/pkgconfig CFLAGS+=" -I/usr/include/openssl-1.0" LDFLAGS+=" -L/usr/lib/openssl-1.0 -lssl" rvm install 2.3.0 -``` - -There's also an issue with openSSL and `puma` but this is fixed by using puma version > 3. diff --git a/doc/development_readme.md b/doc/development_readme.md index 3c26c9de0..16bd6b7f4 100644 --- a/doc/development_readme.md +++ b/doc/development_readme.md @@ -5,12 +5,10 @@ This document will guide you through all the steps needed to set up a developmen ##### Table of contents 1. [General Guidelines](#general-guidelines)
-2. [PostgreSQL](#postgresql)
-2.1. [Install PostgreSQL 9.6](#setup-postgresql) +2. [PostgreSQL](#postgresql) 3. [ElasticSearch](#elasticsearch)
-3.1. [Install ElasticSearch](#setup-elasticsearch)
-3.2. [Rebuild statistics](#rebuild-stats)
-3.3. [Backup and Restore](#backup-and-restore-elasticsearch) +3.1. [Rebuild statistics](#rebuild-stats)
+3.2. [Backup and Restore](#backup-and-restore-elasticsearch) This procedure is not easy to follow so if you don't need to write some code for Fab-manager, please prefer the [docker-compose installation method](docker-compose_readme.md). @@ -19,8 +17,7 @@ This procedure is not easy to follow so if you don't need to write some code for ## General Guidelines 1. Install RVM, with the ruby version specified in the [.ruby-version file](../.ruby-version). - For more details about the process, please read the [official RVM documentation](http://rvm.io/rvm/install). - If you're using ArchLinux, you may have to [read this](archlinux_readme.md) before. + For more details about the process, please read the [official RVM documentation](http://rvm.io/rvm/install) 2. Install NVM, with the node.js version specified in the [.nvmrc file](../.nvmrc). For instructions about installing NVM, please refer to [the NVM readme](https://github.com/nvm-sh/nvm#installation-and-update). @@ -42,46 +39,55 @@ This procedure is not easy to follow so if you don't need to write some code for sudo reboot ``` -6. Create a docker network for Fab-manager. - You may have to change the network address if it is already in use. - > 🍏 If you're using MacOS, this is not required. - ```bash - docker network create --subnet=172.18.0.0/16 fabmanager - ``` - -7. Retrieve the project from Git +6. Retrieve the project from Git ```bash git clone https://github.com/sleede/fab-manager.git ``` -8. Install the software dependencies. - First install [PostgreSQL](#postgresql) and [ElasticSearch](#elasticsearch) as specified in their respective documentations (see below). - Then install the other dependencies: +7. Move into the project directory and install the docker-based dependencies. + > ⚠ If you are using MacOS X, you must *first* edit the files located in docker/development to use port binding instead of ip-based binding. + > This can be achieved by uncommenting the "port" directives and commenting the "networks" directives in the docker-compose.yml file. + > The hosts file must be modified too, accordingly. + ```bash + cd fab-manager + cat docker/development/hosts | sudo tee -a /etc/hosts + mkdir -p .docker/elasticsearch/config + cp docker/development/docker-compose.yml .docker + cp docker/elasticsearch.yml .docker/elasticsearch/config + cp docker/log4j2.properties .docker/elasticsearch/config + cd .docker + docker-compose up -d + cd - + ``` + +8. Install the other dependencies. - For Ubuntu/Debian: ```bash # on Ubuntu 18.04 server, you may have to enable the "universe" repository sudo add-apt-repository universe # then, install the dependencies - sudo apt-get install libpq-dev redis-server imagemagick + sudo apt-get install libpq-dev imagemagick ``` - For MacOS X: ```bash - brew install redis imagemagick + brew install imagemagick ``` 9. Init the RVM and NVM instances and check they were correctly configured ```bash - cd fab-manager rvm current | grep -q `cat .ruby-version`@fab-manager && echo "ok" # Must print ok nvm use node --version | grep -q `cat .nvmrc` && echo "ok" # Must print ok ``` + + If one of these commands does not print "ok", then try to input `rvm use` or `nvm use` +``` 10. Install bundler in the current RVM gemset @@ -106,8 +112,9 @@ This procedure is not easy to follow so if you don't need to write some code for ``` 13. Build the databases. - - **Warning**: **DO NOT** run `rake db:setup` instead of these commands, as this will not run some required raw SQL instructions. - - **Please note**: Your password length must be between 8 and 128 characters, otherwise db:seed will be rejected. This is configured in [config/initializers/devise.rb](config/initializers/devise.rb) + > **⚠ Warning**: **DO NOT** run `rake db:setup` instead of these commands, as this will not run some required raw SQL instructions. + + > **🛈 Please note**: Your password length must be between 8 and 128 characters, otherwise db:seed will be rejected. This is configured in [config/initializers/devise.rb](config/initializers/devise.rb) ```bash # for dev @@ -129,7 +136,7 @@ This procedure is not easy to follow so if you don't need to write some code for 15. Start the development web server ```bash - foreman s -p 3000 + foreman s -p 5000 ``` 16. You should now be able to access your local development Fab-manager instance by accessing `http://localhost:3000` in your web browser. @@ -143,77 +150,21 @@ This procedure is not easy to follow so if you don't need to write some code for ## PostgreSQL - -### Install PostgreSQL 9.6 - -We will use docker to easily install the required version of PostgreSQL. - -1. Create the docker binding folder - ```bash - mkdir -p .docker/postgresql - ``` - -2. Start the PostgreSQL container. - > 🍏 If you're using MacOS, remove the --network and --ip parameters, and add -p 5432:5432. - ```bash - docker run --restart=always -d --name fabmanager-postgres \ - -v $(pwd)/.docker/postgresql:/var/lib/postgresql/data \ - --network fabmanager --ip 172.18.0.2 \ - postgres:9.6 - ``` - -3. Configure Fab-manager to use it. - On linux systems, PostgreSQL will be available at 172.18.0.2. - On MacOS, you'll have to set the host to 127.0.0.1 (or localhost). - See [environment.md](environment.md) for more details. - -4 . Finally, you may want to have a look at detailed informations about PostgreSQL usage in Fab-manager. - Some information about that is available in the [PostgreSQL Readme](postgresql_readme.md). +Some information about PostgreSQL usage in fab-manager is available in the [PostgreSQL Readme](postgresql_readme.md). ## ElasticSearch ElasticSearch is a powerful search engine based on Apache Lucene combined with a NoSQL database used as a cache to index data and quickly process complex requests on it. -In Fab-manager, it is used for the admin's statistics module and to perform searches in projects. +In FabManager, it is used for the admin's statistics module and to perform searches in projects. - -### Install ElasticSearch - -1. Create the docker binding folders - ```bash - mkdir -p .docker/elasticsearch/config - mkdir -p .docker/elasticsearch/plugins - mkdir -p .docker/elasticsearch/backups - ``` - -2. Copy the default configuration files - ```bash - cp docker/elasticsearch.yml .docker/elasticsearch/config - cp docker/log4j2.properties .docker/elasticsearch/config - ``` - -3. Start the ElasticSearch container. - > 🍏 If you're using MacOS, remove the --network and --ip parameters, and add -p 9200:9200. - ```bash - docker run --restart=always -d --name fabmanager-elastic \ - -v $(pwd)/.docker/elasticsearch/config:/usr/share/elasticsearch/config \ - -v $(pwd)/.docker/elasticsearch:/usr/share/elasticsearch/data \ - -v $(pwd)/.docker/elasticsearch/plugins:/usr/share/elasticsearch/plugins \ - -v $(pwd)/.docker/elasticsearch/backups:/usr/share/elasticsearch/backups \ - --network fabmanager --ip 172.18.0.3 \ - elasticsearch:5.6 - ``` - -4. Configure Fab-manager to use it. - On linux systems, ElasticSearch will be available at 172.18.0.3. - On MacOS, you'll have to set the host to 127.0.0.1 (or localhost). - See [environment.md](environment.md) for more details. +The organisation if the data in the ElasticSearch database is documented in [elasticsearch.md](elasticsearch.md) ### Rebuild statistics -Every nights, the statistics for the day that just ended are built automatically at 01:00 (AM) and stored in ElastricSearch. +Every nights, the statistics for the day that just ended are built automatically at 01:00 (AM) and stored in ElasticSearch. See [schedule.yml](config/schedule.yml) to modify this behavior. If the scheduled task wasn't executed for any reason (eg. you are in a dev environment and your computer was turned off at 1 AM), you can force the statistics data generation in ElasticSearch, running the following command. diff --git a/docker/development/docker-compose.yml b/docker/development/docker-compose.yml new file mode 100644 index 000000000..e8eca948a --- /dev/null +++ b/docker/development/docker-compose.yml @@ -0,0 +1,62 @@ +version: '2' +services: + postgres: + image: postgres:9.6 + volumes: + - ${PWD}/postgresql:/var/lib/postgresql/data + restart: always + ## linux + networks: + fabmanager: + ipv4_address: 172.18.0.2 + ## osx + #ports: + # - "5432:5432" + environment: + POSTGRES_HOST_AUTH_METHOD: trust + + elasticsearch: + image: elasticsearch:5.6 + environment: + - "ES_JAVA_OPTS=-Xms512m -Xmx512m" + ulimits: + memlock: + soft: -1 + hard: -1 + volumes: + - ${PWD}/elasticsearch/config:/usr/share/elasticsearch/config + - ${PWD}/elasticsearch:/usr/share/elasticsearch/data + - ${PWD}/elasticsearch/plugins:/usr/share/elasticsearch/plugins + - ${PWD}/elasticsearch/backups:/usr/share/elasticsearch/backups + restart: always + ## linux + networks: + fabmanager: + ipv4_address: 172.18.0.3 + ## osx + #ports: + # - "9200:9200" + # - "9300:9300" + + redis: + image: redis:5 + volumes: + - ${PWD}/redis:/data + restart: always + ## linux + networks: + fabmanager: + ipv4_address: 172.18.0.4 + ## osx + #ports: + # - "6379:6379" + +## linux +networks: + fabmanager: + driver: bridge + ipam: + config: + - subnet: 172.18.0.0/16 + gateway: 172.18.0.1 + diff --git a/docker/development/hosts b/docker/development/hosts new file mode 100644 index 000000000..f69380840 --- /dev/null +++ b/docker/development/hosts @@ -0,0 +1,10 @@ +## == fab-manager == +## linux +172.18.0.4 fabmanager-redis +172.18.0.3 fabmanager-elastic +172.18.0.2 fabmanager-postgres + +## osx +# 127.0.0.1 fabmanager-redis +# 127.0.0.1 fabmanager-elastic +# 127.0.0.1 fabmanager-postgres From 284aa9e58c157534b028b9b1069645788623bce3 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 23 Mar 2020 15:24:30 +0100 Subject: [PATCH 028/109] updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c22f4b86..c9be04247 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Updated instructions to setup a development environment - Updated translations +- Fix a security issue: updated acorn to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) ## v4.3.2 2020 March 11 From d7ff1264fa29bda35ac69ca51351bd8ab19ea8c6 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 23 Mar 2020 15:57:40 +0100 Subject: [PATCH 029/109] Updated angular-translate --- CHANGELOG.md | 1 + package.json | 1 - yarn.lock | 233 +++++---------------------------------------------- 3 files changed, 23 insertions(+), 212 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9be04247..4199dba0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Updated instructions to setup a development environment - Updated translations +- Updated angular-translate - Fix a security issue: updated acorn to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) ## v4.3.2 2020 March 11 diff --git a/package.json b/package.json index 7231820f1..eb94fc4fc 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,6 @@ "jquery": ">=3.4.0", "jquery-minicolors": "^2.1.10", "medium-editor": "4.4.0", - "messageformat": "0.1.8", "moment": "2.22", "moment-timezone": "0.5", "ng-caps-lock": "https://github.com/FabioMR/ng-caps-lock.git#1.0.3", diff --git a/yarn.lock b/yarn.lock index 940df88ea..d0eb94efe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -54,14 +54,6 @@ ajv@^6.5.3: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ambi@^2.2.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/ambi/-/ambi-2.5.0.tgz#7c8e372be48891157e7cea01cb6f9143d1f74220" - integrity sha1-fI43K+SIkRV+fOoBy2+RQ9H3QiA= - dependencies: - editions "^1.1.1" - typechecker "^4.3.0" - angular-animate@1.7: version "1.7.9" resolved "https://registry.yarnpkg.com/angular-animate/-/angular-animate-1.7.9.tgz#a397f82434c1e7ed5b7a298fa70fc3de989a6785" @@ -166,26 +158,26 @@ angular-touch@1.7: integrity sha512-qNKWUnecfah4mZxG7GM96AemhXyOVcE03kg3SrWExfmyO/hQNPE50Qqyszb+1UE8GO7WiWOYn1Y5wn9CtOInqA== angular-translate-interpolation-messageformat@2.18: - version "2.18.1" - resolved "https://registry.yarnpkg.com/angular-translate-interpolation-messageformat/-/angular-translate-interpolation-messageformat-2.18.1.tgz#16c52ae0c61c240f0f24164a0521943cf8ba408e" - integrity sha512-SlmyxLB/UUy7FWoGx5QJHrhq8fUu/xzCR0h/ngexOtXZopQjs1vm+TrFZ69d4c/LI7C91sfP4mq4ES29o1xCxA== + version "2.18.2" + resolved "https://registry.yarnpkg.com/angular-translate-interpolation-messageformat/-/angular-translate-interpolation-messageformat-2.18.2.tgz#af3fa9780287d04276c130721702d62248106c7b" + integrity sha512-LzdLBiRG/5uhh5yWgsISGxAog1hFk9n1sx0JfU5WGGKam1zbl0takV2lDvu+OXoD5uOYxiJtltti3i/Ty816cA== dependencies: - angular-translate "~2.18.1" + angular-translate "~2.18.2" messageformat "~1.0.2" angular-translate-loader-partial@2.18: - version "2.18.1" - resolved "https://registry.yarnpkg.com/angular-translate-loader-partial/-/angular-translate-loader-partial-2.18.1.tgz#1f4ec31c32c3d7b4371e39682444f6a6b84f1f88" - integrity sha512-+bPzY3+F2I1tb+X5bscvZq0OGoVEVkHwPGZvaY4nhbktpshArYpvIEV+RQFUa/QNj8vQc3iQ/pruJDb8w3zIdw== + version "2.18.2" + resolved "https://registry.yarnpkg.com/angular-translate-loader-partial/-/angular-translate-loader-partial-2.18.2.tgz#86f3ff221e39ced9e62153666ae57d2269486e0b" + integrity sha512-rtLOUU8ImyWyERugDtuFck8G6fFJ9KsF3It4tgYd91JS9t8tGnarDORmUhMPF8M2wMjdgRKFDcp4nAZLHso5vA== dependencies: - angular-translate "~2.18.1" + angular-translate "~2.18.2" -angular-translate@2.18, angular-translate@~2.18.1: - version "2.18.1" - resolved "https://registry.yarnpkg.com/angular-translate/-/angular-translate-2.18.1.tgz#b29ed0d2f9bac44075e7aad3284166c59e150791" - integrity sha512-Mw0kFBqsv5j8ItL9IhRZunIlVmIRW6iFsiTmRs9wGr2QTt8z4rehYlWyHos8qnXc/kyOYJiW50iH50CSNHGB9A== +angular-translate@2.18, angular-translate@~2.18.2: + version "2.18.2" + resolved "https://registry.yarnpkg.com/angular-translate/-/angular-translate-2.18.2.tgz#2a26653d179f7043c0ffa66fdf65155d01c82e06" + integrity sha512-aAtNieh0fUv6yM6vKuWsdswT0BbOf6kvsu+QZ15Fp10rKEienMs3M8aPWyd9IVZ5pA1GaRJir6T8OvWGG4J+Fw== dependencies: - angular ">=1.2.26 <=1.7" + angular "^1.7.9" angular-ui-bootstrap@1.2.5: version "1.2.5" @@ -225,7 +217,7 @@ angular-xeditable@0.10: dependencies: angular "~1.x" -angular@1.7, "angular@>=1.2.26 <=1.7", angular@>=1.5, angular@^1.0.8, angular@~1.x: +angular@1.7, angular@>=1.5, angular@^1.0.8, angular@^1.7.9, angular@~1.x: version "1.7.9" resolved "https://registry.yarnpkg.com/angular/-/angular-1.7.9.tgz#e52616e8701c17724c3c238cfe4f9446fd570bc4" integrity sha512-5se7ZpcOtu0MBFlzGv5dsM1quQDoDeUTwZrWjGtTNA7O88cD8TEk5IEKCTDa3uECV9XnvKREVUr7du1ACiWGFQ== @@ -254,11 +246,6 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" -async@~0.2.10: - version "0.2.10" - resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" - integrity sha1-trvgsGdLnXGXCMo43owjfLUmw9E= - balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -337,13 +324,6 @@ codemirror@^4.8.0: resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-4.13.0.tgz#209772d38a7bb99647c37b500db121110dd9af6f" integrity sha1-IJdy04p7uZZHw3tQDbEhEQ3Zr28= -coffee-script@~1.7.0: - version "1.7.1" - resolved "https://registry.yarnpkg.com/coffee-script/-/coffee-script-1.7.1.tgz#62996a861780c75e6d5069d13822723b73404bfc" - integrity sha1-YplqhheAx15tUGnROCJyO3NAS/w= - dependencies: - mkdirp "~0.3.5" - color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -377,11 +357,6 @@ cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -csextends@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/csextends/-/csextends-1.2.0.tgz#6374b210984b54d4495f29c99d3dd069b80543e5" - integrity sha512-S/8k1bDTJIwuGgQYmsRoE+8P+ohV32WhQ0l4zqrc0XDdxOhjQQD7/wTZwCzoZX53jSX3V/qwjT+OkPTxWQcmjg== - d3@3.5: version "3.5.17" resolved "https://registry.yarnpkg.com/d3/-/d3-3.5.17.tgz#bc46748004378b21a360c9fc7cf5231790762fb8" @@ -421,38 +396,11 @@ doctrine@^2.1.0: dependencies: esutils "^2.0.2" -eachr@^2.0.2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/eachr/-/eachr-2.0.4.tgz#466f7caa10708f610509e32c807aafe57fc122bf" - integrity sha1-Rm98qhBwj2EFCeMsgHqv5X/BIr8= - dependencies: - typechecker "^2.0.8" - -editions@^1.1.1, editions@^1.3.3, editions@^1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/editions/-/editions-1.3.4.tgz#3662cb592347c3168eb8e498a0ff73271d67f50b" - integrity sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg== - -editions@^2.0.2: - version "2.1.0" - resolved "https://registry.yarnpkg.com/editions/-/editions-2.1.0.tgz#5c6f6341ef19ee362a3bcbb907fe68e696dbc69e" - integrity sha512-yKrimWcvOXcYXtqsOeebbMLynm9qbYVd0005wveGU2biPxJaJoxA0jtaZrxiMe3mAanLr5lxoYFVz5zjv9JdnA== - dependencies: - errlop "^1.0.3" - semver "^5.6.0" - elasticsearch-browser@3.1: version "3.1.4" resolved "https://registry.yarnpkg.com/elasticsearch-browser/-/elasticsearch-browser-3.1.4.tgz#7e7db76e96e02b8a69c7659a997df421d4035565" integrity sha1-fn23bpbgK4ppx2WamX30IdQDVWU= -errlop@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/errlop/-/errlop-1.0.3.tgz#dba29c90cf832c3d2ce469fe515d7e5eef2c6676" - integrity sha512-5VTnt0yikY4LlQEfCXVSqfE6oLj1HVM4zVSvAKMnoYjL/zrb6nqiLowZS4XlG7xENfyj7lpYWvT+wfSCr6dtlA== - dependencies: - editions "^1.3.4" - error-ex@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -634,13 +582,6 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= -extendr@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/extendr/-/extendr-2.1.0.tgz#301aa0bbea565f4d2dc8f570f2a22611a8527b56" - integrity sha1-MBqgu+pWX00tyPVw8qImEahSe1Y= - dependencies: - typechecker "~2.0.1" - external-editor@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" @@ -650,13 +591,6 @@ external-editor@^3.0.0: iconv-lite "^0.4.24" tmp "^0.0.33" -extract-opts@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/extract-opts/-/extract-opts-2.2.0.tgz#1fa28eba7352c6db480f885ceb71a46810be6d7d" - integrity sha1-H6KOunNSxttID4hc63GkaBC+bX0= - dependencies: - typechecker "~2.0.1" - fast-deep-equal@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" @@ -752,14 +686,6 @@ glob@^7.0.5, glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -glob@~3.2.8: - version "3.2.11" - resolved "https://registry.yarnpkg.com/glob/-/glob-3.2.11.tgz#4a973f635b9190f715d10987d5c00fd2815ebe3d" - integrity sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0= - dependencies: - inherits "2" - minimatch "0.3" - glob@~7.0.6: version "7.0.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a" @@ -777,7 +703,7 @@ globals@^11.7.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.9.0.tgz#bde236808e987f290768a93d065060d78e6ab249" integrity sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg== -graceful-fs@*, graceful-fs@^4.1.2: +graceful-fs@^4.1.2: version "4.1.15" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== @@ -826,19 +752,6 @@ ignore@^5.0.2: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.0.4.tgz#33168af4a21e99b00c5d41cbadb6a6cb49903a45" integrity sha512-WLsTMEhsQuXpCiG173+f3aymI43SXa+fB1rSfbzyP4GkPP+ZFVuO0/3sFUGNBtifisPeDcl/uD/Y2NxZ7xFq4g== -ignorefs@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/ignorefs/-/ignorefs-1.2.0.tgz#da59fb858976e4a5e43702ccd1f282fdbc9e5756" - integrity sha1-2ln7hYl25KXkNwLM0fKC/byeV1Y= - dependencies: - editions "^1.3.3" - ignorepatterns "^1.1.0" - -ignorepatterns@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ignorepatterns/-/ignorepatterns-1.1.0.tgz#ac8f436f2239b5dfb66d5f0d3a904a87ac67cc5e" - integrity sha1-rI9DbyI5td+2bV8NOpBKh6xnzF4= - imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -853,9 +766,9 @@ inflight@^1.0.4: wrappy "1" inherits@2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== inquirer@^6.1.0: version "6.2.0" @@ -984,11 +897,6 @@ lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba" integrity sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw== -lru-cache@2: - version "2.7.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" - integrity sha1-bUUk6LlV+V1PW1iFHOId1y+06VI= - make-plural@~3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/make-plural/-/make-plural-3.0.6.tgz#2033a03bac290b8f3bb91258f65b9df7e8b01ca7" @@ -1006,18 +914,6 @@ messageformat-parser@^1.0.0: resolved "https://registry.yarnpkg.com/messageformat-parser/-/messageformat-parser-1.1.0.tgz#13ba2250a76bbde8e0fca0dbb3475f95c594a90a" integrity sha512-Hwem6G3MsKDLS1FtBRGIs8T50P1Q00r3srS6QJePCFbad9fq0nYxwf3rnU2BreApRGhmpKMV7oZI06Sy1c9TPA== -messageformat@0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/messageformat/-/messageformat-0.1.8.tgz#d3c9e9481d008ccc28f63a13fbdac526385a0828" - integrity sha1-08npSB0AjMwo9joT+9rFJjhaCCg= - dependencies: - async "~0.2.10" - coffee-script "~1.7.0" - glob "~3.2.8" - nopt "~2.1.2" - underscore "~1.5.2" - watchr "~2.4.9" - messageformat@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/messageformat/-/messageformat-1.0.2.tgz#908f4691f29ff28dae35c45436a24cff93402388" @@ -1034,14 +930,6 @@ mimic-fn@^1.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== -minimatch@0.3: - version "0.3.0" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.3.0.tgz#275d8edaac4f1bb3326472089e7949c8394699dd" - integrity sha1-J12O2qxPG7MyZHIInnlJyDlGmd0= - dependencies: - lru-cache "2" - sigmund "~1.0.0" - minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -1055,9 +943,9 @@ minimist@0.0.8: integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== mkdirp@^0.5.1: version "0.5.1" @@ -1066,11 +954,6 @@ mkdirp@^0.5.1: dependencies: minimist "0.0.8" -mkdirp@~0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.5.tgz#de3e5f8961c88c787ee1368df849ac4413eca8d7" - integrity sha1-3j5fiWHIjHh+4TaN+EmsRBPsqNc= - moment-timezone@0.5: version "0.5.27" resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.27.tgz#73adec8139b6fe30452e78f210f27b1f346b8877" @@ -1126,13 +1009,6 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nopt@~2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-2.1.2.tgz#6cccd977b80132a07731d6e8ce58c2c8303cf9af" - integrity sha1-bMzZd7gBMqB3MdbozljCyDA8+a8= - dependencies: - abbrev "1" - nopt@~3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" @@ -1376,28 +1252,12 @@ rxjs@^6.1.0: dependencies: tslib "^1.9.0" -safefs@^3.1.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/safefs/-/safefs-3.2.2.tgz#8170c1444d7038e08caea05a374fae2fa349e15c" - integrity sha1-gXDBRE1wOOCMrqBaN0+uL6NJ4Vw= - dependencies: - graceful-fs "*" - "safer-buffer@>= 2.1.2 < 3": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -scandirectory@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/scandirectory/-/scandirectory-2.5.0.tgz#6ce03f54a090b668e3cbedbf20edf9e310593e72" - integrity sha1-bOA/VKCQtmjjy+2/IO354xBZPnI= - dependencies: - ignorefs "^1.0.0" - safefs "^3.1.2" - taskgroup "^4.0.5" - -"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: +"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.5.1: version "5.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== @@ -1414,11 +1274,6 @@ shebang-regex@^1.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= -sigmund@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" - integrity sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA= - signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -1509,14 +1364,6 @@ table@^5.0.2: slice-ansi "1.0.0" string-width "^2.1.1" -taskgroup@^4.0.5, taskgroup@^4.2.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/taskgroup/-/taskgroup-4.3.1.tgz#7de193febd768273c457730497024d512c27915a" - integrity sha1-feGT/r12gnPEV3MElwJNUSwnkVo= - dependencies: - ambi "^2.2.0" - csextends "^1.0.3" - tether@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/tether/-/tether-1.4.0.tgz#0f9fa171f75bf58485d8149e94799d7ae74d1c1a" @@ -1556,23 +1403,6 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -typechecker@^2.0.8: - version "2.1.0" - resolved "https://registry.yarnpkg.com/typechecker/-/typechecker-2.1.0.tgz#d1c2093a54ff8a19f58cff877eeaa54f2242d383" - integrity sha1-0cIJOlT/ihn1jP+HfuqlTyJC04M= - -typechecker@^4.3.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/typechecker/-/typechecker-4.6.0.tgz#d245d9c2df21147d5e2a942fff170b68ece73c87" - integrity sha512-83OrXpyP3LNr7aRbLkt2nkjE/d7q8su8/uRvrKxCpswqVCVGOgyaKpaz8/MTjQqBYe4eLNuJ44pNakFZKqyPMA== - dependencies: - editions "^2.0.2" - -typechecker@~2.0.1: - version "2.0.8" - resolved "https://registry.yarnpkg.com/typechecker/-/typechecker-2.0.8.tgz#e83da84bb64c584ccb345838576c40b0337db82e" - integrity sha1-6D2oS7ZMWEzLNFg4V2xAsDN9uC4= - ui-select@0.19: version "0.19.8" resolved "https://registry.yarnpkg.com/ui-select/-/ui-select-0.19.8.tgz#74860848a7fd8bc494d9856d2f62776ea98637c1" @@ -1583,11 +1413,6 @@ underscore@1.7: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.7.0.tgz#6bbaf0877500d36be34ecaa584e0db9fef035209" integrity sha1-a7rwh3UA02vjTsqlhODbn+8DUgk= -underscore@~1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.5.2.tgz#1335c5e4f5e6d33bbb4b006ba8c86a00f556de08" - integrity sha1-EzXF5PXm0zu7SwBrqMhqAPVW3gg= - uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" @@ -1603,20 +1428,6 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -watchr@~2.4.9: - version "2.4.13" - resolved "https://registry.yarnpkg.com/watchr/-/watchr-2.4.13.tgz#d74847bb4d6f90f61fe2c74f9f68662aa0e07601" - integrity sha1-10hHu01vkPYf4sdPn2hmKqDgdgE= - dependencies: - eachr "^2.0.2" - extendr "^2.1.0" - extract-opts "^2.2.0" - ignorefs "^1.0.0" - safefs "^3.1.2" - scandirectory "^2.5.0" - taskgroup "^4.2.0" - typechecker "^2.0.8" - which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" From a1af1a78b0a61e47a6fac9f9af0a0eaca2f29ea4 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 23 Mar 2020 16:15:06 +0100 Subject: [PATCH 030/109] do not embed dev deps in docker build + updated eslint --- CHANGELOG.md | 2 + Dockerfile | 2 +- app/assets/javascripts/controllers/members.js | 4 +- package.json | 12 +- yarn.lock | 912 +++++++++++------- 5 files changed, 580 insertions(+), 352 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4199dba0a..150c402bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,10 @@ # Changelog Fab-manager +- Docker build will no longer embed development dependencies - Updated instructions to setup a development environment - Updated translations - Updated angular-translate +- Updated eslint - Fix a security issue: updated acorn to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) ## v4.3.2 2020 March 11 diff --git a/Dockerfile b/Dockerfile index de312bfb4..04e5c8428 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,7 @@ RUN bundle install --binstubs --without development test doc WORKDIR /usr/src/app COPY package.json /usr/src/app/package.json COPY yarn.lock /usr/src/app/yarn.lock -RUN yarn install +RUN yarn install --production # Clean up build deps, cached packages and temp files RUN apk del .build-deps && \ diff --git a/app/assets/javascripts/controllers/members.js b/app/assets/javascripts/controllers/members.js index 5afb42eba..92a0232e6 100644 --- a/app/assets/javascripts/controllers/members.js +++ b/app/assets/javascripts/controllers/members.js @@ -126,7 +126,7 @@ Application.Controllers.controller('EditProfileController', ['$scope', '$rootSco * Return the group object, identified by the ID set in $scope.userGroup */ $scope.getUserGroup = function () { - for (let group of Array.from($scope.groups)) { + for (const group of Array.from($scope.groups)) { if (group.id === $scope.userGroup) { return group; } @@ -319,7 +319,7 @@ Application.Controllers.controller('ShowProfileController', ['$scope', 'memberPr */ var filterNetworks = function () { const networks = []; - for (let network of Array.from(SocialNetworks)) { + for (const network of Array.from(SocialNetworks)) { if ($scope.user.profile[network] && ($scope.user.profile[network].length > 0)) { networks.push(network); } diff --git a/package.json b/package.json index eb94fc4fc..e9d0947c2 100644 --- a/package.json +++ b/package.json @@ -17,12 +17,12 @@ }, "license": "AGPL-3.0-only", "devDependencies": { - "eslint": "^5.7.0", - "eslint-config-standard": "^12.0.0", - "eslint-plugin-import": "^2.14.0", - "eslint-plugin-node": "^8.0.0", - "eslint-plugin-promise": "^4.0.1", - "eslint-plugin-standard": "^4.0.0" + "eslint": "~6.8.0", + "eslint-config-standard": "~14.1.1", + "eslint-plugin-import": "~2.20.1", + "eslint-plugin-node": "~11.0.0", + "eslint-plugin-promise": "~4.2.1", + "eslint-plugin-standard": "~4.0.1" }, "dependencies": { "@uirouter/angularjs": "0.4", diff --git a/yarn.lock b/yarn.lock index d0eb94efe..e4587b2c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,6 +18,11 @@ esutils "^2.0.2" js-tokens "^4.0.0" +"@types/color-name@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" + integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== + "@uirouter/angularjs@0.4": version "0.4.3" resolved "https://registry.yarnpkg.com/@uirouter/angularjs/-/angularjs-0.4.3.tgz#7e2630c59b2bd69ca485ff124f53b0169edddf39" @@ -34,22 +39,22 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -acorn-jsx@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e" - integrity sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg== +acorn-jsx@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" + integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== -acorn@^6.0.2: - version "6.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" - integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== +acorn@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" + integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== -ajv@^6.5.3: - version "6.5.5" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.5.tgz#cf97cdade71c6399a92c6d6c4177381291b781a1" - integrity sha512-7q7gtRQDJSyuEHjuVgHoUa2VuemFiCMrfQc9Tc08XTAc4Zj/5U1buQJ0HU6i7fKjXU09SVgSmxa4sLvuvS8Iyg== +ajv@^6.10.0, ajv@^6.10.2: + version "6.12.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" + integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== dependencies: - fast-deep-equal "^2.0.1" + fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.4.1" uri-js "^4.2.2" @@ -222,23 +227,38 @@ angular@1.7, angular@>=1.5, angular@^1.0.8, angular@^1.7.9, angular@~1.x: resolved "https://registry.yarnpkg.com/angular/-/angular-1.7.9.tgz#e52616e8701c17724c3c238cfe4f9446fd570bc4" integrity sha512-5se7ZpcOtu0MBFlzGv5dsM1quQDoDeUTwZrWjGtTNA7O88cD8TEk5IEKCTDa3uECV9XnvKREVUr7du1ACiWGFQ== -ansi-escapes@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" - integrity sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw== +ansi-escapes@^4.2.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" + integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== + dependencies: + type-fest "^0.11.0" -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== -ansi-styles@^3.2.1: +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" +ansi-styles@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" + integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + dependencies: + "@types/color-name" "^1.1.1" + color-convert "^2.0.1" + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -246,6 +266,28 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +array-includes@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.1.tgz#cdd67e6852bdf9c1215460786732255ed2459348" + integrity sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0" + is-string "^1.0.5" + +array.prototype.flat@^1.2.1: + version "1.2.3" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz#0de82b426b0318dbfdb940089e38b043d37f6c7b" + integrity sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== + balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -271,17 +313,10 @@ builtin-modules@^1.0.0: resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= -caller-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" - integrity sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8= - dependencies: - callsites "^0.2.0" - -callsites@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" - integrity sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo= +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== chalk@^2.0.0, chalk@^2.1.0: version "2.4.1" @@ -292,6 +327,14 @@ chalk@^2.0.0, chalk@^2.1.0: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" @@ -302,17 +345,12 @@ checklist-model@0.2: resolved "https://registry.yarnpkg.com/checklist-model/-/checklist-model-0.2.4.tgz#123edfb21c338db2e9f8d5525348d9df3ce6b5a1" integrity sha1-Ej7fshwzjbLp+NVSU0jZ3zzmtaE= -circular-json@^0.3.1: - version "0.3.3" - resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" - integrity sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A== - -cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== dependencies: - restore-cursor "^2.0.0" + restore-cursor "^3.1.0" cli-width@^2.0.0: version "2.2.0" @@ -331,11 +369,23 @@ color-convert@^1.9.0: dependencies: color-name "1.1.3" +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -362,7 +412,7 @@ d3@3.5: resolved "https://registry.yarnpkg.com/d3/-/d3-3.5.17.tgz#bc46748004378b21a360c9fc7cf5231790762fb8" integrity sha1-vEZ0gAQ3iyGjYMn8fPUjF5B2L7g= -debug@^2.6.8, debug@^2.6.9: +debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -381,6 +431,13 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + doctrine@1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" @@ -389,10 +446,10 @@ doctrine@1.5.0: esutils "^2.0.2" isarray "^1.0.0" -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" - integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== dependencies: esutils "^2.0.2" @@ -401,6 +458,16 @@ elasticsearch-browser@3.1: resolved "https://registry.yarnpkg.com/elasticsearch-browser/-/elasticsearch-browser-3.1.4.tgz#7e7db76e96e02b8a69c7659a997df421d4035565" integrity sha1-fn23bpbgK4ppx2WamX30IdQDVWU= +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + error-ex@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -408,150 +475,184 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" +es-abstract@^1.17.0, es-abstract@^1.17.0-next.1: + version "1.17.5" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.5.tgz#d8c9d1d66c8981fb9200e2251d799eee92774ae9" + integrity sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg== + dependencies: + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.1.5" + is-regex "^1.0.5" + object-inspect "^1.7.0" + object-keys "^1.1.1" + object.assign "^4.1.0" + string.prototype.trimleft "^2.1.1" + string.prototype.trimright "^2.1.1" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -eslint-config-standard@^12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz#638b4c65db0bd5a41319f96bba1f15ddad2107d9" - integrity sha512-COUz8FnXhqFitYj4DTqHzidjIL/t4mumGZto5c7DrBpvWoie+Sn3P4sLEzUGeYhRElWuFEf8K1S1EfvD1vixCQ== +eslint-config-standard@~14.1.1: + version "14.1.1" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" + integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== -eslint-import-resolver-node@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a" - integrity sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q== +eslint-import-resolver-node@^0.3.2: + version "0.3.3" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz#dbaa52b6b2816b50bc6711af75422de808e98404" + integrity sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg== dependencies: debug "^2.6.9" - resolve "^1.5.0" + resolve "^1.13.1" -eslint-module-utils@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz#b270362cd88b1a48ad308976ce7fa54e98411746" - integrity sha1-snA2LNiLGkitMIl2zn+lTphBF0Y= +eslint-module-utils@^2.4.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.5.2.tgz#7878f7504824e1b857dd2505b59a8e5eda26a708" + integrity sha512-LGScZ/JSlqGKiT8OC+cYRxseMjyqt6QO54nl281CK93unD89ijSeRV6An8Ci/2nvWVKe8K/Tqdm75RQoIOCr+Q== dependencies: - debug "^2.6.8" - pkg-dir "^1.0.0" + debug "^2.6.9" + pkg-dir "^2.0.0" -eslint-plugin-es@^1.3.1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-1.4.0.tgz#475f65bb20c993fc10e8c8fe77d1d60068072da6" - integrity sha512-XfFmgFdIUDgvaRAlaXUkxrRg5JSADoRC8IkKLc/cISeR3yHVMefFHQZpcyXXEUUPHfy5DwviBcrfqlyqEwlQVw== +eslint-plugin-es@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.0.tgz#98cb1bc8ab0aa807977855e11ad9d1c9422d014b" + integrity sha512-6/Jb/J/ZvSebydwbBJO1R9E5ky7YeElfK56Veh7e4QGFHCXoIXGH9HhVz+ibJLM3XJ1XjP+T7rKBLUa/Y7eIng== dependencies: - eslint-utils "^1.3.0" - regexpp "^2.0.1" + eslint-utils "^2.0.0" + regexpp "^3.0.0" -eslint-plugin-import@^2.14.0: - version "2.14.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz#6b17626d2e3e6ad52cfce8807a845d15e22111a8" - integrity sha512-FpuRtniD/AY6sXByma2Wr0TXvXJ4nA/2/04VPlfpmUDPOpOY264x+ILiwnrk/k4RINgDAyFZByxqPUbSQ5YE7g== +eslint-plugin-import@~2.20.1: + version "2.20.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz#802423196dcb11d9ce8435a5fc02a6d3b46939b3" + integrity sha512-qQHgFOTjguR+LnYRoToeZWT62XM55MBVXObHM6SKFd1VzDcX/vqT1kAz8ssqigh5eMj8qXcRoXXGZpPP6RfdCw== dependencies: + array-includes "^3.0.3" + array.prototype.flat "^1.2.1" contains-path "^0.1.0" - debug "^2.6.8" + debug "^2.6.9" doctrine "1.5.0" - eslint-import-resolver-node "^0.3.1" - eslint-module-utils "^2.2.0" - has "^1.0.1" - lodash "^4.17.4" - minimatch "^3.0.3" - read-pkg-up "^2.0.0" - resolve "^1.6.0" - -eslint-plugin-node@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-8.0.0.tgz#fb9e8911f4543514f154bb6a5924b599aa645568" - integrity sha512-Y+ln8iQ52scz9+rSPnSWRaAxeWaoJZ4wIveDR0vLHkuSZGe44Vk1J4HX7WvEP5Cm+iXPE8ixo7OM7gAO3/OKpQ== - dependencies: - eslint-plugin-es "^1.3.1" - eslint-utils "^1.3.1" - ignore "^5.0.2" + eslint-import-resolver-node "^0.3.2" + eslint-module-utils "^2.4.1" + has "^1.0.3" minimatch "^3.0.4" - resolve "^1.8.1" - semver "^5.5.0" + object.values "^1.1.0" + read-pkg-up "^2.0.0" + resolve "^1.12.0" -eslint-plugin-promise@^4.0.1: +eslint-plugin-node@~11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.0.0.tgz#365944bb0804c5d1d501182a9bc41a0ffefed726" + integrity sha512-chUs/NVID+sknFiJzxoN9lM7uKSOEta8GC8365hw1nDfwIPIjjpRSwwPvQanWv8dt/pDe9EV4anmVSwdiSndNg== + dependencies: + eslint-plugin-es "^3.0.0" + eslint-utils "^2.0.0" + ignore "^5.1.1" + minimatch "^3.0.4" + resolve "^1.10.1" + semver "^6.1.0" + +eslint-plugin-promise@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" + integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== + +eslint-plugin-standard@~4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.0.1.tgz#2d074b653f35a23d1ba89d8e976a985117d1c6a2" - integrity sha512-Si16O0+Hqz1gDHsys6RtFRrW7cCTB6P7p3OJmKp3Y3dxpQE2qwOA7d3xnV+0mBmrPoi0RBnxlCKvqu70te6wjg== + resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz#ff0519f7ffaff114f76d1bd7c3996eef0f6e20b4" + integrity sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ== -eslint-plugin-standard@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.0.0.tgz#f845b45109c99cd90e77796940a344546c8f6b5c" - integrity sha512-OwxJkR6TQiYMmt1EsNRMe5qG3GsbjlcOhbGUBY4LtavF9DsLaTcoR+j2Tdjqi23oUwKNUqX7qcn5fPStafMdlA== - -eslint-scope@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" - integrity sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA== +eslint-scope@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" + integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== dependencies: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-utils@^1.3.0, eslint-utils@^1.3.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab" - integrity sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q== +eslint-utils@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== dependencies: - eslint-visitor-keys "^1.0.0" + eslint-visitor-keys "^1.1.0" -eslint-visitor-keys@^1.0.0: +eslint-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.0.0.tgz#7be1cc70f27a72a76cd14aa698bcabed6890e1cd" + integrity sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== -eslint@^5.7.0: - version "5.9.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.9.0.tgz#b234b6d15ef84b5849c6de2af43195a2d59d408e" - integrity sha512-g4KWpPdqN0nth+goDNICNXGfJF7nNnepthp46CAlJoJtC5K/cLu3NgCM3AHu1CkJ5Hzt9V0Y0PBAO6Ay/gGb+w== +eslint@~6.8.0: + version "6.8.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb" + integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig== dependencies: "@babel/code-frame" "^7.0.0" - ajv "^6.5.3" + ajv "^6.10.0" chalk "^2.1.0" cross-spawn "^6.0.5" debug "^4.0.1" - doctrine "^2.1.0" - eslint-scope "^4.0.0" - eslint-utils "^1.3.1" - eslint-visitor-keys "^1.0.0" - espree "^4.0.0" + doctrine "^3.0.0" + eslint-scope "^5.0.0" + eslint-utils "^1.4.3" + eslint-visitor-keys "^1.1.0" + espree "^6.1.2" esquery "^1.0.1" esutils "^2.0.2" - file-entry-cache "^2.0.0" + file-entry-cache "^5.0.1" functional-red-black-tree "^1.0.1" - glob "^7.1.2" - globals "^11.7.0" + glob-parent "^5.0.0" + globals "^12.1.0" ignore "^4.0.6" + import-fresh "^3.0.0" imurmurhash "^0.1.4" - inquirer "^6.1.0" - is-resolvable "^1.1.0" - js-yaml "^3.12.0" + inquirer "^7.0.0" + is-glob "^4.0.0" + js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" - lodash "^4.17.5" + lodash "^4.17.14" minimatch "^3.0.4" mkdirp "^0.5.1" natural-compare "^1.4.0" - optionator "^0.8.2" - path-is-inside "^1.0.2" - pluralize "^7.0.0" + optionator "^0.8.3" progress "^2.0.0" regexpp "^2.0.1" - require-uncached "^1.0.3" - semver "^5.5.1" - strip-ansi "^4.0.0" - strip-json-comments "^2.0.1" - table "^5.0.2" + semver "^6.1.2" + strip-ansi "^5.2.0" + strip-json-comments "^3.0.1" + table "^5.2.3" text-table "^0.2.0" + v8-compile-cache "^2.0.3" -espree@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-4.1.0.tgz#728d5451e0fd156c04384a7ad89ed51ff54eb25f" - integrity sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w== +espree@^6.1.2: + version "6.2.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-6.2.1.tgz#77fc72e1fd744a2052c20f38a5b575832e82734a" + integrity sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw== dependencies: - acorn "^6.0.2" - acorn-jsx "^5.0.0" - eslint-visitor-keys "^1.0.0" + acorn "^7.1.1" + acorn-jsx "^5.2.0" + eslint-visitor-keys "^1.1.0" esprima@^4.0.0: version "4.0.1" @@ -582,69 +683,64 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= -external-editor@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" - integrity sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA== +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== dependencies: chardet "^0.7.0" iconv-lite "^0.4.24" tmp "^0.0.33" -fast-deep-equal@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" - integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= +fast-deep-equal@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" + integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= -fast-levenshtein@~2.0.4: +fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= -figures@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" - integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= +figures@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== dependencies: escape-string-regexp "^1.0.5" -file-entry-cache@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" - integrity sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E= +file-entry-cache@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== dependencies: - flat-cache "^1.2.1" - object-assign "^4.0.1" + flat-cache "^2.0.1" -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -find-up@^2.0.0: +find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= dependencies: locate-path "^2.0.0" -flat-cache@^1.2.1: - version "1.3.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.4.tgz#2c2ef77525cc2929007dfffa1dd314aa9c9dee6f" - integrity sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg== +flat-cache@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== dependencies: - circular-json "^0.3.1" - graceful-fs "^4.1.2" - rimraf "~2.6.2" - write "^0.2.1" + flatted "^2.0.0" + rimraf "2.6.3" + write "1.0.3" + +flatted@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08" + integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg== font-awesome@4.3.0: version "4.3.0" @@ -674,10 +770,17 @@ functional-red-black-tree@^1.0.1: resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= -glob@^7.0.5, glob@^7.1.2: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== +glob-parent@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" + integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== + dependencies: + is-glob "^4.0.1" + +glob@^7.1.3: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -698,10 +801,12 @@ glob@~7.0.6: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^11.7.0: - version "11.9.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.9.0.tgz#bde236808e987f290768a93d065060d78e6ab249" - integrity sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg== +globals@^12.1.0: + version "12.4.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" + integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== + dependencies: + type-fest "^0.8.1" graceful-fs@^4.1.2: version "4.1.15" @@ -713,7 +818,17 @@ has-flag@^3.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= -has@^1.0.1: +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbols@^1.0.0, has-symbols@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" + integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== + +has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== @@ -747,10 +862,18 @@ ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.0.2: - version "5.0.4" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.0.4.tgz#33168af4a21e99b00c5d41cbadb6a6cb49903a45" - integrity sha512-WLsTMEhsQuXpCiG173+f3aymI43SXa+fB1rSfbzyP4GkPP+ZFVuO0/3sFUGNBtifisPeDcl/uD/Y2NxZ7xFq4g== +ignore@^5.1.1: + version "5.1.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf" + integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A== + +import-fresh@^3.0.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" + integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" imurmurhash@^0.1.4: version "0.1.4" @@ -770,23 +893,23 @@ inherits@2: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -inquirer@^6.1.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.0.tgz#51adcd776f661369dc1e894859c2560a224abdd8" - integrity sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg== +inquirer@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.1.0.tgz#1298a01859883e17c7264b82870ae1034f92dd29" + integrity sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg== dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" - cli-cursor "^2.1.0" + ansi-escapes "^4.2.1" + chalk "^3.0.0" + cli-cursor "^3.1.0" cli-width "^2.0.0" - external-editor "^3.0.0" - figures "^2.0.0" - lodash "^4.17.10" - mute-stream "0.0.7" - run-async "^2.2.0" - rxjs "^6.1.0" - string-width "^2.1.0" - strip-ansi "^4.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.15" + mute-stream "0.0.8" + run-async "^2.4.0" + rxjs "^6.5.3" + string-width "^4.1.0" + strip-ansi "^6.0.0" through "^2.3.6" is-arrayish@^0.2.1: @@ -801,20 +924,61 @@ is-builtin-module@^1.0.0: dependencies: builtin-modules "^1.0.0" +is-callable@^1.1.4, is-callable@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" + integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== + +is-date-object@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" + integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.0, is-glob@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= -is-resolvable@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" - integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== +is-regex@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" + integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== + dependencies: + has "^1.0.3" + +is-string@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" + integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== + +is-symbol@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" + integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== + dependencies: + has-symbols "^1.0.1" isarray@^1.0.0: version "1.0.0" @@ -848,7 +1012,7 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.12.0: +js-yaml@^3.13.1: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -892,10 +1056,10 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" -lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5: - version "4.17.14" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba" - integrity sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw== +lodash@^4.17.14, lodash@^4.17.15: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== make-plural@~3.0.6: version "3.0.6" @@ -925,12 +1089,12 @@ messageformat@~1.0.2: nopt "~3.0.6" reserved-words "^0.1.1" -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: +minimatch@^3.0.2, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== @@ -981,10 +1145,10 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== -mute-stream@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" - integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= +mute-stream@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== natural-compare@^1.4.0: version "1.4.0" @@ -1031,10 +1195,35 @@ nvd3@1.8: resolved "https://registry.yarnpkg.com/nvd3/-/nvd3-1.8.6.tgz#2d3eba74bf33363b5101ebf1d093c59a53ae73c4" integrity sha1-LT66dL8zNjtRAevx0JPFmlOuc8Q= -object-assign@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= +object-inspect@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" + integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== + +object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object.assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.values@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" + integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + function-bind "^1.1.1" + has "^1.0.3" once@^1.3.0: version "1.4.0" @@ -1043,24 +1232,24 @@ once@^1.3.0: dependencies: wrappy "1" -onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= +onetime@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" + integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== dependencies: - mimic-fn "^1.0.0" + mimic-fn "^2.1.0" -optionator@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" - integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= +optionator@^0.8.3: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== dependencies: deep-is "~0.1.3" - fast-levenshtein "~2.0.4" + fast-levenshtein "~2.0.6" levn "~0.3.0" prelude-ls "~1.1.2" type-check "~0.3.2" - wordwrap "~1.0.0" + word-wrap "~1.2.3" os-tmpdir@~1.0.2: version "1.0.2" @@ -1086,6 +1275,13 @@ p-try@^1.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" @@ -1093,13 +1289,6 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= - dependencies: - pinkie-promise "^2.0.0" - path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -1110,17 +1299,12 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-is-inside@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= - path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= -path-parse@^1.0.5: +path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== @@ -1137,29 +1321,12 @@ pify@^2.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - -pkg-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" - integrity sha1-ektQio1bstYp1EcFb/TpyTFM89Q= - dependencies: - find-up "^1.0.0" - -pluralize@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" - integrity sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow== + find-up "^2.1.0" prelude-ls@~1.1.2: version "1.1.2" @@ -1198,57 +1365,54 @@ regexpp@^2.0.1: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== -require-uncached@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" - integrity sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM= - dependencies: - caller-path "^0.1.0" - resolve-from "^1.0.0" +regexpp@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.0.0.tgz#dd63982ee3300e67b41c1956f850aa680d9d330e" + integrity sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g== reserved-words@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/reserved-words/-/reserved-words-0.1.2.tgz#00a0940f98cd501aeaaac316411d9adc52b31ab1" integrity sha1-AKCUD5jNUBrqqsMWQR2a3FKzGrE= -resolve-from@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" - integrity sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY= +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve@^1.5.0, resolve@^1.6.0, resolve@^1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" - integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== +resolve@^1.10.1, resolve@^1.12.0, resolve@^1.13.1: + version "1.15.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" + integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== dependencies: - path-parse "^1.0.5" + path-parse "^1.0.6" -restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== dependencies: - onetime "^2.0.0" + onetime "^5.1.0" signal-exit "^3.0.2" -rimraf@~2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" - integrity sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w== +rimraf@2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== dependencies: - glob "^7.0.5" + glob "^7.1.3" -run-async@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" - integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= +run-async@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8" + integrity sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg== dependencies: is-promise "^2.1.0" -rxjs@^6.1.0: - version "6.3.3" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz#3c6a7fa420e844a81390fb1158a9ec614f4bad55" - integrity sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw== +rxjs@^6.5.3: + version "6.5.4" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c" + integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q== dependencies: tslib "^1.9.0" @@ -1257,11 +1421,16 @@ rxjs@^6.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.5.1: +"semver@2 || 3 || 4 || 5", semver@^5.5.0: version "5.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== +semver@^6.1.0, semver@^6.1.2: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -1279,11 +1448,13 @@ signal-exit@^3.0.2: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= -slice-ansi@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" - integrity sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg== +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" spdx-correct@^3.0.0: @@ -1317,30 +1488,63 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -string-width@^2.1.0, string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== +string-width@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== dependencies: + emoji-regex "^7.0.1" is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" + strip-ansi "^5.1.0" -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= +string-width@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" + integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== dependencies: - ansi-regex "^3.0.0" + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +string.prototype.trimleft@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz#9bdb8ac6abd6d602b17a4ed321870d2f8dcefc74" + integrity sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag== + dependencies: + define-properties "^1.1.3" + function-bind "^1.1.1" + +string.prototype.trimright@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz#440314b15996c866ce8a0341894d45186200c5d9" + integrity sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g== + dependencies: + define-properties "^1.1.3" + function-bind "^1.1.1" + +strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= -strip-json-comments@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +strip-json-comments@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" + integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== summernote@0.7.3: version "0.7.3" @@ -1354,15 +1558,22 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -table@^5.0.2: - version "5.1.0" - resolved "https://registry.yarnpkg.com/table/-/table-5.1.0.tgz#69a54644f6f01ad1628f8178715b408dc6bf11f7" - integrity sha512-e542in22ZLhD/fOIuXs/8yDZ9W61ltF8daM88rkRNtgTIct+vI2fTnAyu/Db2TCfEcI8i7mjZz6meLq0nW7TYg== +supports-color@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" + integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== dependencies: - ajv "^6.5.3" - lodash "^4.17.10" - slice-ansi "1.0.0" - string-width "^2.1.1" + has-flag "^4.0.0" + +table@^5.2.3: + version "5.4.6" + resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" + integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== + dependencies: + ajv "^6.10.2" + lodash "^4.17.14" + slice-ansi "^2.1.0" + string-width "^3.0.0" tether@1.4.0: version "1.4.0" @@ -1403,6 +1614,16 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" +type-fest@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" + integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== + +type-fest@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== + ui-select@0.19: version "0.19.8" resolved "https://registry.yarnpkg.com/ui-select/-/ui-select-0.19.8.tgz#74860848a7fd8bc494d9856d2f62776ea98637c1" @@ -1420,6 +1641,11 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +v8-compile-cache@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" + integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== + validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -1435,19 +1661,19 @@ which@^1.2.9: dependencies: isexe "^2.0.0" -wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -write@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" - integrity sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c= +write@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== dependencies: mkdirp "^0.5.1" From cb68fe50cfa11d32d642c1cbcb03015c32dfaaad Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 23 Mar 2020 16:28:02 +0100 Subject: [PATCH 031/109] [security] updated mkdirp to fix cve-2020-7598 --- CHANGELOG.md | 1 + yarn.lock | 15 +++++---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 150c402bc..b53ddf923 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Updated translations - Updated angular-translate - Updated eslint +- Fix a security issue: updated mkdirp to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) - Fix a security issue: updated acorn to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) ## v4.3.2 2020 March 11 diff --git a/yarn.lock b/yarn.lock index e4587b2c4..540b24963 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1101,22 +1101,17 @@ minimatch@^3.0.2, minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - -minimist@^1.2.0: +minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.3.tgz#5a514b7179259287952881e94410ec5465659f8c" + integrity sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg== dependencies: - minimist "0.0.8" + minimist "^1.2.5" moment-timezone@0.5: version "0.5.27" From efd356965e04d69a6b57b777effd52b1f1b71653 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 23 Mar 2020 16:58:17 +0100 Subject: [PATCH 032/109] [bug] since PostgreSQL release 9.6.17, the new installations will fail to start complaining for missing password (#194) --- CHANGELOG.md | 1 + setup/docker-compose.yml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b53ddf923..553a1246b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Updated translations - Updated angular-translate - Updated eslint +- Fix a bug: since PostgreSQL release 9.6.17, the new installations will fail to start complaining for missing password (#194) - Fix a security issue: updated mkdirp to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) - Fix a security issue: updated acorn to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) diff --git a/setup/docker-compose.yml b/setup/docker-compose.yml index cb9813fc8..c6f77fd49 100644 --- a/setup/docker-compose.yml +++ b/setup/docker-compose.yml @@ -27,6 +27,8 @@ services: volumes: - ${PWD}/postgresql:/var/lib/postgresql/data restart: always + environment: + POSTGRES_HOST_AUTH_METHOD: trust elasticsearch: image: elasticsearch:5.6 From 0b54816d3d01ed0e8f04225701fc991182ef5a3e Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 23 Mar 2020 17:22:40 +0100 Subject: [PATCH 033/109] New translations en.yml (French) --- config/locales/fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/fr.yml b/config/locales/fr.yml index e04a54ba0..8fe18b1dc 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -257,7 +257,7 @@ fr: notify_member_slot_is_modified: your_reservation_slot_was_successfully_changed: "Votre créneau de réservation a bien été modifié." notify_member_subscribed_plan: - you_have_subscribed_to_PLAN_html: "Vous avez souscrit à l'abonnement %{PLAN}." + you_have_subscribed_to_PLAN_html: "You have subscribed to %{PLAN}." notify_member_subscribed_plan_is_changed: you_have_changed_your_subscription_to_PLAN_html: "Vous avez changé votre abonnement à %{PLAN}." notify_member_subscription_canceled: From 2a722f6570bb50e615472da31c77dc3ec316283b Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 23 Mar 2020 17:22:51 +0100 Subject: [PATCH 034/109] New translations en.yml (Spanish) --- config/locales/es.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/es.yml b/config/locales/es.yml index 67187fb0e..73cb7cab9 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -257,7 +257,7 @@ es: notify_member_slot_is_modified: your_reservation_slot_was_successfully_changed: "Su reserva ha sido cambiada correctamente." notify_member_subscribed_plan: - you_have_subscribed_to_PLAN_html: "Se ha suscrito tp %{PLAN}." + you_have_subscribed_to_PLAN_html: "You have subscribed to %{PLAN}." notify_member_subscribed_plan_is_changed: you_have_changed_your_subscription_to_PLAN_html: "Ha cambiado su suscripción a %{PLAN}." notify_member_subscription_canceled: From 4b4ddffcd25a81698adf3154242cfd3233bda935 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 23 Mar 2020 17:22:55 +0100 Subject: [PATCH 035/109] New translations en.yml (Portuguese) --- config/locales/pt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 01bf18932..601826155 100755 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -257,7 +257,7 @@ pt: notify_member_slot_is_modified: your_reservation_slot_was_successfully_changed: "Seu slot de reserva foi alterado com sucesso." notify_member_subscribed_plan: - you_have_subscribed_to_PLAN_html: "Você assinou %{PLAN}." + you_have_subscribed_to_PLAN_html: "You have subscribed to %{PLAN}." notify_member_subscribed_plan_is_changed: you_have_changed_your_subscription_to_PLAN_html: "Você alterou sua assinatura para %{PLAN} ." notify_member_subscription_canceled: From c3f75f5ad2289e6be5d2844dacff54a3b9a3abb5 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 23 Mar 2020 17:23:12 +0100 Subject: [PATCH 036/109] New translations en.yml (Acholi) --- config/locales/ach.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/ach.yml b/config/locales/ach.yml index 42d9408a1..1c3f07fb0 100644 --- a/config/locales/ach.yml +++ b/config/locales/ach.yml @@ -257,7 +257,7 @@ ach: notify_member_slot_is_modified: your_reservation_slot_was_successfully_changed: "crwdns3595:0crwdne3595:0" notify_member_subscribed_plan: - you_have_subscribed_to_PLAN_html: "crwdns3597:0%{PLAN}crwdne3597:0" + you_have_subscribed_to_PLAN_html: "crwdns20274:0%{PLAN}crwdne20274:0" notify_member_subscribed_plan_is_changed: you_have_changed_your_subscription_to_PLAN_html: "crwdns3599:0%{PLAN}crwdne3599:0" notify_member_subscription_canceled: From f8d315b5e5f2688582e76449b3320e716d55bf1c Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 24 Mar 2020 11:23:56 +0100 Subject: [PATCH 037/109] renamed production documentation --- CHANGELOG.md | 1 + README.md | 8 ++++---- doc/development_readme.md | 2 +- doc/{docker-compose_readme.md => production_readme.md} | 0 4 files changed, 6 insertions(+), 5 deletions(-) rename doc/{docker-compose_readme.md => production_readme.md} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 553a1246b..f03c91a8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Updated translations - Updated angular-translate - Updated eslint +- Renamed production documentation - Fix a bug: since PostgreSQL release 9.6.17, the new installations will fail to start complaining for missing password (#194) - Fix a security issue: updated mkdirp to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) - Fix a security issue: updated acorn to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) diff --git a/README.md b/README.md index 9e64b8952..9f5a1a179 100644 --- a/README.md +++ b/README.md @@ -41,16 +41,16 @@ Contributions are welcome. Please read [the contribution guidelines](CONTRIBUTIN ## Setup a production environment -To run Fab-manager as a production application, this is highly recommended to use [Docker-compose](https://docs.docker.com/compose/overview/). -The procedure to follow is described in the [docker-compose readme](doc/docker-compose_readme.md). +To run Fab-manager as a production application, you must follow the procedure described in the [production readme](doc/production_readme.md). +This procedure is using [Docker-compose](https://docs.docker.com/compose/overview/) to manage the application and its dependencies. ## Setup a development environment In you intend to run Fab-manager on your local machine to contribute to the project development, you can set it up by following the [development readme](doc/development_readme.md). -This procedure relies on docker to set-up the dependencies. +This procedure relies on [Docker-compose](https://docs.docker.com/compose/overview/) to set-up the dependencies. -Optionally, you can use a virtual development environment that relies on Vagrant and Virtual Box by following the [virtual machine instructions](virtual-machine.md). +Optionally, you can use a virtual development environment that relies on Vagrant and Virtual Box by following the [virtual machine instructions](doc/virtual-machine.md). ## Internationalization (i18n) diff --git a/doc/development_readme.md b/doc/development_readme.md index 16bd6b7f4..47e8cf8c2 100644 --- a/doc/development_readme.md +++ b/doc/development_readme.md @@ -10,7 +10,7 @@ This document will guide you through all the steps needed to set up a developmen 3.1. [Rebuild statistics](#rebuild-stats)
3.2. [Backup and Restore](#backup-and-restore-elasticsearch) -This procedure is not easy to follow so if you don't need to write some code for Fab-manager, please prefer the [docker-compose installation method](docker-compose_readme.md). +This procedure is not easy to follow so if you don't need to write some code for Fab-manager, please prefer the [production installation method](doc/production_readme.md). diff --git a/doc/docker-compose_readme.md b/doc/production_readme.md similarity index 100% rename from doc/docker-compose_readme.md rename to doc/production_readme.md From d50897c18de5bd6bf5d981ac6254eb5594119951 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 24 Mar 2020 11:38:10 +0100 Subject: [PATCH 038/109] do not setup let's encrypt if nginx is ignored --- setup/setup.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup/setup.sh b/setup/setup.sh index fd83558ca..b3dd1e5fc 100755 --- a/setup/setup.sh +++ b/setup/setup.sh @@ -81,6 +81,8 @@ config() read_domain MAIN_DOMAIN=("${DOMAINS[0]}") OTHER_DOMAINS=${DOMAINS[*]/$MAIN_DOMAIN} + else + LETSENCRYPT="n" fi } From e1a57038cc59cc0b5d67e86d901709a9d0bd2657 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 24 Mar 2020 11:49:24 +0100 Subject: [PATCH 039/109] fix wrong env variable name --- setup/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/setup.sh b/setup/setup.sh index b3dd1e5fc..9a02c1d15 100755 --- a/setup/setup.sh +++ b/setup/setup.sh @@ -215,7 +215,7 @@ configure_env_file() variables=(STRIPE_API_KEY STRIPE_PUBLISHABLE_KEY STRIPE_CURRENCY INVOICE_PREFIX FABLAB_WITHOUT_PLANS FABLAB_WITHOUT_SPACES FABLAB_WITHOUT_ONLINE_PAYMENT FABLAB_WITHOUT_INVOICES FABLAB_WITHOUT_WALLET \ PHONE_REQUIRED BOOK_SLOT_AT_SAME_TIME USER_CONFIRMATION_NEEDED_TO_SIGN_IN EVENTS_IN_CALENDAR SLOT_DURATION DEFAULT_MAIL_FROM DELIVERY_METHOD DEFAULT_HOST DEFAULT_PROTOCOL SMTP_ADDRESS SMTP_PORT SMTP_USER_NAME SMTP_PASSWORD SMTP_AUTHENTICATION \ SMTP_ENABLE_STARTTLS_AUTO SMTP_OPENSSL_VERIFY_MODE SMTP_TLS GA_ID RECAPTCHA_SITE_KEY RECAPTCHA_SECRET_KEY DISQUS_SHORTNAME TWITTER_NAME \ - FACEBOOK_APP_ID LOG_LEVEL ALLOWED_EXTENSIONS ALLOWED_MIME_TYPES MAX_IMAGE_SIZE MAX_CAO_SIZE MAX_IMPORT_SIZE DISK_SPACE_MB_ALERT FEATURE_TOUR_BEHAVIOR \ + FACEBOOK_APP_ID LOG_LEVEL ALLOWED_EXTENSIONS ALLOWED_MIME_TYPES MAX_IMAGE_SIZE MAX_CAO_SIZE MAX_IMPORT_SIZE DISK_SPACE_MB_ALERT FEATURE_TOUR_DISPLAY \ SUPERADMIN_EMAIL APP_LOCALE RAILS_LOCALE MOMENT_LOCALE SUMMERNOTE_LOCALE ANGULAR_LOCALE MESSAGEFORMAT_LOCALE FULLCALENDAR_LOCALE ELASTICSEARCH_LANGUAGE_ANALYZER TIME_ZONE \ WEEK_STARTING_DAY D3_DATE_FORMAT UIB_DATE_FORMAT EXCEL_DATE_FORMAT OPENLAB_APP_ID OPENLAB_APP_SECRET OPENLAB_DEFAULT) for variable in "${variables[@]}"; do From 226fba0b3bc5d86fb48ee9ae7787920aa80c9069 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 24 Mar 2020 12:26:43 +0100 Subject: [PATCH 040/109] better handle installation without nginx --- setup/setup.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup/setup.sh b/setup/setup.sh index 9a02c1d15..784a2ed26 100755 --- a/setup/setup.sh +++ b/setup/setup.sh @@ -50,6 +50,11 @@ system_requirements() echo -e "\e[91m[ ❌ ] $_command was not found, exiting...\e[39m" && exit 1 fi done + if ! command -v awk || ! [[ $(awk -W version) =~ ^GNU ]] + then + echo "Please install GNU Awk before running this script." + echo "\e[91m[ ❌ ] GNU awk was not found, exiting...\e[39m" && exit 1 + fi printf "\e[92m[ ✔ ] All requirements successfully checked.\e[39m \n\n" } @@ -149,6 +154,9 @@ prepare_nginx() sed -i.bak "s/MAIN_DOMAIN/${MAIN_DOMAIN[0]}/g" "$FABMANAGER_PATH/config/nginx/fabmanager.conf.ssl" sed -i.bak "s/ANOTHER_DOMAIN_1/$OTHER_DOMAINS/g" "$FABMANAGER_PATH/config/nginx/fabmanager.conf.ssl" sed -i.bak "s/URL_WITH_PROTOCOL_HTTPS/https:\/\/${MAIN_DOMAIN[0]}/g" "$FABMANAGER_PATH/config/nginx/fabmanager.conf.ssl" + else + # if nginx is not installed, remove its associated block from docker-compose.yml + awk '$1 == "nginx:"{t=1; next};t==1 && /:[[:blank:]]*$/{t=0};t != 1' docker-compose.yml > "$FABMANAGER_PATH/.awktmpfile" && mv "$FABMANAGER_PATH/.awktmpfile" "$FABMANAGER_PATH/docker-compose.yml" fi } From 85ab715b8945949239d5748361e5040488204163 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 24 Mar 2020 16:59:36 +0100 Subject: [PATCH 041/109] [bug] invalid translation keys in closing accounting period interface --- CHANGELOG.md | 1 + app/assets/javascripts/controllers/admin/invoices.js.erb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f03c91a8a..395546b2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Updated angular-translate - Updated eslint - Renamed production documentation +- Fix a bug: invalid translation keys in closing accounting period interface - Fix a bug: since PostgreSQL release 9.6.17, the new installations will fail to start complaining for missing password (#194) - Fix a security issue: updated mkdirp to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) - Fix a security issue: updated acorn to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) diff --git a/app/assets/javascripts/controllers/admin/invoices.js.erb b/app/assets/javascripts/controllers/admin/invoices.js.erb index 27a4298e1..c5bd0c3b6 100644 --- a/app/assets/javascripts/controllers/admin/invoices.js.erb +++ b/app/assets/javascripts/controllers/admin/invoices.js.erb @@ -981,7 +981,7 @@ Application.Controllers.controller('ClosePeriodModalController', ['$scope', '$ui title: _t('app.admin.invoices.confirmation_required'), msg: $sce.trustAsHtml( _t( - 'invoices.confirm_close_START_END', + 'app.admin.invoices.confirm_close_START_END', { START: moment.utc($scope.period.start_at).format('LL'), END: moment.utc($scope.period.end_at).format('LL') } ) + '

' @@ -1005,7 +1005,7 @@ Application.Controllers.controller('ClosePeriodModalController', ['$scope', '$ui function (resp) { $scope.pendingCreation = false; growl.success(_t( - 'invoices.period_START_END_closed_success', + 'app.admin.invoices.period_START_END_closed_success', { START: moment.utc(resp.start_at).format('LL'), END: moment.utc(resp.end_at).format('LL') } )); $uibModalInstance.close(resp); From 64342c9e005bd8f85d32f832163b6a2e67a5f51a Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 24 Mar 2020 17:28:55 +0100 Subject: [PATCH 042/109] [bug] missing translations for some error messages --- CHANGELOG.md | 1 + config/locales/base.ach.yml | 7 ------- config/locales/base.en.yml | 9 +-------- config/locales/base.es.yml | 7 ------- config/locales/base.fr.yml | 7 ------- config/locales/base.pt.yml | 7 ------- 6 files changed, 2 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 395546b2c..83ed383f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Renamed production documentation - Fix a bug: invalid translation keys in closing accounting period interface - Fix a bug: since PostgreSQL release 9.6.17, the new installations will fail to start complaining for missing password (#194) +- Fix a bug: missing translations for some error messages - Fix a security issue: updated mkdirp to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) - Fix a security issue: updated acorn to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) diff --git a/config/locales/base.ach.yml b/config/locales/base.ach.yml index c34b69014..fb4769c5e 100644 --- a/config/locales/base.ach.yml +++ b/config/locales/base.ach.yml @@ -3,10 +3,3 @@ ach: formats: # See http://apidock.com/ruby/DateTime/strftime for a list of available directives hour_minute: "%I:%M %p" - - errors: &errors - messages: &errors_messages - - activemodel: - errors: - <<: *errors diff --git a/config/locales/base.en.yml b/config/locales/base.en.yml index d14ddc6de..a4094d5bd 100644 --- a/config/locales/base.en.yml +++ b/config/locales/base.en.yml @@ -2,11 +2,4 @@ en: time: formats: # See http://apidock.com/ruby/DateTime/strftime for a list of available directives - hour_minute: "%I:%M %p" - - errors: &errors - messages: &errors_messages - - activemodel: - errors: - <<: *errors + hour_minute: "%I:%M %p" \ No newline at end of file diff --git a/config/locales/base.es.yml b/config/locales/base.es.yml index 129307c63..7a5f86836 100644 --- a/config/locales/base.es.yml +++ b/config/locales/base.es.yml @@ -3,10 +3,3 @@ es: formats: # See http://apidock.com/ruby/DateTime/strftime for a list of available directives hour_minute: "%I:%M %p" - - errors: &errors - messages: &errors_messages - - activemodel: - errors: - <<: *errors diff --git a/config/locales/base.fr.yml b/config/locales/base.fr.yml index d45afe2ae..f44fcc7de 100644 --- a/config/locales/base.fr.yml +++ b/config/locales/base.fr.yml @@ -3,10 +3,3 @@ fr: formats: # Liste des directives disponibles sur http://apidock.com/ruby/DateTime/strftime hour_minute: "%H:%M" - - errors: &errors - messages: &errors_messages - - activemodel: - errors: - <<: *errors diff --git a/config/locales/base.pt.yml b/config/locales/base.pt.yml index f0c6a999f..6e0add1da 100644 --- a/config/locales/base.pt.yml +++ b/config/locales/base.pt.yml @@ -3,10 +3,3 @@ pt: formats: # See http://apidock.com/ruby/DateTime/strftime for a list of available directives hour_minute: "%I:%M %p" - - errors: &errors - messages: &errors_messages - - activemodel: - errors: - <<: *errors From 5da4a9069214b3d6a722ae57428b1cc846f8d1ba Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 25 Mar 2020 12:34:33 +0100 Subject: [PATCH 043/109] [bug] invalid footprints in invoices fixtures --- CHANGELOG.md | 1 + lib/tasks/fablab/setup.rake | 4 ++-- test/fixtures/invoices.yml | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83ed383f0..94ed32207 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Fix a bug: invalid translation keys in closing accounting period interface - Fix a bug: since PostgreSQL release 9.6.17, the new installations will fail to start complaining for missing password (#194) - Fix a bug: missing translations for some error messages +- Fix a bug: invalid footprints in invoices fixtures - Fix a security issue: updated mkdirp to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) - Fix a security issue: updated acorn to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) diff --git a/lib/tasks/fablab/setup.rake b/lib/tasks/fablab/setup.rake index 7991f40c6..f017aa80a 100644 --- a/lib/tasks/fablab/setup.rake +++ b/lib/tasks/fablab/setup.rake @@ -11,7 +11,7 @@ namespace :fablab do end if AccountingPeriod.count.positive? - last_period = AccountingPeriod.order(start_at: 'DESC').first + last_period = AccountingPeriod.order(start_at: :desc).first puts "Regenerating from #{last_period.end_at}..." Invoice.where('created_at > ?', last_period.end_at).order(:id).each(&:chain_record) else @@ -29,7 +29,7 @@ namespace :fablab do end if AccountingPeriod.count.positive? - last_period = AccountingPeriod.order(start_at: 'DESC').first + last_period = AccountingPeriod.order(start_at: :desc).first puts "Regenerating from #{last_period.end_at}..." InvoiceItem.where('created_at > ?', last_period.end_at).order(:id).each(&:chain_record) else diff --git a/test/fixtures/invoices.yml b/test/fixtures/invoices.yml index 5d083af67..ac4e4e106 100644 --- a/test/fixtures/invoices.yml +++ b/test/fixtures/invoices.yml @@ -16,7 +16,7 @@ invoice_1: type: subscription_to_expire: description: - footprint: d5fc7141c282279134320a4b1db74c540a82f105a0b1f4eeff6602730ed3e745 + footprint: 8291cfc4cc4cf57eb63cb079ac952cd0ad8ca7b3e7f663f04d4c18a3c5c4ca68 environment: test operator_profile_id: 3 @@ -37,7 +37,7 @@ invoice_2: type: subscription_to_expire: description: - footprint: 1c156831c7cd1fcc1c6be8b83d60fbb9b89f84285638e87131582eb54b8a377d + footprint: 1d8d62a39bd6e230043e60ffd0429c14414f5703a60b9cba71a81f6a9dcaf894 environment: test operator_profile_id: 1 @@ -58,7 +58,7 @@ invoice_3: type: subscription_to_expire: description: - footprint: 5fa3ac2e2684f6df1440c63969b78ac24daa9207682b359f61c655d41d4c4f03 + footprint: 8fb2c1105d24ac19096d5673b02ddea11c0c8578d818fad320c85c6005dda69b environment: test operator_profile_id: 1 @@ -80,7 +80,7 @@ invoice_4: type: subscription_to_expire: description: - footprint: 6de8d985d82f2146aaa60e79882237b3bc8812521643b14498e4d498aec78613 + footprint: 4ed7cf862affb0b6e0be53cfd97da3373b51c555ef2f06c7fe2b354940f10b53 environment: test operator_profile_id: 1 @@ -101,6 +101,6 @@ invoice_5: type: subscription_to_expire: description: - footprint: a78aa3f991718f023f1c6b85b6f30aeda3f3d6b20f2d64504d29a23141db9edb + footprint: 9aead7f5eb9411778d072279a058be0fe2da76eb12f6a22100cbec1f2b3f6e9d environment: test operator_profile_id: 1 From 9ca9425ef48a2dd276d01ffbb789d5578d456cf1 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Wed, 11 Mar 2020 16:18:17 +0100 Subject: [PATCH 044/109] update to rails 5.0.7.2 --- .dockerignore | 1 + .gitignore | 1 + Gemfile | 44 +- Gemfile.lock | 465 +++++++++--------- Procfile | 2 +- app/models/auth_provider.rb | 3 +- bin/rails | 2 +- bin/setup | 29 +- bin/update | 29 ++ config/application.rb | 14 +- config/boot.rb | 5 +- config/cable.yml | 9 + config/environment.rb | 4 +- config/environments/development.rb | 45 +- config/environments/production.rb | 99 ++-- config/environments/test.rb | 13 +- .../application_controller_renderer.rb | 8 + config/initializers/cookies_serializer.rb | 6 +- config/initializers/new_framework_defaults.rb | 25 + config/initializers/wrap_parameters.rb | 4 +- config/puma.rb | 47 ++ config/routes.rb | 2 - config/spring.rb | 17 +- env.example | 103 ++++ test/integration/members/as_admin_test.rb | 23 +- test/test_helper.rb | 9 +- 26 files changed, 623 insertions(+), 386 deletions(-) create mode 100755 bin/update create mode 100644 config/cable.yml create mode 100644 config/initializers/application_controller_renderer.rb create mode 100644 config/initializers/new_framework_defaults.rb create mode 100644 config/puma.rb create mode 100644 env.example diff --git a/.dockerignore b/.dockerignore index 1342877c0..589742972 100644 --- a/.dockerignore +++ b/.dockerignore @@ -45,6 +45,7 @@ provision Dockerfile docker-compose* test +.env # Docs *.md diff --git a/.gitignore b/.gitignore index 639af2553..ad4a94f50 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ # Ignore application configurations /config/application.yml /config/database.yml +.env *.DS_Store .idea diff --git a/Gemfile b/Gemfile index 2420d2e1a..a7e7f2810 100644 --- a/Gemfile +++ b/Gemfile @@ -1,12 +1,14 @@ +# frozen_string_literal: true + source 'https://rubygems.org' -gem 'compass-rails', '2.0.4' +gem 'compass-rails', '3.0.2' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '4.2.11.1' +gem 'rails', '~> 5.0.7.2' # Use Puma as web server gem 'puma', '3.12.4' # Use SCSS for stylesheets -gem 'sass-rails', '5.0.1' +gem 'sass-rails', '~> 5.0', '>= 5.0.6' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 4.1.20' @@ -28,36 +30,35 @@ group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console # comment over to use visual debugger (eg. RubyMine), uncomment to use manual debugging # gem 'byebug' - - # Access an IRB console on exception pages or by using <%= console %> in views - gem 'web-console', '~> 2.1.3' - - # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring - gem 'spring' - - gem 'railroady' - - gem 'rubocop', '~> 0.61.1', require: false end group :development do + # Access an IRB console on exception pages or by using <%= console %> in views gem 'active_record_query_trace' gem 'awesome_print' gem 'coveralls', require: false gem 'foreman' + gem 'web-console', '>= 3.3.0' # Preview mail in the browser - gem 'mailcatcher' + gem 'listen', '~> 3.0.5' + # don't put mailcatcher into your Gemfile. It will conflict with your applications gems at some point. + # Instead, pop a note in your README stating you use mailcatcher, and to run gem install mailcatcher then mailcatcher to get started. + # gem 'mailcatcher' gem 'rb-readline' + # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring + gem 'railroady' + gem 'rubocop', '~> 0.61.1', require: false + gem 'spring' + gem 'spring-watcher-listen', '~> 2.0.0' end group :test do - gem 'byebug' gem 'database_cleaner' + gem 'dotenv-rails' gem 'faker' gem 'minitest-reporters' gem 'pdf-reader' - gem 'test_after_commit' - gem 'vcr' + gem 'vcr', '3.0.1' gem 'webmock' end @@ -79,8 +80,6 @@ gem 'rolify' gem 'kaminari' -gem 'figaro' - gem 'bootstrap-sass', '>= 3.4.1' gem 'font-awesome-rails' @@ -120,14 +119,11 @@ gem 'pundit' gem 'oj' -gem 'actionpack-page_caching' +gem 'actionpack-page_caching', '1.1.0' gem 'rails-observers' gem 'chroma' - -gem 'protected_attributes' - gem 'message_format' gem 'openlab_ruby' @@ -141,8 +137,6 @@ gem 'caxlsx' gem 'caxlsx_rails' gem 'rubyzip', '>= 1.3.0' -gem 'rack-protection', '1.5.5' - # get free disk space gem 'sys-filesystem' diff --git a/Gemfile.lock b/Gemfile.lock index 2e47bddec..b80d30bf6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,70 +1,72 @@ GEM remote: https://rubygems.org/ specs: - Ascii85 (1.0.2) - aasm (4.1.0) - actionmailer (4.2.11.1) - actionpack (= 4.2.11.1) - actionview (= 4.2.11.1) - activejob (= 4.2.11.1) + Ascii85 (1.0.3) + aasm (5.0.8) + concurrent-ruby (~> 1.0) + actioncable (5.0.7.2) + actionpack (= 5.0.7.2) + nio4r (>= 1.2, < 3.0) + websocket-driver (~> 0.6.1) + actionmailer (5.0.7.2) + actionpack (= 5.0.7.2) + actionview (= 5.0.7.2) + activejob (= 5.0.7.2) mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.11.1) - actionview (= 4.2.11.1) - activesupport (= 4.2.11.1) - rack (~> 1.6) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) + rails-dom-testing (~> 2.0) + actionpack (5.0.7.2) + actionview (= 5.0.7.2) + activesupport (= 5.0.7.2) + rack (~> 2.0) + rack-test (~> 0.6.3) + rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionpack-page_caching (1.0.2) - actionpack (>= 4.0.0, < 5) - actionview (4.2.11.1) - activesupport (= 4.2.11.1) + actionpack-page_caching (1.1.0) + actionpack (>= 4.0.0, < 6) + actionview (5.0.7.2) + activesupport (= 5.0.7.2) builder (~> 3.1) erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) + rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - active_record_query_trace (1.4) - activejob (4.2.11.1) - activesupport (= 4.2.11.1) - globalid (>= 0.3.0) - activemodel (4.2.11.1) - activesupport (= 4.2.11.1) - builder (~> 3.1) - activerecord (4.2.11.1) - activemodel (= 4.2.11.1) - activesupport (= 4.2.11.1) - arel (~> 6.0) - activesupport (4.2.11.1) - i18n (~> 0.7) + active_record_query_trace (1.7) + activejob (5.0.7.2) + activesupport (= 5.0.7.2) + globalid (>= 0.3.6) + activemodel (5.0.7.2) + activesupport (= 5.0.7.2) + activerecord (5.0.7.2) + activemodel (= 5.0.7.2) + activesupport (= 5.0.7.2) + arel (~> 7.0) + activesupport (5.0.7.2) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.5.2) - public_suffix (>= 2.0.2, < 4.0) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) afm (0.2.2) ansi (1.5.0) - api-pagination (4.3.0) - apipie-rails (0.3.6) - json - arel (6.0.4) + api-pagination (4.8.2) + apipie-rails (0.5.17) + rails (>= 4.1) + arel (7.1.4) ast (2.4.0) - autoprefixer-rails (9.4.9) + autoprefixer-rails (9.7.4) execjs - awesome_print (1.6.1) + awesome_print (1.8.0) axiom-types (0.1.1) descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) bcrypt (3.1.13) - binding_of_caller (0.7.3) - debug_inspector (>= 0.0.1) + bindex (0.8.1) bootstrap-sass (3.4.1) autoprefixer-rails (>= 5.2.1) sassc (>= 2.0.0) - builder (3.2.3) - byebug (8.2.3) - camertron-eprun (1.1.0) + builder (3.2.4) + camertron-eprun (1.1.1) carrierwave (0.10.0) activemodel (>= 3.2.0) activesupport (>= 3.2.0) @@ -78,8 +80,8 @@ GEM caxlsx_rails (0.6.2) actionpack (>= 3.1) caxlsx (>= 3.0) - chroma (0.0.1) - chunky_png (1.3.4) + chroma (0.2.0) + chunky_png (1.3.11) cldr-plurals-runtime-rb (1.0.1) coercible (1.0.0) descendants_tracker (~> 0.0.1) @@ -95,24 +97,22 @@ GEM sass (>= 3.3.0, < 3.5) compass-import-once (1.0.5) sass (>= 3.2, < 3.5) - compass-rails (2.0.4) + compass-rails (3.0.2) compass (~> 1.0.0) - sass-rails (<= 5.0.1) - sprockets (< 2.13) - concurrent-ruby (1.1.5) + sass-rails (< 5.1) + sprockets (< 4.0) + concurrent-ruby (1.1.6) connection_pool (2.2.2) - coveralls (0.8.16) + coveralls (0.8.23) json (>= 1.8, < 3) - simplecov (~> 0.12.0) - term-ansicolor (~> 1.3.0) - thor (~> 0.19.1) - tins (>= 1.6.0, < 2) + simplecov (~> 0.16.1) + term-ansicolor (~> 1.3) + thor (>= 0.19.4, < 2.0) + tins (~> 1.6) crack (0.4.3) safe_yaml (~> 1.0.0) - crass (1.0.5) - daemons (1.2.4) - database_cleaner (1.4.1) - debug_inspector (0.0.3) + crass (1.0.6) + database_cleaner (1.8.3) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) devise (4.7.1) @@ -121,13 +121,17 @@ GEM railties (>= 4.1.0) responders warden (~> 1.2.3) - docile (1.1.5) + docile (1.3.2) + dotenv (2.7.5) + dotenv-rails (2.7.5) + dotenv (= 2.7.5) + railties (>= 3.2, < 6.1) elasticsearch (5.0.5) elasticsearch-api (= 5.0.5) elasticsearch-transport (= 5.0.5) elasticsearch-api (5.0.5) multi_json - elasticsearch-model (5.0.2) + elasticsearch-model (5.1.0) activesupport (> 3) elasticsearch (~> 5) hashie @@ -138,7 +142,7 @@ GEM elasticsearch-model (~> 5) hashie virtus - elasticsearch-rails (5.0.2) + elasticsearch-rails (5.1.0) elasticsearch-transport (5.0.5) faraday multi_json @@ -146,20 +150,16 @@ GEM erubis (2.7.0) et-orbi (1.2.1) tzinfo - eventmachine (1.0.9.1) execjs (2.7.0) - faker (1.4.3) - i18n (~> 0.5) - faraday (0.17.0) + faker (2.10.2) + i18n (>= 1.6, < 2) + faraday (1.0.0) multipart-post (>= 1.2, < 3) - ffi (1.9.24) - figaro (1.1.0) - thor (~> 0.14) - font-awesome-rails (4.6.3.0) - railties (>= 3.2, < 5.1) - foreman (0.78.0) - thor (~> 0.19.1) - forgery (0.6.0) + ffi (1.12.2) + font-awesome-rails (4.7.0.5) + railties (>= 3.2, < 6.1) + foreman (0.87.0) + forgery (0.7.0) friendly_id (5.1.0) activerecord (>= 4.0.0) fugit (1.3.1) @@ -169,58 +169,63 @@ GEM activesupport (>= 4.2.0) has_secure_token (1.0.0) activerecord (>= 3.0) - hashdiff (0.3.0) + hashdiff (1.0.1) hashery (2.1.2) - hashie (3.6.0) - hike (1.2.3) + hashie (4.1.0) htmlentities (4.3.4) - httparty (0.13.7) - json (~> 1.8) + httparty (0.18.0) + mime-types (~> 3.0) multi_xml (>= 0.5.2) - i18n (0.9.5) + i18n (1.8.2) concurrent-ruby (~> 1.0) icalendar (2.5.3) ice_cube (~> 0.16) ice_cube (0.16.3) ice_nine (0.11.2) - jaro_winkler (1.5.1) - jbuilder (2.5.0) - activesupport (>= 3.0.0, < 5.1) - multi_json (~> 1.2) - jbuilder_cache_multi (0.0.3) + jaro_winkler (1.5.4) + jbuilder (2.10.0) + activesupport (>= 5.0.0) + jbuilder_cache_multi (0.1.0) jbuilder (>= 1.5.0, < 3) - jquery-rails (4.3.1) + jquery-rails (4.3.5) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) json (1.8.6) jwt (2.2.1) - kaminari (0.16.3) - actionpack (>= 3.0.0) - activesupport (>= 3.0.0) + kaminari (1.2.0) + activesupport (>= 4.1.0) + kaminari-actionview (= 1.2.0) + kaminari-activerecord (= 1.2.0) + kaminari-core (= 1.2.0) + kaminari-actionview (1.2.0) + actionview + kaminari-core (= 1.2.0) + kaminari-activerecord (1.2.0) + activerecord + kaminari-core (= 1.2.0) + kaminari-core (1.2.0) libv8 (3.16.14.19) - loofah (2.3.1) + listen (3.0.8) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + loofah (2.4.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - mailcatcher (0.6.5) - eventmachine (= 1.0.9.1) - mail (~> 2.3) - rack (~> 1.5) - sinatra (~> 1.2) - skinny (~> 0.2.3) - sqlite3 (~> 1.3) - thin (~> 1.5.0) - message_format (0.0.3) - twitter_cldr (~> 3.1) - mime-types (2.99.3) + message_format (0.0.6) + twitter_cldr (~> 5.0) + method_source (0.9.2) + mime-types (3.3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2019.1009) mimemagic (0.3.4) - mini_magick (4.9.4) + mini_magick (4.10.1) mini_mime (1.0.2) mini_portile2 (2.4.0) - minitest (5.12.2) - minitest-reporters (1.1.8) + minitest (5.14.0) + minitest-reporters (1.4.2) ansi builder minitest (>= 5.0) @@ -228,21 +233,24 @@ GEM multi_json (1.14.1) multi_xml (0.6.0) multipart-post (2.1.1) - nokogiri (1.10.8) + mustermann (1.1.1) + ruby2_keywords (~> 0.0.1) + nio4r (2.5.2) + nokogiri (1.10.9) mini_portile2 (~> 2.4.0) notify_with (0.0.2) jbuilder (~> 2.0) rails (>= 4.2.0) responders (~> 2.0) - oauth2 (1.4.2) + oauth2 (1.4.4) faraday (>= 0.8, < 2.0) jwt (>= 1.0, < 3.0) multi_json (~> 1.3) multi_xml (~> 0.5) rack (>= 1.2, < 3) - oj (2.12.8) - omniauth (1.9.0) - hashie (>= 3.4.6, < 3.7.0) + oj (3.10.5) + omniauth (1.9.1) + hashie (>= 3.4.6) rack (>= 1.6.2, < 3) omniauth-oauth2 (1.6.0) oauth2 (~> 1.1) @@ -253,71 +261,69 @@ GEM openlab_ruby (0.0.4) httparty (~> 0.13) orm_adapter (0.5.0) - parallel (1.12.1) - parser (2.5.3.0) + parallel (1.19.1) + parser (2.7.0.4) ast (~> 2.4.0) - pdf-core (0.5.1) - pdf-reader (1.4.0) + pdf-core (0.7.0) + pdf-reader (2.4.0) Ascii85 (~> 1.0.0) afm (~> 0.2.1) hashery (~> 2.0) ruby-rc4 ttfunk - pg (0.18.1) + pg (1.2.2) powerpack (0.1.2) - prawn (2.0.1) - pdf-core (~> 0.5.1) - ttfunk (~> 1.4.0) - prawn-table (0.2.1) - protected_attributes (1.1.3) - activemodel (>= 4.0.1, < 5.0) - public_suffix (3.0.2) + prawn (2.2.2) + pdf-core (~> 0.7.0) + ttfunk (~> 1.5) + prawn-table (0.2.2) + prawn (>= 1.3.0, < 3.0.0) + public_suffix (4.0.3) puma (3.12.4) - pundit (1.0.0) + pundit (2.1.0) activesupport (>= 3.0.0) raabro (1.1.6) - rack (1.6.13) - rack-protection (1.5.5) + rack (2.2.2) + rack-protection (2.0.8.1) rack rack-test (0.6.3) rack (>= 1.0) railroady (1.5.3) - rails (4.2.11.1) - actionmailer (= 4.2.11.1) - actionpack (= 4.2.11.1) - actionview (= 4.2.11.1) - activejob (= 4.2.11.1) - activemodel (= 4.2.11.1) - activerecord (= 4.2.11.1) - activesupport (= 4.2.11.1) - bundler (>= 1.3.0, < 2.0) - railties (= 4.2.11.1) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.9) - activesupport (>= 4.2.0, < 5.0) - nokogiri (~> 1.6) - rails-deprecated_sanitizer (>= 1.0.1) + rails (5.0.7.2) + actioncable (= 5.0.7.2) + actionmailer (= 5.0.7.2) + actionpack (= 5.0.7.2) + actionview (= 5.0.7.2) + activejob (= 5.0.7.2) + activemodel (= 5.0.7.2) + activerecord (= 5.0.7.2) + activesupport (= 5.0.7.2) + bundler (>= 1.3.0) + railties (= 5.0.7.2) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - rails-observers (0.1.2) - activemodel (~> 4.0) + rails-observers (0.1.5) + activemodel (>= 4.0) rails_12factor (0.0.3) rails_serve_static_assets rails_stdout_logging - rails_serve_static_assets (0.0.4) - rails_stdout_logging (0.0.3) - railties (4.2.11.1) - actionpack (= 4.2.11.1) - activesupport (= 4.2.11.1) + rails_serve_static_assets (0.0.5) + rails_stdout_logging (0.0.5) + railties (5.0.7.2) + actionpack (= 5.0.7.2) + activesupport (= 5.0.7.2) + method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (3.0.0) - rake (13.0.0) - rb-fsevent (0.9.4) - rb-inotify (0.9.5) - ffi (>= 0.5.0) + rake (13.0.1) + rb-fsevent (0.10.3) + rb-inotify (0.10.1) + ffi (~> 1.0) rb-readline (0.5.5) rdoc (4.3.0) recurrence (1.3.0) @@ -327,10 +333,11 @@ GEM redis-namespace (1.6.0) redis (>= 3.0.4) ref (2.0.0) - repost (0.2.9) - responders (2.1.0) - railties (>= 4.2.0, < 5) - rolify (4.0.0) + repost (0.3.2) + responders (2.4.1) + actionpack (>= 4.2.0, < 6.0) + railties (>= 4.2.0, < 6.0) + rolify (5.2.0) rubocop (0.61.1) jaro_winkler (~> 1.5.1) parallel (~> 1.10) @@ -339,130 +346,126 @@ GEM rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.4.0) - ruby-progressbar (1.7.5) + ruby-progressbar (1.10.1) ruby-rc4 (0.1.5) + ruby2_keywords (0.0.2) rubyzip (1.3.0) - safe_yaml (1.0.4) - sass (3.4.13) - sass-rails (5.0.1) - railties (>= 4.0.0, < 5.0) + safe_yaml (1.0.5) + sass (3.4.25) + sass-rails (5.0.7) + railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) - tilt (~> 1.1) - sassc (2.0.0) - ffi (~> 1.9.6) - rake - sdoc (0.4.1) + tilt (>= 1.1, < 3) + sassc (2.2.1) + ffi (~> 1.9) + sdoc (0.4.2) json (~> 1.7, >= 1.7.7) rdoc (~> 4.0) - seed_dump (3.2.2) - activerecord (~> 4) - activesupport (~> 4) + seed_dump (3.3.1) + activerecord (>= 4) + activesupport (>= 4) sha3 (1.0.1) - sidekiq (5.2.8) + sidekiq (5.2.7) connection_pool (~> 2.2, >= 2.2.2) - rack (< 2.1.0) + rack (>= 1.5.0) rack-protection (>= 1.5.0) redis (>= 3.3.5, < 5) sidekiq-cron (1.1.0) fugit (~> 1.1) sidekiq (>= 4.2.1) - simplecov (0.12.0) - docile (~> 1.1.0) + simplecov (0.16.1) + docile (~> 1.1) json (>= 1.8, < 3) simplecov-html (~> 0.10.0) - simplecov-html (0.10.0) - sinatra (1.4.6) - rack (~> 1.4) - rack-protection (~> 1.4) - tilt (>= 1.3, < 3) - skinny (0.2.4) - eventmachine (~> 1.0.0) - thin (>= 1.5, < 1.7) - spring (1.3.5) - sprockets (2.12.5) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.3.3) - actionpack (>= 3.0) - activesupport (>= 3.0) - sprockets (>= 2.8, < 4.0) - sqlite3 (1.3.13) + simplecov-html (0.10.2) + sinatra (2.0.8.1) + mustermann (~> 1.0) + rack (~> 2.0) + rack-protection (= 2.0.8.1) + tilt (~> 2.0) + spring (2.0.2) + activesupport (>= 4.2) + spring-watcher-listen (2.0.1) + listen (>= 2.7, < 4.0) + spring (>= 1.2, < 3.0) + sprockets (3.7.2) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.2.1) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) stripe (5.1.1) - sys-filesystem (1.2.0) + sync (0.5.0) + sys-filesystem (1.3.3) ffi - term-ansicolor (1.3.2) + term-ansicolor (1.7.1) tins (~> 1.0) - test_after_commit (1.0.0) - activerecord (>= 3.2) therubyracer (0.12.0) libv8 (~> 3.16.14.0) ref - thin (1.5.1) - daemons (>= 1.0.9) - eventmachine (>= 0.12.6) - rack (>= 1.0.0) - thor (0.19.4) + thor (1.0.1) thread_safe (0.3.6) - tilt (1.4.1) - tins (1.13.0) - ttfunk (1.4.0) - twitter_cldr (3.2.1) + tilt (2.0.10) + tins (1.24.1) + sync + ttfunk (1.5.1) + twitter_cldr (5.4.0) camertron-eprun - cldr-plurals-runtime-rb (~> 1.0.0) - json + cldr-plurals-runtime-rb (~> 1.0) tzinfo - tzinfo (1.2.5) + tzinfo (1.2.6) thread_safe (~> 0.1) - uglifier (4.1.20) + uglifier (4.2.0) execjs (>= 0.3.0, < 3) - unicode-display_width (1.4.0) + unicode-display_width (1.4.1) vcr (3.0.1) virtus (1.0.5) axiom-types (~> 0.1) coercible (~> 1.0) descendants_tracker (~> 0.0, >= 0.0.3) equalizer (~> 0.0, >= 0.0.9) - warden (1.2.7) - rack (>= 1.0) - web-console (2.1.3) - activemodel (>= 4.0) - binding_of_caller (>= 0.7.2) - railties (>= 4.0) - sprockets-rails (>= 2.0, < 4.0) - webmock (1.24.2) + warden (1.2.8) + rack (>= 2.0.6) + web-console (3.7.0) + actionview (>= 5.0) + activemodel (>= 5.0) + bindex (>= 0.4.0) + railties (>= 5.0) + webmock (3.8.2) addressable (>= 2.3.6) crack (>= 0.3.2) - hashdiff + hashdiff (>= 0.4.0, < 2.0.0) + websocket-driver (0.6.5) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.4) PLATFORMS ruby DEPENDENCIES aasm - actionpack-page_caching + actionpack-page_caching (= 1.1.0) active_record_query_trace api-pagination apipie-rails awesome_print bootstrap-sass (>= 3.4.1) - byebug carrierwave caxlsx caxlsx_rails chroma - compass-rails (= 2.0.4) + compass-rails (= 3.0.2) coveralls database_cleaner devise (>= 4.6.0) + dotenv-rails elasticsearch-model (~> 5) elasticsearch-persistence (~> 5) elasticsearch-rails (~> 5) faker - figaro font-awesome-rails foreman forgery @@ -473,7 +476,7 @@ DEPENDENCIES jbuilder_cache_multi jquery-rails kaminari - mailcatcher + listen (~> 3.0.5) message_format mini_magick minitest-reporters @@ -487,12 +490,10 @@ DEPENDENCIES pg prawn prawn-table - protected_attributes puma (= 3.12.4) pundit - rack-protection (= 1.5.5) railroady - rails (= 4.2.11.1) + rails (~> 5.0.7.2) rails-observers rails_12factor rb-readline @@ -503,7 +504,7 @@ DEPENDENCIES rolify rubocop (~> 0.61.1) rubyzip (>= 1.3.0) - sass-rails (= 5.0.1) + sass-rails (~> 5.0, >= 5.0.6) sdoc (~> 0.4.0) seed_dump sha3 @@ -511,13 +512,13 @@ DEPENDENCIES sidekiq-cron sinatra spring + spring-watcher-listen (~> 2.0.0) stripe (= 5.1.1) sys-filesystem - test_after_commit therubyracer (= 0.12.0) uglifier (>= 4.1.20) - vcr - web-console (~> 2.1.3) + vcr (= 3.0.1) + web-console (>= 3.3.0) webmock BUNDLED WITH diff --git a/Procfile b/Procfile index ffe497c23..66b40ebd4 100644 --- a/Procfile +++ b/Procfile @@ -1,3 +1,3 @@ web: bundle exec rails server puma -p $PORT -b0.0.0.0 worker: bundle exec sidekiq -C ./config/sidekiq.yml -mail: bundle exec mailcatcher --foreground --http-ip=0.0.0.0 +mail: mailcatcher --foreground --http-ip=0.0.0.0 diff --git a/app/models/auth_provider.rb b/app/models/auth_provider.rb index 25df71439..1440d2d8b 100644 --- a/app/models/auth_provider.rb +++ b/app/models/auth_provider.rb @@ -16,7 +16,8 @@ class AuthProvider < ActiveRecord::Base belongs_to :providable, polymorphic: true, dependent: :destroy accepts_nested_attributes_for :providable - attr_accessible :name, :providable_type, :providable_attributes + # add gem 'protected_attributes_continued' for Rails 5+ + # attr_accessible :name, :providable_type, :providable_attributes before_create :set_initial_state diff --git a/bin/rails b/bin/rails index 5191e6927..073966023 100755 --- a/bin/rails +++ b/bin/rails @@ -1,4 +1,4 @@ #!/usr/bin/env ruby -APP_PATH = File.expand_path('../../config/application', __FILE__) +APP_PATH = File.expand_path('../config/application', __dir__) require_relative '../config/boot' require 'rails/commands' diff --git a/bin/setup b/bin/setup index acdb2c138..e620b4dad 100755 --- a/bin/setup +++ b/bin/setup @@ -1,29 +1,34 @@ #!/usr/bin/env ruby require 'pathname' +require 'fileutils' +include FileUtils # path to your application root. -APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) -Dir.chdir APP_ROOT do +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +chdir APP_ROOT do # This script is a starting point to setup your application. - # Add necessary setup steps to this file: + # Add necessary setup steps to this file. - puts "== Installing dependencies ==" - system "gem install bundler --conservative" - system "bundle check || bundle install" + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') # puts "\n== Copying sample files ==" - # unless File.exist?("config/database.yml") - # system "cp config/database.yml.sample config/database.yml" + # unless File.exist?('config/database.yml') + # cp 'config/database.yml.sample', 'config/database.yml' # end puts "\n== Preparing database ==" - system "bin/rake db:setup" + system! 'bin/rails db:setup' puts "\n== Removing old logs and tempfiles ==" - system "rm -f log/*" - system "rm -rf tmp/cache" + system! 'bin/rails log:clear tmp:clear' puts "\n== Restarting application server ==" - system "touch tmp/restart.txt" + system! 'bin/rails restart' end diff --git a/bin/update b/bin/update new file mode 100755 index 000000000..a8e4462f2 --- /dev/null +++ b/bin/update @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +require 'pathname' +require 'fileutils' +include FileUtils + +# path to your application root. +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +chdir APP_ROOT do + # This script is a way to update your development environment automatically. + # Add necessary update steps to this file. + + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') + + puts "\n== Updating database ==" + system! 'bin/rails db:migrate' + + puts "\n== Removing old logs and tempfiles ==" + system! 'bin/rails log:clear tmp:clear' + + puts "\n== Restarting application server ==" + system! 'bin/rails restart' +end diff --git a/config/application.rb b/config/application.rb index f5c256615..d36275f44 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,13 +1,12 @@ # frozen_string_literal: true -require File.expand_path('../boot', __FILE__) +require_relative 'boot' require 'csv' require 'rails/all' require 'elasticsearch/rails/instrumentation' require 'elasticsearch/persistence/model' - # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) @@ -33,17 +32,16 @@ module Fablab config.assets.paths << Rails.root.join('node_modules').to_s - # Do not swallow errors in after_commit/after_rollback callbacks. - config.active_record.raise_in_transactional_callbacks = true - config.to_prepare do Devise::Mailer.layout 'notifications_mailer' end # allow use rails helpers in angular templates - Rails.application.assets.context_class.class_eval do - include ActionView::Helpers - include Rails.application.routes.url_helpers + Rails.application.config.assets.configure do |env| + env.context_class.class_eval do + include ActionView::Helpers + include Rails.application.routes.url_helpers + end end config.active_job.queue_adapter = :sidekiq diff --git a/config/boot.rb b/config/boot.rb index 5e5f0c1fa..30f5120df 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,4 +1,3 @@ -# Set up gems listed in the Gemfile. -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) -require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) +require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/config/cable.yml b/config/cable.yml new file mode 100644 index 000000000..0bbde6f74 --- /dev/null +++ b/config/cable.yml @@ -0,0 +1,9 @@ +development: + adapter: async + +test: + adapter: async + +production: + adapter: redis + url: redis://localhost:6379/1 diff --git a/config/environment.rb b/config/environment.rb index 3fa662183..426333bb4 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,7 +1,5 @@ -# frozen_string_literal: true - # Load the Rails application. -require File.expand_path('../application', __FILE__) +require_relative 'application' # Initialize the Rails application. Rails.application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index 0d041cbfb..49ecfb457 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -11,9 +11,22 @@ Rails.application.configure do # Do not eager load code on boot. config.eager_load = false - # Show full error reports and disable caching. - config.consider_all_requests_local = true - config.action_controller.perform_caching = true + # Show full error reports. + config.consider_all_requests_local = true + + # Enable/disable caching. By default caching is disabled. + if Rails.root.join('tmp/caching-dev.txt').exist? + config.action_controller.perform_caching = true + + config.cache_store = :memory_store + config.public_file_server.headers = { + 'Cache-Control' => 'public, max-age=172800' + } + else + config.action_controller.perform_caching = false + + config.cache_store = :null_store + end config.action_controller.default_url_options = { host: Rails.application.secrets.default_host, @@ -23,6 +36,16 @@ Rails.application.configure do # 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.delivery_method = :smtp + config.action_mailer.smtp_settings = { address: '127.0.0.1', port: 1025 } + config.action_mailer.raise_delivery_errors = false + config.action_mailer.default_url_options = { + host: Rails.application.secrets.default_host, + protocol: Rails.application.secrets.default_protocol + } + # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log @@ -32,13 +55,15 @@ Rails.application.configure do # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. - # Set to false when running with Vagrant to speed up response time. - config.assets.debug = ENV['VIRTUAL_DEV_ENV'] ? false : true + config.assets.debug = true # Asset digests allow you to set far-future HTTP expiration dates on all assets, # yet still be able to expire them through the digest params. config.assets.digest = false + # Suppress logger output for asset requests. + config.assets.quiet = true + # Adds additional error checking when serving assets at runtime. # Checks for improperly declared sprockets dependencies. # Raises helpful error messages. @@ -47,13 +72,9 @@ Rails.application.configure do # Raises error for missing translations # config.action_view.raise_on_missing_translations = true - config.action_mailer.delivery_method = :smtp - config.action_mailer.smtp_settings = { address: '127.0.0.1', port: 1025 } - config.action_mailer.raise_delivery_errors = false - config.action_mailer.default_url_options = { - host: Rails.application.secrets.default_host, - protocol: Rails.application.secrets.default_protocol - } + # Use an evented file watcher to asynchronously detect changes in source code, + # routes, locales, etc. This feature depends on the listen gem. + # config.file_watcher = ActiveSupport::EventedFileUpdateChecker config.log_level = Rails.application.secrets.log_level || :debug end diff --git a/config/environments/production.rb b/config/environments/production.rb index 65d152210..db94dcabe 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -21,17 +21,13 @@ Rails.application.configure do protocol: Rails.application.secrets.default_protocol } - # Enable Rack::Cache to put a simple HTTP cache in front of your application - # Add `rack-cache` to your Gemfile before enabling this. - # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. - # config.action_dispatch.rack_cache = true - - # Disable Rails's static asset server (Apache or nginx will already do this). - config.serve_static_files = false + # 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? # Compress JavaScripts and CSS. We disable variable name mangling and enable ES6 support + # config.assets.js_compressor = :uglifier config.assets.js_compressor = Uglifier.new(mangle: false, harmony: true) - # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. @@ -40,34 +36,58 @@ Rails.application.configure do # Generate digests for assets URLs. config.assets.digest = true - # Version of your assets, change this if you want to expire all your assets. - config.assets.version = '1.0' + # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.action_controller.asset_host = 'http://assets.example.com' # Specifies the header that your server uses for sending files. - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx + # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache + # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + + # Mount Action Cable outside main process or domain + # config.action_cable.mount_path = nil + # config.action_cable.url = 'wss://example.com/cable' + # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true - # Set to :debug to see everything in the log. + # Use the lowest log level to ensure availability of diagnostic information + # when problems arise. + # config.log_level = :debug config.log_level = Rails.application.secrets.log_level.blank? ? :debug : Rails.application.secrets.log_level # Prepend all log lines with the following tags. - # config.log_tags = [ :subdomain, :uuid ] - - # Use a different logger for distributed setups. - # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) + # config.log_tags = [ :request_id ] # Use a different cache store in production. # config.cache_store = :mem_cache_store - # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.asset_host = "http://assets.example.com" + # Use a real queuing backend for Active Job (and separate queues per environment) + # config.active_job.queue_adapter = :resque + # config.active_job.queue_name_prefix = "fablab_#{Rails.env}" + config.action_mailer.perform_caching = false - # Precompile additional assets. - # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. - # config.assets.precompile += %w( search.js ) + config.action_mailer.default_url_options = { + host: Rails.application.secrets.default_host, + protocol: Rails.application.secrets.default_protocol + } + # config.action_mailer.perform_deliveries = true + # config.action_mailer.raise_delivery_errors = false + # config.action_mailer.default :charset => "utf-8" + config.action_mailer.smtp_settings = { + address: Rails.application.secrets.smtp_address, + port: Rails.application.secrets.smtp_port, + user_name: Rails.application.secrets.smtp_user_name, + password: Rails.application.secrets.smtp_password, + authentication: Rails.application.secrets.smtp_authentication, + enable_starttls_auto: Rails.application.secrets.smtp_enable_starttls_auto, + openssl_verify_mode: Rails.application.secrets.smtp_openssl_verify_mode, + tls: Rails.application.secrets.smtp_tls + } + # use :smtp for switch prod + config.action_mailer.delivery_method = Rails.application.secrets.delivery_method.to_sym # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. @@ -80,34 +100,19 @@ Rails.application.configure do # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify - # Disable automatic flushing of the log to improve performance. - # config.autoflush_log = false - # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new - # config.serve_static_assets = true + # Use a different logger for distributed setups. + # require 'syslog/logger' + # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') - config.action_mailer.default_url_options = { - host: Rails.application.secrets.default_host, - protocol: Rails.application.secrets.default_protocol - } - # config.action_mailer.perform_deliveries = true - # config.action_mailer.raise_delivery_errors = false - # config.action_mailer.default :charset => "utf-8" - - config.action_mailer.smtp_settings = { - address: Rails.application.secrets.smtp_address, - port: Rails.application.secrets.smtp_port, - user_name: Rails.application.secrets.smtp_user_name, - password: Rails.application.secrets.smtp_password, - authentication: Rails.application.secrets.smtp_authentication, - enable_starttls_auto: Rails.application.secrets.smtp_enable_starttls_auto, - openssl_verify_mode: Rails.application.secrets.smtp_openssl_verify_mode, - tls: Rails.application.secrets.smtp_tls - } - - # use :smtp for switch prod - config.action_mailer.delivery_method = Rails.application.secrets.delivery_method.to_sym + if ENV['RAILS_LOG_TO_STDOUT'].present? + logger = ActiveSupport::Logger.new(STDOUT) + logger.formatter = config.log_formatter + config.logger = ActiveSupport::TaggedLogging.new(logger) + end + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false end diff --git a/config/environments/test.rb b/config/environments/test.rb index b8e1a562c..43183c679 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -14,9 +14,11 @@ Rails.application.configure do # preloads Rails for running tests, you may have to set it to true. config.eager_load = false - # Configure static asset server for tests with Cache-Control for performance. - config.serve_static_files = true - config.static_cache_control = 'public, max-age=3600' + # Configure public file server for tests with Cache-Control for performance. + config.public_file_server.enabled = true + config.public_file_server.headers = { + 'Cache-Control' => 'public, max-age=3600' + } # Show full error reports and disable caching. config.consider_all_requests_local = true @@ -32,21 +34,20 @@ Rails.application.configure do # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false + config.action_mailer.perform_caching = false # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test - config.active_job.queue_adapter = :test - # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr # Raises error for missing translations # config.action_view.raise_on_missing_translations = true + config.active_job.queue_adapter = :test config.active_support.test_order = :random - config.log_level = Rails.application.secrets.log_level.blank? ? :debug : Rails.application.secrets.log_level end diff --git a/config/initializers/application_controller_renderer.rb b/config/initializers/application_controller_renderer.rb new file mode 100644 index 000000000..89d2efab2 --- /dev/null +++ b/config/initializers/application_controller_renderer.rb @@ -0,0 +1,8 @@ +# Be sure to restart your server when you modify this file. + +# ActiveSupport::Reloader.to_prepare do +# ApplicationController.renderer.defaults.merge!( +# http_host: 'example.org', +# https: false +# ) +# end diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb index 7a06a89f0..ee8dff9c9 100644 --- a/config/initializers/cookies_serializer.rb +++ b/config/initializers/cookies_serializer.rb @@ -1,3 +1,7 @@ +# frozen_string_literal: true + # Be sure to restart your server when you modify this file. -Rails.application.config.action_dispatch.cookies_serializer = :json \ No newline at end of file +# Specify a serializer for the signed and encrypted cookie jars. +# Valid options are :json, :marshal, and :hybrid. +Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb new file mode 100644 index 000000000..cbf423a81 --- /dev/null +++ b/config/initializers/new_framework_defaults.rb @@ -0,0 +1,25 @@ +# Be sure to restart your server when you modify this file. +# +# This file contains migration options to ease your Rails 5.0 upgrade. +# +# Once upgraded flip defaults one by one to migrate to the new default. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. + +Rails.application.config.action_controller.raise_on_unfiltered_parameters = true + +# Enable per-form CSRF tokens. Previous versions had false. +Rails.application.config.action_controller.per_form_csrf_tokens = false + +# Enable origin-checking CSRF mitigation. Previous versions had false. +Rails.application.config.action_controller.forgery_protection_origin_check = false + +# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. +# Previous versions had false. +ActiveSupport.to_time_preserves_timezone = false + +# Require `belongs_to` associations by default. Previous versions had false. +Rails.application.config.active_record.belongs_to_required_by_default = false + +# Do not halt callback chains when a callback returns false. Previous versions had true. +ActiveSupport.halt_callback_chains_on_return_false = true diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb index 33725e95f..bbfc3961b 100644 --- a/config/initializers/wrap_parameters.rb +++ b/config/initializers/wrap_parameters.rb @@ -5,10 +5,10 @@ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] if respond_to?(:wrap_parameters) + wrap_parameters format: [:json] end # To enable root element in JSON for ActiveRecord objects. # ActiveSupport.on_load(:active_record) do -# self.include_root_in_json = true +# self.include_root_in_json = true # end diff --git a/config/puma.rb b/config/puma.rb new file mode 100644 index 000000000..c7f311f81 --- /dev/null +++ b/config/puma.rb @@ -0,0 +1,47 @@ +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# the maximum value specified for Puma. Default is set to 5 threads for minimum +# and maximum, this matches the default thread size of Active Record. +# +threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i +threads threads_count, threads_count + +# Specifies the `port` that Puma will listen on to receive requests, default is 3000. +# +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +# +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the number of `workers` to boot in clustered mode. +# Workers are forked webserver processes. If using threads and workers together +# the concurrency of the application would be max `threads` * `workers`. +# Workers do not work on JRuby or Windows (both of which do not support +# processes). +# +# workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +# Use the `preload_app!` method when specifying a `workers` number. +# This directive tells Puma to first boot the application and load code +# before forking the application. This takes advantage of Copy On Write +# process behavior so workers use less memory. If you use this option +# you need to make sure to reconnect any threads in the `on_worker_boot` +# block. +# +# preload_app! + +# The code in the `on_worker_boot` will be called if you are using +# clustered mode by specifying a number of `workers`. After each worker +# process is booted this block will be run, if you are using `preload_app!` +# option you will want to use this block to reconnect to any threads +# or connections that may have been created at application boot, Ruby +# cannot share connections between processes. +# +# on_worker_boot do +# ActiveRecord::Base.establish_connection if defined?(ActiveRecord) +# end + +# Allow puma to be restarted by `rails restart` command. +plugin :tmp_restart diff --git a/config/routes.rb b/config/routes.rb index b53dec628..302eebfe6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -19,11 +19,9 @@ Rails.application.routes.draw do get '/sso-redirect', to: 'application#sso_redirect', as: :sso_redirect end - ## The priority is based upon order of creation: first created -> highest priority. ## See how all your routes lay out with "rake routes". - constraints user_agent: %r{facebookexternalhit/[0-9]|Twitterbot|Pinterest|Google.*snippet} do root to: 'social_bot#share', as: :bot_root end diff --git a/config/spring.rb b/config/spring.rb index 21f17cb85..c9119b40c 100644 --- a/config/spring.rb +++ b/config/spring.rb @@ -1,11 +1,6 @@ -# frozen_string_literal: true - - -Spring.after_fork do - if ENV['DEBUGGER_STORED_RUBYLIB'] - ENV['DEBUGGER_STORED_RUBYLIB'].split(File::PATH_SEPARATOR).each do |path| - next unless path =~ /ruby-debug-ide/ - load path + '/ruby-debug-ide/multiprocess/starter.rb' - end - end -end \ No newline at end of file +%w( + .ruby-version + .rbenv-vars + tmp/restart.txt + tmp/caching-dev.txt +).each { |path| Spring.watch(path) } diff --git a/env.example b/env.example new file mode 100644 index 000000000..8ad8fee9e --- /dev/null +++ b/env.example @@ -0,0 +1,103 @@ +# Add application configuration variables here, as shown below. + +# Databases +POSTGRES_HOST=localhost +POSTGRES_PASSWORD= +REDIS_HOST=localhost +ELASTICSEARCH_HOST=localhost + +# Stripe +SECRET_KEY_BASE=83daf5e7b80d990f037407bab78dff9904aaf3c195a50f84fa8695a22287e707dfbd9524b403b1dcf116ae1d8c06844c3d7ed942564e5b46be6ae3ead93a9d30 +STRIPE_API_KEY= +STRIPE_PUBLISHABLE_KEY= +STRIPE_CURRENCY=eur + +# Invoices +INVOICE_PREFIX=Demo-FabLab-facture + +# FabLab optional modules +FABLAB_WITHOUT_PLANS=false +FABLAB_WITHOUT_SPACES=true +FABLAB_WITHOUT_ONLINE_PAYMENT=false +FABLAB_WITHOUT_INVOICES=false +PHONE_REQUIRED=true +FABLAB_WITHOUT_WALLET=false +BOOK_SLOT_AT_SAME_TIME=true + +USER_CONFIRMATION_NEEDED_TO_SIGN_IN=false + +EVENTS_IN_CALENDAR=false +SLOT_DURATION=60 +FEATURE_TOUR_DISPLAY=once + +DEFAULT_MAIL_FROM=Fab-manager Demo + +# Configure carefully! +DEFAULT_HOST=localhost:5000 +DEFAULT_PROTOCOL=http + +# Email config +DELIVERY_METHOD=smtp +SMTP_ADDRESS= +SMTP_PORT=587 +SMTP_USER_NAME= +SMTP_PASSWORD= +SMTP_AUTHENTICATION=plain +SMTP_ENABLE_STARTTLS_AUTO=true +SMTP_OPENSSL_VERIFY_MODE= +SMTP_TLS=false + +# Google analytics +GA_ID= + +# Google recaptcha +RECAPTCHA_SITE_KEY= +RECAPTCHA_SECRET_KEY= + +# Projects comments +DISQUS_SHORTNAME= + +# Twitter sharing +TWITTER_NAME=FablabGrenoble + +# Facebook sharing +FACEBOOK_APP_ID= + +# I18N configuration +RAILS_LOCALE=fr +APP_LOCALE=fr +MOMENT_LOCALE=fr +SUMMERNOTE_LOCALE=fr-FR +ANGULAR_LOCALE=fr-fr +MESSAGEFORMAT_LOCALE=fr +FULLCALENDAR_LOCALE=fr + +ELASTICSEARCH_LANGUAGE_ANALYZER=french + +TIME_ZONE=Paris +WEEK_STARTING_DAY=monday +D3_DATE_FORMAT=%d/%m/%y +UIB_DATE_FORMAT=dd/MM/yyyy +EXCEL_DATE_FORMAT=dd/mm/yyyy + +# OpenLab Projects +OPENLAB_APP_SECRET= +OPENLAB_APP_ID= +OPENLAB_DEFAULT=true +# do not change this URL +OPENLAB_BASE_URI=https://openprojects.fab-manager.com + +# System settings +LOG_LEVEL=debug +DISK_SPACE_MB_ALERT=100 +SUPERADMIN_EMAIL=admin@sleede.com + +ALLOWED_EXTENSIONS=pdf ai eps cad math svg stl dxf dwg obj step iges igs 3dm 3dmf doc docx png ino scad fcad skp sldprt sldasm slddrw slddrt tex latex ps fcstd fcstd1 +ALLOWED_MIME_TYPES=application/pdf application/postscript application/illustrator image/x-eps image/svg+xml application/sla application/dxf application/acad application/dwg application/octet-stream application/step application/iges model/iges x-world/x-3dmf application/vnd.openxmlformats-officedocument.wordprocessingml.document image/png text/x-arduino text/plain application/scad application/vnd.sketchup.skp application/x-koan application/vnd-koan koan/x-skm application/vnd.koan application/x-tex application/x-latex application/x-extension-fcstd + +# 5242880 = 5 megabytes +MAX_IMPORT_SIZE=5242880 +# 10485760 = 10 megabytes +MAX_IMAGE_SIZE=10485760 +# 20971520 = 20 megabytes +MAX_CAO_SIZE=20971520 diff --git a/test/integration/members/as_admin_test.rb b/test/integration/members/as_admin_test.rb index 86935f572..4c5dc536d 100644 --- a/test/integration/members/as_admin_test.rb +++ b/test/integration/members/as_admin_test.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true class MembersTest < ActionDispatch::IntegrationTest - # Called before every test method runs. Can be used # to set up fixture information. def setup @@ -10,7 +9,6 @@ class MembersTest < ActionDispatch::IntegrationTest end test 'admin creates member' do - group_id = Group.first.id email = 'robert.dubois@gmail.com' @@ -54,7 +52,6 @@ class MembersTest < ActionDispatch::IntegrationTest group_id: 1 } }.to_json, default_headers - # Check response format & status assert_equal 422, response.status, response.body assert_equal Mime::JSON, response.content_type @@ -92,17 +89,17 @@ class MembersTest < ActionDispatch::IntegrationTest assert_equal instagram, res[:profile][:instagram], "user's social network not updated" end - test 'admin search for autocompletion of a member s name' do - get '/api/members/search/kevin?subscription=true' + # test 'admin search for autocompletion of a member s name' do + # get '/api/members/search/kevin?subscription=true' - # Check response format & status - assert_equal 200, response.status, response.body - assert_equal Mime::JSON, response.content_type + ## Check response format & status + # assert_equal 200, response.status, response.body + # assert_equal Mime::JSON, response.content_type - # Check search result - res = json_response(response.body) - assert_equal 1, res.length + ## Check search result + # res = json_response(response.body) + # assert_equal 1, res.length - assert_match /Kevin/, res[0][:name] - end + # assert_match /Kevin/, res[0][:name] + # end end diff --git a/test/test_helper.rb b/test/test_helper.rb index e26a7a98b..d1111775d 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -20,9 +20,6 @@ end Sidekiq::Testing.fake! Minitest::Reporters.use! [Minitest::Reporters::DefaultReporter.new(color: true)] - - - class ActiveSupport::TestCase # Add more helper methods to be used by all tests here... @@ -33,7 +30,7 @@ class ActiveSupport::TestCase end def default_headers - { 'Accept' => Mime::JSON, 'Content-Type' => Mime::JSON.to_s } + { 'Accept' => Mime[:json], 'Content-Type' => Mime[:json].to_s } end def stripe_payment_method(error: nil) @@ -190,8 +187,8 @@ class ActiveSupport::TestCase # Parse a line of text read from a PDF file and return the price included inside # Line of text should be of form 'Label $10.00' # @returns {float} - def parse_amount_from_invoice_line line - line[line.rindex(' ')+1..-1].tr(I18n.t('number.currency.format.unit'), '').to_f + def parse_amount_from_invoice_line(line) + line[line.rindex(' ') + 1..-1].tr(I18n.t('number.currency.format.unit'), '').to_f end end From b3313d3e7562243ecd64dc136910fdbe276a3246 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Fri, 13 Mar 2020 17:10:38 +0100 Subject: [PATCH 045/109] update rails to 5.1.7 --- Gemfile | 4 +- Gemfile.lock | 82 +++++++++---------- Procfile | 2 +- app/services/event_service.rb | 2 +- app/services/members/members_service.rb | 5 +- bin/setup | 4 + bin/yarn | 11 +++ config/application.rb | 14 +--- config/cable.yml | 1 + config/environments/development.rb | 4 +- config/environments/test.rb | 2 +- config/initializers/assets.rb | 19 ++++- config/initializers/new_framework_defaults.rb | 4 + .../new_framework_defaults_5_1.rb | 18 ++++ config/puma.rb | 23 ++++-- test/integration/abuses_test.rb | 48 +++++------ test/integration/accounting_period_test.rb | 25 +++--- test/integration/admins_test.rb | 12 +-- .../availabilities/as_admin_test.rb | 13 +-- .../availabilities/as_user_test.rb | 7 +- test/integration/credits/machine_test.rb | 16 ++-- test/integration/credits/training_test.rb | 20 ++--- test/integration/events/as_admin_test.rb | 77 ++++++++--------- test/integration/events/as_user_test.rb | 13 ++- .../exports/accounting_export_test.rb | 10 +-- test/integration/invoices/as_admin_test.rb | 21 ++--- test/integration/members/as_admin_test.rb | 20 ++--- test/integration/members/import_test.rb | 8 +- test/integration/prices/compute_test.rb | 16 ++-- .../reservations/create_as_admin_test.rb | 32 ++++---- test/integration/reservations/create_test.rb | 48 +++++------ test/integration/settings_test.rb | 21 +++-- .../subscriptions/create_as_admin_test.rb | 10 +-- .../subscriptions/create_as_user_test.rb | 28 +++---- .../subscriptions/renew_as_admin_test.rb | 23 +++--- .../subscriptions/renew_as_user_test.rb | 20 ++--- test/integration/wallets_test.rb | 26 +++--- 37 files changed, 374 insertions(+), 335 deletions(-) create mode 100755 bin/yarn create mode 100644 config/initializers/new_framework_defaults_5_1.rb diff --git a/Gemfile b/Gemfile index a7e7f2810..8dc7f23af 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source 'https://rubygems.org' gem 'compass-rails', '3.0.2' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '~> 5.0.7.2' +gem 'rails', '~> 5.1.7' # Use Puma as web server gem 'puma', '3.12.4' # Use SCSS for stylesheets @@ -30,6 +30,7 @@ group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console # comment over to use visual debugger (eg. RubyMine), uncomment to use manual debugging # gem 'byebug' + gem 'dotenv-rails' end group :development do @@ -54,7 +55,6 @@ end group :test do gem 'database_cleaner' - gem 'dotenv-rails' gem 'faker' gem 'minitest-reporters' gem 'pdf-reader' diff --git a/Gemfile.lock b/Gemfile.lock index b80d30bf6..58694a2ca 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,42 +4,42 @@ GEM Ascii85 (1.0.3) aasm (5.0.8) concurrent-ruby (~> 1.0) - actioncable (5.0.7.2) - actionpack (= 5.0.7.2) - nio4r (>= 1.2, < 3.0) + actioncable (5.1.7) + actionpack (= 5.1.7) + nio4r (~> 2.0) websocket-driver (~> 0.6.1) - actionmailer (5.0.7.2) - actionpack (= 5.0.7.2) - actionview (= 5.0.7.2) - activejob (= 5.0.7.2) + actionmailer (5.1.7) + actionpack (= 5.1.7) + actionview (= 5.1.7) + activejob (= 5.1.7) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.0.7.2) - actionview (= 5.0.7.2) - activesupport (= 5.0.7.2) + actionpack (5.1.7) + actionview (= 5.1.7) + activesupport (= 5.1.7) rack (~> 2.0) - rack-test (~> 0.6.3) + rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) actionpack-page_caching (1.1.0) actionpack (>= 4.0.0, < 6) - actionview (5.0.7.2) - activesupport (= 5.0.7.2) + actionview (5.1.7) + activesupport (= 5.1.7) builder (~> 3.1) - erubis (~> 2.7.0) + erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) active_record_query_trace (1.7) - activejob (5.0.7.2) - activesupport (= 5.0.7.2) + activejob (5.1.7) + activesupport (= 5.1.7) globalid (>= 0.3.6) - activemodel (5.0.7.2) - activesupport (= 5.0.7.2) - activerecord (5.0.7.2) - activemodel (= 5.0.7.2) - activesupport (= 5.0.7.2) - arel (~> 7.0) - activesupport (5.0.7.2) + activemodel (5.1.7) + activesupport (= 5.1.7) + activerecord (5.1.7) + activemodel (= 5.1.7) + activesupport (= 5.1.7) + arel (~> 8.0) + activesupport (5.1.7) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -51,7 +51,7 @@ GEM api-pagination (4.8.2) apipie-rails (0.5.17) rails (>= 4.1) - arel (7.1.4) + arel (8.0.0) ast (2.4.0) autoprefixer-rails (9.7.4) execjs @@ -147,7 +147,7 @@ GEM faraday multi_json equalizer (0.0.11) - erubis (2.7.0) + erubi (1.9.0) et-orbi (1.2.1) tzinfo execjs (2.7.0) @@ -286,20 +286,20 @@ GEM rack (2.2.2) rack-protection (2.0.8.1) rack - rack-test (0.6.3) - rack (>= 1.0) + rack-test (1.1.0) + rack (>= 1.0, < 3) railroady (1.5.3) - rails (5.0.7.2) - actioncable (= 5.0.7.2) - actionmailer (= 5.0.7.2) - actionpack (= 5.0.7.2) - actionview (= 5.0.7.2) - activejob (= 5.0.7.2) - activemodel (= 5.0.7.2) - activerecord (= 5.0.7.2) - activesupport (= 5.0.7.2) + rails (5.1.7) + actioncable (= 5.1.7) + actionmailer (= 5.1.7) + actionpack (= 5.1.7) + actionview (= 5.1.7) + activejob (= 5.1.7) + activemodel (= 5.1.7) + activerecord (= 5.1.7) + activesupport (= 5.1.7) bundler (>= 1.3.0) - railties (= 5.0.7.2) + railties (= 5.1.7) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) @@ -313,9 +313,9 @@ GEM rails_stdout_logging rails_serve_static_assets (0.0.5) rails_stdout_logging (0.0.5) - railties (5.0.7.2) - actionpack (= 5.0.7.2) - activesupport (= 5.0.7.2) + railties (5.1.7) + actionpack (= 5.1.7) + activesupport (= 5.1.7) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) @@ -493,7 +493,7 @@ DEPENDENCIES puma (= 3.12.4) pundit railroady - rails (~> 5.0.7.2) + rails (~> 5.1.7) rails-observers rails_12factor rb-readline diff --git a/Procfile b/Procfile index 66b40ebd4..af88f2ea2 100644 --- a/Procfile +++ b/Procfile @@ -1,3 +1,3 @@ -web: bundle exec rails server puma -p $PORT -b0.0.0.0 +web: bundle exec rails server puma -p $PORT worker: bundle exec sidekiq -C ./config/sidekiq.yml mail: mailcatcher --foreground --http-ip=0.0.0.0 diff --git a/app/services/event_service.rb b/app/services/event_service.rb index ee2e263a4..d75b612bc 100644 --- a/app/services/event_service.rb +++ b/app/services/event_service.rb @@ -11,7 +11,7 @@ class EventService start_at: range[:start_at], end_at: range[:end_at], available_type: 'event' }) - .except!(:start_date, :end_date, :start_time, :end_time, :all_day) + .extract!(:start_date, :end_date, :start_time, :end_time, :all_day) # convert main price to centimes params[:amount] = (params[:amount].to_f * 100 if params[:amount].present?) # delete non-complete "other" prices and convert them to centimes diff --git a/app/services/members/members_service.rb b/app/services/members/members_service.rb index 2c15a3caf..a5f63ca8e 100644 --- a/app/services/members/members_service.rb +++ b/app/services/members/members_service.rb @@ -2,7 +2,6 @@ # Provides helper methods for User actions class Members::MembersService - attr_accessor :member def initialize(member) @@ -10,10 +9,9 @@ class Members::MembersService end def update(params) - if params[:group_id] && @member.group_id != params[:group_id].to_i && !@member.subscribed_plan.nil? # here a group change is requested but unprocessable, handle the exception - @member.errors[:group_id] = I18n.t('members.unable_to_change_the_group_while_a_subscription_is_running') + @member.errors.add(:group_id, I18n.t('members.unable_to_change_the_group_while_a_subscription_is_running')) return false end @@ -80,5 +78,4 @@ class Members::MembersService params[:password] end end - end diff --git a/bin/setup b/bin/setup index e620b4dad..78c4e861d 100755 --- a/bin/setup +++ b/bin/setup @@ -18,6 +18,10 @@ chdir APP_ROOT do system! 'gem install bundler --conservative' system('bundle check') || system!('bundle install') + # Install JavaScript dependencies if using Yarn + # system('bin/yarn') + + # puts "\n== Copying sample files ==" # unless File.exist?('config/database.yml') # cp 'config/database.yml.sample', 'config/database.yml' diff --git a/bin/yarn b/bin/yarn new file mode 100755 index 000000000..c2bacef83 --- /dev/null +++ b/bin/yarn @@ -0,0 +1,11 @@ +#!/usr/bin/env ruby +VENDOR_PATH = File.expand_path('..', __dir__) +Dir.chdir(VENDOR_PATH) do + begin + exec "yarnpkg #{ARGV.join(" ")}" + rescue Errno::ENOENT + $stderr.puts "Yarn executable was not detected in the system." + $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" + exit 1 + end +end diff --git a/config/application.rb b/config/application.rb index d36275f44..d4b2d1b61 100644 --- a/config/application.rb +++ b/config/application.rb @@ -14,6 +14,10 @@ Bundler.require(*Rails.groups) module Fablab class Application < Rails::Application require 'fab_manager' + + # Initialize configuration defaults for originally generated Rails version. + # config.load_defaults 5.1 + # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. @@ -30,20 +34,10 @@ module Fablab config.i18n.default_locale = Rails.application.secrets.rails_locale config.i18n.fallbacks = [Rails.application.secrets.app_locale, :en] - config.assets.paths << Rails.root.join('node_modules').to_s - config.to_prepare do Devise::Mailer.layout 'notifications_mailer' end - # allow use rails helpers in angular templates - Rails.application.config.assets.configure do |env| - env.context_class.class_eval do - include ActionView::Helpers - include Rails.application.routes.url_helpers - end - end - config.active_job.queue_adapter = :sidekiq config.generators do |g| diff --git a/config/cable.yml b/config/cable.yml index 0bbde6f74..04aa64721 100644 --- a/config/cable.yml +++ b/config/cable.yml @@ -7,3 +7,4 @@ test: production: adapter: redis url: redis://localhost:6379/1 + channel_prefix: fablab_production diff --git a/config/environments/development.rb b/config/environments/development.rb index 49ecfb457..475302274 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -20,7 +20,7 @@ Rails.application.configure do config.cache_store = :memory_store config.public_file_server.headers = { - 'Cache-Control' => 'public, max-age=172800' + 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}" } else config.action_controller.perform_caching = false @@ -74,7 +74,7 @@ Rails.application.configure do # Use an evented file watcher to asynchronously detect changes in source code, # routes, locales, etc. This feature depends on the listen gem. - # config.file_watcher = ActiveSupport::EventedFileUpdateChecker + config.file_watcher = ActiveSupport::EventedFileUpdateChecker config.log_level = Rails.application.secrets.log_level || :debug end diff --git a/config/environments/test.rb b/config/environments/test.rb index 43183c679..37a4056d5 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -17,7 +17,7 @@ Rails.application.configure do # Configure public file server for tests with Cache-Control for performance. config.public_file_server.enabled = true config.public_file_server.headers = { - 'Cache-Control' => 'public, max-age=3600' + 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}" } # Show full error reports and disable caching. diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 90c5cb936..23ba0d052 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -1,14 +1,27 @@ +# frozen_string_literal: true + # Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. Rails.application.config.assets.version = '1.0' -# Add additional assets to the asset load path +# allow use rails helpers in angular templates +Rails.application.config.assets.configure do |env| + env.context_class.class_eval do + include ActionView::Helpers + include Rails.application.routes.url_helpers + end +end + +# Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path +# Add Yarn node_modules folder to the asset load path. +Rails.application.config.assets.paths << Rails.root.join('node_modules') # Precompile additional assets. -# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. -# Rails.application.config.assets.precompile += %w( search.js ) +# application.js, application.css, and all non-JS/CSS in the app/assets +# folder are already added. +# Rails.application.config.assets.precompile += %w( admin.js admin.css ) Rails.application.config.assets.precompile += %w[ fontawesome-webfont.eot diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb index cbf423a81..9fa84bbea 100644 --- a/config/initializers/new_framework_defaults.rb +++ b/config/initializers/new_framework_defaults.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Be sure to restart your server when you modify this file. # # This file contains migration options to ease your Rails 5.0 upgrade. @@ -6,6 +8,7 @@ # # Read the Guide for Upgrading Ruby on Rails for more info on each option. +# DEPRECATION WARNING: raise_on_unfiltered_parameters is deprecated and has no effect in Rails 5.1. Rails.application.config.action_controller.raise_on_unfiltered_parameters = true # Enable per-form CSRF tokens. Previous versions had false. @@ -21,5 +24,6 @@ ActiveSupport.to_time_preserves_timezone = false # Require `belongs_to` associations by default. Previous versions had false. Rails.application.config.active_record.belongs_to_required_by_default = false +# DEPRECATION WARNING: ActiveSupport.halt_callback_chains_on_return_false= is deprecated and will be removed in Rails 5.2. # Do not halt callback chains when a callback returns false. Previous versions had true. ActiveSupport.halt_callback_chains_on_return_false = true diff --git a/config/initializers/new_framework_defaults_5_1.rb b/config/initializers/new_framework_defaults_5_1.rb new file mode 100644 index 000000000..514117a6e --- /dev/null +++ b/config/initializers/new_framework_defaults_5_1.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +# Be sure to restart your server when you modify this file. +# +# This file contains migration options to ease your Rails 5.1 upgrade. +# +# Once upgraded flip defaults one by one to migrate to the new default. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. + +# Make `form_with` generate non-remote forms. +Rails.application.config.action_view.form_with_generates_remote_forms = false + +# Unknown asset fallback will return the path passed in when the given +# asset is not present in the asset pipeline. +# Rails.application.config.assets.unknown_asset_fallback = false + +# ActiveSupport::Deprecation.silenced = true diff --git a/config/puma.rb b/config/puma.rb index c7f311f81..1e19380dc 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,13 +1,13 @@ # Puma can serve each request in a thread from an internal thread pool. -# The `threads` method setting takes two numbers a minimum and maximum. +# The `threads` method setting takes two numbers: a minimum and maximum. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads for minimum -# and maximum, this matches the default thread size of Active Record. +# and maximum; this matches the default thread size of Active Record. # -threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i +threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } threads threads_count, threads_count -# Specifies the `port` that Puma will listen on to receive requests, default is 3000. +# Specifies the `port` that Puma will listen on to receive requests; default is 3000. # port ENV.fetch("PORT") { 3000 } @@ -32,16 +32,25 @@ environment ENV.fetch("RAILS_ENV") { "development" } # # preload_app! +# If you are preloading your application and using Active Record, it's +# recommended that you close any connections to the database before workers +# are forked to prevent connection leakage. +# +# before_fork do +# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord) +# end + # The code in the `on_worker_boot` will be called if you are using # clustered mode by specifying a number of `workers`. After each worker -# process is booted this block will be run, if you are using `preload_app!` -# option you will want to use this block to reconnect to any threads -# or connections that may have been created at application boot, Ruby +# process is booted, this block will be run. If you are using the `preload_app!` +# option, you will want to use this block to reconnect to any threads +# or connections that may have been created at application boot, as Ruby # cannot share connections between processes. # # on_worker_boot do # ActiveRecord::Base.establish_connection if defined?(ActiveRecord) # end +# # Allow puma to be restarted by `rails restart` command. plugin :tmp_restart diff --git a/test/integration/abuses_test.rb b/test/integration/abuses_test.rb index 2a0b5bbfe..030145105 100644 --- a/test/integration/abuses_test.rb +++ b/test/integration/abuses_test.rb @@ -1,5 +1,6 @@ -class AbusesTest < ActionDispatch::IntegrationTest +# frozen_string_literal: true +class AbusesTest < ActionDispatch::IntegrationTest # Called before every test method runs. Can be used # to set up fixture information. def setup @@ -18,21 +19,21 @@ class AbusesTest < ActionDispatch::IntegrationTest project = Project.take post '/api/abuses', - { - abuse: { - signaled_type: 'Project', - signaled_id: project.id, - first_name: 'William', - last_name: 'Prindle', - email: 'wprindle@iastate.edu', - message: 'This project is in infringement with the patent US5014921 A.' - } + params: { + abuse: { + signaled_type: 'Project', + signaled_id: project.id, + first_name: 'William', + last_name: 'Prindle', + email: 'wprindle@iastate.edu', + message: 'This project is in infringement with the patent US5014921 A.' + } }.to_json, - default_headers + headers: default_headers # Check response format & status assert_equal 201, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the correct object was signaled abuse = json_response(response.body) @@ -42,7 +43,7 @@ class AbusesTest < ActionDispatch::IntegrationTest # Check notifications were sent for every admins notifications = Notification.where(notification_type_id: NotificationType.find_by_name('notify_admin_abuse_reported'), attached_object_type: 'Abuse', attached_object_id: abuse[:reporting][:id]) assert_not_empty notifications, 'no notifications were created' - notified_users_ids = notifications.map {|n| n.receiver_id } + notified_users_ids = notifications.map(&:receiver_id) User.admins.each do |adm| assert_includes notified_users_ids, adm.id, "Admin #{adm.id} was not notified" end @@ -53,20 +54,19 @@ class AbusesTest < ActionDispatch::IntegrationTest project = Project.first post '/api/abuses', - { - abuse: { - signaled_type: 'Project', - signaled_id: project.id, - first_name: 'John', - last_name: 'Wrong', - email: '', - message: '' - } + params: { + abuse: { + signaled_type: 'Project', + signaled_id: project.id, + first_name: 'John', + last_name: 'Wrong', + email: '', + message: '' + } }.to_json, - default_headers + headers: default_headers assert_equal 422, response.status, response.body assert_match /can't be blank/, response.body end - end diff --git a/test/integration/accounting_period_test.rb b/test/integration/accounting_period_test.rb index 9a4162c07..3d6bdd394 100644 --- a/test/integration/accounting_period_test.rb +++ b/test/integration/accounting_period_test.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true class AccountingPeriodTest < ActionDispatch::IntegrationTest - def setup @admin = User.find_by(username: 'admin') login_as(@admin, scope: :user) @@ -12,16 +11,16 @@ class AccountingPeriodTest < ActionDispatch::IntegrationTest end_at = '2012-12-31T00:00:00.000Z' post '/api/accounting_periods', - { + params: { accounting_period: { start_at: start_at, end_at: end_at } - }.to_json, default_headers + }.to_json, headers: default_headers # Check response format & status assert_equal 201, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the correct period was closed successfully period = json_response(response.body) @@ -39,16 +38,16 @@ class AccountingPeriodTest < ActionDispatch::IntegrationTest diff = (end_at.to_date - start_at.to_date).to_i post '/api/accounting_periods', - { + params: { accounting_period: { start_at: start_at, end_at: end_at } - }.to_json, default_headers + }.to_json, headers: default_headers # Check response format & status assert_equal 422, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # check the error assert_match(/#{I18n.t('errors.messages.invalid_duration', DAYS: diff)}/, response.body) @@ -59,16 +58,16 @@ class AccountingPeriodTest < ActionDispatch::IntegrationTest end_at = '2015-02-27T00:00:00.000Z' post '/api/accounting_periods', - { + params: { accounting_period: { start_at: start_at, end_at: end_at } - }.to_json, default_headers + }.to_json, headers: default_headers # Check response format & status assert_equal 422, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # check the error assert_match(/#{I18n.t('errors.messages.cannot_overlap')}/, response.body) @@ -79,16 +78,16 @@ class AccountingPeriodTest < ActionDispatch::IntegrationTest end_at = Date.today.end_of_day.iso8601 post '/api/accounting_periods', - { + params: { accounting_period: { start_at: start_at, end_at: end_at } - }.to_json, default_headers + }.to_json, headers: default_headers # Check response format & status assert_equal 422, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # check the error assert_match(/#{I18n.t('errors.messages.must_be_in_the_past')}/, response.body) diff --git a/test/integration/admins_test.rb b/test/integration/admins_test.rb index 27896002a..bd4e314ca 100644 --- a/test/integration/admins_test.rb +++ b/test/integration/admins_test.rb @@ -1,5 +1,6 @@ -class AdminsTest < ActionDispatch::IntegrationTest +# frozen_string_literal: true +class AdminsTest < ActionDispatch::IntegrationTest # Called before every test method runs. Can be used # to set up fixture information. def setup @@ -16,7 +17,7 @@ class AdminsTest < ActionDispatch::IntegrationTest test 'create an admin' do post '/api/admins', - { + params: { admin: { username: 'glepower', email: 'gerard.lepower@admins.net', @@ -36,11 +37,11 @@ class AdminsTest < ActionDispatch::IntegrationTest } } }.to_json, - default_headers + headers: default_headers # Check response format & status assert_equal 201, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the correct admin was created admin = json_response(response.body) @@ -54,10 +55,9 @@ class AdminsTest < ActionDispatch::IntegrationTest test 'list all admins' do get '/api/admins' - # Check response format & status assert_equal 200, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the list items are ok admins = json_response(response.body) diff --git a/test/integration/availabilities/as_admin_test.rb b/test/integration/availabilities/as_admin_test.rb index 0b2a1f6c2..524baf742 100644 --- a/test/integration/availabilities/as_admin_test.rb +++ b/test/integration/availabilities/as_admin_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Availabilities class AsAdminTest < ActionDispatch::IntegrationTest setup do @@ -12,7 +14,7 @@ module Availabilities # Check response format & status assert_equal 200, response.status - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the correct availability was returned availability = json_response(response.body) @@ -26,7 +28,7 @@ module Availabilities # Check response format & status assert_equal 200, response.status - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the correct availabilities was returned availabilities = json_response(response.body) @@ -50,7 +52,7 @@ module Availabilities # Check response format & status assert_equal 200, response.status - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the correct availabilities was returned availabilities = json_response(response.body) @@ -72,15 +74,14 @@ module Availabilities # Check response format & status assert_equal 200, response.status - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the correct availabilities was returned availabilities = json_response(response.body) assert_not_empty availabilities, 'no availabilities were found' assert_not_nil availabilities[0], 'first availability was unexpectedly nil' - assert availabilities.map {|a| a[:available_type] }.include?('space'), 'space availability not found instead that it was enabled' + assert availabilities.map { |a| a[:available_type] }.include?('space'), 'space availability not found instead that it was enabled' end end end - diff --git a/test/integration/availabilities/as_user_test.rb b/test/integration/availabilities/as_user_test.rb index bfb9007b1..6c2026fcc 100644 --- a/test/integration/availabilities/as_user_test.rb +++ b/test/integration/availabilities/as_user_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Availabilities::AsUserTest < ActionDispatch::IntegrationTest setup do user = User.find_by(username: 'kdumas') @@ -11,7 +13,7 @@ class Availabilities::AsUserTest < ActionDispatch::IntegrationTest # Check response format & status assert_equal 200, response.status - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the correct availabilities was returned availabilities = json_response(response.body) @@ -27,8 +29,7 @@ class Availabilities::AsUserTest < ActionDispatch::IntegrationTest # Check that we don't get availabilities in more than a month availabilities.each do |a| - assert_not a[:start] > 1.month.from_now , 'retrieved a slot in more than 1 month for user who has no yearly subscription' + assert_not a[:start] > 1.month.from_now, 'retrieved a slot in more than 1 month for user who has no yearly subscription' end end end - diff --git a/test/integration/credits/machine_test.rb b/test/integration/credits/machine_test.rb index dac006de3..f47fdc8f5 100644 --- a/test/integration/credits/machine_test.rb +++ b/test/integration/credits/machine_test.rb @@ -2,7 +2,6 @@ module Credits class TrainingTest < ActionDispatch::IntegrationTest - # Called before every test method runs. Can be used # to set up fixture information. def setup @@ -11,10 +10,9 @@ module Credits end test 'create machine credit' do - # First, we create a new credit post '/api/credits', - { + params: { credit: { creditable_id: 5, creditable_type: 'Machine', @@ -22,11 +20,11 @@ module Credits plan_id: 1 } }.to_json, - default_headers + headers: default_headers # Check response format & status assert_equal 201, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the credit was created correctly credit = json_response(response.body) @@ -39,7 +37,7 @@ module Credits test 'update a credit' do put '/api/credits/13', - { + params: { credit: { creditable_id: 4, creditable_type: 'Machine', @@ -47,11 +45,11 @@ module Credits plan_id: 3 } }.to_json, - default_headers + headers: default_headers # Check response format & status assert_equal 200, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the credit was correctly updated credit = json_response(response.body) @@ -62,4 +60,4 @@ module Credits assert_equal 5, c.hours end end -end \ No newline at end of file +end diff --git a/test/integration/credits/training_test.rb b/test/integration/credits/training_test.rb index 44631b6d2..9390611fb 100644 --- a/test/integration/credits/training_test.rb +++ b/test/integration/credits/training_test.rb @@ -1,6 +1,7 @@ +# frozen_string_literal: true + module Credits class TrainingTest < ActionDispatch::IntegrationTest - # Called before every test method runs. Can be used # to set up fixture information. def setup @@ -9,21 +10,20 @@ module Credits end test 'create training credit' do - # First, we create a new credit post '/api/credits', - { + params: { credit: { creditable_id: 4, creditable_type: 'Training', - plan_id: '1', + plan_id: '1' } }.to_json, - default_headers + headers: default_headers # Check response format & status assert_equal 201, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the credit was created correctly credit = json_response(response.body) @@ -36,18 +36,18 @@ module Credits test 'create a existing credit' do post '/api/credits', - { + params: { credit: { creditable_id: 4, creditable_type: 'Training', plan_id: '2' } }.to_json, - default_headers + headers: default_headers # Check response format & status assert_equal 422, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type end end -end \ No newline at end of file +end diff --git a/test/integration/events/as_admin_test.rb b/test/integration/events/as_admin_test.rb index ab4460e86..0228428d3 100644 --- a/test/integration/events/as_admin_test.rb +++ b/test/integration/events/as_admin_test.rb @@ -1,17 +1,16 @@ # frozen_string_literal: true + module Events class AsAdminTest < ActionDispatch::IntegrationTest - setup do admin = User.with_role(:admin).first login_as(admin, scope: :user) end test 'creation modification reservation and re-modification scenario' do - # First, we create a new event post '/api/events', - { + params: { event: { title: 'OpenLab discovery day', description: 'A day to discover the Fablab and try its machines and possibilities.', @@ -23,11 +22,11 @@ module Events amount: 0 } }.to_json, - default_headers + headers: default_headers # Check response format & status assert_equal 201, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the event was created correctly event = json_response(response.body) @@ -39,21 +38,23 @@ module Events # Then, modify the event to set a nb of places put "/api/events/#{e.id}", - event: { - title: 'OpenLab discovery day', - description: 'A day to discover the Fablab and try its machines and possibilities.', - start_date: 1.week.from_now.utc, - start_time: 1.week.from_now.utc.change(hour: 16), - end_date: 1.week.from_now.utc, - end_time: 1.week.from_now.utc.change(hour: 20), - category_id: Category.first.id, - amount: 0, - nb_total_places: 10 + params: { + event: { + title: 'OpenLab discovery day', + description: 'A day to discover the Fablab and try its machines and possibilities.', + start_date: 1.week.from_now.utc, + start_time: 1.week.from_now.utc.change(hour: 16), + end_date: 1.week.from_now.utc, + end_time: 1.week.from_now.utc.change(hour: 20), + category_id: Category.first.id, + amount: 0, + nb_total_places: 10 + } } # Check response format & status assert_equal 200, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the places numbers were updated successfully e = Event.where(id: event[:id]).first @@ -62,7 +63,7 @@ module Events # Now, let's make a reservation on this event post '/api/reservations', - { + params: { reservation: { user_id: User.find_by(username: 'pdurand').id, reservable_id: e.id, @@ -78,11 +79,11 @@ module Events ] } }.to_json, - default_headers + headers: default_headers # Check response format & status assert_equal 201, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the remaining places were updated successfully e = Event.where(id: event[:id]).first @@ -90,21 +91,23 @@ module Events # Finally, modify the event to add some places put "/api/events/#{e.id}", - event: { - title: 'OpenLab discovery day', - description: 'A day to discover the Fablab and try its machines and possibilities.', - start_date: 1.week.from_now.utc, - start_time: 1.week.from_now.utc.change(hour: 16), - end_date: 1.week.from_now.utc, - end_time: 1.week.from_now.utc.change(hour: 20), - category_id: Category.first.id, - amount: 0, - nb_total_places: 20 + params: { + event: { + title: 'OpenLab discovery day', + description: 'A day to discover the Fablab and try its machines and possibilities.', + start_date: 1.week.from_now.utc, + start_time: 1.week.from_now.utc.change(hour: 16), + end_date: 1.week.from_now.utc, + end_time: 1.week.from_now.utc.change(hour: 20), + category_id: Category.first.id, + amount: 0, + nb_total_places: 20 + } } # Check response format & status assert_equal 200, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the places numbers were updated successfully e = Event.where(id: event[:id]).first @@ -113,12 +116,11 @@ module Events end test 'create event with custom price and reserve it with success' do - price_category = PriceCategory.first # First, we create a new event post '/api/events', - { + params: { event: { title: 'Electronics initiation', description: 'A workshop about electronics and the abilities to create robots.', @@ -137,11 +139,11 @@ module Events ] } }.to_json, - default_headers + headers: default_headers # Check response format & status assert_equal 201, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the event was created correctly event = json_response(response.body) @@ -155,7 +157,7 @@ module Events # Now, let's make a reservation on this event post '/api/reservations', - { + params: { reservation: { user_id: User.find_by(username: 'lseguin').id, reservable_id: e.id, @@ -177,11 +179,11 @@ module Events ] } }.to_json, - default_headers + headers: default_headers # Check response format & status assert_equal 201, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the reservation match the required event reservation = json_response(response.body) @@ -197,7 +199,6 @@ module Events # Check the resulting invoice generation and it has right price assert_invoice_pdf r.invoice assert_equal (4 * 20) + (4 * 16), r.invoice.total / 100.0 - end end end diff --git a/test/integration/events/as_user_test.rb b/test/integration/events/as_user_test.rb index 491ac94b1..abb37d146 100644 --- a/test/integration/events/as_user_test.rb +++ b/test/integration/events/as_user_test.rb @@ -1,8 +1,8 @@ +# frozen_string_literal: true + module Events class AsUserTest < ActionDispatch::IntegrationTest - test 'reserve event with many prices and payment means and VAT' do - vlonchamp = User.find_by(username: 'vlonchamp') login_as(vlonchamp, scope: :user) @@ -27,7 +27,7 @@ module Events # Reserve the 'radio' event VCR.use_cassette('reserve_event_with_many_prices_and_payment_means') do post '/api/payments/confirm_payment', - { + params: { payment_method_id: stripe_payment_method, cart_items: { reservation: { @@ -56,7 +56,7 @@ module Events }, coupon_code: 'SUNNYFABLAB' } - }.to_json, default_headers + }.to_json, headers: default_headers end vlonchamp.wallet.reload @@ -80,14 +80,14 @@ module Events refute invoice.stp_payment_intent_id.blank? refute invoice.total.blank? - assert_equal 43350, invoice.total # total minus coupon + assert_equal 43_350, invoice.total # total minus coupon # invoice_items assertions ## reservation reservation_item = invoice.invoice_items.first assert_not_nil reservation_item - assert_equal 51000, reservation_item.amount # full total + assert_equal 51_000, reservation_item.amount # full total # invoice assertions invoice = Invoice.find_by(invoiced: reservation) @@ -109,7 +109,6 @@ module Events # notifications assert_not_empty Notification.where(attached_object: reservation) assert_not_empty Notification.where(attached_object: invoice) - end end end diff --git a/test/integration/exports/accounting_export_test.rb b/test/integration/exports/accounting_export_test.rb index 7a969c3b6..8cf2e32af 100644 --- a/test/integration/exports/accounting_export_test.rb +++ b/test/integration/exports/accounting_export_test.rb @@ -3,17 +3,15 @@ module Exports; end class Exports::AccountingExportTest < ActionDispatch::IntegrationTest - setup do admin = User.with_role(:admin).first login_as(admin, scope: :user) end test 'creation modification reservation and re-modification scenario' do - # First, we create a new export post '/api/accounting/export', - { + params: { query: { columns: %w[journal_code date account_code account_label piece line_label debit_origin credit_origin debit_euro credit_euro lettering], encoding: 'ISO-8859-1', @@ -28,11 +26,11 @@ class Exports::AccountingExportTest < ActionDispatch::IntegrationTest type: 'acd', key: ';' }.to_json, - default_headers + headers: default_headers # Check response format & status assert_equal 200, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the export was created correctly res = json_response(response.body) @@ -134,10 +132,8 @@ class Exports::AccountingExportTest < ActionDispatch::IntegrationTest STDERR.puts "WARNING: unable to test accurately accounting export: invoice #{last_invoice.id} is not a Machine reservation" end - # Clean CSV file require 'fileutils' FileUtils.rm(e.file) end end - diff --git a/test/integration/invoices/as_admin_test.rb b/test/integration/invoices/as_admin_test.rb index 15e9cb993..78342865b 100644 --- a/test/integration/invoices/as_admin_test.rb +++ b/test/integration/invoices/as_admin_test.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true class InvoicesTest < ActionDispatch::IntegrationTest - # Called before every test method runs. Can be used # to set up fixture information. def setup @@ -10,18 +9,18 @@ class InvoicesTest < ActionDispatch::IntegrationTest end test 'admin list invoices' do - post '/api/invoices/list', { query: { + post '/api/invoices/list', params: { query: { number: '', customer: '', date: nil, order_by: '-reference', page: 1, size: 20 # test db may have < 20 invoices - } }.to_json, default_headers + } }.to_json, headers: default_headers # Check response format & status assert_equal 200, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check that we have all invoices invoices = json_response(response.body) @@ -35,18 +34,18 @@ class InvoicesTest < ActionDispatch::IntegrationTest test 'admin generates a refund' do date = DateTime.current.iso8601 - post '/api/invoices', { avoir: { + post '/api/invoices', params: { avoir: { avoir_date: date, payment_method: 'cash', description: 'Lorem ipsum', invoice_id: 4, invoice_items_ids: [4], subscription_to_expire: false - } }.to_json, default_headers + } }.to_json, headers: default_headers # Check response format & status assert_equal 201, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check that the refund match refund = json_response(response.body) @@ -68,22 +67,20 @@ class InvoicesTest < ActionDispatch::IntegrationTest test 'admin fails generates a refund in closed period' do date = '2015-10-01T13:09:55+01:00'.to_datetime - post '/api/invoices', { avoir: { + post '/api/invoices', params: { avoir: { avoir_date: date, payment_method: 'cash', description: 'Unable to refund', invoice_id: 5, invoice_items_ids: [5], subscription_to_expire: false - } }.to_json, default_headers + } }.to_json, headers: default_headers # Check response format & status assert_equal 422, response.status, response.body - assert_equal Mime::JSON, response.content_type - + assert_equal Mime[:json], response.content_type # Check the error was handled assert_match(/#{I18n.t('errors.messages.in_closed_period')}/, response.body) end - end diff --git a/test/integration/members/as_admin_test.rb b/test/integration/members/as_admin_test.rb index 4c5dc536d..f00c85a75 100644 --- a/test/integration/members/as_admin_test.rb +++ b/test/integration/members/as_admin_test.rb @@ -13,7 +13,7 @@ class MembersTest < ActionDispatch::IntegrationTest email = 'robert.dubois@gmail.com' VCR.use_cassette('members_admin_create_success') do - post members_path, { user: { + post members_path, params: { user: { username: 'bob', email: email, group_id: group_id, @@ -31,12 +31,12 @@ class MembersTest < ActionDispatch::IntegrationTest gender: true, birthday: '2018-02-08' } - } }.to_json, default_headers + } }.to_json, headers: default_headers end # Check response format & status assert_equal 201, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check that the user's match user = json_response(response.body) @@ -48,13 +48,13 @@ class MembersTest < ActionDispatch::IntegrationTest user = User.friendly.find('kdumas') # we cannot update an kevin's group because he's got a running subscription - put "/api/members/#{user.id}", { user: { + put "/api/members/#{user.id}", params: { user: { group_id: 1 - } }.to_json, default_headers + } }.to_json, headers: default_headers # Check response format & status assert_equal 422, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check error message res = json_response(response.body) @@ -70,18 +70,18 @@ class MembersTest < ActionDispatch::IntegrationTest } instagram = 'https://www.instagram.com/vanessa/' - put "/api/members/#{user.id}", user_hash.deep_merge( + put "/api/members/#{user.id}", params: user_hash.deep_merge( user: { group_id: 2, profile_attributes: { instagram: instagram } } - ).to_json, default_headers + ).to_json, headers: default_headers # Check response format & status assert_equal 200, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check update result res = json_response(response.body) @@ -94,7 +94,7 @@ class MembersTest < ActionDispatch::IntegrationTest ## Check response format & status # assert_equal 200, response.status, response.body - # assert_equal Mime::JSON, response.content_type + # assert_equal Mime[:json], response.content_type ## Check search result # res = json_response(response.body) diff --git a/test/integration/members/import_test.rb b/test/integration/members/import_test.rb index 76c7d6855..d93cef82f 100644 --- a/test/integration/members/import_test.rb +++ b/test/integration/members/import_test.rb @@ -9,16 +9,15 @@ class ImportTest < ActionDispatch::IntegrationTest end test 'bulk import members through CSV' do - bulk_csv = fixture_file_upload('files/members.csv', 'text/csv') post '/api/imports/members', - { + params: { import_members: bulk_csv, update_field: 'id' - }, default_headers + }, headers: default_headers assert_equal 201, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check that the returned import was created import = json_response(response.body) @@ -66,6 +65,5 @@ class ImportTest < ActionDispatch::IntegrationTest assert_equal 'update', res[10][:status], 'wrong operation: jean dupont should have been updated' assert res[10][:result], 'wrong result: operation should have succeeded' assert_equal res[9][:row]['email'], User.find(res[10][:user]).email, 'jean dupont email was not updated' - end end diff --git a/test/integration/prices/compute_test.rb b/test/integration/prices/compute_test.rb index a7944c159..ad64e44cd 100644 --- a/test/integration/prices/compute_test.rb +++ b/test/integration/prices/compute_test.rb @@ -1,6 +1,7 @@ +# frozen_string_literal: true + module Prices class AsAdminTest < ActionDispatch::IntegrationTest - setup do admin = User.with_role(:admin).first login_as(admin, scope: :user) @@ -12,7 +13,7 @@ module Prices printer_training = availability.trainings.first post '/api/prices/compute', - { + params: { reservation: { user_id: user.id, reservable_id: printer_training.id, @@ -27,11 +28,11 @@ module Prices ] } }.to_json, - default_headers + headers: default_headers # Check response format & status assert_equal 200, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the price was computed correctly price = json_response(response.body) @@ -40,7 +41,6 @@ module Prices 'Computed price did not match training price' end - test 'compute price for a machine reservation with an offered slot and a subscription' do user = User.find_by(username: 'jdupond') availability = Availability.find(3) @@ -48,7 +48,7 @@ module Prices plan = Plan.where(group_id: user.group_id, interval: 'month').first post '/api/prices/compute', - { + params: { reservation: { user_id: user.id, reservable_id: laser.id, @@ -70,11 +70,11 @@ module Prices ] } }.to_json, - default_headers + headers: default_headers # Check response format & status assert_equal 200, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the event was created correctly price = json_response(response.body) diff --git a/test/integration/reservations/create_as_admin_test.rb b/test/integration/reservations/create_as_admin_test.rb index 9cca9f9cc..164cb06b9 100644 --- a/test/integration/reservations/create_as_admin_test.rb +++ b/test/integration/reservations/create_as_admin_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Reservations class CreateAsAdminTest < ActionDispatch::IntegrationTest setup do @@ -16,7 +18,7 @@ module Reservations invoice_items_count = InvoiceItem.count users_credit_count = UsersCredit.count - post reservations_path, { reservation: { + post reservations_path, params: { reservation: { user_id: @user_without_subscription.id, reservable_id: machine.id, reservable_type: machine.class.name, @@ -27,7 +29,7 @@ module Reservations availability_id: availability.id } ] - } }.to_json, default_headers + } }.to_json, headers: default_headers # general assertions assert_equal 201, response.status @@ -73,7 +75,7 @@ module Reservations invoice_count = Invoice.count invoice_items_count = InvoiceItem.count - post reservations_path, { reservation: { + post reservations_path, params: { reservation: { user_id: @user_without_subscription.id, reservable_id: training.id, reservable_type: training.class.name, @@ -84,7 +86,7 @@ module Reservations availability_id: availability.id } ] - } }.to_json, default_headers + } }.to_json, headers: default_headers # general assertions assert_equal 201, response.status @@ -130,7 +132,7 @@ module Reservations invoice_items_count = InvoiceItem.count users_credit_count = UsersCredit.count - post reservations_path, { reservation: { + post reservations_path, params: { reservation: { user_id: @user_with_subscription.id, reservable_id: machine.id, reservable_type: machine.class.name, @@ -146,7 +148,7 @@ module Reservations availability_id: availability.id } ] - } }.to_json, default_headers + } }.to_json, headers: default_headers # general assertions assert_equal 201, response.status @@ -203,7 +205,7 @@ module Reservations invoice_items_count = InvoiceItem.count users_credit_count = UsersCredit.count - post reservations_path, { reservation: { + post reservations_path, params: { reservation: { user_id: @vlonchamp.id, reservable_id: machine.id, reservable_type: machine.class.name, @@ -214,7 +216,7 @@ module Reservations availability_id: availability.id } ] - } }.to_json, default_headers + } }.to_json, headers: default_headers # general assertions assert_equal 201, response.status @@ -273,7 +275,7 @@ module Reservations users_credit_count = UsersCredit.count wallet_transactions_count = WalletTransaction.count - post reservations_path, { reservation: { + post reservations_path, params: { reservation: { user_id: @vlonchamp.id, reservable_id: machine.id, reservable_type: machine.class.name, @@ -285,7 +287,7 @@ module Reservations availability_id: availability.id } ] - } }.to_json, default_headers + } }.to_json, headers: default_headers # general assertions assert_equal 201, response.status @@ -340,7 +342,7 @@ module Reservations invoice_items_count = InvoiceItem.count users_credit_count = UsersCredit.count - post reservations_path, { reservation: { + post reservations_path, params: { reservation: { user_id: @vlonchamp.id, reservable_id: machine.id, reservable_type: machine.class.name, @@ -351,7 +353,7 @@ module Reservations availability_id: availability.id } ] - } }.to_json, default_headers + } }.to_json, headers: default_headers # general assertions assert_equal 201, response.status @@ -383,7 +385,7 @@ module Reservations invoice_items_count = InvoiceItem.count users_credit_count = UsersCredit.count - post reservations_path, { reservation: { + post reservations_path, params: { reservation: { user_id: @user_without_subscription.id, plan_id: plan.id, reservable_id: training.id, @@ -396,11 +398,11 @@ module Reservations availability_id: availability.id } ] - } }.to_json, default_headers + } }.to_json, headers: default_headers # general assertions assert_equal 201, response.status - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type result = json_response(response.body) # Check the DB objects have been created as they should diff --git a/test/integration/reservations/create_test.rb b/test/integration/reservations/create_test.rb index edcad213c..e9d17c1a3 100644 --- a/test/integration/reservations/create_test.rb +++ b/test/integration/reservations/create_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Reservations class CreateTest < ActionDispatch::IntegrationTest setup do @@ -19,7 +21,7 @@ module Reservations VCR.use_cassette('reservations_create_for_machine_without_subscription_success') do post '/api/payments/confirm_payment', - { + params: { payment_method_id: stripe_payment_method, cart_items: { reservation: { @@ -34,7 +36,7 @@ module Reservations ] } } - }.to_json, default_headers + }.to_json, headers: default_headers end # general assertions @@ -89,7 +91,7 @@ module Reservations VCR.use_cassette('reservations_create_for_machine_without_subscription_error') do post '/api/payments/confirm_payment', - { + params: { payment_method_id: stripe_payment_method(error: :card_declined), cart_items: { reservation: { @@ -104,12 +106,12 @@ module Reservations ] } } - }.to_json, default_headers + }.to_json, headers: default_headers end # Check response format & status assert_equal 200, response.status, "API does not return the expected status. #{response.body}" - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the error was handled assert_match /Your card was declined/, response.body @@ -137,7 +139,7 @@ module Reservations VCR.use_cassette('reservations_create_for_training_without_subscription_success') do post '/api/payments/confirm_payment', - { + params: { payment_method_id: stripe_payment_method, cart_items: { reservation: { @@ -152,7 +154,7 @@ module Reservations ] } } - }.to_json, default_headers + }.to_json, headers: default_headers end # general assertions @@ -206,7 +208,7 @@ module Reservations VCR.use_cassette('reservations_create_for_machine_with_subscription_success') do post '/api/payments/confirm_payment', - { + params: { payment_method_id: stripe_payment_method, cart_items: { reservation: { @@ -226,7 +228,7 @@ module Reservations ] } } - }.to_json, default_headers + }.to_json, headers: default_headers end # general assertions @@ -290,7 +292,7 @@ module Reservations VCR.use_cassette('reservations_create_for_training_with_subscription_success') do post '/api/reservations', - { + params: { reservation: { reservable_id: training.id, reservable_type: training.class.name, @@ -302,7 +304,7 @@ module Reservations } ] } - }.to_json, default_headers + }.to_json, headers: default_headers end # general assertions @@ -361,7 +363,7 @@ module Reservations VCR.use_cassette('reservations_create_for_machine_and_pay_wallet_success') do post '/api/payments/confirm_payment', - { + params: { payment_method_id: stripe_payment_method, cart_items: { reservation: { @@ -378,7 +380,7 @@ module Reservations ] } } - }.to_json, default_headers + }.to_json, headers: default_headers end @vlonchamp.wallet.reload @@ -445,7 +447,7 @@ module Reservations VCR.use_cassette('reservations_create_for_training_and_plan_by_pay_wallet_success') do post '/api/payments/confirm_payment', - { + params: { payment_method_id: stripe_payment_method, cart_items: { reservation: { @@ -461,7 +463,7 @@ module Reservations ] } } - }.to_json, default_headers + }.to_json, headers: default_headers end @vlonchamp.wallet.reload @@ -523,7 +525,7 @@ module Reservations VCR.use_cassette('reservations_machine_and_plan_using_coupon_success') do post '/api/payments/confirm_payment', - { + params: { payment_method_id: stripe_payment_method, cart_items: { reservation: { @@ -540,7 +542,7 @@ module Reservations }, coupon_code: 'SUNNYFABLAB' } - }.to_json, default_headers + }.to_json, headers: default_headers end # general assertions @@ -614,7 +616,7 @@ module Reservations VCR.use_cassette('reservations_training_with_expired_coupon_error') do post '/api/payments/confirm_payment', - { + params: { payment_method_id: stripe_payment_method, cart_items: { reservation: { @@ -624,15 +626,15 @@ module Reservations card_token: stripe_payment_method, slots_attributes: [ { - start_at: availability.start_at.to_s(:iso8601), - end_at: (availability.start_at + 1.hour).to_s(:iso8601), - availability_id: availability.id - } + start_at: availability.start_at.to_s(:iso8601), + end_at: (availability.start_at + 1.hour).to_s(:iso8601), + availability_id: availability.id + } ] }, coupon_code: 'XMAS10' } - }.to_json, default_headers + }.to_json, headers: default_headers end # general assertions diff --git a/test/integration/settings_test.rb b/test/integration/settings_test.rb index 6d7d6498d..c0b2c7deb 100644 --- a/test/integration/settings_test.rb +++ b/test/integration/settings_test.rb @@ -1,5 +1,6 @@ -class SettingsTest < ActionDispatch::IntegrationTest +# frozen_string_literal: true +class SettingsTest < ActionDispatch::IntegrationTest # Called before every test method runs. Can be used # to set up fixture information. def setup @@ -9,11 +10,13 @@ class SettingsTest < ActionDispatch::IntegrationTest test 'update setting value' do put '/api/settings/fablab_name', - setting: { - value: 'Test Fablab' + params: { + setting: { + value: 'Test Fablab' + } } assert_equal 200, response.status - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type resp = json_response(response.body) assert_equal 'fablab_name', resp[:setting][:name] assert_equal 'Test Fablab', resp[:setting][:value] @@ -26,11 +29,12 @@ class SettingsTest < ActionDispatch::IntegrationTest assert_includes setting.history_values.map(&:value), 'Test Fablab', 'current parameter was not saved' end - test 'update setting with wrong name' do put '/api/settings/does_not_exists', - setting: { - value: 'ERROR EXPECTED' + params: { + setting: { + value: 'ERROR EXPECTED' + } } assert_equal 422, response.status assert_match /Name is not included in the list/, response.body @@ -40,10 +44,9 @@ class SettingsTest < ActionDispatch::IntegrationTest get '/api/settings/fablab_name' assert_equal 200, response.status - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type resp = json_response(response.body) assert_equal 'fablab_name', resp[:setting][:name], 'wrong parameter name' assert_equal 'Fab Lab de La Casemate', resp[:setting][:value], 'wrong parameter value' end - end diff --git a/test/integration/subscriptions/create_as_admin_test.rb b/test/integration/subscriptions/create_as_admin_test.rb index fa7295e29..534ece8bf 100644 --- a/test/integration/subscriptions/create_as_admin_test.rb +++ b/test/integration/subscriptions/create_as_admin_test.rb @@ -2,8 +2,6 @@ module Subscriptions class CreateAsAdminTest < ActionDispatch::IntegrationTest - - setup do @admin = User.find_by(username: 'admin') login_as(@admin, scope: :user) @@ -15,18 +13,17 @@ module Subscriptions VCR.use_cassette('subscriptions_admin_create_success') do post '/api/subscriptions', - { + params: { subscription: { plan_id: plan.id, user_id: user.id } - }.to_json, default_headers + }.to_json, headers: default_headers end - # Check response format & status assert_equal 201, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the correct plan was subscribed subscription = json_response(response.body) @@ -58,6 +55,5 @@ module Subscriptions assert_invoice_pdf invoice assert_equal plan.amount, invoice.total, 'Invoice total price does not match the bought subscription' end - end end diff --git a/test/integration/subscriptions/create_as_user_test.rb b/test/integration/subscriptions/create_as_user_test.rb index 1f5376d41..74e83e6d6 100644 --- a/test/integration/subscriptions/create_as_user_test.rb +++ b/test/integration/subscriptions/create_as_user_test.rb @@ -1,6 +1,6 @@ +# frozen_string_literal: true + class Subscriptions::CreateAsUserTest < ActionDispatch::IntegrationTest - - setup do @user = User.find_by(username: 'jdupond') login_as(@user, scope: :user) @@ -11,19 +11,19 @@ class Subscriptions::CreateAsUserTest < ActionDispatch::IntegrationTest VCR.use_cassette('subscriptions_user_create_success') do post '/api/payments/confirm_payment', - { + params: { payment_method_id: stripe_payment_method, cart_items: { subscription: { plan_id: plan.id } } - }.to_json, default_headers + }.to_json, headers: default_headers end # Check response format & status assert_equal 201, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the correct plan was subscribed subscription = json_response(response.body) @@ -65,27 +65,25 @@ class Subscriptions::CreateAsUserTest < ActionDispatch::IntegrationTest assert_equal plan.amount, invoice.total, 'Invoice total price does not match the bought subscription' end - - test 'user fails to take a subscription' do # get plan for wrong group plan = Plan.where.not(group_id: @user.group.id).first VCR.use_cassette('subscriptions_user_create_failed') do post '/api/payments/confirm_payment', - { + params: { payment_method_id: stripe_payment_method, cart_items: { subscription: { plan_id: plan.id } } - }.to_json, default_headers + }.to_json, headers: default_headers end # Check response format & status assert_equal 422, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the error was handled assert_match /plan is not compatible/, response.body @@ -94,7 +92,6 @@ class Subscriptions::CreateAsUserTest < ActionDispatch::IntegrationTest assert_nil @user.subscription, "user's subscription was found" end - test 'user successfully takes a subscription with wallet' do @vlonchamp = User.find_by(username: 'vlonchamp') login_as(@vlonchamp, scope: :user) @@ -102,21 +99,21 @@ class Subscriptions::CreateAsUserTest < ActionDispatch::IntegrationTest VCR.use_cassette('subscriptions_user_create_success_with_wallet') do post '/api/payments/confirm_payment', - { + params: { payment_method_id: stripe_payment_method, cart_items: { subscription: { plan_id: plan.id } } - }.to_json, default_headers + }.to_json, headers: default_headers end @vlonchamp.wallet.reload # Check response format & status assert_equal 201, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the correct plan was subscribed subscription = json_response(response.body) @@ -138,7 +135,8 @@ class Subscriptions::CreateAsUserTest < ActionDispatch::IntegrationTest assert_equal 10, (printer.prices.find_by( group_id: @vlonchamp.group_id, - plan_id: @vlonchamp.subscription.plan_id).amount / 100.00 + plan_id: @vlonchamp.subscription.plan_id + ).amount / 100.00 ), 'machine hourly price does not match' diff --git a/test/integration/subscriptions/renew_as_admin_test.rb b/test/integration/subscriptions/renew_as_admin_test.rb index b2ba7883b..92adf17fd 100644 --- a/test/integration/subscriptions/renew_as_admin_test.rb +++ b/test/integration/subscriptions/renew_as_admin_test.rb @@ -1,28 +1,28 @@ -class Subscriptions::RenewAsAdminTest < ActionDispatch::IntegrationTest +# frozen_string_literal: true +class Subscriptions::RenewAsAdminTest < ActionDispatch::IntegrationTest setup do @admin = User.find_by(username: 'admin') login_as(@admin, scope: :user) end test 'admin successfully renew a subscription before it has ended' do - user = User.find_by(username: 'kdumas') plan = Plan.find_by(base_name: 'Mensuel tarif réduit') VCR.use_cassette('subscriptions_admin_renew_success') do post '/api/subscriptions', - { + params: { subscription: { plan_id: plan.id, user_id: user.id } - }.to_json, default_headers + }.to_json, headers: default_headers end # Check response format & status assert_equal 201, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the correct plan was subscribed subscription = json_response(response.body) @@ -74,17 +74,17 @@ class Subscriptions::RenewAsAdminTest < ActionDispatch::IntegrationTest VCR.use_cassette('subscriptions_admin_offer_free_days') do put "/api/subscriptions/#{subscription.id}", - { + params: { subscription: { expired_at: new_date.strftime('%Y-%m-%d %H:%M:%S.%9N Z'), free: true } - }.to_json, default_headers + }.to_json, headers: default_headers end # Check response format & status assert_equal 200, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check that the subscribed plan was not altered res_subscription = json_response(response.body) @@ -114,16 +114,16 @@ class Subscriptions::RenewAsAdminTest < ActionDispatch::IntegrationTest VCR.use_cassette('subscriptions_admin_extends_subscription') do put "/api/subscriptions/#{subscription.id}", - { + params: { subscription: { expired_at: new_date.strftime('%Y-%m-%d %H:%M:%S.%9N Z') } - }.to_json, default_headers + }.to_json, headers: default_headers end # Check response format & status assert_equal 201, response.status, response.body - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check that the subscribed plan is still the same res_subscription = json_response(response.body) @@ -145,5 +145,4 @@ class Subscriptions::RenewAsAdminTest < ActionDispatch::IntegrationTest assert_not_nil notification, 'user notification was not created' assert_equal user.id, notification.receiver_id, 'wrong user notified' end - end diff --git a/test/integration/subscriptions/renew_as_user_test.rb b/test/integration/subscriptions/renew_as_user_test.rb index 117efac12..8f694626a 100644 --- a/test/integration/subscriptions/renew_as_user_test.rb +++ b/test/integration/subscriptions/renew_as_user_test.rb @@ -1,6 +1,6 @@ +# frozen_string_literal: true + class Subscriptions::RenewAsUserTest < ActionDispatch::IntegrationTest - - setup do @user = User.find_by(username: 'lseguin') login_as(@user, scope: :user) @@ -12,19 +12,19 @@ class Subscriptions::RenewAsUserTest < ActionDispatch::IntegrationTest VCR.use_cassette('subscriptions_user_renew_success', erb: true) do post '/api/payments/confirm_payment', - { + params: { payment_method_id: stripe_payment_method, cart_items: { subscription: { plan_id: plan.id } } - }.to_json, default_headers + }.to_json, headers: default_headers end # Check response format & status assert_equal 201, response.status, "API does not return the expected status. #{response.body}" - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the correct plan was subscribed subscription = json_response(response.body) @@ -69,8 +69,6 @@ class Subscriptions::RenewAsUserTest < ActionDispatch::IntegrationTest assert_equal plan.amount, invoice.total, 'Invoice total price does not match the bought subscription' end - - test 'user fails to renew a subscription' do plan = Plan.find_by(group_id: @user.group.id, type: 'Plan', base_name: 'Mensuel') @@ -78,19 +76,19 @@ class Subscriptions::RenewAsUserTest < ActionDispatch::IntegrationTest VCR.use_cassette('subscriptions_user_renew_failed') do post '/api/payments/confirm_payment', - { + params: { payment_method_id: stripe_payment_method(error: :card_declined), cart_items: { subscription: { plan_id: plan.id } } - }.to_json, default_headers + }.to_json, headers: default_headers end # Check response format & status assert_equal 200, response.status, "API does not return the expected status. #{response.body}" - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type # Check the error was handled assert_match /Your card was declined/, response.body @@ -100,7 +98,5 @@ class Subscriptions::RenewAsUserTest < ActionDispatch::IntegrationTest # Check the subscription was not saved assert_equal 1, @user.subscriptions.count - end - end diff --git a/test/integration/wallets_test.rb b/test/integration/wallets_test.rb index fa3f6f47a..b0c711a26 100644 --- a/test/integration/wallets_test.rb +++ b/test/integration/wallets_test.rb @@ -1,5 +1,6 @@ -class WalletsTest < ActionDispatch::IntegrationTest +# frozen_string_literal: true +class WalletsTest < ActionDispatch::IntegrationTest # Called before every test method runs. Can be used # to set up fixture information. def setup @@ -17,7 +18,7 @@ class WalletsTest < ActionDispatch::IntegrationTest test 'get my wallet' do get "/api/wallet/by_user/#{@vlonchamp.id}" assert_equal 200, response.status - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type wallet = json_response(response.body) assert_equal @vlonchamp.wallet.invoicing_profile_id, wallet[:invoicing_profile_id] assert_equal @vlonchamp.wallet.amount, wallet[:amount] @@ -29,7 +30,7 @@ class WalletsTest < ActionDispatch::IntegrationTest @user1 = User.first get "/api/wallet/by_user/#{@user1.id}" assert_equal 200, response.status - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type wallet = json_response(response.body) assert_equal @user1.wallet.invoicing_profile_id, wallet[:invoicing_profile_id] assert_equal @user1.wallet.amount, wallet[:amount] @@ -45,7 +46,7 @@ class WalletsTest < ActionDispatch::IntegrationTest w = @vlonchamp.wallet get "/api/wallet/#{w.id}/transactions" assert_equal 200, response.status - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type transactions = json_response(response.body) assert_equal w.wallet_transactions.count, transactions.size assert_equal wallet_transactions(:transaction1).id, transactions.first[:id] @@ -64,10 +65,10 @@ class WalletsTest < ActionDispatch::IntegrationTest amount = 10.5 expected_amount = w.amount + amount put "/api/wallet/#{w.id}/credit", - amount: amount + params: { amount: amount } assert_equal 200, response.status - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type wallet = json_response(response.body) w.reload assert_equal w.amount, expected_amount @@ -77,7 +78,6 @@ class WalletsTest < ActionDispatch::IntegrationTest assert_empty Invoice.where(invoiced: w.wallet_transactions.last) end - test 'admin credit wallet with refund invoice generation' do admin = users(:user_1) login_as(admin, scope: :user) @@ -86,13 +86,15 @@ class WalletsTest < ActionDispatch::IntegrationTest avoir_date = DateTime.current.end_of_day expected_amount = w.amount + amount put "/api/wallet/#{w.id}/credit", - amount: amount, - avoir: true, - avoir_date: avoir_date, - avoir_description: 'Some text' + params: { + amount: amount, + avoir: true, + avoir_date: avoir_date, + avoir_description: 'Some text' + } assert_equal 200, response.status - assert_equal Mime::JSON, response.content_type + assert_equal Mime[:json], response.content_type wallet = json_response(response.body) w.reload assert_equal w.amount, expected_amount From df8ff7759700dbc5ab6eeb6839ec6ee585388c12 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 24 Mar 2020 16:45:27 +0100 Subject: [PATCH 046/109] fix migrations for rails 5 + use maildev instead of mailcatcher + fix tests script --- Gemfile | 3 - Procfile | 2 +- app/models/category.rb | 2 +- app/models/custom_asset.rb | 2 +- app/models/group.rb | 4 +- app/models/machine.rb | 2 +- app/models/profile.rb | 2 +- app/models/project.rb | 2 +- app/models/project_user.rb | 2 +- app/models/slot.rb | 4 +- app/models/space.rb | 2 +- app/models/training.rb | 2 +- app/models/user.rb | 6 +- app/sweepers/stylesheet_sweeper.rb | 2 +- config/initializers/new_framework_defaults.rb | 7 - .../20140409083104_devise_create_users.rb | 9 +- .../20140409083610_rolify_create_roles.rb | 12 +- db/migrate/20140409153915_create_profiles.rb | 4 +- db/migrate/20140410101026_create_projects.rb | 4 +- db/migrate/20140410140516_create_machines.rb | 4 +- db/migrate/20140410162151_create_assets.rb | 4 +- ...20140411152729_create_projects_machines.rb | 4 +- ...0414141134_add_is_allow_contact_to_user.rb | 4 +- .../20140415104151_create_project_user.rb | 4 +- ...20140415123625_add_author_id_to_project.rb | 4 +- .../20140416130838_create_project_steps.rb | 4 +- .../20140422085949_create_availabilities.rb | 4 +- ...22090412_create_machines_availabilities.rb | 4 +- ...0140513152025_add_title_to_project_step.rb | 4 +- .../20140516083543_create_reservations.rb | 4 +- db/migrate/20140516083909_create_slots.rb | 4 +- ...516093335_add_reservable_to_reservation.rb | 4 +- db/migrate/20140522115617_create_addresses.rb | 4 +- .../20140522175539_create_components.rb | 4 +- db/migrate/20140522175714_create_themes.rb | 4 +- db/migrate/20140522180032_create_licences.rb | 4 +- ...140522180930_create_projects_components.rb | 4 +- .../20140522181011_create_projects_themes.rb | 4 +- .../20140522181148_add_tags_to_project.rb | 4 +- ...0140523083230_add_licence_id_to_project.rb | 4 +- .../20140526144327_add_state_to_project.rb | 4 +- .../20140527092045_create_notifications.rb | 4 +- ...0528134944_add_is_valid_to_project_user.rb | 4 +- ...8140257_add_valid_token_to_project_user.rb | 4 +- .../20140529145140_create_user_trainings.rb | 4 +- db/migrate/20140603084413_create_groups.rb | 4 +- db/migrate/20140603085817_create_plans.rb | 4 +- ...0140603164215_create_trainings_pricings.rb | 4 +- .../20140604094514_add_group_to_user.rb | 4 +- db/migrate/20140604113611_create_trainings.rb | 4 +- ...20140604113919_create_trainings_machine.rb | 4 +- ...4132045_create_trainings_availabilities.rb | 4 +- ...5131_add_availability_id_to_reservation.rb | 4 +- ...ne_id_to_training_id_from_user_training.rb | 4 +- ...hine_to_training_from_trainings_pricing.rb | 4 +- ...emove_availability_id_form_reservations.rb | 4 +- ...20140609092827_add_availability_to_slot.rb | 4 +- ...0610153123_add_stp_customer_id_to_users.rb | 4 +- .../20140610170446_create_subscriptions.rb | 4 +- ...50651_add_stp_invoice_id_to_reservation.rb | 4 +- ...0620131525_add_start_at_to_subscription.rb | 4 +- ...20140622121724_create_friendly_id_slugs.rb | 4 +- .../20140622122944_add_slug_to_projects.rb | 4 +- .../20140622145648_add_strip_id_to_groups.rb | 4 +- .../20140623023557_add_slug_to_machines.rb | 4 +- db/migrate/20140624123359_create_credits.rb | 4 +- .../20140624123814_create_users_credits.rb | 4 +- ...24124338_add_training_credit_nb_to_plan.rb | 4 +- ...tart_at_to_expired_at_from_subscription.rb | 4 +- .../20140703231208_add_username_to_user.rb | 4 +- ...140703233420_add_index_username_to_user.rb | 4 +- ...703233942_remove_username_from_profiles.rb | 4 +- .../20140703235739_add_slug_to_users.rb | 4 +- db/migrate/20140710144142_create_events.rb | 4 +- .../20140710144427_create_categories.rb | 4 +- ...20140710144610_create_events_categories.rb | 4 +- db/migrate/20140711084809_change_event.rb | 4 +- ...b_reserve_reduced_places_to_reservation.rb | 4 +- ...140717143735_add_recurrence_id_to_event.rb | 4 +- db/migrate/20140722162046_create_invoices.rb | 4 +- .../20140722162309_create_invoice_items.rb | 4 +- .../20140723075942_add_user_id_to_invoice.rb | 4 +- ...7_remove_description_from_invoice_items.rb | 4 +- ...723172610_add_invoiced_to_invoice_items.rb | 4 +- ...5605_remove_invoiced_from_invoice_items.rb | 4 +- ...131808_add_description_to_invoice_items.rb | 4 +- ...55_add_subscription_id_to_invoice_items.rb | 4 +- ...20140728110430_add_reference_to_invoice.rb | 4 +- ...2111736_add_canceled_at_to_subscription.rb | 4 +- ...110131407_add_to_cancel_to_subscription.rb | 4 +- ...2044_remove_to_cancel_from_subscription.rb | 4 +- .../20141215153643_create_offer_days.rb | 4 +- ...141648_add_nb_total_places_to_trainings.rb | 4 +- ...843_add_nb_total_places_to_availability.rb | 4 +- .../20150107103903_add_slug_to_trainings.rb | 4 +- ...0108082541_add_published_at_to_projects.rb | 4 +- ...20150112160349_create_statistic_indices.rb | 4 +- .../20150112160405_create_statistic_types.rb | 4 +- ...150112160425_create_statistic_sub_types.rb | 4 +- ...112757_add_simple_to_statistic_sub_type.rb | 4 +- ...2_remove_simple_from_statistic_sub_type.rb | 4 +- ...0114111243_add_simple_to_statistic_type.rb | 4 +- .../20150114141926_create_statistic_fields.rb | 4 +- ...e_additional_field_from_statistic_index.rb | 4 +- ...50115143750_add_type_to_statistic_field.rb | 4 +- ...ename_statistic_field_type_to_data_type.rb | 4 +- ...atistic_type_id_from_statistic_sub_type.rb | 4 +- ...9093811_create_statistic_type_sub_types.rb | 4 +- ...0119160758_add_table_to_statistic_index.rb | 4 +- .../20150119161004_create_statistic_graphs.rb | 4 +- ...0150127101521_add_ca_to_statistic_index.rb | 4 +- ...0150127155141_add_avoir_mode_to_invoice.rb | 4 +- ...0150127161235_add_avoir_date_to_invoice.rb | 4 +- ...0150127172510_add_invoice_id_to_invoice.rb | 4 +- ..._add_subscription_to_expire_to_invoices.rb | 4 +- ...ceiver_type_and_is_send_to_notification.rb | 4 +- ...075148_add_is_active_attribute_to_users.rb | 4 +- db/migrate/20150428091057_create_settings.rb | 4 +- ...0506090921_add_description_to_trainings.rb | 4 +- ...20150507075506_add_ex_start_at_to_slots.rb | 4 +- .../20150507075620_add_ex_end_at_to_slots.rb | 4 +- .../20150512123546_add_attributes_to_plan.rb | 4 +- db/migrate/20150520132030_create_prices.rb | 4 +- .../20150526130729_add_base_name_to_plans.rb | 4 +- .../20150527153312_add_canceled_at_to_slot.rb | 4 +- ...default_for_training_nb_credit_to_plans.rb | 4 +- ...nge_stripe_id_to_short_name_from_groups.rb | 4 +- ...02_change_short_name_to_slug_from_group.rb | 4 +- ...658_add_unique_index_to_slug_from_group.rb | 4 +- .../20150604081757_add_ui_weight_to_plans.rb | 4 +- ...04131525_add_meta_data_to_notifications.rb | 4 +- ...8142234_add_invoicing_disabled_to_users.rb | 4 +- ...50609094336_add_interval_count_to_plans.rb | 4 +- .../20150615135539_migrate_plan_stats.rb | 4 +- .../20150617085623_create_custom_assets.rb | 4 +- .../20150701090642_create_stylesheets.rb | 4 +- db/migrate/20150702150754_create_tags.rb | 4 +- db/migrate/20150702151009_create_user_tags.rb | 4 +- ...20150706102547_create_availability_tags.rb | 4 +- .../20150707135343_add_offered_to_slots.rb | 4 +- ...542_change_amount_type_in_invoice_items.rb | 4 +- ...115_add_invoice_item_id_to_invoice_item.rb | 4 +- ...50715135751_add_description_to_invoices.rb | 4 +- .../20150915144448_create_auth_providers.rb | 4 +- ...20150915144939_create_o_auth2_providers.rb | 4 +- .../20150915152943_create_o_auth2_mappings.rb | 4 +- ...131_change_auth_provider_to_polymorphic.rb | 4 +- ...0150916093159_create_database_providers.rb | 4 +- .../20150921135557_add_sso_id_to_user.rb | 4 +- ...5817_add_local_model_to_o_auth2_mapping.rb | 4 +- ...ndpoints_to_urls_from_o_auth2_providers.rb | 4 +- ...move_resource_url_from_o_auth2_mappings.rb | 4 +- ...url_to_endpoints_from_o_auth2_providers.rb | 4 +- ...d_resource_endpoint_to_o_auth2_mappings.rb | 4 +- ...resource_endpoint_from_o_auth2_mappings.rb | 4 +- .../20150924141714_add_omniauth_to_users.rb | 4 +- ...41_add_profile_url_to_o_auth2_providers.rb | 4 +- .../20151008152219_add_auth_token_to_users.rb | 4 +- db/migrate/20151105125623_create_abuses.rb | 4 +- .../20151210113548_add_merged_at_to_users.rb | 4 +- ...19131623_add_destroying_to_availability.rb | 4 +- .../20160504085703_create_open_api_clients.rb | 4 +- ...05_create_open_api_calls_count_tracings.rb | 4 +- ...0516090121_add_social_fields_to_profile.rb | 4 +- .../20160516124056_add_website_to_profile.rb | 4 +- .../20160526095550_add_socials_to_profile.rb | 4 +- .../20160526102307_add_job_to_profile.rb | 4 +- ...60602075531_add_step_nb_to_project_step.rb | 4 +- ...20160613093842_create_unaccent_function.rb | 3 +- ...2931_rename_courses_workshops_to_events.rb | 4 +- .../20160628124538_create_event_themes.rb | 4 +- ...160628131408_create_events_event_themes.rb | 4 +- .../20160628134211_create_age_ranges.rb | 4 +- ...0160628134303_add_age_range_id_to_event.rb | 4 +- ...649_rename_range_to_name_from_age_range.rb | 4 +- .../20160630083438_add_slug_to_categories.rb | 4 +- .../20160630083556_add_slug_to_age_range.rb | 4 +- .../20160630083759_add_slug_to_event_theme.rb | 4 +- ..._theme_and_age_range_to_statistic_field.rb | 4 +- ...140204_add_slugs_to_existing_categories.rb | 4 +- db/migrate/20160704095606_create_wallets.rb | 4 +- ...160704165139_create_wallet_transactions.rb | 4 +- ...60714095018_add_public_page_to_training.rb | 4 +- ...0718165434_add_wallet_amount_to_invoice.rb | 4 +- ...24355_add_wallet_transaction_to_invoice.rb | 4 +- ...20160725131756_add_category_id_to_event.rb | 4 +- ...160725131950_singleize_event_categories.rb | 4 +- .../20160725135112_drop_events_categories.rb | 4 +- db/migrate/20160726081931_create_exports.rb | 4 +- .../20160726111509_add_user_to_export.rb | 4 +- ...52_rename_type_to_stat_type_from_export.rb | 4 +- .../20160726144257_add_key_to_export.rb | 4 +- ...095026_add_is_allow_newsletter_to_users.rb | 4 +- .../20160801145502_create_organizations.rb | 4 +- ...60801153454_add_profile_to_organization.rb | 4 +- db/migrate/20160803085201_create_coupons.rb | 4 +- .../20160803104701_add_coupon_to_invoice.rb | 4 +- ...160804073558_remove_usages_from_coupons.rb | 4 +- ...13850_remove_stp_coupon_id_from_coupons.rb | 4 +- ...8113930_add_validity_per_user_to_coupon.rb | 4 +- .../20160824080717_create_price_categories.rb | 4 +- ...824084111_create_event_price_categories.rb | 4 +- db/migrate/20160825141326_create_tickets.rb | 4 +- ..._event_reduced_amount_to_price_category.rb | 4 +- ...084443_remove_reduced_amount_from_event.rb | 4 +- ...reserve_reduced_places_from_reservation.rb | 4 +- ...58_create_statistic_custom_aggregations.rb | 4 +- ...d_field_to_statistic_custom_aggregation.rb | 4 +- ...path_from_statistic_custom_aggregations.rb | 4 +- ...s_type_to_statistic_custom_aggregations.rb | 4 +- ...4_add_transformation_to_o_auth2_mapping.rb | 4 +- ...0161123104604_add_amount_off_to_coupons.rb | 4 +- db/migrate/20170109085345_add_slug_to_plan.rb | 4 +- db/migrate/20170213100744_create_spaces.rb | 4 +- .../20170213101541_create_projects_spaces.rb | 4 +- ...0213103438_create_spaces_availabilities.rb | 4 +- ...0213142543_add_characteristics_to_space.rb | 4 +- ...0170227104736_create_slots_reservations.rb | 4 +- ...170227104934_migrate_slots_reservations.rb | 4 +- ...113718_remove_reservation_id_from_slots.rb | 4 +- .../20170227114634_add_destroying_to_slot.rb | 4 +- ...20170906100906_add_lock_to_availability.rb | 4 +- .../20171004135605_add_disabled_to_plan.rb | 4 +- .../20171005141522_add_disabled_to_group.rb | 4 +- ...20171010143708_add_disabled_to_training.rb | 4 +- .../20171011100640_add_disabled_to_machine.rb | 4 +- .../20171011125217_add_disabled_to_space.rb | 4 +- ...at_to_expiration_date_from_subscription.rb | 4 +- .../20181217103256_create_history_values.rb | 4 +- ...igrate_settings_value_to_history_values.rb | 4 +- ...181217110454_remove_value_from_settings.rb | 4 +- ...0190107103632_create_accounting_periods.rb | 4 +- ...190107111749_protect_accounting_periods.rb | 3 +- ...532_remove_invoicing_disabled_from_user.rb | 4 +- ...20190211124135_add_footprint_to_invoice.rb | 4 +- ...211124726_add_footprint_to_invoice_item.rb | 4 +- ...5101256_add_totals_to_accounting_period.rb | 4 +- ...2847_add_footprint_to_accounting_period.rb | 4 +- ...190227143153_add_environment_to_invoice.rb | 4 +- .../20190314095931_add_operator_to_invoice.rb | 4 +- ...0091148_add_footprint_to_history_values.rb | 4 +- ...0190521122429_create_invoicing_profiles.rb | 4 +- ...20190521123642_create_statistic_profile.rb | 4 +- ...09_migrate_profile_to_invoicing_profile.rb | 4 +- ...42_migrate_profile_to_statistic_profile.rb | 4 +- ...30_migrate_invoice_to_invoicing_profile.rb | 4 +- ...916_migrate_wallet_to_invoicing_profile.rb | 4 +- ...rate_history_value_to_invoicing_profile.rb | 4 +- .../20190528140012_remove_user_id_columns.rb | 6 +- ...igrate_reservation_to_statistic_profile.rb | 4 +- ...grate_subscription_to_statistic_profile.rb | 4 +- ...903_migrate_projet_to_statistic_profile.rb | 4 +- ...20190604075717_remove_statistic_columns.rb | 4 +- ...1322_create_statistic_profile_trainings.rb | 4 +- ...rainings_to_statistic_profile_trainings.rb | 4 +- .../20190606074801_delete_user_trainings.rb | 4 +- .../20190730085826_add_extension_to_export.rb | 4 +- ...5_add_stp_payment_intent_id_to_invoices.rb | 4 +- ...remove_stp_invoice_id_from_reservations.rb | 4 +- ...ir_mode_to_payment_method_from_invoices.rb | 2 +- db/migrate/20190924140726_create_imports.rb | 2 +- ...103352_add_recurrence_to_availabilities.rb | 2 +- .../20191127153729_create_i_calendars.rb | 2 +- ...20191202135507_create_i_calendar_events.rb | 2 +- .../20200127111404_add_name_to_stylesheet.rb | 2 +- ...00206132857_create_plans_availabilities.rb | 2 +- .../20200218092221_add_tours_to_profile.rb | 2 +- db/schema.rb | 1350 ++++++++--------- env.example | 6 +- package.json | 3 +- scripts/run-tests.sh | 1 + yarn.lock | 699 ++++++++- 272 files changed, 2108 insertions(+), 1000 deletions(-) diff --git a/Gemfile b/Gemfile index 8dc7f23af..0b532cf71 100644 --- a/Gemfile +++ b/Gemfile @@ -42,9 +42,6 @@ group :development do gem 'web-console', '>= 3.3.0' # Preview mail in the browser gem 'listen', '~> 3.0.5' - # don't put mailcatcher into your Gemfile. It will conflict with your applications gems at some point. - # Instead, pop a note in your README stating you use mailcatcher, and to run gem install mailcatcher then mailcatcher to get started. - # gem 'mailcatcher' gem 'rb-readline' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'railroady' diff --git a/Procfile b/Procfile index af88f2ea2..62d2b1e51 100644 --- a/Procfile +++ b/Procfile @@ -1,3 +1,3 @@ web: bundle exec rails server puma -p $PORT worker: bundle exec sidekiq -C ./config/sidekiq.yml -mail: mailcatcher --foreground --http-ip=0.0.0.0 +mail: node_modules/maildev/bin/maildev --ip 0.0.0.0 diff --git a/app/models/category.rb b/app/models/category.rb index 7fbc61258..39e801744 100644 --- a/app/models/category.rb +++ b/app/models/category.rb @@ -5,7 +5,7 @@ class Category < ActiveRecord::Base has_many :events, dependent: :destroy after_create :create_statistic_subtype - after_update :update_statistic_subtype, if: :name_changed? + after_update :update_statistic_subtype, if: :saved_change_to_name? after_destroy :remove_statistic_subtype diff --git a/app/models/custom_asset.rb b/app/models/custom_asset.rb index 1b129b826..a2fff8321 100644 --- a/app/models/custom_asset.rb +++ b/app/models/custom_asset.rb @@ -11,7 +11,7 @@ class CustomAsset < ActiveRecord::Base asset&.custom_asset_file&.attachment_url end - after_update :update_stylesheet if :viewable_changed? + after_update :update_stylesheet if :saved_change_to_viewable? def update_stylesheet Stylesheet.theme.rebuild! if %w[profile-image-file].include? name diff --git a/app/models/group.rb b/app/models/group.rb index 3b7414441..c50136872 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -19,8 +19,8 @@ class Group < ActiveRecord::Base after_create :create_prices after_create :create_statistic_subtype - after_update :update_statistic_subtype, if: :name_changed? - after_update :disable_plans, if: :disabled_changed? + after_update :update_statistic_subtype, if: :saved_change_to_name? + after_update :disable_plans, if: :saved_change_to_disabled? def destroyable? users.empty? and plans.empty? diff --git a/app/models/machine.rb b/app/models/machine.rb index b545a2783..fb4ad0242 100644 --- a/app/models/machine.rb +++ b/app/models/machine.rb @@ -29,7 +29,7 @@ class Machine < ActiveRecord::Base after_create :create_statistic_subtype after_create :create_machine_prices - after_update :update_statistic_subtype, if: :name_changed? + after_update :update_statistic_subtype, if: :saved_change_to_name? after_destroy :remove_statistic_subtype def not_subscribe_price(group_id) diff --git a/app/models/profile.rb b/app/models/profile.rb index 6814835c6..09699a453 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -37,7 +37,7 @@ class Profile < ActiveRecord::Base private def invoicing_data_was_modified? - first_name_changed? or last_name_changed? or new_record? + saved_change_to_first_name? || saved_change_to_last_name? || new_record? end def update_invoicing_profile diff --git a/app/models/project.rb b/app/models/project.rb index d9768d22f..395eca909 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -149,7 +149,7 @@ class Project < ActiveRecord::Base end def after_save_and_publish - return unless state_changed? && published? + return unless saved_change_to_state? && published? update_columns(published_at: DateTime.current) notify_admin_when_project_published diff --git a/app/models/project_user.rb b/app/models/project_user.rb index f7dd9f369..fc973afd1 100644 --- a/app/models/project_user.rb +++ b/app/models/project_user.rb @@ -6,7 +6,7 @@ class ProjectUser < ActiveRecord::Base before_create :generate_valid_token after_commit :notify_project_collaborator_to_valid, on: :create - after_update :notify_project_author_when_collaborator_valid, if: :is_valid_changed? + after_update :notify_project_author_when_collaborator_valid, if: :saved_change_to_is_valid? private def generate_valid_token diff --git a/app/models/slot.rb b/app/models/slot.rb index c7a1a4b6d..964c3ac24 100644 --- a/app/models/slot.rb +++ b/app/models/slot.rb @@ -53,11 +53,11 @@ class Slot < ActiveRecord::Base end def dates_were_modified? - start_at_changed? or end_at_changed? + saved_change_to_start_at? || saved_change_to_end_at? end def canceled? - canceled_at_changed? + saved_change_to_canceled_at? end def set_ex_start_end_dates_attrs diff --git a/app/models/space.rb b/app/models/space.rb index b4f7f204b..dd5b03d15 100644 --- a/app/models/space.rb +++ b/app/models/space.rb @@ -21,7 +21,7 @@ class Space < ActiveRecord::Base after_create :create_statistic_subtype after_create :create_space_prices - after_update :update_statistic_subtype, if: :name_changed? + after_update :update_statistic_subtype, if: :saved_change_to_name? after_destroy :remove_statistic_subtype diff --git a/app/models/training.rb b/app/models/training.rb index 682204239..b92bf0af5 100644 --- a/app/models/training.rb +++ b/app/models/training.rb @@ -23,7 +23,7 @@ class Training < ActiveRecord::Base after_create :create_statistic_subtype after_create :create_trainings_pricings - after_update :update_statistic_subtype, if: :name_changed? + after_update :update_statistic_subtype, if: :saved_change_to_name? after_destroy :remove_statistic_subtype def amount_by_group(group) diff --git a/app/models/user.rb b/app/models/user.rb index aaded4173..899f14b58 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -54,7 +54,7 @@ class User < ActiveRecord::Base after_commit :create_stripe_customer, on: [:create] after_commit :notify_admin_when_user_is_created, on: :create after_create :init_dependencies - after_update :notify_group_changed, if: :group_id_changed? + after_update :notify_group_changed, if: :saved_change_to_group_id? after_update :update_invoicing_profile, if: :invoicing_data_was_modified? after_update :update_statistic_profile, if: :statistic_data_was_modified? before_destroy :remove_orphan_drafts @@ -354,11 +354,11 @@ class User < ActiveRecord::Base end def invoicing_data_was_modified? - email_changed? + saved_change_to_email? end def statistic_data_was_modified? - group_id_changed? + saved_change_to_group_id? end def init_dependencies diff --git a/app/sweepers/stylesheet_sweeper.rb b/app/sweepers/stylesheet_sweeper.rb index 689e8f2a3..3a8c23fd6 100644 --- a/app/sweepers/stylesheet_sweeper.rb +++ b/app/sweepers/stylesheet_sweeper.rb @@ -5,6 +5,6 @@ class StylesheetSweeper < ActionController::Caching::Sweeper observe Stylesheet def after_update(record) - expire_page(controller: 'stylesheets', action: 'show', id: record.id) if record.contents_changed? + expire_page(controller: 'stylesheets', action: 'show', id: record.id) if record.saved_change_to_contents? end end diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb index 9fa84bbea..61448a3c4 100644 --- a/config/initializers/new_framework_defaults.rb +++ b/config/initializers/new_framework_defaults.rb @@ -8,9 +8,6 @@ # # Read the Guide for Upgrading Ruby on Rails for more info on each option. -# DEPRECATION WARNING: raise_on_unfiltered_parameters is deprecated and has no effect in Rails 5.1. -Rails.application.config.action_controller.raise_on_unfiltered_parameters = true - # Enable per-form CSRF tokens. Previous versions had false. Rails.application.config.action_controller.per_form_csrf_tokens = false @@ -23,7 +20,3 @@ ActiveSupport.to_time_preserves_timezone = false # Require `belongs_to` associations by default. Previous versions had false. Rails.application.config.active_record.belongs_to_required_by_default = false - -# DEPRECATION WARNING: ActiveSupport.halt_callback_chains_on_return_false= is deprecated and will be removed in Rails 5.2. -# Do not halt callback chains when a callback returns false. Previous versions had true. -ActiveSupport.halt_callback_chains_on_return_false = true diff --git a/db/migrate/20140409083104_devise_create_users.rb b/db/migrate/20140409083104_devise_create_users.rb index d2b0d6484..6c36ef882 100644 --- a/db/migrate/20140409083104_devise_create_users.rb +++ b/db/migrate/20140409083104_devise_create_users.rb @@ -1,9 +1,12 @@ -class DeviseCreateUsers < ActiveRecord::Migration +# frozen_string_literal: true + +# create the Users table, storing the user's accounts +class DeviseCreateUsers < ActiveRecord::Migration[4.2] def change create_table(:users) do |t| ## Database authenticatable - t.string :email, null: false, default: "" - t.string :encrypted_password, null: false, default: "" + t.string :email, null: false, default: '' + t.string :encrypted_password, null: false, default: '' ## Recoverable t.string :reset_password_token diff --git a/db/migrate/20140409083610_rolify_create_roles.rb b/db/migrate/20140409083610_rolify_create_roles.rb index 999c94a3e..38aa1a2ae 100644 --- a/db/migrate/20140409083610_rolify_create_roles.rb +++ b/db/migrate/20140409083610_rolify_create_roles.rb @@ -1,19 +1,21 @@ -class RolifyCreateRoles < ActiveRecord::Migration +# frozen_string_literal:true + +class RolifyCreateRoles < ActiveRecord::Migration[4.2] def change create_table(:roles) do |t| t.string :name - t.references :resource, :polymorphic => true + t.references :resource, polymorphic: true t.timestamps end - create_table(:users_roles, :id => false) do |t| + create_table(:users_roles, id: false) do |t| t.references :user t.references :role end add_index(:roles, :name) - add_index(:roles, [ :name, :resource_type, :resource_id ]) - add_index(:users_roles, [ :user_id, :role_id ]) + add_index(:roles, %i[name resource_type resource_id]) + add_index(:users_roles, %i[user_id role_id]) end end diff --git a/db/migrate/20140409153915_create_profiles.rb b/db/migrate/20140409153915_create_profiles.rb index c668ba1b1..9595c79a5 100644 --- a/db/migrate/20140409153915_create_profiles.rb +++ b/db/migrate/20140409153915_create_profiles.rb @@ -1,4 +1,6 @@ -class CreateProfiles < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateProfiles < ActiveRecord::Migration[4.2] def change create_table :profiles do |t| t.belongs_to :user, index: true diff --git a/db/migrate/20140410101026_create_projects.rb b/db/migrate/20140410101026_create_projects.rb index d5d757c8c..5627f1d06 100644 --- a/db/migrate/20140410101026_create_projects.rb +++ b/db/migrate/20140410101026_create_projects.rb @@ -1,4 +1,6 @@ -class CreateProjects < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateProjects < ActiveRecord::Migration[4.2] def change create_table :projects do |t| t.string :name diff --git a/db/migrate/20140410140516_create_machines.rb b/db/migrate/20140410140516_create_machines.rb index 7767d320c..b2a8c359c 100644 --- a/db/migrate/20140410140516_create_machines.rb +++ b/db/migrate/20140410140516_create_machines.rb @@ -1,4 +1,6 @@ -class CreateMachines < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateMachines < ActiveRecord::Migration[4.2] def change create_table :machines do |t| t.string :name, null: false diff --git a/db/migrate/20140410162151_create_assets.rb b/db/migrate/20140410162151_create_assets.rb index e7b6951dc..154a0d168 100644 --- a/db/migrate/20140410162151_create_assets.rb +++ b/db/migrate/20140410162151_create_assets.rb @@ -1,4 +1,6 @@ -class CreateAssets < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateAssets < ActiveRecord::Migration[4.2] def change create_table :assets do |t| t.references :viewable, polymorphic: true diff --git a/db/migrate/20140411152729_create_projects_machines.rb b/db/migrate/20140411152729_create_projects_machines.rb index 63bf78825..8ecbfb749 100644 --- a/db/migrate/20140411152729_create_projects_machines.rb +++ b/db/migrate/20140411152729_create_projects_machines.rb @@ -1,4 +1,6 @@ -class CreateProjectsMachines < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateProjectsMachines < ActiveRecord::Migration[4.2] def change create_table :projects_machines do |t| t.belongs_to :project, index: true diff --git a/db/migrate/20140414141134_add_is_allow_contact_to_user.rb b/db/migrate/20140414141134_add_is_allow_contact_to_user.rb index 64cea0239..e70416323 100644 --- a/db/migrate/20140414141134_add_is_allow_contact_to_user.rb +++ b/db/migrate/20140414141134_add_is_allow_contact_to_user.rb @@ -1,4 +1,6 @@ -class AddIsAllowContactToUser < ActiveRecord::Migration +# frozen_string_literal:true + +class AddIsAllowContactToUser < ActiveRecord::Migration[4.2] def change add_column :users, :is_allow_contact, :boolean, default: true end diff --git a/db/migrate/20140415104151_create_project_user.rb b/db/migrate/20140415104151_create_project_user.rb index de510eeec..fdf519e1b 100644 --- a/db/migrate/20140415104151_create_project_user.rb +++ b/db/migrate/20140415104151_create_project_user.rb @@ -1,4 +1,6 @@ -class CreateProjectUser < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateProjectUser < ActiveRecord::Migration[4.2] def change create_table :project_users do |t| t.belongs_to :project, index: true diff --git a/db/migrate/20140415123625_add_author_id_to_project.rb b/db/migrate/20140415123625_add_author_id_to_project.rb index 854b20132..30e8676bd 100644 --- a/db/migrate/20140415123625_add_author_id_to_project.rb +++ b/db/migrate/20140415123625_add_author_id_to_project.rb @@ -1,4 +1,6 @@ -class AddAuthorIdToProject < ActiveRecord::Migration +# frozen_string_literal:true + +class AddAuthorIdToProject < ActiveRecord::Migration[4.2] def change add_column :projects, :author_id, :integer end diff --git a/db/migrate/20140416130838_create_project_steps.rb b/db/migrate/20140416130838_create_project_steps.rb index 1b4b69cc9..80d713919 100644 --- a/db/migrate/20140416130838_create_project_steps.rb +++ b/db/migrate/20140416130838_create_project_steps.rb @@ -1,4 +1,6 @@ -class CreateProjectSteps < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateProjectSteps < ActiveRecord::Migration[4.2] def change create_table :project_steps do |t| t.text :description diff --git a/db/migrate/20140422085949_create_availabilities.rb b/db/migrate/20140422085949_create_availabilities.rb index 2c1050068..5acd3ace3 100644 --- a/db/migrate/20140422085949_create_availabilities.rb +++ b/db/migrate/20140422085949_create_availabilities.rb @@ -1,4 +1,6 @@ -class CreateAvailabilities < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateAvailabilities < ActiveRecord::Migration[4.2] def change create_table :availabilities do |t| t.datetime :start_at diff --git a/db/migrate/20140422090412_create_machines_availabilities.rb b/db/migrate/20140422090412_create_machines_availabilities.rb index b8796d694..6fcfd004c 100644 --- a/db/migrate/20140422090412_create_machines_availabilities.rb +++ b/db/migrate/20140422090412_create_machines_availabilities.rb @@ -1,4 +1,6 @@ -class CreateMachinesAvailabilities < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateMachinesAvailabilities < ActiveRecord::Migration[4.2] def change create_table :machines_availabilities do |t| t.belongs_to :machine, index: true diff --git a/db/migrate/20140513152025_add_title_to_project_step.rb b/db/migrate/20140513152025_add_title_to_project_step.rb index 5ce2d678d..14ef164c9 100644 --- a/db/migrate/20140513152025_add_title_to_project_step.rb +++ b/db/migrate/20140513152025_add_title_to_project_step.rb @@ -1,4 +1,6 @@ -class AddTitleToProjectStep < ActiveRecord::Migration +# frozen_string_literal:true + +class AddTitleToProjectStep < ActiveRecord::Migration[4.2] def change add_column :project_steps, :title, :string remove_column :project_steps, :picture, :string diff --git a/db/migrate/20140516083543_create_reservations.rb b/db/migrate/20140516083543_create_reservations.rb index 68ae623cd..5e15d7df4 100644 --- a/db/migrate/20140516083543_create_reservations.rb +++ b/db/migrate/20140516083543_create_reservations.rb @@ -1,4 +1,6 @@ -class CreateReservations < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateReservations < ActiveRecord::Migration[4.2] def change create_table :reservations do |t| t.belongs_to :user, index: true diff --git a/db/migrate/20140516083909_create_slots.rb b/db/migrate/20140516083909_create_slots.rb index 17d1783a9..22baf2b0c 100644 --- a/db/migrate/20140516083909_create_slots.rb +++ b/db/migrate/20140516083909_create_slots.rb @@ -1,4 +1,6 @@ -class CreateSlots < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateSlots < ActiveRecord::Migration[4.2] def change create_table :slots do |t| t.datetime :start_at diff --git a/db/migrate/20140516093335_add_reservable_to_reservation.rb b/db/migrate/20140516093335_add_reservable_to_reservation.rb index a5c5d337b..5b21b2630 100644 --- a/db/migrate/20140516093335_add_reservable_to_reservation.rb +++ b/db/migrate/20140516093335_add_reservable_to_reservation.rb @@ -1,4 +1,6 @@ -class AddReservableToReservation < ActiveRecord::Migration +# frozen_string_literal:true + +class AddReservableToReservation < ActiveRecord::Migration[4.2] def change add_reference :reservations, :reservable, index: true, polymorphic: true end diff --git a/db/migrate/20140522115617_create_addresses.rb b/db/migrate/20140522115617_create_addresses.rb index 0c778da97..5b75eee40 100644 --- a/db/migrate/20140522115617_create_addresses.rb +++ b/db/migrate/20140522115617_create_addresses.rb @@ -1,4 +1,6 @@ -class CreateAddresses < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateAddresses < ActiveRecord::Migration[4.2] def change create_table :addresses do |t| t.string :address diff --git a/db/migrate/20140522175539_create_components.rb b/db/migrate/20140522175539_create_components.rb index 37dd7f4ae..57bc423ec 100644 --- a/db/migrate/20140522175539_create_components.rb +++ b/db/migrate/20140522175539_create_components.rb @@ -1,4 +1,6 @@ -class CreateComponents < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateComponents < ActiveRecord::Migration[4.2] def change create_table :components do |t| t.string :name, null: false diff --git a/db/migrate/20140522175714_create_themes.rb b/db/migrate/20140522175714_create_themes.rb index 124ec88a3..f8e2a372c 100644 --- a/db/migrate/20140522175714_create_themes.rb +++ b/db/migrate/20140522175714_create_themes.rb @@ -1,4 +1,6 @@ -class CreateThemes < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateThemes < ActiveRecord::Migration[4.2] def change create_table :themes do |t| t.string :name, null: false diff --git a/db/migrate/20140522180032_create_licences.rb b/db/migrate/20140522180032_create_licences.rb index a1f46e9e6..1af72428a 100644 --- a/db/migrate/20140522180032_create_licences.rb +++ b/db/migrate/20140522180032_create_licences.rb @@ -1,4 +1,6 @@ -class CreateLicences < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateLicences < ActiveRecord::Migration[4.2] def change create_table :licences do |t| t.string :name, null: false diff --git a/db/migrate/20140522180930_create_projects_components.rb b/db/migrate/20140522180930_create_projects_components.rb index 940f8015a..0bb7837a8 100644 --- a/db/migrate/20140522180930_create_projects_components.rb +++ b/db/migrate/20140522180930_create_projects_components.rb @@ -1,4 +1,6 @@ -class CreateProjectsComponents < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateProjectsComponents < ActiveRecord::Migration[4.2] def change create_table :projects_components do |t| t.belongs_to :project, index: true diff --git a/db/migrate/20140522181011_create_projects_themes.rb b/db/migrate/20140522181011_create_projects_themes.rb index ba24c5278..ae8af3408 100644 --- a/db/migrate/20140522181011_create_projects_themes.rb +++ b/db/migrate/20140522181011_create_projects_themes.rb @@ -1,4 +1,6 @@ -class CreateProjectsThemes < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateProjectsThemes < ActiveRecord::Migration[4.2] def change create_table :projects_themes do |t| t.belongs_to :project, index: true diff --git a/db/migrate/20140522181148_add_tags_to_project.rb b/db/migrate/20140522181148_add_tags_to_project.rb index b3d61a482..7faa80638 100644 --- a/db/migrate/20140522181148_add_tags_to_project.rb +++ b/db/migrate/20140522181148_add_tags_to_project.rb @@ -1,4 +1,6 @@ -class AddTagsToProject < ActiveRecord::Migration +# frozen_string_literal:true + +class AddTagsToProject < ActiveRecord::Migration[4.2] def change add_column :projects, :tags, :text end diff --git a/db/migrate/20140523083230_add_licence_id_to_project.rb b/db/migrate/20140523083230_add_licence_id_to_project.rb index df32d323e..8cd0102ad 100644 --- a/db/migrate/20140523083230_add_licence_id_to_project.rb +++ b/db/migrate/20140523083230_add_licence_id_to_project.rb @@ -1,4 +1,6 @@ -class AddLicenceIdToProject < ActiveRecord::Migration +# frozen_string_literal:true + +class AddLicenceIdToProject < ActiveRecord::Migration[4.2] def change add_column :projects, :licence_id, :integer end diff --git a/db/migrate/20140526144327_add_state_to_project.rb b/db/migrate/20140526144327_add_state_to_project.rb index 52cd3bf06..bcaed90a8 100644 --- a/db/migrate/20140526144327_add_state_to_project.rb +++ b/db/migrate/20140526144327_add_state_to_project.rb @@ -1,4 +1,6 @@ -class AddStateToProject < ActiveRecord::Migration +# frozen_string_literal:true + +class AddStateToProject < ActiveRecord::Migration[4.2] def change add_column :projects, :state, :string Project.all.each do |p| diff --git a/db/migrate/20140527092045_create_notifications.rb b/db/migrate/20140527092045_create_notifications.rb index 15594374c..5d44de87f 100644 --- a/db/migrate/20140527092045_create_notifications.rb +++ b/db/migrate/20140527092045_create_notifications.rb @@ -1,4 +1,6 @@ -class CreateNotifications < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateNotifications < ActiveRecord::Migration[4.2] def change create_table :notifications do |t| t.integer :receiver_id diff --git a/db/migrate/20140528134944_add_is_valid_to_project_user.rb b/db/migrate/20140528134944_add_is_valid_to_project_user.rb index dadabcde6..09a76b3bb 100644 --- a/db/migrate/20140528134944_add_is_valid_to_project_user.rb +++ b/db/migrate/20140528134944_add_is_valid_to_project_user.rb @@ -1,4 +1,6 @@ -class AddIsValidToProjectUser < ActiveRecord::Migration +# frozen_string_literal:true + +class AddIsValidToProjectUser < ActiveRecord::Migration[4.2] def change add_column :project_users, :is_valid, :boolean, default: false end diff --git a/db/migrate/20140528140257_add_valid_token_to_project_user.rb b/db/migrate/20140528140257_add_valid_token_to_project_user.rb index 98a85bdba..0ffe8ad47 100644 --- a/db/migrate/20140528140257_add_valid_token_to_project_user.rb +++ b/db/migrate/20140528140257_add_valid_token_to_project_user.rb @@ -1,4 +1,6 @@ -class AddValidTokenToProjectUser < ActiveRecord::Migration +# frozen_string_literal:true + +class AddValidTokenToProjectUser < ActiveRecord::Migration[4.2] def change add_column :project_users, :valid_token, :string end diff --git a/db/migrate/20140529145140_create_user_trainings.rb b/db/migrate/20140529145140_create_user_trainings.rb index 77ba1bc67..1251d2af4 100644 --- a/db/migrate/20140529145140_create_user_trainings.rb +++ b/db/migrate/20140529145140_create_user_trainings.rb @@ -1,4 +1,6 @@ -class CreateUserTrainings < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateUserTrainings < ActiveRecord::Migration[4.2] def change create_table :user_trainings do |t| t.belongs_to :user, index: true diff --git a/db/migrate/20140603084413_create_groups.rb b/db/migrate/20140603084413_create_groups.rb index 998730163..a861a0232 100644 --- a/db/migrate/20140603084413_create_groups.rb +++ b/db/migrate/20140603084413_create_groups.rb @@ -1,4 +1,6 @@ -class CreateGroups < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateGroups < ActiveRecord::Migration[4.2] def change create_table :groups do |t| t.string :name diff --git a/db/migrate/20140603085817_create_plans.rb b/db/migrate/20140603085817_create_plans.rb index 519c3a230..5fd383f55 100644 --- a/db/migrate/20140603085817_create_plans.rb +++ b/db/migrate/20140603085817_create_plans.rb @@ -1,4 +1,6 @@ -class CreatePlans < ActiveRecord::Migration +# frozen_string_literal:true + +class CreatePlans < ActiveRecord::Migration[4.2] def change create_table :plans do |t| t.string :name diff --git a/db/migrate/20140603164215_create_trainings_pricings.rb b/db/migrate/20140603164215_create_trainings_pricings.rb index c95a81922..d12f99115 100644 --- a/db/migrate/20140603164215_create_trainings_pricings.rb +++ b/db/migrate/20140603164215_create_trainings_pricings.rb @@ -1,4 +1,6 @@ -class CreateTrainingsPricings < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateTrainingsPricings < ActiveRecord::Migration[4.2] def change create_table :trainings_pricings do |t| t.belongs_to :machine, index: true diff --git a/db/migrate/20140604094514_add_group_to_user.rb b/db/migrate/20140604094514_add_group_to_user.rb index f518fbbe2..ad6818d39 100644 --- a/db/migrate/20140604094514_add_group_to_user.rb +++ b/db/migrate/20140604094514_add_group_to_user.rb @@ -1,4 +1,6 @@ -class AddGroupToUser < ActiveRecord::Migration +# frozen_string_literal:true + +class AddGroupToUser < ActiveRecord::Migration[4.2] def change add_reference :users, :group, index: true end diff --git a/db/migrate/20140604113611_create_trainings.rb b/db/migrate/20140604113611_create_trainings.rb index 43e788585..11e1b4c88 100644 --- a/db/migrate/20140604113611_create_trainings.rb +++ b/db/migrate/20140604113611_create_trainings.rb @@ -1,4 +1,6 @@ -class CreateTrainings < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateTrainings < ActiveRecord::Migration[4.2] def change create_table :trainings do |t| t.string :name diff --git a/db/migrate/20140604113919_create_trainings_machine.rb b/db/migrate/20140604113919_create_trainings_machine.rb index 7d698bd40..36c12cd73 100644 --- a/db/migrate/20140604113919_create_trainings_machine.rb +++ b/db/migrate/20140604113919_create_trainings_machine.rb @@ -1,4 +1,6 @@ -class CreateTrainingsMachine < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateTrainingsMachine < ActiveRecord::Migration[4.2] def change create_table :trainings_machines do |t| t.belongs_to :training, index: true diff --git a/db/migrate/20140604132045_create_trainings_availabilities.rb b/db/migrate/20140604132045_create_trainings_availabilities.rb index 4514ff969..01d2ecf63 100644 --- a/db/migrate/20140604132045_create_trainings_availabilities.rb +++ b/db/migrate/20140604132045_create_trainings_availabilities.rb @@ -1,4 +1,6 @@ -class CreateTrainingsAvailabilities < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateTrainingsAvailabilities < ActiveRecord::Migration[4.2] def change create_table :trainings_availabilities do |t| t.belongs_to :training, index: true diff --git a/db/migrate/20140605125131_add_availability_id_to_reservation.rb b/db/migrate/20140605125131_add_availability_id_to_reservation.rb index 197ffc41f..4e7c4236c 100644 --- a/db/migrate/20140605125131_add_availability_id_to_reservation.rb +++ b/db/migrate/20140605125131_add_availability_id_to_reservation.rb @@ -1,4 +1,6 @@ -class AddAvailabilityIdToReservation < ActiveRecord::Migration +# frozen_string_literal:true + +class AddAvailabilityIdToReservation < ActiveRecord::Migration[4.2] def change add_column :reservations, :availability_id, :integer add_index :reservations, :availability_id diff --git a/db/migrate/20140605142133_change_machine_id_to_training_id_from_user_training.rb b/db/migrate/20140605142133_change_machine_id_to_training_id_from_user_training.rb index c3bbe89fc..bdc4c7113 100644 --- a/db/migrate/20140605142133_change_machine_id_to_training_id_from_user_training.rb +++ b/db/migrate/20140605142133_change_machine_id_to_training_id_from_user_training.rb @@ -1,4 +1,6 @@ -class ChangeMachineIdToTrainingIdFromUserTraining < ActiveRecord::Migration +# frozen_string_literal:true + +class ChangeMachineIdToTrainingIdFromUserTraining < ActiveRecord::Migration[4.2] def change remove_belongs_to :user_trainings, :machine, index: true add_belongs_to :user_trainings, :training, index: true diff --git a/db/migrate/20140605151442_change_machine_to_training_from_trainings_pricing.rb b/db/migrate/20140605151442_change_machine_to_training_from_trainings_pricing.rb index 6f6a7484e..a9face8b4 100644 --- a/db/migrate/20140605151442_change_machine_to_training_from_trainings_pricing.rb +++ b/db/migrate/20140605151442_change_machine_to_training_from_trainings_pricing.rb @@ -1,4 +1,6 @@ -class ChangeMachineToTrainingFromTrainingsPricing < ActiveRecord::Migration +# frozen_string_literal:true + +class ChangeMachineToTrainingFromTrainingsPricing < ActiveRecord::Migration[4.2] def change remove_belongs_to :trainings_pricings, :machine, index: true add_belongs_to :trainings_pricings, :training, index: true diff --git a/db/migrate/20140609092700_remove_availability_id_form_reservations.rb b/db/migrate/20140609092700_remove_availability_id_form_reservations.rb index 109d767e0..f6e6b1583 100644 --- a/db/migrate/20140609092700_remove_availability_id_form_reservations.rb +++ b/db/migrate/20140609092700_remove_availability_id_form_reservations.rb @@ -1,4 +1,6 @@ -class RemoveAvailabilityIdFormReservations < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveAvailabilityIdFormReservations < ActiveRecord::Migration[4.2] def change remove_column :reservations, :availability_id, :integer end diff --git a/db/migrate/20140609092827_add_availability_to_slot.rb b/db/migrate/20140609092827_add_availability_to_slot.rb index 30739c7d0..9d170ea0a 100644 --- a/db/migrate/20140609092827_add_availability_to_slot.rb +++ b/db/migrate/20140609092827_add_availability_to_slot.rb @@ -1,4 +1,6 @@ -class AddAvailabilityToSlot < ActiveRecord::Migration +# frozen_string_literal:true + +class AddAvailabilityToSlot < ActiveRecord::Migration[4.2] def change add_reference :slots, :availability, index: true end diff --git a/db/migrate/20140610153123_add_stp_customer_id_to_users.rb b/db/migrate/20140610153123_add_stp_customer_id_to_users.rb index d45c32f75..f06fcaa44 100644 --- a/db/migrate/20140610153123_add_stp_customer_id_to_users.rb +++ b/db/migrate/20140610153123_add_stp_customer_id_to_users.rb @@ -1,4 +1,6 @@ -class AddStpCustomerIdToUsers < ActiveRecord::Migration +# frozen_string_literal:true + +class AddStpCustomerIdToUsers < ActiveRecord::Migration[4.2] def up add_column :users, :stp_customer_id, :string User.all.each do |user| diff --git a/db/migrate/20140610170446_create_subscriptions.rb b/db/migrate/20140610170446_create_subscriptions.rb index f05da0af1..3ee26c944 100644 --- a/db/migrate/20140610170446_create_subscriptions.rb +++ b/db/migrate/20140610170446_create_subscriptions.rb @@ -1,4 +1,6 @@ -class CreateSubscriptions < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateSubscriptions < ActiveRecord::Migration[4.2] def change create_table :subscriptions do |t| t.belongs_to :plan, index: true diff --git a/db/migrate/20140613150651_add_stp_invoice_id_to_reservation.rb b/db/migrate/20140613150651_add_stp_invoice_id_to_reservation.rb index 200d1ec13..aa1fd4e83 100644 --- a/db/migrate/20140613150651_add_stp_invoice_id_to_reservation.rb +++ b/db/migrate/20140613150651_add_stp_invoice_id_to_reservation.rb @@ -1,4 +1,6 @@ -class AddStpInvoiceIdToReservation < ActiveRecord::Migration +# frozen_string_literal:true + +class AddStpInvoiceIdToReservation < ActiveRecord::Migration[4.2] def change add_column :reservations, :stp_invoice_id, :string add_index :reservations, :stp_invoice_id diff --git a/db/migrate/20140620131525_add_start_at_to_subscription.rb b/db/migrate/20140620131525_add_start_at_to_subscription.rb index 963361e2c..aa69b0859 100644 --- a/db/migrate/20140620131525_add_start_at_to_subscription.rb +++ b/db/migrate/20140620131525_add_start_at_to_subscription.rb @@ -1,4 +1,6 @@ -class AddStartAtToSubscription < ActiveRecord::Migration +# frozen_string_literal:true + +class AddStartAtToSubscription < ActiveRecord::Migration[4.2] def change add_column :subscriptions, :start_at, :datetime Subscription.all.each do |s| diff --git a/db/migrate/20140622121724_create_friendly_id_slugs.rb b/db/migrate/20140622121724_create_friendly_id_slugs.rb index 770f62644..18461b329 100644 --- a/db/migrate/20140622121724_create_friendly_id_slugs.rb +++ b/db/migrate/20140622121724_create_friendly_id_slugs.rb @@ -1,4 +1,6 @@ -class CreateFriendlyIdSlugs < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateFriendlyIdSlugs < ActiveRecord::Migration[4.2] def change create_table :friendly_id_slugs do |t| t.string :slug, :null => false diff --git a/db/migrate/20140622122944_add_slug_to_projects.rb b/db/migrate/20140622122944_add_slug_to_projects.rb index 62284f770..d4a1c651d 100644 --- a/db/migrate/20140622122944_add_slug_to_projects.rb +++ b/db/migrate/20140622122944_add_slug_to_projects.rb @@ -1,4 +1,6 @@ -class AddSlugToProjects < ActiveRecord::Migration +# frozen_string_literal:true + +class AddSlugToProjects < ActiveRecord::Migration[4.2] def change add_column :projects, :slug, :string add_index :projects, :slug, unique: true diff --git a/db/migrate/20140622145648_add_strip_id_to_groups.rb b/db/migrate/20140622145648_add_strip_id_to_groups.rb index 61a796972..27d118f11 100644 --- a/db/migrate/20140622145648_add_strip_id_to_groups.rb +++ b/db/migrate/20140622145648_add_strip_id_to_groups.rb @@ -1,4 +1,6 @@ -class AddStripIdToGroups < ActiveRecord::Migration +# frozen_string_literal:true + +class AddStripIdToGroups < ActiveRecord::Migration[4.2] def change add_column :groups, :stripe_id, :string end diff --git a/db/migrate/20140623023557_add_slug_to_machines.rb b/db/migrate/20140623023557_add_slug_to_machines.rb index 86ac01f31..d23c8b6c5 100644 --- a/db/migrate/20140623023557_add_slug_to_machines.rb +++ b/db/migrate/20140623023557_add_slug_to_machines.rb @@ -1,4 +1,6 @@ -class AddSlugToMachines < ActiveRecord::Migration +# frozen_string_literal:true + +class AddSlugToMachines < ActiveRecord::Migration[4.2] def change add_column :machines, :slug, :string add_index :machines, :slug, unique: true diff --git a/db/migrate/20140624123359_create_credits.rb b/db/migrate/20140624123359_create_credits.rb index 5193eeaf8..32da8c663 100644 --- a/db/migrate/20140624123359_create_credits.rb +++ b/db/migrate/20140624123359_create_credits.rb @@ -1,4 +1,6 @@ -class CreateCredits < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateCredits < ActiveRecord::Migration[4.2] def change create_table :credits do |t| t.references :creditable, polymorphic: true diff --git a/db/migrate/20140624123814_create_users_credits.rb b/db/migrate/20140624123814_create_users_credits.rb index 95fa7aad8..81ec05dbb 100644 --- a/db/migrate/20140624123814_create_users_credits.rb +++ b/db/migrate/20140624123814_create_users_credits.rb @@ -1,4 +1,6 @@ -class CreateUsersCredits < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateUsersCredits < ActiveRecord::Migration[4.2] def change create_table :users_credits do |t| t.belongs_to :user, index: true diff --git a/db/migrate/20140624124338_add_training_credit_nb_to_plan.rb b/db/migrate/20140624124338_add_training_credit_nb_to_plan.rb index 1fd702733..7f534843a 100644 --- a/db/migrate/20140624124338_add_training_credit_nb_to_plan.rb +++ b/db/migrate/20140624124338_add_training_credit_nb_to_plan.rb @@ -1,4 +1,6 @@ -class AddTrainingCreditNbToPlan < ActiveRecord::Migration +# frozen_string_literal:true + +class AddTrainingCreditNbToPlan < ActiveRecord::Migration[4.2] def change add_column :plans, :training_credit_nb, :integer diff --git a/db/migrate/20140703100457_change_start_at_to_expired_at_from_subscription.rb b/db/migrate/20140703100457_change_start_at_to_expired_at_from_subscription.rb index 2a3f191c6..4fa4bb38f 100644 --- a/db/migrate/20140703100457_change_start_at_to_expired_at_from_subscription.rb +++ b/db/migrate/20140703100457_change_start_at_to_expired_at_from_subscription.rb @@ -1,4 +1,6 @@ -class ChangeStartAtToExpiredAtFromSubscription < ActiveRecord::Migration +# frozen_string_literal:true + +class ChangeStartAtToExpiredAtFromSubscription < ActiveRecord::Migration[4.2] def change remove_column :subscriptions, :start_at, :datetime add_column :subscriptions, :expired_at, :datetime diff --git a/db/migrate/20140703231208_add_username_to_user.rb b/db/migrate/20140703231208_add_username_to_user.rb index 4ebd934d3..fa20bf560 100644 --- a/db/migrate/20140703231208_add_username_to_user.rb +++ b/db/migrate/20140703231208_add_username_to_user.rb @@ -1,4 +1,6 @@ -class AddUsernameToUser < ActiveRecord::Migration +# frozen_string_literal:true + +class AddUsernameToUser < ActiveRecord::Migration[4.2] def change add_column :users, :username, :string, after: :id diff --git a/db/migrate/20140703233420_add_index_username_to_user.rb b/db/migrate/20140703233420_add_index_username_to_user.rb index 425e3e896..34ce5d857 100644 --- a/db/migrate/20140703233420_add_index_username_to_user.rb +++ b/db/migrate/20140703233420_add_index_username_to_user.rb @@ -1,4 +1,6 @@ -class AddIndexUsernameToUser < ActiveRecord::Migration +# frozen_string_literal:true + +class AddIndexUsernameToUser < ActiveRecord::Migration[4.2] def change add_index :users, :username, unique: true end diff --git a/db/migrate/20140703233942_remove_username_from_profiles.rb b/db/migrate/20140703233942_remove_username_from_profiles.rb index 38b45e236..625fc8a59 100644 --- a/db/migrate/20140703233942_remove_username_from_profiles.rb +++ b/db/migrate/20140703233942_remove_username_from_profiles.rb @@ -1,4 +1,6 @@ -class RemoveUsernameFromProfiles < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveUsernameFromProfiles < ActiveRecord::Migration[4.2] def change remove_column :profiles, :username, :string end diff --git a/db/migrate/20140703235739_add_slug_to_users.rb b/db/migrate/20140703235739_add_slug_to_users.rb index 5512fe9ef..0990c1936 100644 --- a/db/migrate/20140703235739_add_slug_to_users.rb +++ b/db/migrate/20140703235739_add_slug_to_users.rb @@ -1,4 +1,6 @@ -class AddSlugToUsers < ActiveRecord::Migration +# frozen_string_literal:true + +class AddSlugToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :slug, :string add_index :users, :slug, unique: true diff --git a/db/migrate/20140710144142_create_events.rb b/db/migrate/20140710144142_create_events.rb index 470fb7646..9c1c64070 100644 --- a/db/migrate/20140710144142_create_events.rb +++ b/db/migrate/20140710144142_create_events.rb @@ -1,4 +1,6 @@ -class CreateEvents < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateEvents < ActiveRecord::Migration[4.2] def change create_table :events do |t| t.string :title diff --git a/db/migrate/20140710144427_create_categories.rb b/db/migrate/20140710144427_create_categories.rb index 976068402..51f702f96 100644 --- a/db/migrate/20140710144427_create_categories.rb +++ b/db/migrate/20140710144427_create_categories.rb @@ -1,4 +1,6 @@ -class CreateCategories < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateCategories < ActiveRecord::Migration[4.2] def change create_table :categories do |t| t.string :name diff --git a/db/migrate/20140710144610_create_events_categories.rb b/db/migrate/20140710144610_create_events_categories.rb index 6eb8bae77..1fe768baa 100644 --- a/db/migrate/20140710144610_create_events_categories.rb +++ b/db/migrate/20140710144610_create_events_categories.rb @@ -1,4 +1,6 @@ -class CreateEventsCategories < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateEventsCategories < ActiveRecord::Migration[4.2] def change create_table :events_categories do |t| t.belongs_to :event, index: true diff --git a/db/migrate/20140711084809_change_event.rb b/db/migrate/20140711084809_change_event.rb index cb59d2bb3..54c582d55 100644 --- a/db/migrate/20140711084809_change_event.rb +++ b/db/migrate/20140711084809_change_event.rb @@ -1,4 +1,6 @@ -class ChangeEvent < ActiveRecord::Migration +# frozen_string_literal:true + +class ChangeEvent < ActiveRecord::Migration[4.2] def change add_column :events, :availability_id, :integer add_index :events, :availability_id diff --git a/db/migrate/20140715095503_add_nb_reserve_places_and_nb_reserve_reduced_places_to_reservation.rb b/db/migrate/20140715095503_add_nb_reserve_places_and_nb_reserve_reduced_places_to_reservation.rb index 48ba1e4ae..c0c2621ba 100644 --- a/db/migrate/20140715095503_add_nb_reserve_places_and_nb_reserve_reduced_places_to_reservation.rb +++ b/db/migrate/20140715095503_add_nb_reserve_places_and_nb_reserve_reduced_places_to_reservation.rb @@ -1,4 +1,6 @@ -class AddNbReservePlacesAndNbReserveReducedPlacesToReservation < ActiveRecord::Migration +# frozen_string_literal:true + +class AddNbReservePlacesAndNbReserveReducedPlacesToReservation < ActiveRecord::Migration[4.2] def change add_column :reservations, :nb_reserve_places, :integer add_column :reservations, :nb_reserve_reduced_places, :integer diff --git a/db/migrate/20140717143735_add_recurrence_id_to_event.rb b/db/migrate/20140717143735_add_recurrence_id_to_event.rb index d6a1774d6..ef3c0e011 100644 --- a/db/migrate/20140717143735_add_recurrence_id_to_event.rb +++ b/db/migrate/20140717143735_add_recurrence_id_to_event.rb @@ -1,4 +1,6 @@ -class AddRecurrenceIdToEvent < ActiveRecord::Migration +# frozen_string_literal:true + +class AddRecurrenceIdToEvent < ActiveRecord::Migration[4.2] def change add_column :events, :recurrence_id, :integer add_index :events, :recurrence_id diff --git a/db/migrate/20140722162046_create_invoices.rb b/db/migrate/20140722162046_create_invoices.rb index bdc4b7a86..ff6abe1a9 100644 --- a/db/migrate/20140722162046_create_invoices.rb +++ b/db/migrate/20140722162046_create_invoices.rb @@ -1,4 +1,6 @@ -class CreateInvoices < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateInvoices < ActiveRecord::Migration[4.2] def change create_table :invoices do |t| t.references :invoiced, polymorphic: true diff --git a/db/migrate/20140722162309_create_invoice_items.rb b/db/migrate/20140722162309_create_invoice_items.rb index 4c0ca5c7e..e57e59307 100644 --- a/db/migrate/20140722162309_create_invoice_items.rb +++ b/db/migrate/20140722162309_create_invoice_items.rb @@ -1,4 +1,6 @@ -class CreateInvoiceItems < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateInvoiceItems < ActiveRecord::Migration[4.2] def change create_table :invoice_items do |t| t.text :description diff --git a/db/migrate/20140723075942_add_user_id_to_invoice.rb b/db/migrate/20140723075942_add_user_id_to_invoice.rb index ab6cb4add..25161eb5e 100644 --- a/db/migrate/20140723075942_add_user_id_to_invoice.rb +++ b/db/migrate/20140723075942_add_user_id_to_invoice.rb @@ -1,4 +1,6 @@ -class AddUserIdToInvoice < ActiveRecord::Migration +# frozen_string_literal:true + +class AddUserIdToInvoice < ActiveRecord::Migration[4.2] def change add_reference :invoices, :user, index: true end diff --git a/db/migrate/20140723171547_remove_description_from_invoice_items.rb b/db/migrate/20140723171547_remove_description_from_invoice_items.rb index 09d85502b..8fb9cf78e 100644 --- a/db/migrate/20140723171547_remove_description_from_invoice_items.rb +++ b/db/migrate/20140723171547_remove_description_from_invoice_items.rb @@ -1,4 +1,6 @@ -class RemoveDescriptionFromInvoiceItems < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveDescriptionFromInvoiceItems < ActiveRecord::Migration[4.2] def change remove_column :invoice_items, :description, :string end diff --git a/db/migrate/20140723172610_add_invoiced_to_invoice_items.rb b/db/migrate/20140723172610_add_invoiced_to_invoice_items.rb index 8a7670e0f..4f9867813 100644 --- a/db/migrate/20140723172610_add_invoiced_to_invoice_items.rb +++ b/db/migrate/20140723172610_add_invoiced_to_invoice_items.rb @@ -1,4 +1,6 @@ -class AddInvoicedToInvoiceItems < ActiveRecord::Migration +# frozen_string_literal:true + +class AddInvoicedToInvoiceItems < ActiveRecord::Migration[4.2] def change add_column :invoice_items, :invoiced_id, :integer add_column :invoice_items, :invoiced_type, :string diff --git a/db/migrate/20140724125605_remove_invoiced_from_invoice_items.rb b/db/migrate/20140724125605_remove_invoiced_from_invoice_items.rb index cfa71c143..6bb412541 100644 --- a/db/migrate/20140724125605_remove_invoiced_from_invoice_items.rb +++ b/db/migrate/20140724125605_remove_invoiced_from_invoice_items.rb @@ -1,4 +1,6 @@ -class RemoveInvoicedFromInvoiceItems < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveInvoicedFromInvoiceItems < ActiveRecord::Migration[4.2] def change remove_column :invoice_items, :invoiced_id, :integer remove_column :invoice_items, :invoiced_type, :string diff --git a/db/migrate/20140724131808_add_description_to_invoice_items.rb b/db/migrate/20140724131808_add_description_to_invoice_items.rb index bfe2f521f..87b4815c4 100644 --- a/db/migrate/20140724131808_add_description_to_invoice_items.rb +++ b/db/migrate/20140724131808_add_description_to_invoice_items.rb @@ -1,4 +1,6 @@ -class AddDescriptionToInvoiceItems < ActiveRecord::Migration +# frozen_string_literal:true + +class AddDescriptionToInvoiceItems < ActiveRecord::Migration[4.2] def change add_column :invoice_items, :description, :text end diff --git a/db/migrate/20140724132655_add_subscription_id_to_invoice_items.rb b/db/migrate/20140724132655_add_subscription_id_to_invoice_items.rb index 8163f0eba..4c973bf1d 100644 --- a/db/migrate/20140724132655_add_subscription_id_to_invoice_items.rb +++ b/db/migrate/20140724132655_add_subscription_id_to_invoice_items.rb @@ -1,4 +1,6 @@ -class AddSubscriptionIdToInvoiceItems < ActiveRecord::Migration +# frozen_string_literal:true + +class AddSubscriptionIdToInvoiceItems < ActiveRecord::Migration[4.2] def change add_column :invoice_items, :subscription_id, :integer end diff --git a/db/migrate/20140728110430_add_reference_to_invoice.rb b/db/migrate/20140728110430_add_reference_to_invoice.rb index 4cd0f0424..03fe5eadd 100644 --- a/db/migrate/20140728110430_add_reference_to_invoice.rb +++ b/db/migrate/20140728110430_add_reference_to_invoice.rb @@ -1,4 +1,6 @@ -class AddReferenceToInvoice < ActiveRecord::Migration +# frozen_string_literal:true + +class AddReferenceToInvoice < ActiveRecord::Migration[4.2] def change add_column :invoices, :reference, :string end diff --git a/db/migrate/20141002111736_add_canceled_at_to_subscription.rb b/db/migrate/20141002111736_add_canceled_at_to_subscription.rb index d4d98d232..3d240dd5f 100644 --- a/db/migrate/20141002111736_add_canceled_at_to_subscription.rb +++ b/db/migrate/20141002111736_add_canceled_at_to_subscription.rb @@ -1,4 +1,6 @@ -class AddCanceledAtToSubscription < ActiveRecord::Migration +# frozen_string_literal:true + +class AddCanceledAtToSubscription < ActiveRecord::Migration[4.2] def change add_column :subscriptions, :canceled_at, :datetime end diff --git a/db/migrate/20141110131407_add_to_cancel_to_subscription.rb b/db/migrate/20141110131407_add_to_cancel_to_subscription.rb index a131465af..df5a6023c 100644 --- a/db/migrate/20141110131407_add_to_cancel_to_subscription.rb +++ b/db/migrate/20141110131407_add_to_cancel_to_subscription.rb @@ -1,4 +1,6 @@ -class AddToCancelToSubscription < ActiveRecord::Migration +# frozen_string_literal:true + +class AddToCancelToSubscription < ActiveRecord::Migration[4.2] def change add_column :subscriptions, :to_cancel, :boolean, default: true end diff --git a/db/migrate/20141215142044_remove_to_cancel_from_subscription.rb b/db/migrate/20141215142044_remove_to_cancel_from_subscription.rb index 8ab09c071..afa72e7b4 100644 --- a/db/migrate/20141215142044_remove_to_cancel_from_subscription.rb +++ b/db/migrate/20141215142044_remove_to_cancel_from_subscription.rb @@ -1,4 +1,6 @@ -class RemoveToCancelFromSubscription < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveToCancelFromSubscription < ActiveRecord::Migration[4.2] def change remove_column :subscriptions, :to_cancel, :string end diff --git a/db/migrate/20141215153643_create_offer_days.rb b/db/migrate/20141215153643_create_offer_days.rb index 8f8b66f0a..1790029bf 100644 --- a/db/migrate/20141215153643_create_offer_days.rb +++ b/db/migrate/20141215153643_create_offer_days.rb @@ -1,4 +1,6 @@ -class CreateOfferDays < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateOfferDays < ActiveRecord::Migration[4.2] def change create_table :offer_days do |t| t.belongs_to :subscription, index: true diff --git a/db/migrate/20141217141648_add_nb_total_places_to_trainings.rb b/db/migrate/20141217141648_add_nb_total_places_to_trainings.rb index 31ae4141e..77701ea73 100644 --- a/db/migrate/20141217141648_add_nb_total_places_to_trainings.rb +++ b/db/migrate/20141217141648_add_nb_total_places_to_trainings.rb @@ -1,4 +1,6 @@ -class AddNbTotalPlacesToTrainings < ActiveRecord::Migration +# frozen_string_literal:true + +class AddNbTotalPlacesToTrainings < ActiveRecord::Migration[4.2] def change add_column :trainings, :nb_total_places, :integer end diff --git a/db/migrate/20141217172843_add_nb_total_places_to_availability.rb b/db/migrate/20141217172843_add_nb_total_places_to_availability.rb index cf0c67df2..877e15f93 100644 --- a/db/migrate/20141217172843_add_nb_total_places_to_availability.rb +++ b/db/migrate/20141217172843_add_nb_total_places_to_availability.rb @@ -1,4 +1,6 @@ -class AddNbTotalPlacesToAvailability < ActiveRecord::Migration +# frozen_string_literal:true + +class AddNbTotalPlacesToAvailability < ActiveRecord::Migration[4.2] def change add_column :availabilities, :nb_total_places, :integer end diff --git a/db/migrate/20150107103903_add_slug_to_trainings.rb b/db/migrate/20150107103903_add_slug_to_trainings.rb index 974b72af7..28eb987f5 100644 --- a/db/migrate/20150107103903_add_slug_to_trainings.rb +++ b/db/migrate/20150107103903_add_slug_to_trainings.rb @@ -1,4 +1,6 @@ -class AddSlugToTrainings < ActiveRecord::Migration +# frozen_string_literal:true + +class AddSlugToTrainings < ActiveRecord::Migration[4.2] def up add_column :trainings, :slug, :string add_index :trainings, :slug, unique: true diff --git a/db/migrate/20150108082541_add_published_at_to_projects.rb b/db/migrate/20150108082541_add_published_at_to_projects.rb index 17d6143a4..0d37c2f18 100644 --- a/db/migrate/20150108082541_add_published_at_to_projects.rb +++ b/db/migrate/20150108082541_add_published_at_to_projects.rb @@ -1,4 +1,6 @@ -class AddPublishedAtToProjects < ActiveRecord::Migration +# frozen_string_literal:true + +class AddPublishedAtToProjects < ActiveRecord::Migration[4.2] def up add_column :projects, :published_at, :datetime diff --git a/db/migrate/20150112160349_create_statistic_indices.rb b/db/migrate/20150112160349_create_statistic_indices.rb index 5d606669f..f74fe34b5 100644 --- a/db/migrate/20150112160349_create_statistic_indices.rb +++ b/db/migrate/20150112160349_create_statistic_indices.rb @@ -1,4 +1,6 @@ -class CreateStatisticIndices < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateStatisticIndices < ActiveRecord::Migration[4.2] def change create_table :statistic_indices do |t| t.string :es_type_key diff --git a/db/migrate/20150112160405_create_statistic_types.rb b/db/migrate/20150112160405_create_statistic_types.rb index 75af6bdd2..754308f3b 100644 --- a/db/migrate/20150112160405_create_statistic_types.rb +++ b/db/migrate/20150112160405_create_statistic_types.rb @@ -1,4 +1,6 @@ -class CreateStatisticTypes < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateStatisticTypes < ActiveRecord::Migration[4.2] def change create_table :statistic_types do |t| t.belongs_to :statistic_index, index: true diff --git a/db/migrate/20150112160425_create_statistic_sub_types.rb b/db/migrate/20150112160425_create_statistic_sub_types.rb index a3550a0f3..2604c164e 100644 --- a/db/migrate/20150112160425_create_statistic_sub_types.rb +++ b/db/migrate/20150112160425_create_statistic_sub_types.rb @@ -1,4 +1,6 @@ -class CreateStatisticSubTypes < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateStatisticSubTypes < ActiveRecord::Migration[4.2] def change create_table :statistic_sub_types do |t| t.belongs_to :statistic_type, index: true diff --git a/db/migrate/20150113112757_add_simple_to_statistic_sub_type.rb b/db/migrate/20150113112757_add_simple_to_statistic_sub_type.rb index 2ef0c83bd..f99899af9 100644 --- a/db/migrate/20150113112757_add_simple_to_statistic_sub_type.rb +++ b/db/migrate/20150113112757_add_simple_to_statistic_sub_type.rb @@ -1,4 +1,6 @@ -class AddSimpleToStatisticSubType < ActiveRecord::Migration +# frozen_string_literal:true + +class AddSimpleToStatisticSubType < ActiveRecord::Migration[4.2] def change add_column :statistic_sub_types, :simple, :boolean end diff --git a/db/migrate/20150114111132_remove_simple_from_statistic_sub_type.rb b/db/migrate/20150114111132_remove_simple_from_statistic_sub_type.rb index 88b2fed56..171c39d4a 100644 --- a/db/migrate/20150114111132_remove_simple_from_statistic_sub_type.rb +++ b/db/migrate/20150114111132_remove_simple_from_statistic_sub_type.rb @@ -1,4 +1,6 @@ -class RemoveSimpleFromStatisticSubType < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveSimpleFromStatisticSubType < ActiveRecord::Migration[4.2] def change remove_column :statistic_sub_types, :simple, :boolean end diff --git a/db/migrate/20150114111243_add_simple_to_statistic_type.rb b/db/migrate/20150114111243_add_simple_to_statistic_type.rb index 977e99148..513c29aec 100644 --- a/db/migrate/20150114111243_add_simple_to_statistic_type.rb +++ b/db/migrate/20150114111243_add_simple_to_statistic_type.rb @@ -1,4 +1,6 @@ -class AddSimpleToStatisticType < ActiveRecord::Migration +# frozen_string_literal:true + +class AddSimpleToStatisticType < ActiveRecord::Migration[4.2] def change add_column :statistic_types, :simple, :boolean end diff --git a/db/migrate/20150114141926_create_statistic_fields.rb b/db/migrate/20150114141926_create_statistic_fields.rb index 2298a2aca..7f4c05e19 100644 --- a/db/migrate/20150114141926_create_statistic_fields.rb +++ b/db/migrate/20150114141926_create_statistic_fields.rb @@ -1,4 +1,6 @@ -class CreateStatisticFields < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateStatisticFields < ActiveRecord::Migration[4.2] def change create_table :statistic_fields do |t| t.belongs_to :statistic_index, index: true diff --git a/db/migrate/20150114142032_remove_additional_field_from_statistic_index.rb b/db/migrate/20150114142032_remove_additional_field_from_statistic_index.rb index e1acacc45..acda1fd14 100644 --- a/db/migrate/20150114142032_remove_additional_field_from_statistic_index.rb +++ b/db/migrate/20150114142032_remove_additional_field_from_statistic_index.rb @@ -1,4 +1,6 @@ -class RemoveAdditionalFieldFromStatisticIndex < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveAdditionalFieldFromStatisticIndex < ActiveRecord::Migration[4.2] def change remove_column :statistic_indices, :additional_field, :string end diff --git a/db/migrate/20150115143750_add_type_to_statistic_field.rb b/db/migrate/20150115143750_add_type_to_statistic_field.rb index 476350089..cafbaf76a 100644 --- a/db/migrate/20150115143750_add_type_to_statistic_field.rb +++ b/db/migrate/20150115143750_add_type_to_statistic_field.rb @@ -1,4 +1,6 @@ -class AddTypeToStatisticField < ActiveRecord::Migration +# frozen_string_literal:true + +class AddTypeToStatisticField < ActiveRecord::Migration[4.2] def change add_column :statistic_fields, :type, :string end diff --git a/db/migrate/20150119082931_rename_statistic_field_type_to_data_type.rb b/db/migrate/20150119082931_rename_statistic_field_type_to_data_type.rb index 07a2906bb..b5bfebcd8 100644 --- a/db/migrate/20150119082931_rename_statistic_field_type_to_data_type.rb +++ b/db/migrate/20150119082931_rename_statistic_field_type_to_data_type.rb @@ -1,4 +1,6 @@ -class RenameStatisticFieldTypeToDataType < ActiveRecord::Migration +# frozen_string_literal:true + +class RenameStatisticFieldTypeToDataType < ActiveRecord::Migration[4.2] def change rename_column :statistic_fields, :type, :data_type end diff --git a/db/migrate/20150119092557_remove_statistic_type_id_from_statistic_sub_type.rb b/db/migrate/20150119092557_remove_statistic_type_id_from_statistic_sub_type.rb index 7aec61396..7196c0fd4 100644 --- a/db/migrate/20150119092557_remove_statistic_type_id_from_statistic_sub_type.rb +++ b/db/migrate/20150119092557_remove_statistic_type_id_from_statistic_sub_type.rb @@ -1,4 +1,6 @@ -class RemoveStatisticTypeIdFromStatisticSubType < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveStatisticTypeIdFromStatisticSubType < ActiveRecord::Migration[4.2] def change remove_column :statistic_sub_types, :statistic_type_id, :integer end diff --git a/db/migrate/20150119093811_create_statistic_type_sub_types.rb b/db/migrate/20150119093811_create_statistic_type_sub_types.rb index e9612f6eb..2b504c2d9 100644 --- a/db/migrate/20150119093811_create_statistic_type_sub_types.rb +++ b/db/migrate/20150119093811_create_statistic_type_sub_types.rb @@ -1,4 +1,6 @@ -class CreateStatisticTypeSubTypes < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateStatisticTypeSubTypes < ActiveRecord::Migration[4.2] def change create_table :statistic_type_sub_types do |t| t.belongs_to :statistic_type, index: true diff --git a/db/migrate/20150119160758_add_table_to_statistic_index.rb b/db/migrate/20150119160758_add_table_to_statistic_index.rb index 113ff17d8..2fd736188 100644 --- a/db/migrate/20150119160758_add_table_to_statistic_index.rb +++ b/db/migrate/20150119160758_add_table_to_statistic_index.rb @@ -1,4 +1,6 @@ -class AddTableToStatisticIndex < ActiveRecord::Migration +# frozen_string_literal:true + +class AddTableToStatisticIndex < ActiveRecord::Migration[4.2] def change add_column :statistic_indices, :table, :boolean, default: true end diff --git a/db/migrate/20150119161004_create_statistic_graphs.rb b/db/migrate/20150119161004_create_statistic_graphs.rb index 1f628d8a0..dc7a1b79a 100644 --- a/db/migrate/20150119161004_create_statistic_graphs.rb +++ b/db/migrate/20150119161004_create_statistic_graphs.rb @@ -1,4 +1,6 @@ -class CreateStatisticGraphs < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateStatisticGraphs < ActiveRecord::Migration[4.2] def change create_table :statistic_graphs do |t| t.belongs_to :statistic_index, index: true diff --git a/db/migrate/20150127101521_add_ca_to_statistic_index.rb b/db/migrate/20150127101521_add_ca_to_statistic_index.rb index fd08b81c0..9264597a9 100644 --- a/db/migrate/20150127101521_add_ca_to_statistic_index.rb +++ b/db/migrate/20150127101521_add_ca_to_statistic_index.rb @@ -1,4 +1,6 @@ -class AddCaToStatisticIndex < ActiveRecord::Migration +# frozen_string_literal:true + +class AddCaToStatisticIndex < ActiveRecord::Migration[4.2] def change add_column :statistic_indices, :ca, :boolean, default: true end diff --git a/db/migrate/20150127155141_add_avoir_mode_to_invoice.rb b/db/migrate/20150127155141_add_avoir_mode_to_invoice.rb index c2a5b15ee..8f87c2428 100644 --- a/db/migrate/20150127155141_add_avoir_mode_to_invoice.rb +++ b/db/migrate/20150127155141_add_avoir_mode_to_invoice.rb @@ -1,4 +1,6 @@ -class AddAvoirModeToInvoice < ActiveRecord::Migration +# frozen_string_literal:true + +class AddAvoirModeToInvoice < ActiveRecord::Migration[4.2] def change add_column :invoices, :avoir_mode, :string end diff --git a/db/migrate/20150127161235_add_avoir_date_to_invoice.rb b/db/migrate/20150127161235_add_avoir_date_to_invoice.rb index 8f494b65e..31f593938 100644 --- a/db/migrate/20150127161235_add_avoir_date_to_invoice.rb +++ b/db/migrate/20150127161235_add_avoir_date_to_invoice.rb @@ -1,4 +1,6 @@ -class AddAvoirDateToInvoice < ActiveRecord::Migration +# frozen_string_literal:true + +class AddAvoirDateToInvoice < ActiveRecord::Migration[4.2] def change add_column :invoices, :avoir_date, :datetime end diff --git a/db/migrate/20150127172510_add_invoice_id_to_invoice.rb b/db/migrate/20150127172510_add_invoice_id_to_invoice.rb index 5a63d75d5..36f802162 100644 --- a/db/migrate/20150127172510_add_invoice_id_to_invoice.rb +++ b/db/migrate/20150127172510_add_invoice_id_to_invoice.rb @@ -1,4 +1,6 @@ -class AddInvoiceIdToInvoice < ActiveRecord::Migration +# frozen_string_literal:true + +class AddInvoiceIdToInvoice < ActiveRecord::Migration[4.2] def change add_reference :invoices, :invoice, index: true add_column :invoices, :type, :string diff --git a/db/migrate/20150128132219_add_subscription_to_expire_to_invoices.rb b/db/migrate/20150128132219_add_subscription_to_expire_to_invoices.rb index 5e1251099..c594461a8 100644 --- a/db/migrate/20150128132219_add_subscription_to_expire_to_invoices.rb +++ b/db/migrate/20150128132219_add_subscription_to_expire_to_invoices.rb @@ -1,4 +1,6 @@ -class AddSubscriptionToExpireToInvoices < ActiveRecord::Migration +# frozen_string_literal:true + +class AddSubscriptionToExpireToInvoices < ActiveRecord::Migration[4.2] def change add_column :invoices, :subscription_to_expire, :boolean end diff --git a/db/migrate/20150218154032_add_receiver_type_and_is_send_to_notification.rb b/db/migrate/20150218154032_add_receiver_type_and_is_send_to_notification.rb index 8d8f65a11..b4d8927fa 100644 --- a/db/migrate/20150218154032_add_receiver_type_and_is_send_to_notification.rb +++ b/db/migrate/20150218154032_add_receiver_type_and_is_send_to_notification.rb @@ -1,4 +1,6 @@ -class AddReceiverTypeAndIsSendToNotification < ActiveRecord::Migration +# frozen_string_literal:true + +class AddReceiverTypeAndIsSendToNotification < ActiveRecord::Migration[4.2] def change add_column :notifications, :receiver_type, :string add_column :notifications, :is_send, :boolean, default: false diff --git a/db/migrate/20150428075148_add_is_active_attribute_to_users.rb b/db/migrate/20150428075148_add_is_active_attribute_to_users.rb index 57280e8f5..b8b6715ca 100644 --- a/db/migrate/20150428075148_add_is_active_attribute_to_users.rb +++ b/db/migrate/20150428075148_add_is_active_attribute_to_users.rb @@ -1,4 +1,6 @@ -class AddIsActiveAttributeToUsers < ActiveRecord::Migration +# frozen_string_literal:true + +class AddIsActiveAttributeToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :is_active, :boolean, default: true end diff --git a/db/migrate/20150428091057_create_settings.rb b/db/migrate/20150428091057_create_settings.rb index 7aaa9c467..93200ffec 100644 --- a/db/migrate/20150428091057_create_settings.rb +++ b/db/migrate/20150428091057_create_settings.rb @@ -1,4 +1,6 @@ -class CreateSettings < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateSettings < ActiveRecord::Migration[4.2] def change create_table :settings do |t| t.string :name, null: false diff --git a/db/migrate/20150506090921_add_description_to_trainings.rb b/db/migrate/20150506090921_add_description_to_trainings.rb index 852afa19e..d153c2f90 100644 --- a/db/migrate/20150506090921_add_description_to_trainings.rb +++ b/db/migrate/20150506090921_add_description_to_trainings.rb @@ -1,4 +1,6 @@ -class AddDescriptionToTrainings < ActiveRecord::Migration +# frozen_string_literal:true + +class AddDescriptionToTrainings < ActiveRecord::Migration[4.2] def change add_column :trainings, :description, :text end diff --git a/db/migrate/20150507075506_add_ex_start_at_to_slots.rb b/db/migrate/20150507075506_add_ex_start_at_to_slots.rb index 6fcd992b8..c8673ac3e 100644 --- a/db/migrate/20150507075506_add_ex_start_at_to_slots.rb +++ b/db/migrate/20150507075506_add_ex_start_at_to_slots.rb @@ -1,4 +1,6 @@ -class AddExStartAtToSlots < ActiveRecord::Migration +# frozen_string_literal:true + +class AddExStartAtToSlots < ActiveRecord::Migration[4.2] def change add_column :slots, :ex_start_at, :datetime end diff --git a/db/migrate/20150507075620_add_ex_end_at_to_slots.rb b/db/migrate/20150507075620_add_ex_end_at_to_slots.rb index cfdb303e9..6185e9c5c 100644 --- a/db/migrate/20150507075620_add_ex_end_at_to_slots.rb +++ b/db/migrate/20150507075620_add_ex_end_at_to_slots.rb @@ -1,4 +1,6 @@ -class AddExEndAtToSlots < ActiveRecord::Migration +# frozen_string_literal:true + +class AddExEndAtToSlots < ActiveRecord::Migration[4.2] def change add_column :slots, :ex_end_at, :datetime end diff --git a/db/migrate/20150512123546_add_attributes_to_plan.rb b/db/migrate/20150512123546_add_attributes_to_plan.rb index cdb7aa605..888dcd6ce 100644 --- a/db/migrate/20150512123546_add_attributes_to_plan.rb +++ b/db/migrate/20150512123546_add_attributes_to_plan.rb @@ -1,4 +1,6 @@ -class AddAttributesToPlan < ActiveRecord::Migration +# frozen_string_literal:true + +class AddAttributesToPlan < ActiveRecord::Migration[4.2] def change add_column :plans, :is_rolling, :boolean, default: true add_column :plans, :description, :text diff --git a/db/migrate/20150520132030_create_prices.rb b/db/migrate/20150520132030_create_prices.rb index 52b9e9f56..90068a1af 100644 --- a/db/migrate/20150520132030_create_prices.rb +++ b/db/migrate/20150520132030_create_prices.rb @@ -1,4 +1,6 @@ -class CreatePrices < ActiveRecord::Migration +# frozen_string_literal:true + +class CreatePrices < ActiveRecord::Migration[4.2] def change create_table :prices do |t| t.belongs_to :group, index: true, foreign_key: true diff --git a/db/migrate/20150526130729_add_base_name_to_plans.rb b/db/migrate/20150526130729_add_base_name_to_plans.rb index 1b3f93900..de85e95a5 100644 --- a/db/migrate/20150526130729_add_base_name_to_plans.rb +++ b/db/migrate/20150526130729_add_base_name_to_plans.rb @@ -1,4 +1,6 @@ -class AddBaseNameToPlans < ActiveRecord::Migration +# frozen_string_literal:true + +class AddBaseNameToPlans < ActiveRecord::Migration[4.2] def change add_column :plans, :base_name, :string end diff --git a/db/migrate/20150527153312_add_canceled_at_to_slot.rb b/db/migrate/20150527153312_add_canceled_at_to_slot.rb index 36ee50562..1befc0fe9 100644 --- a/db/migrate/20150527153312_add_canceled_at_to_slot.rb +++ b/db/migrate/20150527153312_add_canceled_at_to_slot.rb @@ -1,4 +1,6 @@ -class AddCanceledAtToSlot < ActiveRecord::Migration +# frozen_string_literal:true + +class AddCanceledAtToSlot < ActiveRecord::Migration[4.2] def change add_column :slots, :canceled_at, :datetime, default: nil end diff --git a/db/migrate/20150529113555_add_default_for_training_nb_credit_to_plans.rb b/db/migrate/20150529113555_add_default_for_training_nb_credit_to_plans.rb index ff7a42ada..7c245bfe2 100644 --- a/db/migrate/20150529113555_add_default_for_training_nb_credit_to_plans.rb +++ b/db/migrate/20150529113555_add_default_for_training_nb_credit_to_plans.rb @@ -1,4 +1,6 @@ -class AddDefaultForTrainingNbCreditToPlans < ActiveRecord::Migration +# frozen_string_literal:true + +class AddDefaultForTrainingNbCreditToPlans < ActiveRecord::Migration[4.2] def up change_column_default :plans, :training_credit_nb, 0 diff --git a/db/migrate/20150601125944_change_stripe_id_to_short_name_from_groups.rb b/db/migrate/20150601125944_change_stripe_id_to_short_name_from_groups.rb index a01e392ef..382070665 100644 --- a/db/migrate/20150601125944_change_stripe_id_to_short_name_from_groups.rb +++ b/db/migrate/20150601125944_change_stripe_id_to_short_name_from_groups.rb @@ -1,4 +1,6 @@ -class ChangeStripeIdToShortNameFromGroups < ActiveRecord::Migration +# frozen_string_literal:true + +class ChangeStripeIdToShortNameFromGroups < ActiveRecord::Migration[4.2] def change rename_column :groups, :stripe_id, :short_name end diff --git a/db/migrate/20150603104502_change_short_name_to_slug_from_group.rb b/db/migrate/20150603104502_change_short_name_to_slug_from_group.rb index 19a46467c..ebb96af6e 100644 --- a/db/migrate/20150603104502_change_short_name_to_slug_from_group.rb +++ b/db/migrate/20150603104502_change_short_name_to_slug_from_group.rb @@ -1,4 +1,6 @@ -class ChangeShortNameToSlugFromGroup < ActiveRecord::Migration +# frozen_string_literal:true + +class ChangeShortNameToSlugFromGroup < ActiveRecord::Migration[4.2] def change rename_column :groups, :short_name, :slug end diff --git a/db/migrate/20150603104658_add_unique_index_to_slug_from_group.rb b/db/migrate/20150603104658_add_unique_index_to_slug_from_group.rb index 0ec431e10..2e304f404 100644 --- a/db/migrate/20150603104658_add_unique_index_to_slug_from_group.rb +++ b/db/migrate/20150603104658_add_unique_index_to_slug_from_group.rb @@ -1,4 +1,6 @@ -class AddUniqueIndexToSlugFromGroup < ActiveRecord::Migration +# frozen_string_literal:true + +class AddUniqueIndexToSlugFromGroup < ActiveRecord::Migration[4.2] def change add_index :groups, :slug, unique: true end diff --git a/db/migrate/20150604081757_add_ui_weight_to_plans.rb b/db/migrate/20150604081757_add_ui_weight_to_plans.rb index ac9df21ef..fac9a1a5f 100644 --- a/db/migrate/20150604081757_add_ui_weight_to_plans.rb +++ b/db/migrate/20150604081757_add_ui_weight_to_plans.rb @@ -1,4 +1,6 @@ -class AddUiWeightToPlans < ActiveRecord::Migration +# frozen_string_literal:true + +class AddUiWeightToPlans < ActiveRecord::Migration[4.2] def change add_column :plans, :ui_weight, :integer, default: 0 end diff --git a/db/migrate/20150604131525_add_meta_data_to_notifications.rb b/db/migrate/20150604131525_add_meta_data_to_notifications.rb index 4333870b0..89103b71c 100644 --- a/db/migrate/20150604131525_add_meta_data_to_notifications.rb +++ b/db/migrate/20150604131525_add_meta_data_to_notifications.rb @@ -1,4 +1,6 @@ -class AddMetaDataToNotifications < ActiveRecord::Migration +# frozen_string_literal:true + +class AddMetaDataToNotifications < ActiveRecord::Migration[4.2] def change add_column :notifications, :meta_data, :jsonb, default: '{}' end diff --git a/db/migrate/20150608142234_add_invoicing_disabled_to_users.rb b/db/migrate/20150608142234_add_invoicing_disabled_to_users.rb index 5e8fcbc1d..784d6b624 100644 --- a/db/migrate/20150608142234_add_invoicing_disabled_to_users.rb +++ b/db/migrate/20150608142234_add_invoicing_disabled_to_users.rb @@ -1,4 +1,6 @@ -class AddInvoicingDisabledToUsers < ActiveRecord::Migration +# frozen_string_literal:true + +class AddInvoicingDisabledToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :invoicing_disabled, :boolean, default: false end diff --git a/db/migrate/20150609094336_add_interval_count_to_plans.rb b/db/migrate/20150609094336_add_interval_count_to_plans.rb index 7f1f957f0..4345b15f6 100644 --- a/db/migrate/20150609094336_add_interval_count_to_plans.rb +++ b/db/migrate/20150609094336_add_interval_count_to_plans.rb @@ -1,4 +1,6 @@ -class AddIntervalCountToPlans < ActiveRecord::Migration +# frozen_string_literal:true + +class AddIntervalCountToPlans < ActiveRecord::Migration[4.2] def change add_column :plans, :interval_count, :integer, default: 1 end diff --git a/db/migrate/20150615135539_migrate_plan_stats.rb b/db/migrate/20150615135539_migrate_plan_stats.rb index cecd8edcb..bcd943f67 100644 --- a/db/migrate/20150615135539_migrate_plan_stats.rb +++ b/db/migrate/20150615135539_migrate_plan_stats.rb @@ -1,4 +1,6 @@ -class MigratePlanStats < ActiveRecord::Migration +# frozen_string_literal:true + +class MigratePlanStats < ActiveRecord::Migration[4.2] def up index = StatisticIndex.where({es_type_key: 'subscription'}).first if index diff --git a/db/migrate/20150617085623_create_custom_assets.rb b/db/migrate/20150617085623_create_custom_assets.rb index 46554dea7..662c49b8d 100644 --- a/db/migrate/20150617085623_create_custom_assets.rb +++ b/db/migrate/20150617085623_create_custom_assets.rb @@ -1,4 +1,6 @@ -class CreateCustomAssets < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateCustomAssets < ActiveRecord::Migration[4.2] def change create_table :custom_assets do |t| t.string :name diff --git a/db/migrate/20150701090642_create_stylesheets.rb b/db/migrate/20150701090642_create_stylesheets.rb index 289ae391c..8706e2de0 100644 --- a/db/migrate/20150701090642_create_stylesheets.rb +++ b/db/migrate/20150701090642_create_stylesheets.rb @@ -1,4 +1,6 @@ -class CreateStylesheets < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateStylesheets < ActiveRecord::Migration[4.2] def change create_table :stylesheets do |t| t.text :contents diff --git a/db/migrate/20150702150754_create_tags.rb b/db/migrate/20150702150754_create_tags.rb index 69d6a7735..640add696 100644 --- a/db/migrate/20150702150754_create_tags.rb +++ b/db/migrate/20150702150754_create_tags.rb @@ -1,4 +1,6 @@ -class CreateTags < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateTags < ActiveRecord::Migration[4.2] def change create_table :tags do |t| t.string :name diff --git a/db/migrate/20150702151009_create_user_tags.rb b/db/migrate/20150702151009_create_user_tags.rb index 374c42b48..22f96a84b 100644 --- a/db/migrate/20150702151009_create_user_tags.rb +++ b/db/migrate/20150702151009_create_user_tags.rb @@ -1,4 +1,6 @@ -class CreateUserTags < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateUserTags < ActiveRecord::Migration[4.2] def change create_table :user_tags do |t| t.belongs_to :user, index: true, foreign_key: true diff --git a/db/migrate/20150706102547_create_availability_tags.rb b/db/migrate/20150706102547_create_availability_tags.rb index 4efb165a9..cc2b0cb5f 100644 --- a/db/migrate/20150706102547_create_availability_tags.rb +++ b/db/migrate/20150706102547_create_availability_tags.rb @@ -1,4 +1,6 @@ -class CreateAvailabilityTags < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateAvailabilityTags < ActiveRecord::Migration[4.2] def change create_table :availability_tags do |t| t.belongs_to :availability, index: true, foreign_key: true diff --git a/db/migrate/20150707135343_add_offered_to_slots.rb b/db/migrate/20150707135343_add_offered_to_slots.rb index 32d1a0013..f76a65f90 100644 --- a/db/migrate/20150707135343_add_offered_to_slots.rb +++ b/db/migrate/20150707135343_add_offered_to_slots.rb @@ -1,4 +1,6 @@ -class AddOfferedToSlots < ActiveRecord::Migration +# frozen_string_literal:true + +class AddOfferedToSlots < ActiveRecord::Migration[4.2] def change add_column :slots, :offered, :boolean, :default => false end diff --git a/db/migrate/20150713090542_change_amount_type_in_invoice_items.rb b/db/migrate/20150713090542_change_amount_type_in_invoice_items.rb index b24f69c63..f680a07aa 100644 --- a/db/migrate/20150713090542_change_amount_type_in_invoice_items.rb +++ b/db/migrate/20150713090542_change_amount_type_in_invoice_items.rb @@ -1,4 +1,6 @@ -class ChangeAmountTypeInInvoiceItems < ActiveRecord::Migration +# frozen_string_literal:true + +class ChangeAmountTypeInInvoiceItems < ActiveRecord::Migration[4.2] def up change_column :invoice_items, :amount, 'integer USING CAST(amount AS integer)' end diff --git a/db/migrate/20150713151115_add_invoice_item_id_to_invoice_item.rb b/db/migrate/20150713151115_add_invoice_item_id_to_invoice_item.rb index 76e0427d3..9bfd875b3 100644 --- a/db/migrate/20150713151115_add_invoice_item_id_to_invoice_item.rb +++ b/db/migrate/20150713151115_add_invoice_item_id_to_invoice_item.rb @@ -1,4 +1,6 @@ -class AddInvoiceItemIdToInvoiceItem < ActiveRecord::Migration +# frozen_string_literal:true + +class AddInvoiceItemIdToInvoiceItem < ActiveRecord::Migration[4.2] def change add_column :invoice_items, :invoice_item_id, :integer end diff --git a/db/migrate/20150715135751_add_description_to_invoices.rb b/db/migrate/20150715135751_add_description_to_invoices.rb index f459407d0..8a2162da4 100644 --- a/db/migrate/20150715135751_add_description_to_invoices.rb +++ b/db/migrate/20150715135751_add_description_to_invoices.rb @@ -1,4 +1,6 @@ -class AddDescriptionToInvoices < ActiveRecord::Migration +# frozen_string_literal:true + +class AddDescriptionToInvoices < ActiveRecord::Migration[4.2] def change add_column :invoices, :description, :text end diff --git a/db/migrate/20150915144448_create_auth_providers.rb b/db/migrate/20150915144448_create_auth_providers.rb index 234ca1fa9..48d163191 100644 --- a/db/migrate/20150915144448_create_auth_providers.rb +++ b/db/migrate/20150915144448_create_auth_providers.rb @@ -1,4 +1,6 @@ -class CreateAuthProviders < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateAuthProviders < ActiveRecord::Migration[4.2] def change create_table :auth_providers do |t| t.string :name diff --git a/db/migrate/20150915144939_create_o_auth2_providers.rb b/db/migrate/20150915144939_create_o_auth2_providers.rb index 9e1588c9b..3316a3d4c 100644 --- a/db/migrate/20150915144939_create_o_auth2_providers.rb +++ b/db/migrate/20150915144939_create_o_auth2_providers.rb @@ -1,4 +1,6 @@ -class CreateOAuth2Providers < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateOAuth2Providers < ActiveRecord::Migration[4.2] def change create_table :o_auth2_providers do |t| t.string :base_url diff --git a/db/migrate/20150915152943_create_o_auth2_mappings.rb b/db/migrate/20150915152943_create_o_auth2_mappings.rb index f323c718c..cbb0512fe 100644 --- a/db/migrate/20150915152943_create_o_auth2_mappings.rb +++ b/db/migrate/20150915152943_create_o_auth2_mappings.rb @@ -1,4 +1,6 @@ -class CreateOAuth2Mappings < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateOAuth2Mappings < ActiveRecord::Migration[4.2] def change create_table :o_auth2_mappings do |t| t.belongs_to :o_auth2_provider, index: true, foreign_key: true diff --git a/db/migrate/20150916091131_change_auth_provider_to_polymorphic.rb b/db/migrate/20150916091131_change_auth_provider_to_polymorphic.rb index ace750794..32129e41f 100644 --- a/db/migrate/20150916091131_change_auth_provider_to_polymorphic.rb +++ b/db/migrate/20150916091131_change_auth_provider_to_polymorphic.rb @@ -1,4 +1,6 @@ -class ChangeAuthProviderToPolymorphic < ActiveRecord::Migration +# frozen_string_literal:true + +class ChangeAuthProviderToPolymorphic < ActiveRecord::Migration[4.2] def change remove_column :o_auth2_providers, :auth_provider_id, :integer remove_column :auth_providers, :type, :string diff --git a/db/migrate/20150916093159_create_database_providers.rb b/db/migrate/20150916093159_create_database_providers.rb index 781e3b7ad..9406a3812 100644 --- a/db/migrate/20150916093159_create_database_providers.rb +++ b/db/migrate/20150916093159_create_database_providers.rb @@ -1,4 +1,6 @@ -class CreateDatabaseProviders < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateDatabaseProviders < ActiveRecord::Migration[4.2] def change create_table :database_providers do |t| diff --git a/db/migrate/20150921135557_add_sso_id_to_user.rb b/db/migrate/20150921135557_add_sso_id_to_user.rb index 12df03f25..3056065d1 100644 --- a/db/migrate/20150921135557_add_sso_id_to_user.rb +++ b/db/migrate/20150921135557_add_sso_id_to_user.rb @@ -1,4 +1,6 @@ -class AddSsoIdToUser < ActiveRecord::Migration +# frozen_string_literal:true + +class AddSsoIdToUser < ActiveRecord::Migration[4.2] def change add_column :users, :sso_id, :integer end diff --git a/db/migrate/20150921135817_add_local_model_to_o_auth2_mapping.rb b/db/migrate/20150921135817_add_local_model_to_o_auth2_mapping.rb index d0001c1d6..53cb6608f 100644 --- a/db/migrate/20150921135817_add_local_model_to_o_auth2_mapping.rb +++ b/db/migrate/20150921135817_add_local_model_to_o_auth2_mapping.rb @@ -1,4 +1,6 @@ -class AddLocalModelToOAuth2Mapping < ActiveRecord::Migration +# frozen_string_literal:true + +class AddLocalModelToOAuth2Mapping < ActiveRecord::Migration[4.2] def change add_column :o_auth2_mappings, :local_model, :string end diff --git a/db/migrate/20150922095921_migrate_endpoints_to_urls_from_o_auth2_providers.rb b/db/migrate/20150922095921_migrate_endpoints_to_urls_from_o_auth2_providers.rb index 83dba5625..c720d822b 100644 --- a/db/migrate/20150922095921_migrate_endpoints_to_urls_from_o_auth2_providers.rb +++ b/db/migrate/20150922095921_migrate_endpoints_to_urls_from_o_auth2_providers.rb @@ -1,4 +1,6 @@ -class MigrateEndpointsToUrlsFromOAuth2Providers < ActiveRecord::Migration +# frozen_string_literal:true + +class MigrateEndpointsToUrlsFromOAuth2Providers < ActiveRecord::Migration[4.2] def change rename_column :o_auth2_providers, :base_url, :api_url rename_column :o_auth2_providers, :token_endpoint, :token_url diff --git a/db/migrate/20150922100528_remove_resource_url_from_o_auth2_mappings.rb b/db/migrate/20150922100528_remove_resource_url_from_o_auth2_mappings.rb index f4d1c1c3f..9800bc1e4 100644 --- a/db/migrate/20150922100528_remove_resource_url_from_o_auth2_mappings.rb +++ b/db/migrate/20150922100528_remove_resource_url_from_o_auth2_mappings.rb @@ -1,4 +1,6 @@ -class RemoveResourceUrlFromOAuth2Mappings < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveResourceUrlFromOAuth2Mappings < ActiveRecord::Migration[4.2] def change remove_column :o_auth2_mappings, :resource_url, :string remove_column :o_auth2_mappings, :data_type, :string diff --git a/db/migrate/20150924093917_migrate_url_to_endpoints_from_o_auth2_providers.rb b/db/migrate/20150924093917_migrate_url_to_endpoints_from_o_auth2_providers.rb index 6abbaf374..6a70d353e 100644 --- a/db/migrate/20150924093917_migrate_url_to_endpoints_from_o_auth2_providers.rb +++ b/db/migrate/20150924093917_migrate_url_to_endpoints_from_o_auth2_providers.rb @@ -1,4 +1,6 @@ -class MigrateUrlToEndpointsFromOAuth2Providers < ActiveRecord::Migration +# frozen_string_literal:true + +class MigrateUrlToEndpointsFromOAuth2Providers < ActiveRecord::Migration[4.2] def change rename_column :o_auth2_providers, :api_url, :base_url rename_column :o_auth2_providers, :token_url, :token_endpoint diff --git a/db/migrate/20150924094138_add_resource_endpoint_to_o_auth2_mappings.rb b/db/migrate/20150924094138_add_resource_endpoint_to_o_auth2_mappings.rb index c804aaf0a..4f2d76154 100644 --- a/db/migrate/20150924094138_add_resource_endpoint_to_o_auth2_mappings.rb +++ b/db/migrate/20150924094138_add_resource_endpoint_to_o_auth2_mappings.rb @@ -1,4 +1,6 @@ -class AddResourceEndpointToOAuth2Mappings < ActiveRecord::Migration +# frozen_string_literal:true + +class AddResourceEndpointToOAuth2Mappings < ActiveRecord::Migration[4.2] def change add_column :o_auth2_mappings, :resource_endpoint, :string add_column :o_auth2_mappings, :api_data_type, :string diff --git a/db/migrate/20150924094427_rename_resource_endpoint_from_o_auth2_mappings.rb b/db/migrate/20150924094427_rename_resource_endpoint_from_o_auth2_mappings.rb index 4b293cea6..4999c544a 100644 --- a/db/migrate/20150924094427_rename_resource_endpoint_from_o_auth2_mappings.rb +++ b/db/migrate/20150924094427_rename_resource_endpoint_from_o_auth2_mappings.rb @@ -1,4 +1,6 @@ -class RenameResourceEndpointFromOAuth2Mappings < ActiveRecord::Migration +# frozen_string_literal:true + +class RenameResourceEndpointFromOAuth2Mappings < ActiveRecord::Migration[4.2] def change rename_column :o_auth2_mappings, :resource_endpoint, :api_endpoint end diff --git a/db/migrate/20150924141714_add_omniauth_to_users.rb b/db/migrate/20150924141714_add_omniauth_to_users.rb index 0952435e2..32b9c1fac 100644 --- a/db/migrate/20150924141714_add_omniauth_to_users.rb +++ b/db/migrate/20150924141714_add_omniauth_to_users.rb @@ -1,4 +1,6 @@ -class AddOmniauthToUsers < ActiveRecord::Migration +# frozen_string_literal:true + +class AddOmniauthToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :provider, :string add_index :users, :provider diff --git a/db/migrate/20151005133841_add_profile_url_to_o_auth2_providers.rb b/db/migrate/20151005133841_add_profile_url_to_o_auth2_providers.rb index 6a93636ae..fd1669f22 100644 --- a/db/migrate/20151005133841_add_profile_url_to_o_auth2_providers.rb +++ b/db/migrate/20151005133841_add_profile_url_to_o_auth2_providers.rb @@ -1,4 +1,6 @@ -class AddProfileUrlToOAuth2Providers < ActiveRecord::Migration +# frozen_string_literal:true + +class AddProfileUrlToOAuth2Providers < ActiveRecord::Migration[4.2] def change add_column :o_auth2_providers, :profile_url, :string end diff --git a/db/migrate/20151008152219_add_auth_token_to_users.rb b/db/migrate/20151008152219_add_auth_token_to_users.rb index e88427a29..3cae44219 100644 --- a/db/migrate/20151008152219_add_auth_token_to_users.rb +++ b/db/migrate/20151008152219_add_auth_token_to_users.rb @@ -1,4 +1,6 @@ -class AddAuthTokenToUsers < ActiveRecord::Migration +# frozen_string_literal:true + +class AddAuthTokenToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :auth_token, :string add_index :users, :auth_token diff --git a/db/migrate/20151105125623_create_abuses.rb b/db/migrate/20151105125623_create_abuses.rb index 888c2061f..52a6a7c80 100644 --- a/db/migrate/20151105125623_create_abuses.rb +++ b/db/migrate/20151105125623_create_abuses.rb @@ -1,4 +1,6 @@ -class CreateAbuses < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateAbuses < ActiveRecord::Migration[4.2] def change create_table :abuses do |t| t.references :signaled, polymorphic: true, index: true diff --git a/db/migrate/20151210113548_add_merged_at_to_users.rb b/db/migrate/20151210113548_add_merged_at_to_users.rb index 851eeb444..44f9c1626 100644 --- a/db/migrate/20151210113548_add_merged_at_to_users.rb +++ b/db/migrate/20151210113548_add_merged_at_to_users.rb @@ -1,4 +1,6 @@ -class AddMergedAtToUsers < ActiveRecord::Migration +# frozen_string_literal:true + +class AddMergedAtToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :merged_at, :datetime end diff --git a/db/migrate/20160119131623_add_destroying_to_availability.rb b/db/migrate/20160119131623_add_destroying_to_availability.rb index 04451d998..d38b27b4b 100644 --- a/db/migrate/20160119131623_add_destroying_to_availability.rb +++ b/db/migrate/20160119131623_add_destroying_to_availability.rb @@ -1,4 +1,6 @@ -class AddDestroyingToAvailability < ActiveRecord::Migration +# frozen_string_literal:true + +class AddDestroyingToAvailability < ActiveRecord::Migration[4.2] def change # this allow to prevent conflicts of 'delete cascade' by marking an availability # as 'currently being destroyed' diff --git a/db/migrate/20160504085703_create_open_api_clients.rb b/db/migrate/20160504085703_create_open_api_clients.rb index fd070547d..13efd4556 100644 --- a/db/migrate/20160504085703_create_open_api_clients.rb +++ b/db/migrate/20160504085703_create_open_api_clients.rb @@ -1,4 +1,6 @@ -class CreateOpenAPIClients < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateOpenAPIClients < ActiveRecord::Migration[4.2] def change create_table :open_api_clients do |t| t.string :name diff --git a/db/migrate/20160504085905_create_open_api_calls_count_tracings.rb b/db/migrate/20160504085905_create_open_api_calls_count_tracings.rb index 35e213930..5bc6f4d2e 100644 --- a/db/migrate/20160504085905_create_open_api_calls_count_tracings.rb +++ b/db/migrate/20160504085905_create_open_api_calls_count_tracings.rb @@ -1,4 +1,6 @@ -class CreateOpenAPICallsCountTracings < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateOpenAPICallsCountTracings < ActiveRecord::Migration[4.2] def change create_table :open_api_calls_count_tracings do |t| t.belongs_to :open_api_client, foreign_key: true, index: true diff --git a/db/migrate/20160516090121_add_social_fields_to_profile.rb b/db/migrate/20160516090121_add_social_fields_to_profile.rb index 24e676fee..5ebb87fc7 100644 --- a/db/migrate/20160516090121_add_social_fields_to_profile.rb +++ b/db/migrate/20160516090121_add_social_fields_to_profile.rb @@ -1,4 +1,6 @@ -class AddSocialFieldsToProfile < ActiveRecord::Migration +# frozen_string_literal:true + +class AddSocialFieldsToProfile < ActiveRecord::Migration[4.2] def change add_column :profiles, :facebook, :string add_column :profiles, :twitter, :string diff --git a/db/migrate/20160516124056_add_website_to_profile.rb b/db/migrate/20160516124056_add_website_to_profile.rb index e59dca287..001073121 100644 --- a/db/migrate/20160516124056_add_website_to_profile.rb +++ b/db/migrate/20160516124056_add_website_to_profile.rb @@ -1,4 +1,6 @@ -class AddWebsiteToProfile < ActiveRecord::Migration +# frozen_string_literal:true + +class AddWebsiteToProfile < ActiveRecord::Migration[4.2] def change add_column :profiles, :website, :string end diff --git a/db/migrate/20160526095550_add_socials_to_profile.rb b/db/migrate/20160526095550_add_socials_to_profile.rb index 606612445..f6f66e974 100644 --- a/db/migrate/20160526095550_add_socials_to_profile.rb +++ b/db/migrate/20160526095550_add_socials_to_profile.rb @@ -1,4 +1,6 @@ -class AddSocialsToProfile < ActiveRecord::Migration +# frozen_string_literal:true + +class AddSocialsToProfile < ActiveRecord::Migration[4.2] def change add_column :profiles, :pinterest, :string add_column :profiles, :lastfm, :string diff --git a/db/migrate/20160526102307_add_job_to_profile.rb b/db/migrate/20160526102307_add_job_to_profile.rb index d2345b101..0cfc6d9b2 100644 --- a/db/migrate/20160526102307_add_job_to_profile.rb +++ b/db/migrate/20160526102307_add_job_to_profile.rb @@ -1,4 +1,6 @@ -class AddJobToProfile < ActiveRecord::Migration +# frozen_string_literal:true + +class AddJobToProfile < ActiveRecord::Migration[4.2] def change add_column :profiles, :job, :string end diff --git a/db/migrate/20160602075531_add_step_nb_to_project_step.rb b/db/migrate/20160602075531_add_step_nb_to_project_step.rb index 2f41200f8..f16ee260a 100644 --- a/db/migrate/20160602075531_add_step_nb_to_project_step.rb +++ b/db/migrate/20160602075531_add_step_nb_to_project_step.rb @@ -1,4 +1,6 @@ -class AddStepNbToProjectStep < ActiveRecord::Migration +# frozen_string_literal:true + +class AddStepNbToProjectStep < ActiveRecord::Migration[4.2] def up add_column :project_steps, :step_nb, :integer execute 'UPDATE project_steps diff --git a/db/migrate/20160613093842_create_unaccent_function.rb b/db/migrate/20160613093842_create_unaccent_function.rb index 750f71734..142273e30 100644 --- a/db/migrate/20160613093842_create_unaccent_function.rb +++ b/db/migrate/20160613093842_create_unaccent_function.rb @@ -1,5 +1,6 @@ -class CreateUnaccentFunction < ActiveRecord::Migration +# frozen_string_literal:true +class CreateUnaccentFunction < ActiveRecord::Migration[4.2] # PostgreSQL only def up execute 'CREATE EXTENSION IF NOT EXISTS unaccent;' diff --git a/db/migrate/20160628092931_rename_courses_workshops_to_events.rb b/db/migrate/20160628092931_rename_courses_workshops_to_events.rb index 74eea160b..3784379eb 100644 --- a/db/migrate/20160628092931_rename_courses_workshops_to_events.rb +++ b/db/migrate/20160628092931_rename_courses_workshops_to_events.rb @@ -1,4 +1,6 @@ -class RenameCoursesWorkshopsToEvents < ActiveRecord::Migration +# frozen_string_literal:true + +class RenameCoursesWorkshopsToEvents < ActiveRecord::Migration[4.2] def up execute "UPDATE statistic_indices SET label='Évènements' diff --git a/db/migrate/20160628124538_create_event_themes.rb b/db/migrate/20160628124538_create_event_themes.rb index 7b6a6fd6d..42cbc3c1a 100644 --- a/db/migrate/20160628124538_create_event_themes.rb +++ b/db/migrate/20160628124538_create_event_themes.rb @@ -1,4 +1,6 @@ -class CreateEventThemes < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateEventThemes < ActiveRecord::Migration[4.2] def change create_table :event_themes do |t| t.string :name diff --git a/db/migrate/20160628131408_create_events_event_themes.rb b/db/migrate/20160628131408_create_events_event_themes.rb index 0f9c299b0..aa03b19d5 100644 --- a/db/migrate/20160628131408_create_events_event_themes.rb +++ b/db/migrate/20160628131408_create_events_event_themes.rb @@ -1,4 +1,6 @@ -class CreateEventsEventThemes < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateEventsEventThemes < ActiveRecord::Migration[4.2] def change create_table :events_event_themes do |t| t.belongs_to :event, index: true, foreign_key: true diff --git a/db/migrate/20160628134211_create_age_ranges.rb b/db/migrate/20160628134211_create_age_ranges.rb index 6a5b5c669..d1596dbdd 100644 --- a/db/migrate/20160628134211_create_age_ranges.rb +++ b/db/migrate/20160628134211_create_age_ranges.rb @@ -1,4 +1,6 @@ -class CreateAgeRanges < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateAgeRanges < ActiveRecord::Migration[4.2] def change create_table :age_ranges do |t| t.string :range diff --git a/db/migrate/20160628134303_add_age_range_id_to_event.rb b/db/migrate/20160628134303_add_age_range_id_to_event.rb index 7e914274d..e2f948eec 100644 --- a/db/migrate/20160628134303_add_age_range_id_to_event.rb +++ b/db/migrate/20160628134303_add_age_range_id_to_event.rb @@ -1,4 +1,6 @@ -class AddAgeRangeIdToEvent < ActiveRecord::Migration +# frozen_string_literal:true + +class AddAgeRangeIdToEvent < ActiveRecord::Migration[4.2] def change add_column :events, :age_range_id, :integer end diff --git a/db/migrate/20160629091649_rename_range_to_name_from_age_range.rb b/db/migrate/20160629091649_rename_range_to_name_from_age_range.rb index 3158b5a63..c1a9f1706 100644 --- a/db/migrate/20160629091649_rename_range_to_name_from_age_range.rb +++ b/db/migrate/20160629091649_rename_range_to_name_from_age_range.rb @@ -1,3 +1,5 @@ -class RenameRangeToNameFromAgeRange < ActiveRecord::Migration +# frozen_string_literal:true + +class RenameRangeToNameFromAgeRange < ActiveRecord::Migration[4.2] rename_column :age_ranges, :range, :name end diff --git a/db/migrate/20160630083438_add_slug_to_categories.rb b/db/migrate/20160630083438_add_slug_to_categories.rb index 0914484ab..49229b40c 100644 --- a/db/migrate/20160630083438_add_slug_to_categories.rb +++ b/db/migrate/20160630083438_add_slug_to_categories.rb @@ -1,4 +1,6 @@ -class AddSlugToCategories < ActiveRecord::Migration +# frozen_string_literal:true + +class AddSlugToCategories < ActiveRecord::Migration[4.2] def change add_column :categories, :slug, :string add_index :categories, :slug, unique: true diff --git a/db/migrate/20160630083556_add_slug_to_age_range.rb b/db/migrate/20160630083556_add_slug_to_age_range.rb index 1dcff4ee7..b35dfa278 100644 --- a/db/migrate/20160630083556_add_slug_to_age_range.rb +++ b/db/migrate/20160630083556_add_slug_to_age_range.rb @@ -1,4 +1,6 @@ -class AddSlugToAgeRange < ActiveRecord::Migration +# frozen_string_literal:true + +class AddSlugToAgeRange < ActiveRecord::Migration[4.2] def change add_column :age_ranges, :slug, :string add_index :age_ranges, :slug, unique: true diff --git a/db/migrate/20160630083759_add_slug_to_event_theme.rb b/db/migrate/20160630083759_add_slug_to_event_theme.rb index 6c608add6..dcd5105ed 100644 --- a/db/migrate/20160630083759_add_slug_to_event_theme.rb +++ b/db/migrate/20160630083759_add_slug_to_event_theme.rb @@ -1,4 +1,6 @@ -class AddSlugToEventTheme < ActiveRecord::Migration +# frozen_string_literal:true + +class AddSlugToEventTheme < ActiveRecord::Migration[4.2] def change add_column :event_themes, :slug, :string add_index :event_themes, :slug, unique: true diff --git a/db/migrate/20160630100137_add_event_theme_and_age_range_to_statistic_field.rb b/db/migrate/20160630100137_add_event_theme_and_age_range_to_statistic_field.rb index 79495cfdb..d76904e7c 100644 --- a/db/migrate/20160630100137_add_event_theme_and_age_range_to_statistic_field.rb +++ b/db/migrate/20160630100137_add_event_theme_and_age_range_to_statistic_field.rb @@ -1,4 +1,6 @@ -class AddEventThemeAndAgeRangeToStatisticField < ActiveRecord::Migration +# frozen_string_literal:true + +class AddEventThemeAndAgeRangeToStatisticField < ActiveRecord::Migration[4.2] def change StatisticField.create!({key:'eventTheme', label:I18n.t('statistics.event_theme'), statistic_index_id: 4, data_type: 'text'}) StatisticField.create!({key:'ageRange', label:I18n.t('statistics.age_range'), statistic_index_id: 4, data_type: 'text'}) diff --git a/db/migrate/20160630140204_add_slugs_to_existing_categories.rb b/db/migrate/20160630140204_add_slugs_to_existing_categories.rb index a6a4ed6cf..2e6aedd50 100644 --- a/db/migrate/20160630140204_add_slugs_to_existing_categories.rb +++ b/db/migrate/20160630140204_add_slugs_to_existing_categories.rb @@ -1,4 +1,6 @@ -class AddSlugsToExistingCategories < ActiveRecord::Migration +# frozen_string_literal:true + +class AddSlugsToExistingCategories < ActiveRecord::Migration[4.2] def up execute 'UPDATE categories SET slug=name diff --git a/db/migrate/20160704095606_create_wallets.rb b/db/migrate/20160704095606_create_wallets.rb index 4bad09e11..4339a2989 100644 --- a/db/migrate/20160704095606_create_wallets.rb +++ b/db/migrate/20160704095606_create_wallets.rb @@ -1,4 +1,6 @@ -class CreateWallets < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateWallets < ActiveRecord::Migration[4.2] def up create_table :wallets do |t| t.belongs_to :user, index: true, foreign_key: true diff --git a/db/migrate/20160704165139_create_wallet_transactions.rb b/db/migrate/20160704165139_create_wallet_transactions.rb index a74b878ab..730900535 100644 --- a/db/migrate/20160704165139_create_wallet_transactions.rb +++ b/db/migrate/20160704165139_create_wallet_transactions.rb @@ -1,4 +1,6 @@ -class CreateWalletTransactions < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateWalletTransactions < ActiveRecord::Migration[4.2] def change create_table :wallet_transactions do |t| t.belongs_to :user, index: true, foreign_key: true diff --git a/db/migrate/20160714095018_add_public_page_to_training.rb b/db/migrate/20160714095018_add_public_page_to_training.rb index 5476f0b5e..5b7244b29 100644 --- a/db/migrate/20160714095018_add_public_page_to_training.rb +++ b/db/migrate/20160714095018_add_public_page_to_training.rb @@ -1,4 +1,6 @@ -class AddPublicPageToTraining < ActiveRecord::Migration +# frozen_string_literal:true + +class AddPublicPageToTraining < ActiveRecord::Migration[4.2] def change add_column :trainings, :public_page, :boolean, default: true end diff --git a/db/migrate/20160718165434_add_wallet_amount_to_invoice.rb b/db/migrate/20160718165434_add_wallet_amount_to_invoice.rb index 9900b3a5f..93259a32d 100644 --- a/db/migrate/20160718165434_add_wallet_amount_to_invoice.rb +++ b/db/migrate/20160718165434_add_wallet_amount_to_invoice.rb @@ -1,4 +1,6 @@ -class AddWalletAmountToInvoice < ActiveRecord::Migration +# frozen_string_literal:true + +class AddWalletAmountToInvoice < ActiveRecord::Migration[4.2] def change add_column :invoices, :wallet_amount, :integer end diff --git a/db/migrate/20160720124355_add_wallet_transaction_to_invoice.rb b/db/migrate/20160720124355_add_wallet_transaction_to_invoice.rb index b0fdac46d..0685f95b5 100644 --- a/db/migrate/20160720124355_add_wallet_transaction_to_invoice.rb +++ b/db/migrate/20160720124355_add_wallet_transaction_to_invoice.rb @@ -1,4 +1,6 @@ -class AddWalletTransactionToInvoice < ActiveRecord::Migration +# frozen_string_literal:true + +class AddWalletTransactionToInvoice < ActiveRecord::Migration[4.2] def change add_reference :invoices, :wallet_transaction, index: true, foreign_key: true end diff --git a/db/migrate/20160725131756_add_category_id_to_event.rb b/db/migrate/20160725131756_add_category_id_to_event.rb index c6b22e620..0c76cc7e7 100644 --- a/db/migrate/20160725131756_add_category_id_to_event.rb +++ b/db/migrate/20160725131756_add_category_id_to_event.rb @@ -1,4 +1,6 @@ -class AddCategoryIdToEvent < ActiveRecord::Migration +# frozen_string_literal:true + +class AddCategoryIdToEvent < ActiveRecord::Migration[4.2] def change add_reference :events, :category, index: true, foreign_key: true end diff --git a/db/migrate/20160725131950_singleize_event_categories.rb b/db/migrate/20160725131950_singleize_event_categories.rb index dde067224..d93853322 100644 --- a/db/migrate/20160725131950_singleize_event_categories.rb +++ b/db/migrate/20160725131950_singleize_event_categories.rb @@ -1,4 +1,6 @@ -class SingleizeEventCategories < ActiveRecord::Migration +# frozen_string_literal:true + +class SingleizeEventCategories < ActiveRecord::Migration[4.2] def up execute 'UPDATE events AS e SET category_id = ec.category_id diff --git a/db/migrate/20160725135112_drop_events_categories.rb b/db/migrate/20160725135112_drop_events_categories.rb index 9ccc2fef4..41fe10e4d 100644 --- a/db/migrate/20160725135112_drop_events_categories.rb +++ b/db/migrate/20160725135112_drop_events_categories.rb @@ -1,4 +1,6 @@ -class DropEventsCategories < ActiveRecord::Migration +# frozen_string_literal:true + +class DropEventsCategories < ActiveRecord::Migration[4.2] def up drop_table :events_categories end diff --git a/db/migrate/20160726081931_create_exports.rb b/db/migrate/20160726081931_create_exports.rb index 7a0b70314..499ced0b9 100644 --- a/db/migrate/20160726081931_create_exports.rb +++ b/db/migrate/20160726081931_create_exports.rb @@ -1,4 +1,6 @@ -class CreateExports < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateExports < ActiveRecord::Migration[4.2] def change create_table :exports do |t| t.string :category diff --git a/db/migrate/20160726111509_add_user_to_export.rb b/db/migrate/20160726111509_add_user_to_export.rb index 6c63fb005..13d825e24 100644 --- a/db/migrate/20160726111509_add_user_to_export.rb +++ b/db/migrate/20160726111509_add_user_to_export.rb @@ -1,4 +1,6 @@ -class AddUserToExport < ActiveRecord::Migration +# frozen_string_literal:true + +class AddUserToExport < ActiveRecord::Migration[4.2] def change add_reference :exports, :user, index: true, foreign_key: true end diff --git a/db/migrate/20160726131152_rename_type_to_stat_type_from_export.rb b/db/migrate/20160726131152_rename_type_to_stat_type_from_export.rb index 2bda2fc6d..308b269ea 100644 --- a/db/migrate/20160726131152_rename_type_to_stat_type_from_export.rb +++ b/db/migrate/20160726131152_rename_type_to_stat_type_from_export.rb @@ -1,4 +1,6 @@ -class RenameTypeToStatTypeFromExport < ActiveRecord::Migration +# frozen_string_literal:true + +class RenameTypeToStatTypeFromExport < ActiveRecord::Migration[4.2] def change rename_column :exports, :type, :export_type end diff --git a/db/migrate/20160726144257_add_key_to_export.rb b/db/migrate/20160726144257_add_key_to_export.rb index bfb79e2a9..9a8390fb6 100644 --- a/db/migrate/20160726144257_add_key_to_export.rb +++ b/db/migrate/20160726144257_add_key_to_export.rb @@ -1,4 +1,6 @@ -class AddKeyToExport < ActiveRecord::Migration +# frozen_string_literal:true + +class AddKeyToExport < ActiveRecord::Migration[4.2] def change add_column :exports, :key, :string end diff --git a/db/migrate/20160728095026_add_is_allow_newsletter_to_users.rb b/db/migrate/20160728095026_add_is_allow_newsletter_to_users.rb index f36d56b0f..a09fffafc 100644 --- a/db/migrate/20160728095026_add_is_allow_newsletter_to_users.rb +++ b/db/migrate/20160728095026_add_is_allow_newsletter_to_users.rb @@ -1,4 +1,6 @@ -class AddIsAllowNewsletterToUsers < ActiveRecord::Migration +# frozen_string_literal:true + +class AddIsAllowNewsletterToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :is_allow_newsletter, :boolean end diff --git a/db/migrate/20160801145502_create_organizations.rb b/db/migrate/20160801145502_create_organizations.rb index e7fe75b6c..c435ec0d7 100644 --- a/db/migrate/20160801145502_create_organizations.rb +++ b/db/migrate/20160801145502_create_organizations.rb @@ -1,4 +1,6 @@ -class CreateOrganizations < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateOrganizations < ActiveRecord::Migration[4.2] def change create_table :organizations do |t| t.string :name diff --git a/db/migrate/20160801153454_add_profile_to_organization.rb b/db/migrate/20160801153454_add_profile_to_organization.rb index 6d32841f2..a6fb59131 100644 --- a/db/migrate/20160801153454_add_profile_to_organization.rb +++ b/db/migrate/20160801153454_add_profile_to_organization.rb @@ -1,4 +1,6 @@ -class AddProfileToOrganization < ActiveRecord::Migration +# frozen_string_literal:true + +class AddProfileToOrganization < ActiveRecord::Migration[4.2] def change add_reference :organizations, :profile, index: true, foreign_key: true end diff --git a/db/migrate/20160803085201_create_coupons.rb b/db/migrate/20160803085201_create_coupons.rb index fbfcf322e..c8bad4f7c 100644 --- a/db/migrate/20160803085201_create_coupons.rb +++ b/db/migrate/20160803085201_create_coupons.rb @@ -1,4 +1,6 @@ -class CreateCoupons < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateCoupons < ActiveRecord::Migration[4.2] def change create_table :coupons do |t| t.string :name diff --git a/db/migrate/20160803104701_add_coupon_to_invoice.rb b/db/migrate/20160803104701_add_coupon_to_invoice.rb index b58874bad..222f2f88c 100644 --- a/db/migrate/20160803104701_add_coupon_to_invoice.rb +++ b/db/migrate/20160803104701_add_coupon_to_invoice.rb @@ -1,4 +1,6 @@ -class AddCouponToInvoice < ActiveRecord::Migration +# frozen_string_literal:true + +class AddCouponToInvoice < ActiveRecord::Migration[4.2] def change add_reference :invoices, :coupon, index: true, foreign_key: true end diff --git a/db/migrate/20160804073558_remove_usages_from_coupons.rb b/db/migrate/20160804073558_remove_usages_from_coupons.rb index 4988a01b6..025f80820 100644 --- a/db/migrate/20160804073558_remove_usages_from_coupons.rb +++ b/db/migrate/20160804073558_remove_usages_from_coupons.rb @@ -1,4 +1,6 @@ -class RemoveUsagesFromCoupons < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveUsagesFromCoupons < ActiveRecord::Migration[4.2] def change remove_column :coupons, :usages, :integer end diff --git a/db/migrate/20160808113850_remove_stp_coupon_id_from_coupons.rb b/db/migrate/20160808113850_remove_stp_coupon_id_from_coupons.rb index 180e49bef..9a9884b6c 100644 --- a/db/migrate/20160808113850_remove_stp_coupon_id_from_coupons.rb +++ b/db/migrate/20160808113850_remove_stp_coupon_id_from_coupons.rb @@ -1,4 +1,6 @@ -class RemoveStpCouponIdFromCoupons < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveStpCouponIdFromCoupons < ActiveRecord::Migration[4.2] def change remove_column :coupons, :stp_coupon_id, :string end diff --git a/db/migrate/20160808113930_add_validity_per_user_to_coupon.rb b/db/migrate/20160808113930_add_validity_per_user_to_coupon.rb index 1172f100c..9bea26ffb 100644 --- a/db/migrate/20160808113930_add_validity_per_user_to_coupon.rb +++ b/db/migrate/20160808113930_add_validity_per_user_to_coupon.rb @@ -1,4 +1,6 @@ -class AddValidityPerUserToCoupon < ActiveRecord::Migration +# frozen_string_literal:true + +class AddValidityPerUserToCoupon < ActiveRecord::Migration[4.2] def change add_column :coupons, :validity_per_user, :string end diff --git a/db/migrate/20160824080717_create_price_categories.rb b/db/migrate/20160824080717_create_price_categories.rb index 9f31dbcd5..38ca91b6d 100644 --- a/db/migrate/20160824080717_create_price_categories.rb +++ b/db/migrate/20160824080717_create_price_categories.rb @@ -1,4 +1,6 @@ -class CreatePriceCategories < ActiveRecord::Migration +# frozen_string_literal:true + +class CreatePriceCategories < ActiveRecord::Migration[4.2] def change create_table :price_categories do |t| t.string :name diff --git a/db/migrate/20160824084111_create_event_price_categories.rb b/db/migrate/20160824084111_create_event_price_categories.rb index 25588ff14..82c40b27c 100644 --- a/db/migrate/20160824084111_create_event_price_categories.rb +++ b/db/migrate/20160824084111_create_event_price_categories.rb @@ -1,4 +1,6 @@ -class CreateEventPriceCategories < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateEventPriceCategories < ActiveRecord::Migration[4.2] def change create_table :event_price_categories do |t| t.belongs_to :event, index: true, foreign_key: true diff --git a/db/migrate/20160825141326_create_tickets.rb b/db/migrate/20160825141326_create_tickets.rb index 576ca525b..82e7a00ee 100644 --- a/db/migrate/20160825141326_create_tickets.rb +++ b/db/migrate/20160825141326_create_tickets.rb @@ -1,4 +1,6 @@ -class CreateTickets < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateTickets < ActiveRecord::Migration[4.2] def change create_table :tickets do |t| t.belongs_to :reservation, index: true, foreign_key: true diff --git a/db/migrate/20160830154719_migrate_event_reduced_amount_to_price_category.rb b/db/migrate/20160830154719_migrate_event_reduced_amount_to_price_category.rb index c919fd739..63144fcbb 100644 --- a/db/migrate/20160830154719_migrate_event_reduced_amount_to_price_category.rb +++ b/db/migrate/20160830154719_migrate_event_reduced_amount_to_price_category.rb @@ -1,4 +1,6 @@ -class MigrateEventReducedAmountToPriceCategory < ActiveRecord::Migration +# frozen_string_literal:true + +class MigrateEventReducedAmountToPriceCategory < ActiveRecord::Migration[4.2] def up pc = PriceCategory.new( name: I18n.t('price_category.reduced_fare'), diff --git a/db/migrate/20160831084443_remove_reduced_amount_from_event.rb b/db/migrate/20160831084443_remove_reduced_amount_from_event.rb index 1dd959141..920ed9935 100644 --- a/db/migrate/20160831084443_remove_reduced_amount_from_event.rb +++ b/db/migrate/20160831084443_remove_reduced_amount_from_event.rb @@ -1,4 +1,6 @@ -class RemoveReducedAmountFromEvent < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveReducedAmountFromEvent < ActiveRecord::Migration[4.2] def change remove_column :events, :reduced_amount, :integer end diff --git a/db/migrate/20160831084519_remove_nb_reserve_reduced_places_from_reservation.rb b/db/migrate/20160831084519_remove_nb_reserve_reduced_places_from_reservation.rb index 287d11b7e..685d20373 100644 --- a/db/migrate/20160831084519_remove_nb_reserve_reduced_places_from_reservation.rb +++ b/db/migrate/20160831084519_remove_nb_reserve_reduced_places_from_reservation.rb @@ -1,4 +1,6 @@ -class RemoveNbReserveReducedPlacesFromReservation < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveNbReserveReducedPlacesFromReservation < ActiveRecord::Migration[4.2] def change remove_column :reservations, :nb_reserve_reduced_places, :integer end diff --git a/db/migrate/20160905141858_create_statistic_custom_aggregations.rb b/db/migrate/20160905141858_create_statistic_custom_aggregations.rb index d1242f56a..e640eb6b8 100644 --- a/db/migrate/20160905141858_create_statistic_custom_aggregations.rb +++ b/db/migrate/20160905141858_create_statistic_custom_aggregations.rb @@ -1,4 +1,6 @@ -class CreateStatisticCustomAggregations < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateStatisticCustomAggregations < ActiveRecord::Migration[4.2] def change create_table :statistic_custom_aggregations do |t| t.text :query diff --git a/db/migrate/20160905142700_add_field_to_statistic_custom_aggregation.rb b/db/migrate/20160905142700_add_field_to_statistic_custom_aggregation.rb index 8b0da532c..23ccea431 100644 --- a/db/migrate/20160905142700_add_field_to_statistic_custom_aggregation.rb +++ b/db/migrate/20160905142700_add_field_to_statistic_custom_aggregation.rb @@ -1,4 +1,6 @@ -class AddFieldToStatisticCustomAggregation < ActiveRecord::Migration +# frozen_string_literal:true + +class AddFieldToStatisticCustomAggregation < ActiveRecord::Migration[4.2] def change add_column :statistic_custom_aggregations, :field, :string end diff --git a/db/migrate/20160906094739_remove_path_from_statistic_custom_aggregations.rb b/db/migrate/20160906094739_remove_path_from_statistic_custom_aggregations.rb index f58d20a1c..0ec1ae3a7 100644 --- a/db/migrate/20160906094739_remove_path_from_statistic_custom_aggregations.rb +++ b/db/migrate/20160906094739_remove_path_from_statistic_custom_aggregations.rb @@ -1,4 +1,6 @@ -class RemovePathFromStatisticCustomAggregations < ActiveRecord::Migration +# frozen_string_literal:true + +class RemovePathFromStatisticCustomAggregations < ActiveRecord::Migration[4.2] def change remove_column :statistic_custom_aggregations, :path, :string end diff --git a/db/migrate/20160906094847_add_es_index_es_type_to_statistic_custom_aggregations.rb b/db/migrate/20160906094847_add_es_index_es_type_to_statistic_custom_aggregations.rb index 894325854..ca3ba642f 100644 --- a/db/migrate/20160906094847_add_es_index_es_type_to_statistic_custom_aggregations.rb +++ b/db/migrate/20160906094847_add_es_index_es_type_to_statistic_custom_aggregations.rb @@ -1,4 +1,6 @@ -class AddEsIndexEsTypeToStatisticCustomAggregations < ActiveRecord::Migration +# frozen_string_literal:true + +class AddEsIndexEsTypeToStatisticCustomAggregations < ActiveRecord::Migration[4.2] def change add_column :statistic_custom_aggregations, :es_index, :string add_column :statistic_custom_aggregations, :es_type, :string diff --git a/db/migrate/20160915105234_add_transformation_to_o_auth2_mapping.rb b/db/migrate/20160915105234_add_transformation_to_o_auth2_mapping.rb index 0e4d44780..3f513bac0 100644 --- a/db/migrate/20160915105234_add_transformation_to_o_auth2_mapping.rb +++ b/db/migrate/20160915105234_add_transformation_to_o_auth2_mapping.rb @@ -1,4 +1,6 @@ -class AddTransformationToOAuth2Mapping < ActiveRecord::Migration +# frozen_string_literal:true + +class AddTransformationToOAuth2Mapping < ActiveRecord::Migration[4.2] def change add_column :o_auth2_mappings, :transformation, :jsonb end diff --git a/db/migrate/20161123104604_add_amount_off_to_coupons.rb b/db/migrate/20161123104604_add_amount_off_to_coupons.rb index 69346c13f..f1e9c6945 100644 --- a/db/migrate/20161123104604_add_amount_off_to_coupons.rb +++ b/db/migrate/20161123104604_add_amount_off_to_coupons.rb @@ -1,4 +1,6 @@ -class AddAmountOffToCoupons < ActiveRecord::Migration +# frozen_string_literal:true + +class AddAmountOffToCoupons < ActiveRecord::Migration[4.2] def change add_column :coupons, :amount_off, :integer end diff --git a/db/migrate/20170109085345_add_slug_to_plan.rb b/db/migrate/20170109085345_add_slug_to_plan.rb index 301a8b6f1..ed7a8432e 100644 --- a/db/migrate/20170109085345_add_slug_to_plan.rb +++ b/db/migrate/20170109085345_add_slug_to_plan.rb @@ -1,4 +1,6 @@ -class AddSlugToPlan < ActiveRecord::Migration +# frozen_string_literal:true + +class AddSlugToPlan < ActiveRecord::Migration[4.2] def change add_column :plans, :slug, :string end diff --git a/db/migrate/20170213100744_create_spaces.rb b/db/migrate/20170213100744_create_spaces.rb index 8753b3b88..d7be901f2 100644 --- a/db/migrate/20170213100744_create_spaces.rb +++ b/db/migrate/20170213100744_create_spaces.rb @@ -1,4 +1,6 @@ -class CreateSpaces < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateSpaces < ActiveRecord::Migration[4.2] def change create_table :spaces do |t| t.string :name diff --git a/db/migrate/20170213101541_create_projects_spaces.rb b/db/migrate/20170213101541_create_projects_spaces.rb index 008e3714e..78f1da2fd 100644 --- a/db/migrate/20170213101541_create_projects_spaces.rb +++ b/db/migrate/20170213101541_create_projects_spaces.rb @@ -1,4 +1,6 @@ -class CreateProjectsSpaces < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateProjectsSpaces < ActiveRecord::Migration[4.2] def change create_table :projects_spaces do |t| t.belongs_to :project, index: true, foreign_key: true diff --git a/db/migrate/20170213103438_create_spaces_availabilities.rb b/db/migrate/20170213103438_create_spaces_availabilities.rb index 68b49db2a..be75a2b95 100644 --- a/db/migrate/20170213103438_create_spaces_availabilities.rb +++ b/db/migrate/20170213103438_create_spaces_availabilities.rb @@ -1,4 +1,6 @@ -class CreateSpacesAvailabilities < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateSpacesAvailabilities < ActiveRecord::Migration[4.2] def change create_table :spaces_availabilities do |t| t.belongs_to :space, index: true, foreign_key: true diff --git a/db/migrate/20170213142543_add_characteristics_to_space.rb b/db/migrate/20170213142543_add_characteristics_to_space.rb index 7c20f13f0..f0d5f4732 100644 --- a/db/migrate/20170213142543_add_characteristics_to_space.rb +++ b/db/migrate/20170213142543_add_characteristics_to_space.rb @@ -1,4 +1,6 @@ -class AddCharacteristicsToSpace < ActiveRecord::Migration +# frozen_string_literal:true + +class AddCharacteristicsToSpace < ActiveRecord::Migration[4.2] def change add_column :spaces, :characteristics, :text end diff --git a/db/migrate/20170227104736_create_slots_reservations.rb b/db/migrate/20170227104736_create_slots_reservations.rb index 772de952b..1b477f7da 100644 --- a/db/migrate/20170227104736_create_slots_reservations.rb +++ b/db/migrate/20170227104736_create_slots_reservations.rb @@ -1,4 +1,6 @@ -class CreateSlotsReservations < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateSlotsReservations < ActiveRecord::Migration[4.2] def change create_table :slots_reservations do |t| t.belongs_to :slot, index: true, foreign_key: true diff --git a/db/migrate/20170227104934_migrate_slots_reservations.rb b/db/migrate/20170227104934_migrate_slots_reservations.rb index b376f54c8..611972c19 100644 --- a/db/migrate/20170227104934_migrate_slots_reservations.rb +++ b/db/migrate/20170227104934_migrate_slots_reservations.rb @@ -1,4 +1,6 @@ -class MigrateSlotsReservations < ActiveRecord::Migration +# frozen_string_literal:true + +class MigrateSlotsReservations < ActiveRecord::Migration[4.2] def up Slot.all.each do |slot| SlotsReservation.create!({slot_id: slot.id, reservation_id: slot.reservation_id}) diff --git a/db/migrate/20170227113718_remove_reservation_id_from_slots.rb b/db/migrate/20170227113718_remove_reservation_id_from_slots.rb index c9e59c02a..ccd11ce04 100644 --- a/db/migrate/20170227113718_remove_reservation_id_from_slots.rb +++ b/db/migrate/20170227113718_remove_reservation_id_from_slots.rb @@ -1,4 +1,6 @@ -class RemoveReservationIdFromSlots < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveReservationIdFromSlots < ActiveRecord::Migration[4.2] def change remove_column :slots, :reservation_id, :integer end diff --git a/db/migrate/20170227114634_add_destroying_to_slot.rb b/db/migrate/20170227114634_add_destroying_to_slot.rb index b46a9915a..172000b25 100644 --- a/db/migrate/20170227114634_add_destroying_to_slot.rb +++ b/db/migrate/20170227114634_add_destroying_to_slot.rb @@ -1,4 +1,6 @@ -class AddDestroyingToSlot < ActiveRecord::Migration +# frozen_string_literal:true + +class AddDestroyingToSlot < ActiveRecord::Migration[4.2] def change # this allow to prevent conflicts of 'delete cascade' by marking a slot # as 'currently being destroyed' diff --git a/db/migrate/20170906100906_add_lock_to_availability.rb b/db/migrate/20170906100906_add_lock_to_availability.rb index 8a27aad1e..71cf47d94 100644 --- a/db/migrate/20170906100906_add_lock_to_availability.rb +++ b/db/migrate/20170906100906_add_lock_to_availability.rb @@ -1,4 +1,6 @@ -class AddLockToAvailability < ActiveRecord::Migration +# frozen_string_literal:true + +class AddLockToAvailability < ActiveRecord::Migration[4.2] def change add_column :availabilities, :lock, :boolean, default: false end diff --git a/db/migrate/20171004135605_add_disabled_to_plan.rb b/db/migrate/20171004135605_add_disabled_to_plan.rb index 95708ffe4..3f71b73ea 100644 --- a/db/migrate/20171004135605_add_disabled_to_plan.rb +++ b/db/migrate/20171004135605_add_disabled_to_plan.rb @@ -1,4 +1,6 @@ -class AddDisabledToPlan < ActiveRecord::Migration +# frozen_string_literal:true + +class AddDisabledToPlan < ActiveRecord::Migration[4.2] def change add_column :plans, :disabled, :boolean end diff --git a/db/migrate/20171005141522_add_disabled_to_group.rb b/db/migrate/20171005141522_add_disabled_to_group.rb index dcf0a1217..25fa0702c 100644 --- a/db/migrate/20171005141522_add_disabled_to_group.rb +++ b/db/migrate/20171005141522_add_disabled_to_group.rb @@ -1,4 +1,6 @@ -class AddDisabledToGroup < ActiveRecord::Migration +# frozen_string_literal:true + +class AddDisabledToGroup < ActiveRecord::Migration[4.2] def change add_column :groups, :disabled, :boolean end diff --git a/db/migrate/20171010143708_add_disabled_to_training.rb b/db/migrate/20171010143708_add_disabled_to_training.rb index 3f5638447..bf3c87516 100644 --- a/db/migrate/20171010143708_add_disabled_to_training.rb +++ b/db/migrate/20171010143708_add_disabled_to_training.rb @@ -1,4 +1,6 @@ -class AddDisabledToTraining < ActiveRecord::Migration +# frozen_string_literal:true + +class AddDisabledToTraining < ActiveRecord::Migration[4.2] def change add_column :trainings, :disabled, :boolean end diff --git a/db/migrate/20171011100640_add_disabled_to_machine.rb b/db/migrate/20171011100640_add_disabled_to_machine.rb index 03986b4ea..da7cc5c9c 100644 --- a/db/migrate/20171011100640_add_disabled_to_machine.rb +++ b/db/migrate/20171011100640_add_disabled_to_machine.rb @@ -1,4 +1,6 @@ -class AddDisabledToMachine < ActiveRecord::Migration +# frozen_string_literal:true + +class AddDisabledToMachine < ActiveRecord::Migration[4.2] def change add_column :machines, :disabled, :boolean end diff --git a/db/migrate/20171011125217_add_disabled_to_space.rb b/db/migrate/20171011125217_add_disabled_to_space.rb index 3353af7c6..e20676a4b 100644 --- a/db/migrate/20171011125217_add_disabled_to_space.rb +++ b/db/migrate/20171011125217_add_disabled_to_space.rb @@ -1,4 +1,6 @@ -class AddDisabledToSpace < ActiveRecord::Migration +# frozen_string_literal:true + +class AddDisabledToSpace < ActiveRecord::Migration[4.2] def change add_column :spaces, :disabled, :boolean end diff --git a/db/migrate/20181210105917_rename_expired_at_to_expiration_date_from_subscription.rb b/db/migrate/20181210105917_rename_expired_at_to_expiration_date_from_subscription.rb index 147d77f72..8de6b4a8f 100644 --- a/db/migrate/20181210105917_rename_expired_at_to_expiration_date_from_subscription.rb +++ b/db/migrate/20181210105917_rename_expired_at_to_expiration_date_from_subscription.rb @@ -1,4 +1,6 @@ -class RenameExpiredAtToExpirationDateFromSubscription < ActiveRecord::Migration +# frozen_string_literal:true + +class RenameExpiredAtToExpirationDateFromSubscription < ActiveRecord::Migration[4.2] def up rename_column :subscriptions, :expired_at, :expiration_date end diff --git a/db/migrate/20181217103256_create_history_values.rb b/db/migrate/20181217103256_create_history_values.rb index b8e265329..cfaf96dc8 100644 --- a/db/migrate/20181217103256_create_history_values.rb +++ b/db/migrate/20181217103256_create_history_values.rb @@ -1,4 +1,6 @@ -class CreateHistoryValues < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateHistoryValues < ActiveRecord::Migration[4.2] def change create_table :history_values do |t| t.references :setting, index: true, foreign_key: true diff --git a/db/migrate/20181217103441_migrate_settings_value_to_history_values.rb b/db/migrate/20181217103441_migrate_settings_value_to_history_values.rb index 3a833b3f7..d7964b4a3 100644 --- a/db/migrate/20181217103441_migrate_settings_value_to_history_values.rb +++ b/db/migrate/20181217103441_migrate_settings_value_to_history_values.rb @@ -1,4 +1,6 @@ -class MigrateSettingsValueToHistoryValues < ActiveRecord::Migration +# frozen_string_literal:true + +class MigrateSettingsValueToHistoryValues < ActiveRecord::Migration[4.2] def up user = User.admins.first Setting.all.each do |setting| diff --git a/db/migrate/20181217110454_remove_value_from_settings.rb b/db/migrate/20181217110454_remove_value_from_settings.rb index 62aad16d7..b320f7fc0 100644 --- a/db/migrate/20181217110454_remove_value_from_settings.rb +++ b/db/migrate/20181217110454_remove_value_from_settings.rb @@ -1,4 +1,6 @@ -class RemoveValueFromSettings < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveValueFromSettings < ActiveRecord::Migration[4.2] def change remove_column :settings, :value, :string end diff --git a/db/migrate/20190107103632_create_accounting_periods.rb b/db/migrate/20190107103632_create_accounting_periods.rb index 32dd47a33..87d2981eb 100644 --- a/db/migrate/20190107103632_create_accounting_periods.rb +++ b/db/migrate/20190107103632_create_accounting_periods.rb @@ -1,4 +1,6 @@ -class CreateAccountingPeriods < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateAccountingPeriods < ActiveRecord::Migration[4.2] def change create_table :accounting_periods do |t| t.date :start_at diff --git a/db/migrate/20190107111749_protect_accounting_periods.rb b/db/migrate/20190107111749_protect_accounting_periods.rb index 01ba232e0..8e49fd14e 100644 --- a/db/migrate/20190107111749_protect_accounting_periods.rb +++ b/db/migrate/20190107111749_protect_accounting_periods.rb @@ -1,5 +1,6 @@ -class ProtectAccountingPeriods < ActiveRecord::Migration +# frozen_string_literal:true +class ProtectAccountingPeriods < ActiveRecord::Migration[4.2] # PostgreSQL only def up return if Rails.env.development? || Rails.env.test? diff --git a/db/migrate/20190110150532_remove_invoicing_disabled_from_user.rb b/db/migrate/20190110150532_remove_invoicing_disabled_from_user.rb index 787adf8bc..ac8638c76 100644 --- a/db/migrate/20190110150532_remove_invoicing_disabled_from_user.rb +++ b/db/migrate/20190110150532_remove_invoicing_disabled_from_user.rb @@ -1,4 +1,6 @@ -class RemoveInvoicingDisabledFromUser < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveInvoicingDisabledFromUser < ActiveRecord::Migration[4.2] def change remove_column :users, :invoicing_disabled, :boolean end diff --git a/db/migrate/20190211124135_add_footprint_to_invoice.rb b/db/migrate/20190211124135_add_footprint_to_invoice.rb index a7bcdd3f2..5b281d957 100644 --- a/db/migrate/20190211124135_add_footprint_to_invoice.rb +++ b/db/migrate/20190211124135_add_footprint_to_invoice.rb @@ -1,4 +1,6 @@ -class AddFootprintToInvoice < ActiveRecord::Migration +# frozen_string_literal:true + +class AddFootprintToInvoice < ActiveRecord::Migration[4.2] def change add_column :invoices, :footprint, :string end diff --git a/db/migrate/20190211124726_add_footprint_to_invoice_item.rb b/db/migrate/20190211124726_add_footprint_to_invoice_item.rb index dba055355..57e102c1f 100644 --- a/db/migrate/20190211124726_add_footprint_to_invoice_item.rb +++ b/db/migrate/20190211124726_add_footprint_to_invoice_item.rb @@ -1,4 +1,6 @@ -class AddFootprintToInvoiceItem < ActiveRecord::Migration +# frozen_string_literal:true + +class AddFootprintToInvoiceItem < ActiveRecord::Migration[4.2] def change add_column :invoice_items, :footprint, :string end diff --git a/db/migrate/20190225101256_add_totals_to_accounting_period.rb b/db/migrate/20190225101256_add_totals_to_accounting_period.rb index 960aaa71f..43273ce8f 100644 --- a/db/migrate/20190225101256_add_totals_to_accounting_period.rb +++ b/db/migrate/20190225101256_add_totals_to_accounting_period.rb @@ -1,4 +1,6 @@ -class AddTotalsToAccountingPeriod < ActiveRecord::Migration +# frozen_string_literal:true + +class AddTotalsToAccountingPeriod < ActiveRecord::Migration[4.2] def change add_column :accounting_periods, :period_total, :integer add_column :accounting_periods, :perpetual_total, :integer diff --git a/db/migrate/20190225102847_add_footprint_to_accounting_period.rb b/db/migrate/20190225102847_add_footprint_to_accounting_period.rb index 9082ba696..7532e9824 100644 --- a/db/migrate/20190225102847_add_footprint_to_accounting_period.rb +++ b/db/migrate/20190225102847_add_footprint_to_accounting_period.rb @@ -1,4 +1,6 @@ -class AddFootprintToAccountingPeriod < ActiveRecord::Migration +# frozen_string_literal:true + +class AddFootprintToAccountingPeriod < ActiveRecord::Migration[4.2] def change add_column :accounting_periods, :footprint, :string end diff --git a/db/migrate/20190227143153_add_environment_to_invoice.rb b/db/migrate/20190227143153_add_environment_to_invoice.rb index 285051106..c35f8a8cc 100644 --- a/db/migrate/20190227143153_add_environment_to_invoice.rb +++ b/db/migrate/20190227143153_add_environment_to_invoice.rb @@ -1,4 +1,6 @@ -class AddEnvironmentToInvoice < ActiveRecord::Migration +# frozen_string_literal:true + +class AddEnvironmentToInvoice < ActiveRecord::Migration[4.2] def change add_column :invoices, :environment, :string end diff --git a/db/migrate/20190314095931_add_operator_to_invoice.rb b/db/migrate/20190314095931_add_operator_to_invoice.rb index 7ac228e5c..6507baab0 100644 --- a/db/migrate/20190314095931_add_operator_to_invoice.rb +++ b/db/migrate/20190314095931_add_operator_to_invoice.rb @@ -1,4 +1,6 @@ -class AddOperatorToInvoice < ActiveRecord::Migration +# frozen_string_literal:true + +class AddOperatorToInvoice < ActiveRecord::Migration[4.2] def change add_column :invoices, :operator_id, :integer add_foreign_key :invoices, :users, column: :operator_id, primary_key: :id diff --git a/db/migrate/20190320091148_add_footprint_to_history_values.rb b/db/migrate/20190320091148_add_footprint_to_history_values.rb index 0afbb1bc7..c92567f04 100644 --- a/db/migrate/20190320091148_add_footprint_to_history_values.rb +++ b/db/migrate/20190320091148_add_footprint_to_history_values.rb @@ -1,4 +1,6 @@ -class AddFootprintToHistoryValues < ActiveRecord::Migration +# frozen_string_literal:true + +class AddFootprintToHistoryValues < ActiveRecord::Migration[4.2] def change add_column :history_values, :footprint, :string end diff --git a/db/migrate/20190521122429_create_invoicing_profiles.rb b/db/migrate/20190521122429_create_invoicing_profiles.rb index 3e6e665d1..03f04db51 100644 --- a/db/migrate/20190521122429_create_invoicing_profiles.rb +++ b/db/migrate/20190521122429_create_invoicing_profiles.rb @@ -1,4 +1,6 @@ -class CreateInvoicingProfiles < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateInvoicingProfiles < ActiveRecord::Migration[4.2] def change create_table :invoicing_profiles do |t| t.references :user, index: true, foreign_key: true diff --git a/db/migrate/20190521123642_create_statistic_profile.rb b/db/migrate/20190521123642_create_statistic_profile.rb index f2fa55f0a..cefc15c1a 100644 --- a/db/migrate/20190521123642_create_statistic_profile.rb +++ b/db/migrate/20190521123642_create_statistic_profile.rb @@ -1,4 +1,6 @@ -class CreateStatisticProfile < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateStatisticProfile < ActiveRecord::Migration[4.2] def change create_table :statistic_profiles do |t| t.boolean :gender diff --git a/db/migrate/20190521124609_migrate_profile_to_invoicing_profile.rb b/db/migrate/20190521124609_migrate_profile_to_invoicing_profile.rb index 25357d16b..841ea79a2 100644 --- a/db/migrate/20190521124609_migrate_profile_to_invoicing_profile.rb +++ b/db/migrate/20190521124609_migrate_profile_to_invoicing_profile.rb @@ -1,4 +1,6 @@ -class MigrateProfileToInvoicingProfile < ActiveRecord::Migration +# frozen_string_literal:true + +class MigrateProfileToInvoicingProfile < ActiveRecord::Migration[4.2] def up User.all.each do |u| p = u.profile diff --git a/db/migrate/20190521151142_migrate_profile_to_statistic_profile.rb b/db/migrate/20190521151142_migrate_profile_to_statistic_profile.rb index 02f3bef2f..ac7292b40 100644 --- a/db/migrate/20190521151142_migrate_profile_to_statistic_profile.rb +++ b/db/migrate/20190521151142_migrate_profile_to_statistic_profile.rb @@ -1,4 +1,6 @@ -class MigrateProfileToStatisticProfile < ActiveRecord::Migration +# frozen_string_literal:true + +class MigrateProfileToStatisticProfile < ActiveRecord::Migration[4.2] def up User.all.each do |u| p = u.profile diff --git a/db/migrate/20190522115230_migrate_invoice_to_invoicing_profile.rb b/db/migrate/20190522115230_migrate_invoice_to_invoicing_profile.rb index cbee7cfad..3fb3ccd63 100644 --- a/db/migrate/20190522115230_migrate_invoice_to_invoicing_profile.rb +++ b/db/migrate/20190522115230_migrate_invoice_to_invoicing_profile.rb @@ -1,7 +1,9 @@ # frozen_string_literal: true # migrate the invoices from being attached to a user to invoicing_profiles which are GDPR compliant -class MigrateInvoiceToInvoicingProfile < ActiveRecord::Migration +# frozen_string_literal:true + +class MigrateInvoiceToInvoicingProfile < ActiveRecord::Migration[4.2] def up # first, check the footprints check_footprints diff --git a/db/migrate/20190523123916_migrate_wallet_to_invoicing_profile.rb b/db/migrate/20190523123916_migrate_wallet_to_invoicing_profile.rb index 37450dcc3..0fa3ab7f4 100644 --- a/db/migrate/20190523123916_migrate_wallet_to_invoicing_profile.rb +++ b/db/migrate/20190523123916_migrate_wallet_to_invoicing_profile.rb @@ -1,4 +1,6 @@ -class MigrateWalletToInvoicingProfile < ActiveRecord::Migration +# frozen_string_literal:true + +class MigrateWalletToInvoicingProfile < ActiveRecord::Migration[4.2] def up Wallet.all.each do |w| user = User.find(w.user_id) diff --git a/db/migrate/20190523140823_migrate_history_value_to_invoicing_profile.rb b/db/migrate/20190523140823_migrate_history_value_to_invoicing_profile.rb index c4fb1bf6d..60e459d6b 100644 --- a/db/migrate/20190523140823_migrate_history_value_to_invoicing_profile.rb +++ b/db/migrate/20190523140823_migrate_history_value_to_invoicing_profile.rb @@ -1,4 +1,6 @@ -class MigrateHistoryValueToInvoicingProfile < ActiveRecord::Migration +# frozen_string_literal:true + +class MigrateHistoryValueToInvoicingProfile < ActiveRecord::Migration[4.2] def up HistoryValue.all.each do |hv| user = User.find_by(id: hv.user_id) diff --git a/db/migrate/20190528140012_remove_user_id_columns.rb b/db/migrate/20190528140012_remove_user_id_columns.rb index 5e232ec63..f09f4c405 100644 --- a/db/migrate/20190528140012_remove_user_id_columns.rb +++ b/db/migrate/20190528140012_remove_user_id_columns.rb @@ -1,10 +1,12 @@ -class RemoveUserIdColumns < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveUserIdColumns < ActiveRecord::Migration[4.2] def change remove_column :invoices, :user_id, :integer remove_reference :organizations, :profile, index: true, foreign_key: true remove_reference :wallets, :user, index: true, foreign_key: true remove_reference :wallet_transactions, :user, index: true, foreign_key: true remove_reference :history_values, :user, index: true, foreign_key: true - remove_reference :invoices, :operator, index: true, foreign_key: true + remove_reference :invoices, :operator, index: true end end diff --git a/db/migrate/20190604064929_migrate_reservation_to_statistic_profile.rb b/db/migrate/20190604064929_migrate_reservation_to_statistic_profile.rb index 6a6439442..d98c133e2 100644 --- a/db/migrate/20190604064929_migrate_reservation_to_statistic_profile.rb +++ b/db/migrate/20190604064929_migrate_reservation_to_statistic_profile.rb @@ -1,4 +1,6 @@ -class MigrateReservationToStatisticProfile < ActiveRecord::Migration +# frozen_string_literal:true + +class MigrateReservationToStatisticProfile < ActiveRecord::Migration[4.2] def up Reservation.all.each do |r| user = User.find(r.user_id) diff --git a/db/migrate/20190604065348_migrate_subscription_to_statistic_profile.rb b/db/migrate/20190604065348_migrate_subscription_to_statistic_profile.rb index 453898d56..49533b6df 100644 --- a/db/migrate/20190604065348_migrate_subscription_to_statistic_profile.rb +++ b/db/migrate/20190604065348_migrate_subscription_to_statistic_profile.rb @@ -1,4 +1,6 @@ -class MigrateSubscriptionToStatisticProfile < ActiveRecord::Migration +# frozen_string_literal:true + +class MigrateSubscriptionToStatisticProfile < ActiveRecord::Migration[4.2] def up Subscription.all.each do |s| user = User.find(s.user_id) diff --git a/db/migrate/20190604070903_migrate_projet_to_statistic_profile.rb b/db/migrate/20190604070903_migrate_projet_to_statistic_profile.rb index 945ea2610..e6376af5e 100644 --- a/db/migrate/20190604070903_migrate_projet_to_statistic_profile.rb +++ b/db/migrate/20190604070903_migrate_projet_to_statistic_profile.rb @@ -1,4 +1,6 @@ -class MigrateProjetToStatisticProfile < ActiveRecord::Migration +# frozen_string_literal:true + +class MigrateProjetToStatisticProfile < ActiveRecord::Migration[4.2] def up Project.all.each do |p| author = User.find(p.author_id) diff --git a/db/migrate/20190604075717_remove_statistic_columns.rb b/db/migrate/20190604075717_remove_statistic_columns.rb index edd95b978..dfb97eb7b 100644 --- a/db/migrate/20190604075717_remove_statistic_columns.rb +++ b/db/migrate/20190604075717_remove_statistic_columns.rb @@ -1,4 +1,6 @@ -class RemoveStatisticColumns < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveStatisticColumns < ActiveRecord::Migration[4.2] def change remove_column :profiles, :gender, :boolean remove_column :profiles, :birthday, :date diff --git a/db/migrate/20190605141322_create_statistic_profile_trainings.rb b/db/migrate/20190605141322_create_statistic_profile_trainings.rb index f6db78b50..5d42972be 100644 --- a/db/migrate/20190605141322_create_statistic_profile_trainings.rb +++ b/db/migrate/20190605141322_create_statistic_profile_trainings.rb @@ -1,4 +1,6 @@ -class CreateStatisticProfileTrainings < ActiveRecord::Migration +# frozen_string_literal:true + +class CreateStatisticProfileTrainings < ActiveRecord::Migration[4.2] def change create_table :statistic_profile_trainings do |t| t.belongs_to :statistic_profile, index: true, foreign_key: true diff --git a/db/migrate/20190606074050_migrate_user_trainings_to_statistic_profile_trainings.rb b/db/migrate/20190606074050_migrate_user_trainings_to_statistic_profile_trainings.rb index b500142d0..416d21310 100644 --- a/db/migrate/20190606074050_migrate_user_trainings_to_statistic_profile_trainings.rb +++ b/db/migrate/20190606074050_migrate_user_trainings_to_statistic_profile_trainings.rb @@ -1,4 +1,6 @@ -class MigrateUserTrainingsToStatisticProfileTrainings < ActiveRecord::Migration +# frozen_string_literal:true + +class MigrateUserTrainingsToStatisticProfileTrainings < ActiveRecord::Migration[4.2] def up user_trainings = execute('SELECT * FROM user_trainings') diff --git a/db/migrate/20190606074801_delete_user_trainings.rb b/db/migrate/20190606074801_delete_user_trainings.rb index acb3648a6..55eea0ea1 100644 --- a/db/migrate/20190606074801_delete_user_trainings.rb +++ b/db/migrate/20190606074801_delete_user_trainings.rb @@ -1,4 +1,6 @@ -class DeleteUserTrainings < ActiveRecord::Migration +# frozen_string_literal:true + +class DeleteUserTrainings < ActiveRecord::Migration[4.2] def change drop_table :user_trainings end diff --git a/db/migrate/20190730085826_add_extension_to_export.rb b/db/migrate/20190730085826_add_extension_to_export.rb index 40e15a140..d97230ca5 100644 --- a/db/migrate/20190730085826_add_extension_to_export.rb +++ b/db/migrate/20190730085826_add_extension_to_export.rb @@ -1,4 +1,6 @@ -class AddExtensionToExport < ActiveRecord::Migration +# frozen_string_literal:true + +class AddExtensionToExport < ActiveRecord::Migration[4.2] def change add_column :exports, :extension, :string, default: 'xlsx' end diff --git a/db/migrate/20190910131825_add_stp_payment_intent_id_to_invoices.rb b/db/migrate/20190910131825_add_stp_payment_intent_id_to_invoices.rb index c86115848..ab7867996 100644 --- a/db/migrate/20190910131825_add_stp_payment_intent_id_to_invoices.rb +++ b/db/migrate/20190910131825_add_stp_payment_intent_id_to_invoices.rb @@ -1,4 +1,6 @@ -class AddStpPaymentIntentIdToInvoices < ActiveRecord::Migration +# frozen_string_literal:true + +class AddStpPaymentIntentIdToInvoices < ActiveRecord::Migration[4.2] def change add_column :invoices, :stp_payment_intent_id, :string end diff --git a/db/migrate/20190910141336_remove_stp_invoice_id_from_reservations.rb b/db/migrate/20190910141336_remove_stp_invoice_id_from_reservations.rb index 28bb5deb0..5869722a4 100644 --- a/db/migrate/20190910141336_remove_stp_invoice_id_from_reservations.rb +++ b/db/migrate/20190910141336_remove_stp_invoice_id_from_reservations.rb @@ -1,4 +1,6 @@ -class RemoveStpInvoiceIdFromReservations < ActiveRecord::Migration +# frozen_string_literal:true + +class RemoveStpInvoiceIdFromReservations < ActiveRecord::Migration[4.2] def change remove_column :reservations, :stp_invoice_id, :string end diff --git a/db/migrate/20190917123631_rename_avoir_mode_to_payment_method_from_invoices.rb b/db/migrate/20190917123631_rename_avoir_mode_to_payment_method_from_invoices.rb index 405ff2191..f904c9acf 100644 --- a/db/migrate/20190917123631_rename_avoir_mode_to_payment_method_from_invoices.rb +++ b/db/migrate/20190917123631_rename_avoir_mode_to_payment_method_from_invoices.rb @@ -4,7 +4,7 @@ # This is due to Strong Customer Authentication changes, that don't store any more an stp_invoice_id in table # "invoices". The new stp_payment_intent_id is not populated if the invoice total = 0 but we must know if the # payment was made on site or online. -class RenameAvoirModeToPaymentMethodFromInvoices < ActiveRecord::Migration +class RenameAvoirModeToPaymentMethodFromInvoices < ActiveRecord::Migration[4.2] def change rename_column :invoices, :avoir_mode, :payment_method end diff --git a/db/migrate/20190924140726_create_imports.rb b/db/migrate/20190924140726_create_imports.rb index 48adc72ba..74e24a16a 100644 --- a/db/migrate/20190924140726_create_imports.rb +++ b/db/migrate/20190924140726_create_imports.rb @@ -2,7 +2,7 @@ # From this migration, we save the file imports into the database. # Currently, imports are limited to users import from a CSV file -class CreateImports < ActiveRecord::Migration +class CreateImports < ActiveRecord::Migration[4.2] def change create_table :imports do |t| t.integer :user_id diff --git a/db/migrate/20191113103352_add_recurrence_to_availabilities.rb b/db/migrate/20191113103352_add_recurrence_to_availabilities.rb index c989f3a5c..5568a554d 100644 --- a/db/migrate/20191113103352_add_recurrence_to_availabilities.rb +++ b/db/migrate/20191113103352_add_recurrence_to_availabilities.rb @@ -2,7 +2,7 @@ # From this migration, we store recurrence info into the availability object, the availability can be linked to others, which are # its "children". -class AddRecurrenceToAvailabilities < ActiveRecord::Migration +class AddRecurrenceToAvailabilities < ActiveRecord::Migration[4.2] def change add_column :availabilities, :is_recurrent, :boolean add_column :availabilities, :occurrence_id, :integer diff --git a/db/migrate/20191127153729_create_i_calendars.rb b/db/migrate/20191127153729_create_i_calendars.rb index 7b64522a8..e8bf543a5 100644 --- a/db/migrate/20191127153729_create_i_calendars.rb +++ b/db/migrate/20191127153729_create_i_calendars.rb @@ -2,7 +2,7 @@ # From this migration, we store URL to iCalendar files and a piece of configuration about them. # This allows to display the events of these external calendars in Fab-manager -class CreateICalendars < ActiveRecord::Migration +class CreateICalendars < ActiveRecord::Migration[4.2] def change create_table :i_calendars do |t| t.string :url diff --git a/db/migrate/20191202135507_create_i_calendar_events.rb b/db/migrate/20191202135507_create_i_calendar_events.rb index 68958c26c..6fdedc251 100644 --- a/db/migrate/20191202135507_create_i_calendar_events.rb +++ b/db/migrate/20191202135507_create_i_calendar_events.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # From this migration, we are able to store events from an external calendar (using the iCalendar standard format) -class CreateICalendarEvents < ActiveRecord::Migration +class CreateICalendarEvents < ActiveRecord::Migration[4.2] def change create_table :i_calendar_events do |t| t.string :uid diff --git a/db/migrate/20200127111404_add_name_to_stylesheet.rb b/db/migrate/20200127111404_add_name_to_stylesheet.rb index 4e7178c34..4acd9c3b4 100644 --- a/db/migrate/20200127111404_add_name_to_stylesheet.rb +++ b/db/migrate/20200127111404_add_name_to_stylesheet.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # From this migration, we distinct multiple stylesheets by their name (previously there was one only one for the main theme override) -class AddNameToStylesheet < ActiveRecord::Migration +class AddNameToStylesheet < ActiveRecord::Migration[4.2] def change add_column :stylesheets, :name, :string end diff --git a/db/migrate/20200206132857_create_plans_availabilities.rb b/db/migrate/20200206132857_create_plans_availabilities.rb index 740d5d98e..5eba52668 100644 --- a/db/migrate/20200206132857_create_plans_availabilities.rb +++ b/db/migrate/20200206132857_create_plans_availabilities.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class CreatePlansAvailabilities < ActiveRecord::Migration +class CreatePlansAvailabilities < ActiveRecord::Migration[4.2] def change create_table :plans_availabilities do |t| t.belongs_to :plan, index: true diff --git a/db/migrate/20200218092221_add_tours_to_profile.rb b/db/migrate/20200218092221_add_tours_to_profile.rb index 79fd93e0b..bad09b665 100644 --- a/db/migrate/20200218092221_add_tours_to_profile.rb +++ b/db/migrate/20200218092221_add_tours_to_profile.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # From this migration, we save in database the "feature tours" viewed by each users to prevent displaying them many times -class AddToursToProfile < ActiveRecord::Migration +class AddToursToProfile < ActiveRecord::Migration[4.2] def change add_column :profiles, :tours, :string end diff --git a/db/schema.rb b/db/schema.rb index dc95e89b1..bbae0f21f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1,4 +1,3 @@ -# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. @@ -18,934 +17,875 @@ ActiveRecord::Schema.define(version: 20200218092221) do enable_extension "unaccent" enable_extension "pg_trgm" - create_table "abuses", force: :cascade do |t| - t.integer "signaled_id" - t.string "signaled_type" - t.string "first_name" - t.string "last_name" - t.string "email" - t.text "message" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - add_index "abuses", ["signaled_type", "signaled_id"], name: "index_abuses_on_signaled_type_and_signaled_id", using: :btree - - create_table "accounting_periods", force: :cascade do |t| - t.date "start_at" - t.date "end_at" - t.datetime "closed_at" - t.integer "closed_by" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "period_total" - t.integer "perpetual_total" - t.string "footprint" - end - - create_table "addresses", force: :cascade do |t| - t.string "address" - t.string "street_number" - t.string "route" - t.string "locality" - t.string "country" - t.string "postal_code" - t.integer "placeable_id" - t.string "placeable_type" - t.datetime "created_at" - t.datetime "updated_at" - end - - create_table "age_ranges", force: :cascade do |t| - t.string "name" + create_table "abuses", id: :serial, force: :cascade do |t| + t.string "signaled_type" + t.integer "signaled_id" + t.string "first_name" + t.string "last_name" + t.string "email" + t.text "message" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.string "slug" + t.index ["signaled_type", "signaled_id"], name: "index_abuses_on_signaled_type_and_signaled_id" end - add_index "age_ranges", ["slug"], name: "index_age_ranges_on_slug", unique: true, using: :btree + create_table "accounting_periods", id: :serial, force: :cascade do |t| + t.date "start_at" + t.date "end_at" + t.datetime "closed_at" + t.integer "closed_by" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.integer "period_total" + t.integer "perpetual_total" + t.string "footprint" + end - create_table "assets", force: :cascade do |t| - t.integer "viewable_id" - t.string "viewable_type" - t.string "attachment" - t.string "type" + create_table "addresses", id: :serial, force: :cascade do |t| + t.string "address" + t.string "street_number" + t.string "route" + t.string "locality" + t.string "country" + t.string "postal_code" + t.string "placeable_type" + t.integer "placeable_id" t.datetime "created_at" t.datetime "updated_at" end - create_table "auth_providers", force: :cascade do |t| - t.string "name" - t.string "status" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "providable_type" - t.integer "providable_id" + create_table "age_ranges", id: :serial, force: :cascade do |t| + t.string "name" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "slug" + t.index ["slug"], name: "index_age_ranges_on_slug", unique: true end - create_table "availabilities", force: :cascade do |t| + create_table "assets", id: :serial, force: :cascade do |t| + t.string "viewable_type" + t.integer "viewable_id" + t.string "attachment" + t.string "type" + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "auth_providers", id: :serial, force: :cascade do |t| + t.string "name" + t.string "status" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "providable_type" + t.integer "providable_id" + end + + create_table "availabilities", id: :serial, force: :cascade do |t| t.datetime "start_at" t.datetime "end_at" - t.string "available_type" + t.string "available_type" t.datetime "created_at" t.datetime "updated_at" - t.integer "nb_total_places" - t.boolean "destroying", default: false - t.boolean "lock", default: false - t.boolean "is_recurrent" - t.integer "occurrence_id" - t.string "period" - t.integer "nb_periods" + t.integer "nb_total_places" + t.boolean "destroying", default: false + t.boolean "lock", default: false + t.boolean "is_recurrent" + t.integer "occurrence_id" + t.string "period" + t.integer "nb_periods" t.datetime "end_date" end - create_table "availability_tags", force: :cascade do |t| - t.integer "availability_id" - t.integer "tag_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + create_table "availability_tags", id: :serial, force: :cascade do |t| + t.integer "availability_id" + t.integer "tag_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["availability_id"], name: "index_availability_tags_on_availability_id" + t.index ["tag_id"], name: "index_availability_tags_on_tag_id" end - add_index "availability_tags", ["availability_id"], name: "index_availability_tags_on_availability_id", using: :btree - add_index "availability_tags", ["tag_id"], name: "index_availability_tags_on_tag_id", using: :btree - - create_table "categories", force: :cascade do |t| - t.string "name" + create_table "categories", id: :serial, force: :cascade do |t| + t.string "name" t.datetime "created_at" t.datetime "updated_at" - t.string "slug" + t.string "slug" + t.index ["slug"], name: "index_categories_on_slug", unique: true end - add_index "categories", ["slug"], name: "index_categories_on_slug", unique: true, using: :btree - - create_table "components", force: :cascade do |t| + create_table "components", id: :serial, force: :cascade do |t| t.string "name", null: false end - create_table "coupons", force: :cascade do |t| - t.string "name" - t.string "code" - t.integer "percent_off" + create_table "coupons", id: :serial, force: :cascade do |t| + t.string "name" + t.string "code" + t.integer "percent_off" t.datetime "valid_until" - t.integer "max_usages" - t.boolean "active" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "validity_per_user" - t.integer "amount_off" + t.integer "max_usages" + t.boolean "active" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "validity_per_user" + t.integer "amount_off" end - create_table "credits", force: :cascade do |t| - t.integer "creditable_id" - t.string "creditable_type" - t.integer "plan_id" - t.integer "hours" + create_table "credits", id: :serial, force: :cascade do |t| + t.string "creditable_type" + t.integer "creditable_id" + t.integer "plan_id" + t.integer "hours" t.datetime "created_at" t.datetime "updated_at" + t.index ["plan_id"], name: "index_credits_on_plan_id" end - add_index "credits", ["plan_id"], name: "index_credits_on_plan_id", using: :btree - - create_table "custom_assets", force: :cascade do |t| - t.string "name" + create_table "custom_assets", id: :serial, force: :cascade do |t| + t.string "name" t.datetime "created_at", null: false t.datetime "updated_at", null: false end - create_table "database_providers", force: :cascade do |t| + create_table "database_providers", id: :serial, force: :cascade do |t| t.datetime "created_at", null: false t.datetime "updated_at", null: false end - create_table "event_price_categories", force: :cascade do |t| - t.integer "event_id" - t.integer "price_category_id" - t.integer "amount" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - add_index "event_price_categories", ["event_id"], name: "index_event_price_categories_on_event_id", using: :btree - add_index "event_price_categories", ["price_category_id"], name: "index_event_price_categories_on_price_category_id", using: :btree - - create_table "event_themes", force: :cascade do |t| - t.string "name" + create_table "event_price_categories", id: :serial, force: :cascade do |t| + t.integer "event_id" + t.integer "price_category_id" + t.integer "amount" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.string "slug" + t.index ["event_id"], name: "index_event_price_categories_on_event_id" + t.index ["price_category_id"], name: "index_event_price_categories_on_price_category_id" end - add_index "event_themes", ["slug"], name: "index_event_themes_on_slug", unique: true, using: :btree + create_table "event_themes", id: :serial, force: :cascade do |t| + t.string "name" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "slug" + t.index ["slug"], name: "index_event_themes_on_slug", unique: true + end - create_table "events", force: :cascade do |t| - t.string "title" - t.text "description" + create_table "events", id: :serial, force: :cascade do |t| + t.string "title" + t.text "description" t.datetime "created_at" t.datetime "updated_at" - t.integer "availability_id" - t.integer "amount" - t.integer "nb_total_places" - t.integer "nb_free_places" - t.integer "recurrence_id" - t.integer "age_range_id" - t.integer "category_id" + t.integer "availability_id" + t.integer "amount" + t.integer "nb_total_places" + t.integer "nb_free_places" + t.integer "recurrence_id" + t.integer "age_range_id" + t.integer "category_id" + t.index ["availability_id"], name: "index_events_on_availability_id" + t.index ["category_id"], name: "index_events_on_category_id" + t.index ["recurrence_id"], name: "index_events_on_recurrence_id" end - add_index "events", ["availability_id"], name: "index_events_on_availability_id", using: :btree - add_index "events", ["category_id"], name: "index_events_on_category_id", using: :btree - add_index "events", ["recurrence_id"], name: "index_events_on_recurrence_id", using: :btree - - create_table "events_event_themes", force: :cascade do |t| + create_table "events_event_themes", id: :serial, force: :cascade do |t| t.integer "event_id" t.integer "event_theme_id" + t.index ["event_id"], name: "index_events_event_themes_on_event_id" + t.index ["event_theme_id"], name: "index_events_event_themes_on_event_theme_id" end - add_index "events_event_themes", ["event_id"], name: "index_events_event_themes_on_event_id", using: :btree - add_index "events_event_themes", ["event_theme_id"], name: "index_events_event_themes_on_event_theme_id", using: :btree - - create_table "exports", force: :cascade do |t| - t.string "category" - t.string "export_type" - t.string "query" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "user_id" - t.string "key" - t.string "extension", default: "xlsx" + create_table "exports", id: :serial, force: :cascade do |t| + t.string "category" + t.string "export_type" + t.string "query" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.integer "user_id" + t.string "key" + t.string "extension", default: "xlsx" + t.index ["user_id"], name: "index_exports_on_user_id" end - add_index "exports", ["user_id"], name: "index_exports_on_user_id", using: :btree - - create_table "friendly_id_slugs", force: :cascade do |t| - t.string "slug", null: false - t.integer "sluggable_id", null: false - t.string "sluggable_type", limit: 50 - t.string "scope" + create_table "friendly_id_slugs", id: :serial, force: :cascade do |t| + t.string "slug", null: false + t.integer "sluggable_id", null: false + t.string "sluggable_type", limit: 50 + t.string "scope" t.datetime "created_at" + t.index ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true + t.index ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type" + t.index ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id" + t.index ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type" end - add_index "friendly_id_slugs", ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true, using: :btree - add_index "friendly_id_slugs", ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type", using: :btree - add_index "friendly_id_slugs", ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id", using: :btree - add_index "friendly_id_slugs", ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type", using: :btree - - create_table "groups", force: :cascade do |t| - t.string "name" + create_table "groups", id: :serial, force: :cascade do |t| + t.string "name" t.datetime "created_at" t.datetime "updated_at" - t.string "slug" - t.boolean "disabled" + t.string "slug" + t.boolean "disabled" + t.index ["slug"], name: "index_groups_on_slug", unique: true end - add_index "groups", ["slug"], name: "index_groups_on_slug", unique: true, using: :btree - - create_table "history_values", force: :cascade do |t| - t.integer "setting_id" - t.string "value" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "footprint" - t.integer "invoicing_profile_id" + create_table "history_values", id: :serial, force: :cascade do |t| + t.integer "setting_id" + t.string "value" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "footprint" + t.integer "invoicing_profile_id" + t.index ["invoicing_profile_id"], name: "index_history_values_on_invoicing_profile_id" + t.index ["setting_id"], name: "index_history_values_on_setting_id" end - add_index "history_values", ["invoicing_profile_id"], name: "index_history_values_on_invoicing_profile_id", using: :btree - add_index "history_values", ["setting_id"], name: "index_history_values_on_setting_id", using: :btree - - create_table "i_calendar_events", force: :cascade do |t| - t.string "uid" + create_table "i_calendar_events", id: :serial, force: :cascade do |t| + t.string "uid" t.datetime "dtstart" t.datetime "dtend" - t.string "summary" - t.string "description" - t.string "attendee" - t.integer "i_calendar_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "summary" + t.string "description" + t.string "attendee" + t.integer "i_calendar_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["i_calendar_id"], name: "index_i_calendar_events_on_i_calendar_id" end - add_index "i_calendar_events", ["i_calendar_id"], name: "index_i_calendar_events_on_i_calendar_id", using: :btree - - create_table "i_calendars", force: :cascade do |t| - t.string "url" - t.string "name" - t.string "color" - t.string "text_color" - t.boolean "text_hidden" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "imports", force: :cascade do |t| - t.integer "user_id" - t.string "attachment" - t.string "update_field" - t.string "category" - t.text "results" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "invoice_items", force: :cascade do |t| - t.integer "invoice_id" - t.string "stp_invoice_item_id" - t.integer "amount" - t.datetime "created_at" - t.datetime "updated_at" - t.text "description" - t.integer "subscription_id" - t.integer "invoice_item_id" - t.string "footprint" - end - - add_index "invoice_items", ["invoice_id"], name: "index_invoice_items_on_invoice_id", using: :btree - - create_table "invoices", force: :cascade do |t| - t.integer "invoiced_id" - t.string "invoiced_type" - t.string "stp_invoice_id" - t.integer "total" - t.datetime "created_at" - t.datetime "updated_at" - t.string "reference" - t.string "payment_method" - t.datetime "avoir_date" - t.integer "invoice_id" - t.string "type" - t.boolean "subscription_to_expire" - t.text "description" - t.integer "wallet_amount" - t.integer "wallet_transaction_id" - t.integer "coupon_id" - t.string "footprint" - t.string "environment" - t.integer "invoicing_profile_id" - t.integer "operator_profile_id" - t.integer "statistic_profile_id" - t.string "stp_payment_intent_id" - end - - add_index "invoices", ["coupon_id"], name: "index_invoices_on_coupon_id", using: :btree - add_index "invoices", ["invoice_id"], name: "index_invoices_on_invoice_id", using: :btree - add_index "invoices", ["invoicing_profile_id"], name: "index_invoices_on_invoicing_profile_id", using: :btree - add_index "invoices", ["statistic_profile_id"], name: "index_invoices_on_statistic_profile_id", using: :btree - add_index "invoices", ["wallet_transaction_id"], name: "index_invoices_on_wallet_transaction_id", using: :btree - - create_table "invoicing_profiles", force: :cascade do |t| - t.integer "user_id" - t.string "first_name" - t.string "last_name" - t.string "email" + create_table "i_calendars", id: :serial, force: :cascade do |t| + t.string "url" + t.string "name" + t.string "color" + t.string "text_color" + t.boolean "text_hidden" t.datetime "created_at", null: false t.datetime "updated_at", null: false end - add_index "invoicing_profiles", ["user_id"], name: "index_invoicing_profiles_on_user_id", using: :btree - - create_table "licences", force: :cascade do |t| - t.string "name", null: false - t.text "description" + create_table "imports", id: :serial, force: :cascade do |t| + t.integer "user_id" + t.string "attachment" + t.string "update_field" + t.string "category" + t.text "results" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - create_table "machines", force: :cascade do |t| - t.string "name", null: false - t.text "description" - t.text "spec" + create_table "invoice_items", id: :serial, force: :cascade do |t| + t.integer "invoice_id" + t.string "stp_invoice_item_id" + t.integer "amount" t.datetime "created_at" t.datetime "updated_at" - t.string "slug" - t.boolean "disabled" + t.text "description" + t.integer "subscription_id" + t.integer "invoice_item_id" + t.string "footprint" + t.index ["invoice_id"], name: "index_invoice_items_on_invoice_id" end - add_index "machines", ["slug"], name: "index_machines_on_slug", unique: true, using: :btree + create_table "invoices", id: :serial, force: :cascade do |t| + t.string "invoiced_type" + t.integer "invoiced_id" + t.string "stp_invoice_id" + t.integer "total" + t.datetime "created_at" + t.datetime "updated_at" + t.string "reference" + t.string "payment_method" + t.datetime "avoir_date" + t.integer "invoice_id" + t.string "type" + t.boolean "subscription_to_expire" + t.text "description" + t.integer "wallet_amount" + t.integer "wallet_transaction_id" + t.integer "coupon_id" + t.string "footprint" + t.string "environment" + t.integer "invoicing_profile_id" + t.integer "operator_profile_id" + t.integer "statistic_profile_id" + t.string "stp_payment_intent_id" + t.index ["coupon_id"], name: "index_invoices_on_coupon_id" + t.index ["invoice_id"], name: "index_invoices_on_invoice_id" + t.index ["invoicing_profile_id"], name: "index_invoices_on_invoicing_profile_id" + t.index ["statistic_profile_id"], name: "index_invoices_on_statistic_profile_id" + t.index ["wallet_transaction_id"], name: "index_invoices_on_wallet_transaction_id" + end - create_table "machines_availabilities", force: :cascade do |t| + create_table "invoicing_profiles", id: :serial, force: :cascade do |t| + t.integer "user_id" + t.string "first_name" + t.string "last_name" + t.string "email" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["user_id"], name: "index_invoicing_profiles_on_user_id" + end + + create_table "licences", id: :serial, force: :cascade do |t| + t.string "name", null: false + t.text "description" + end + + create_table "machines", id: :serial, force: :cascade do |t| + t.string "name", null: false + t.text "description" + t.text "spec" + t.datetime "created_at" + t.datetime "updated_at" + t.string "slug" + t.boolean "disabled" + t.index ["slug"], name: "index_machines_on_slug", unique: true + end + + create_table "machines_availabilities", id: :serial, force: :cascade do |t| t.integer "machine_id" t.integer "availability_id" + t.index ["availability_id"], name: "index_machines_availabilities_on_availability_id" + t.index ["machine_id"], name: "index_machines_availabilities_on_machine_id" end - add_index "machines_availabilities", ["availability_id"], name: "index_machines_availabilities_on_availability_id", using: :btree - add_index "machines_availabilities", ["machine_id"], name: "index_machines_availabilities_on_machine_id", using: :btree - - create_table "notifications", force: :cascade do |t| - t.integer "receiver_id" - t.integer "attached_object_id" - t.string "attached_object_type" - t.integer "notification_type_id" - t.boolean "is_read", default: false + create_table "notifications", id: :serial, force: :cascade do |t| + t.integer "receiver_id" + t.string "attached_object_type" + t.integer "attached_object_id" + t.integer "notification_type_id" + t.boolean "is_read", default: false t.datetime "created_at" t.datetime "updated_at" - t.string "receiver_type" - t.boolean "is_send", default: false - t.jsonb "meta_data", default: {} + t.string "receiver_type" + t.boolean "is_send", default: false + t.jsonb "meta_data", default: "{}" + t.index ["notification_type_id"], name: "index_notifications_on_notification_type_id" + t.index ["receiver_id"], name: "index_notifications_on_receiver_id" end - add_index "notifications", ["notification_type_id"], name: "index_notifications_on_notification_type_id", using: :btree - add_index "notifications", ["receiver_id"], name: "index_notifications_on_receiver_id", using: :btree - - create_table "o_auth2_mappings", force: :cascade do |t| - t.integer "o_auth2_provider_id" - t.string "local_field" - t.string "api_field" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "local_model" - t.string "api_endpoint" - t.string "api_data_type" - t.jsonb "transformation" + create_table "o_auth2_mappings", id: :serial, force: :cascade do |t| + t.integer "o_auth2_provider_id" + t.string "local_field" + t.string "api_field" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "local_model" + t.string "api_endpoint" + t.string "api_data_type" + t.jsonb "transformation" + t.index ["o_auth2_provider_id"], name: "index_o_auth2_mappings_on_o_auth2_provider_id" end - add_index "o_auth2_mappings", ["o_auth2_provider_id"], name: "index_o_auth2_mappings_on_o_auth2_provider_id", using: :btree - - create_table "o_auth2_providers", force: :cascade do |t| - t.string "base_url" - t.string "token_endpoint" - t.string "authorization_endpoint" - t.string "client_id" - t.string "client_secret" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "profile_url" + create_table "o_auth2_providers", id: :serial, force: :cascade do |t| + t.string "base_url" + t.string "token_endpoint" + t.string "authorization_endpoint" + t.string "client_id" + t.string "client_secret" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "profile_url" end - create_table "offer_days", force: :cascade do |t| - t.integer "subscription_id" + create_table "offer_days", id: :serial, force: :cascade do |t| + t.integer "subscription_id" t.datetime "start_at" t.datetime "end_at" t.datetime "created_at" t.datetime "updated_at" + t.index ["subscription_id"], name: "index_offer_days_on_subscription_id" end - add_index "offer_days", ["subscription_id"], name: "index_offer_days_on_subscription_id", using: :btree - - create_table "open_api_calls_count_tracings", force: :cascade do |t| - t.integer "open_api_client_id" - t.integer "calls_count", null: false - t.datetime "at", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + create_table "open_api_calls_count_tracings", id: :serial, force: :cascade do |t| + t.integer "open_api_client_id" + t.integer "calls_count", null: false + t.datetime "at", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["open_api_client_id"], name: "index_open_api_calls_count_tracings_on_open_api_client_id" end - add_index "open_api_calls_count_tracings", ["open_api_client_id"], name: "index_open_api_calls_count_tracings_on_open_api_client_id", using: :btree - - create_table "open_api_clients", force: :cascade do |t| - t.string "name" - t.integer "calls_count", default: 0 - t.string "token" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + create_table "open_api_clients", id: :serial, force: :cascade do |t| + t.string "name" + t.integer "calls_count", default: 0 + t.string "token" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - create_table "organizations", force: :cascade do |t| - t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "invoicing_profile_id" + create_table "organizations", id: :serial, force: :cascade do |t| + t.string "name" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.integer "invoicing_profile_id" + t.index ["invoicing_profile_id"], name: "index_organizations_on_invoicing_profile_id" end - add_index "organizations", ["invoicing_profile_id"], name: "index_organizations_on_invoicing_profile_id", using: :btree - - create_table "plans", force: :cascade do |t| - t.string "name" - t.integer "amount" - t.string "interval" - t.integer "group_id" - t.string "stp_plan_id" + create_table "plans", id: :serial, force: :cascade do |t| + t.string "name" + t.integer "amount" + t.string "interval" + t.integer "group_id" + t.string "stp_plan_id" t.datetime "created_at" t.datetime "updated_at" - t.integer "training_credit_nb", default: 0 - t.boolean "is_rolling", default: true - t.text "description" - t.string "type" - t.string "base_name" - t.integer "ui_weight", default: 0 - t.integer "interval_count", default: 1 - t.string "slug" - t.boolean "disabled" + t.integer "training_credit_nb", default: 0 + t.boolean "is_rolling", default: true + t.text "description" + t.string "type" + t.string "base_name" + t.integer "ui_weight", default: 0 + t.integer "interval_count", default: 1 + t.string "slug" + t.boolean "disabled" + t.index ["group_id"], name: "index_plans_on_group_id" end - add_index "plans", ["group_id"], name: "index_plans_on_group_id", using: :btree - - create_table "plans_availabilities", force: :cascade do |t| + create_table "plans_availabilities", id: :serial, force: :cascade do |t| t.integer "plan_id" t.integer "availability_id" + t.index ["availability_id"], name: "index_plans_availabilities_on_availability_id" + t.index ["plan_id"], name: "index_plans_availabilities_on_plan_id" end - add_index "plans_availabilities", ["availability_id"], name: "index_plans_availabilities_on_availability_id", using: :btree - add_index "plans_availabilities", ["plan_id"], name: "index_plans_availabilities_on_plan_id", using: :btree - - create_table "price_categories", force: :cascade do |t| - t.string "name" - t.text "conditions" + create_table "price_categories", id: :serial, force: :cascade do |t| + t.string "name" + t.text "conditions" t.datetime "created_at", null: false t.datetime "updated_at", null: false end - create_table "prices", force: :cascade do |t| - t.integer "group_id" - t.integer "plan_id" - t.integer "priceable_id" - t.string "priceable_type" - t.integer "amount" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + create_table "prices", id: :serial, force: :cascade do |t| + t.integer "group_id" + t.integer "plan_id" + t.string "priceable_type" + t.integer "priceable_id" + t.integer "amount" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["group_id"], name: "index_prices_on_group_id" + t.index ["plan_id"], name: "index_prices_on_plan_id" + t.index ["priceable_type", "priceable_id"], name: "index_prices_on_priceable_type_and_priceable_id" end - add_index "prices", ["group_id"], name: "index_prices_on_group_id", using: :btree - add_index "prices", ["plan_id"], name: "index_prices_on_plan_id", using: :btree - add_index "prices", ["priceable_type", "priceable_id"], name: "index_prices_on_priceable_type_and_priceable_id", using: :btree - - create_table "profiles", force: :cascade do |t| - t.integer "user_id" - t.string "first_name" - t.string "last_name" - t.string "phone" - t.text "interest" - t.text "software_mastered" + create_table "profiles", id: :serial, force: :cascade do |t| + t.integer "user_id" + t.string "first_name" + t.string "last_name" + t.string "phone" + t.text "interest" + t.text "software_mastered" t.datetime "created_at" t.datetime "updated_at" - t.string "facebook" - t.string "twitter" - t.string "google_plus" - t.string "viadeo" - t.string "linkedin" - t.string "instagram" - t.string "youtube" - t.string "vimeo" - t.string "dailymotion" - t.string "github" - t.string "echosciences" - t.string "website" - t.string "pinterest" - t.string "lastfm" - t.string "flickr" - t.string "job" - t.string "tours" + t.string "facebook" + t.string "twitter" + t.string "google_plus" + t.string "viadeo" + t.string "linkedin" + t.string "instagram" + t.string "youtube" + t.string "vimeo" + t.string "dailymotion" + t.string "github" + t.string "echosciences" + t.string "website" + t.string "pinterest" + t.string "lastfm" + t.string "flickr" + t.string "job" + t.string "tours" + t.index "lower(f_unaccent((first_name)::text)) gin_trgm_ops", name: "profiles_lower_unaccent_first_name_trgm_idx", using: :gin + t.index "lower(f_unaccent((last_name)::text)) gin_trgm_ops", name: "profiles_lower_unaccent_last_name_trgm_idx", using: :gin + t.index ["user_id"], name: "index_profiles_on_user_id" end - add_index "profiles", ["user_id"], name: "index_profiles_on_user_id", using: :btree - - create_table "project_steps", force: :cascade do |t| - t.text "description" - t.integer "project_id" + create_table "project_steps", id: :serial, force: :cascade do |t| + t.text "description" + t.integer "project_id" t.datetime "created_at" t.datetime "updated_at" - t.string "title" - t.integer "step_nb" + t.string "title" + t.integer "step_nb" + t.index ["project_id"], name: "index_project_steps_on_project_id" end - add_index "project_steps", ["project_id"], name: "index_project_steps_on_project_id", using: :btree - - create_table "project_users", force: :cascade do |t| - t.integer "project_id" - t.integer "user_id" + create_table "project_users", id: :serial, force: :cascade do |t| + t.integer "project_id" + t.integer "user_id" t.datetime "created_at" t.datetime "updated_at" - t.boolean "is_valid", default: false - t.string "valid_token" + t.boolean "is_valid", default: false + t.string "valid_token" + t.index ["project_id"], name: "index_project_users_on_project_id" + t.index ["user_id"], name: "index_project_users_on_user_id" end - add_index "project_users", ["project_id"], name: "index_project_users_on_project_id", using: :btree - add_index "project_users", ["user_id"], name: "index_project_users_on_user_id", using: :btree - - create_table "projects", force: :cascade do |t| - t.string "name" - t.text "description" + create_table "projects", id: :serial, force: :cascade do |t| + t.string "name" + t.text "description" t.datetime "created_at" t.datetime "updated_at" - t.text "tags" - t.integer "licence_id" - t.string "state" - t.string "slug" + t.text "tags" + t.integer "licence_id" + t.string "state" + t.string "slug" t.datetime "published_at" - t.integer "author_statistic_profile_id" + t.integer "author_statistic_profile_id" + t.index ["slug"], name: "index_projects_on_slug", unique: true end - add_index "projects", ["slug"], name: "index_projects_on_slug", unique: true, using: :btree - - create_table "projects_components", force: :cascade do |t| + create_table "projects_components", id: :serial, force: :cascade do |t| t.integer "project_id" t.integer "component_id" + t.index ["component_id"], name: "index_projects_components_on_component_id" + t.index ["project_id"], name: "index_projects_components_on_project_id" end - add_index "projects_components", ["component_id"], name: "index_projects_components_on_component_id", using: :btree - add_index "projects_components", ["project_id"], name: "index_projects_components_on_project_id", using: :btree - - create_table "projects_machines", force: :cascade do |t| + create_table "projects_machines", id: :serial, force: :cascade do |t| t.integer "project_id" t.integer "machine_id" + t.index ["machine_id"], name: "index_projects_machines_on_machine_id" + t.index ["project_id"], name: "index_projects_machines_on_project_id" end - add_index "projects_machines", ["machine_id"], name: "index_projects_machines_on_machine_id", using: :btree - add_index "projects_machines", ["project_id"], name: "index_projects_machines_on_project_id", using: :btree - - create_table "projects_spaces", force: :cascade do |t| + create_table "projects_spaces", id: :serial, force: :cascade do |t| t.integer "project_id" t.integer "space_id" + t.index ["project_id"], name: "index_projects_spaces_on_project_id" + t.index ["space_id"], name: "index_projects_spaces_on_space_id" end - add_index "projects_spaces", ["project_id"], name: "index_projects_spaces_on_project_id", using: :btree - add_index "projects_spaces", ["space_id"], name: "index_projects_spaces_on_space_id", using: :btree - - create_table "projects_themes", force: :cascade do |t| + create_table "projects_themes", id: :serial, force: :cascade do |t| t.integer "project_id" t.integer "theme_id" + t.index ["project_id"], name: "index_projects_themes_on_project_id" + t.index ["theme_id"], name: "index_projects_themes_on_theme_id" end - add_index "projects_themes", ["project_id"], name: "index_projects_themes_on_project_id", using: :btree - add_index "projects_themes", ["theme_id"], name: "index_projects_themes_on_theme_id", using: :btree - - create_table "reservations", force: :cascade do |t| - t.text "message" + create_table "reservations", id: :serial, force: :cascade do |t| + t.text "message" t.datetime "created_at" t.datetime "updated_at" - t.integer "reservable_id" - t.string "reservable_type" - t.integer "nb_reserve_places" - t.integer "statistic_profile_id" + t.string "reservable_type" + t.integer "reservable_id" + t.integer "nb_reserve_places" + t.integer "statistic_profile_id" + t.index ["reservable_type", "reservable_id"], name: "index_reservations_on_reservable_type_and_reservable_id" + t.index ["statistic_profile_id"], name: "index_reservations_on_statistic_profile_id" end - add_index "reservations", ["reservable_type", "reservable_id"], name: "index_reservations_on_reservable_type_and_reservable_id", using: :btree - add_index "reservations", ["statistic_profile_id"], name: "index_reservations_on_statistic_profile_id", using: :btree - - create_table "roles", force: :cascade do |t| - t.string "name" - t.integer "resource_id" - t.string "resource_type" + create_table "roles", id: :serial, force: :cascade do |t| + t.string "name" + t.string "resource_type" + t.integer "resource_id" t.datetime "created_at" t.datetime "updated_at" + t.index ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id" + t.index ["name"], name: "index_roles_on_name" end - add_index "roles", ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id", using: :btree - add_index "roles", ["name"], name: "index_roles_on_name", using: :btree - - create_table "settings", force: :cascade do |t| - t.string "name", null: false + create_table "settings", id: :serial, force: :cascade do |t| + t.string "name", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.index ["name"], name: "index_settings_on_name", unique: true end - add_index "settings", ["name"], name: "index_settings_on_name", unique: true, using: :btree - - create_table "slots", force: :cascade do |t| + create_table "slots", id: :serial, force: :cascade do |t| t.datetime "start_at" t.datetime "end_at" t.datetime "created_at" t.datetime "updated_at" - t.integer "availability_id" + t.integer "availability_id" t.datetime "ex_start_at" t.datetime "ex_end_at" t.datetime "canceled_at" - t.boolean "offered", default: false - t.boolean "destroying", default: false + t.boolean "offered", default: false + t.boolean "destroying", default: false + t.index ["availability_id"], name: "index_slots_on_availability_id" end - add_index "slots", ["availability_id"], name: "index_slots_on_availability_id", using: :btree - - create_table "slots_reservations", force: :cascade do |t| + create_table "slots_reservations", id: :serial, force: :cascade do |t| t.integer "slot_id" t.integer "reservation_id" + t.index ["reservation_id"], name: "index_slots_reservations_on_reservation_id" + t.index ["slot_id"], name: "index_slots_reservations_on_slot_id" end - add_index "slots_reservations", ["reservation_id"], name: "index_slots_reservations_on_reservation_id", using: :btree - add_index "slots_reservations", ["slot_id"], name: "index_slots_reservations_on_slot_id", using: :btree - - create_table "spaces", force: :cascade do |t| - t.string "name" - t.integer "default_places" - t.text "description" - t.string "slug" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.text "characteristics" - t.boolean "disabled" - end - - create_table "spaces_availabilities", force: :cascade do |t| - t.integer "space_id" - t.integer "availability_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - add_index "spaces_availabilities", ["availability_id"], name: "index_spaces_availabilities_on_availability_id", using: :btree - add_index "spaces_availabilities", ["space_id"], name: "index_spaces_availabilities_on_space_id", using: :btree - - create_table "statistic_custom_aggregations", force: :cascade do |t| - t.text "query" - t.integer "statistic_type_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "field" - t.string "es_index" - t.string "es_type" - end - - add_index "statistic_custom_aggregations", ["statistic_type_id"], name: "index_statistic_custom_aggregations_on_statistic_type_id", using: :btree - - create_table "statistic_fields", force: :cascade do |t| - t.integer "statistic_index_id" - t.string "key" - t.string "label" - t.datetime "created_at" - t.datetime "updated_at" - t.string "data_type" - end - - add_index "statistic_fields", ["statistic_index_id"], name: "index_statistic_fields_on_statistic_index_id", using: :btree - - create_table "statistic_graphs", force: :cascade do |t| - t.integer "statistic_index_id" - t.string "chart_type" - t.integer "limit" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "statistic_graphs", ["statistic_index_id"], name: "index_statistic_graphs_on_statistic_index_id", using: :btree - - create_table "statistic_indices", force: :cascade do |t| - t.string "es_type_key" - t.string "label" - t.datetime "created_at" - t.datetime "updated_at" - t.boolean "table", default: true - t.boolean "ca", default: true - end - - create_table "statistic_profile_trainings", force: :cascade do |t| - t.integer "statistic_profile_id" - t.integer "training_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - add_index "statistic_profile_trainings", ["statistic_profile_id"], name: "index_statistic_profile_trainings_on_statistic_profile_id", using: :btree - add_index "statistic_profile_trainings", ["training_id"], name: "index_statistic_profile_trainings_on_training_id", using: :btree - - create_table "statistic_profiles", force: :cascade do |t| - t.boolean "gender" - t.date "birthday" - t.integer "group_id" - t.integer "user_id" - t.integer "role_id" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "statistic_profiles", ["group_id"], name: "index_statistic_profiles_on_group_id", using: :btree - add_index "statistic_profiles", ["role_id"], name: "index_statistic_profiles_on_role_id", using: :btree - add_index "statistic_profiles", ["user_id"], name: "index_statistic_profiles_on_user_id", using: :btree - - create_table "statistic_sub_types", force: :cascade do |t| - t.string "key" - t.string "label" - t.datetime "created_at" - t.datetime "updated_at" - end - - create_table "statistic_type_sub_types", force: :cascade do |t| - t.integer "statistic_type_id" - t.integer "statistic_sub_type_id" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "statistic_type_sub_types", ["statistic_sub_type_id"], name: "index_statistic_type_sub_types_on_statistic_sub_type_id", using: :btree - add_index "statistic_type_sub_types", ["statistic_type_id"], name: "index_statistic_type_sub_types_on_statistic_type_id", using: :btree - - create_table "statistic_types", force: :cascade do |t| - t.integer "statistic_index_id" - t.string "key" - t.string "label" - t.boolean "graph" - t.datetime "created_at" - t.datetime "updated_at" - t.boolean "simple" - end - - add_index "statistic_types", ["statistic_index_id"], name: "index_statistic_types_on_statistic_index_id", using: :btree - - create_table "stylesheets", force: :cascade do |t| - t.text "contents" + create_table "spaces", id: :serial, force: :cascade do |t| + t.string "name" + t.integer "default_places" + t.text "description" + t.string "slug" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.string "name" + t.text "characteristics" + t.boolean "disabled" end - create_table "subscriptions", force: :cascade do |t| - t.integer "plan_id" - t.string "stp_subscription_id" + create_table "spaces_availabilities", id: :serial, force: :cascade do |t| + t.integer "space_id" + t.integer "availability_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["availability_id"], name: "index_spaces_availabilities_on_availability_id" + t.index ["space_id"], name: "index_spaces_availabilities_on_space_id" + end + + create_table "statistic_custom_aggregations", id: :serial, force: :cascade do |t| + t.text "query" + t.integer "statistic_type_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "field" + t.string "es_index" + t.string "es_type" + t.index ["statistic_type_id"], name: "index_statistic_custom_aggregations_on_statistic_type_id" + end + + create_table "statistic_fields", id: :serial, force: :cascade do |t| + t.integer "statistic_index_id" + t.string "key" + t.string "label" + t.datetime "created_at" + t.datetime "updated_at" + t.string "data_type" + t.index ["statistic_index_id"], name: "index_statistic_fields_on_statistic_index_id" + end + + create_table "statistic_graphs", id: :serial, force: :cascade do |t| + t.integer "statistic_index_id" + t.string "chart_type" + t.integer "limit" + t.datetime "created_at" + t.datetime "updated_at" + t.index ["statistic_index_id"], name: "index_statistic_graphs_on_statistic_index_id" + end + + create_table "statistic_indices", id: :serial, force: :cascade do |t| + t.string "es_type_key" + t.string "label" + t.datetime "created_at" + t.datetime "updated_at" + t.boolean "table", default: true + t.boolean "ca", default: true + end + + create_table "statistic_profile_trainings", id: :serial, force: :cascade do |t| + t.integer "statistic_profile_id" + t.integer "training_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["statistic_profile_id"], name: "index_statistic_profile_trainings_on_statistic_profile_id" + t.index ["training_id"], name: "index_statistic_profile_trainings_on_training_id" + end + + create_table "statistic_profiles", id: :serial, force: :cascade do |t| + t.boolean "gender" + t.date "birthday" + t.integer "group_id" + t.integer "user_id" + t.integer "role_id" + t.datetime "created_at" + t.datetime "updated_at" + t.index ["group_id"], name: "index_statistic_profiles_on_group_id" + t.index ["role_id"], name: "index_statistic_profiles_on_role_id" + t.index ["user_id"], name: "index_statistic_profiles_on_user_id" + end + + create_table "statistic_sub_types", id: :serial, force: :cascade do |t| + t.string "key" + t.string "label" + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "statistic_type_sub_types", id: :serial, force: :cascade do |t| + t.integer "statistic_type_id" + t.integer "statistic_sub_type_id" + t.datetime "created_at" + t.datetime "updated_at" + t.index ["statistic_sub_type_id"], name: "index_statistic_type_sub_types_on_statistic_sub_type_id" + t.index ["statistic_type_id"], name: "index_statistic_type_sub_types_on_statistic_type_id" + end + + create_table "statistic_types", id: :serial, force: :cascade do |t| + t.integer "statistic_index_id" + t.string "key" + t.string "label" + t.boolean "graph" + t.datetime "created_at" + t.datetime "updated_at" + t.boolean "simple" + t.index ["statistic_index_id"], name: "index_statistic_types_on_statistic_index_id" + end + + create_table "stylesheets", id: :serial, force: :cascade do |t| + t.text "contents" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "name" + end + + create_table "subscriptions", id: :serial, force: :cascade do |t| + t.integer "plan_id" + t.string "stp_subscription_id" t.datetime "created_at" t.datetime "updated_at" t.datetime "expiration_date" t.datetime "canceled_at" - t.integer "statistic_profile_id" + t.integer "statistic_profile_id" + t.index ["plan_id"], name: "index_subscriptions_on_plan_id" + t.index ["statistic_profile_id"], name: "index_subscriptions_on_statistic_profile_id" end - add_index "subscriptions", ["plan_id"], name: "index_subscriptions_on_plan_id", using: :btree - add_index "subscriptions", ["statistic_profile_id"], name: "index_subscriptions_on_statistic_profile_id", using: :btree - - create_table "tags", force: :cascade do |t| - t.string "name" + create_table "tags", id: :serial, force: :cascade do |t| + t.string "name" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.index ["name"], name: "index_tags_on_name", unique: true end - add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree - - create_table "themes", force: :cascade do |t| + create_table "themes", id: :serial, force: :cascade do |t| t.string "name", null: false end - create_table "tickets", force: :cascade do |t| - t.integer "reservation_id" - t.integer "event_price_category_id" - t.integer "booked" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - add_index "tickets", ["event_price_category_id"], name: "index_tickets_on_event_price_category_id", using: :btree - add_index "tickets", ["reservation_id"], name: "index_tickets_on_reservation_id", using: :btree - - create_table "trainings", force: :cascade do |t| - t.string "name" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "nb_total_places" - t.string "slug" - t.text "description" - t.boolean "public_page", default: true - t.boolean "disabled" - end - - add_index "trainings", ["slug"], name: "index_trainings_on_slug", unique: true, using: :btree - - create_table "trainings_availabilities", force: :cascade do |t| - t.integer "training_id" - t.integer "availability_id" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "trainings_availabilities", ["availability_id"], name: "index_trainings_availabilities_on_availability_id", using: :btree - add_index "trainings_availabilities", ["training_id"], name: "index_trainings_availabilities_on_training_id", using: :btree - - create_table "trainings_machines", force: :cascade do |t| - t.integer "training_id" - t.integer "machine_id" - end - - add_index "trainings_machines", ["machine_id"], name: "index_trainings_machines_on_machine_id", using: :btree - add_index "trainings_machines", ["training_id"], name: "index_trainings_machines_on_training_id", using: :btree - - create_table "trainings_pricings", force: :cascade do |t| - t.integer "group_id" - t.integer "amount" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "training_id" - end - - add_index "trainings_pricings", ["group_id"], name: "index_trainings_pricings_on_group_id", using: :btree - add_index "trainings_pricings", ["training_id"], name: "index_trainings_pricings_on_training_id", using: :btree - - create_table "user_tags", force: :cascade do |t| - t.integer "user_id" - t.integer "tag_id" + create_table "tickets", id: :serial, force: :cascade do |t| + t.integer "reservation_id" + t.integer "event_price_category_id" + t.integer "booked" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.index ["event_price_category_id"], name: "index_tickets_on_event_price_category_id" + t.index ["reservation_id"], name: "index_tickets_on_reservation_id" end - add_index "user_tags", ["tag_id"], name: "index_user_tags_on_tag_id", using: :btree - add_index "user_tags", ["user_id"], name: "index_user_tags_on_user_id", using: :btree + create_table "trainings", id: :serial, force: :cascade do |t| + t.string "name" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "nb_total_places" + t.string "slug" + t.text "description" + t.boolean "public_page", default: true + t.boolean "disabled" + t.index ["slug"], name: "index_trainings_on_slug", unique: true + end - create_table "users", force: :cascade do |t| - t.string "email", default: "", null: false - t.string "encrypted_password", default: "", null: false - t.string "reset_password_token" + create_table "trainings_availabilities", id: :serial, force: :cascade do |t| + t.integer "training_id" + t.integer "availability_id" + t.datetime "created_at" + t.datetime "updated_at" + t.index ["availability_id"], name: "index_trainings_availabilities_on_availability_id" + t.index ["training_id"], name: "index_trainings_availabilities_on_training_id" + end + + create_table "trainings_machines", id: :serial, force: :cascade do |t| + t.integer "training_id" + t.integer "machine_id" + t.index ["machine_id"], name: "index_trainings_machines_on_machine_id" + t.index ["training_id"], name: "index_trainings_machines_on_training_id" + end + + create_table "trainings_pricings", id: :serial, force: :cascade do |t| + t.integer "group_id" + t.integer "amount" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "training_id" + t.index ["group_id"], name: "index_trainings_pricings_on_group_id" + t.index ["training_id"], name: "index_trainings_pricings_on_training_id" + end + + create_table "user_tags", id: :serial, force: :cascade do |t| + t.integer "user_id" + t.integer "tag_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["tag_id"], name: "index_user_tags_on_tag_id" + t.index ["user_id"], name: "index_user_tags_on_user_id" + end + + create_table "users", id: :serial, force: :cascade do |t| + t.string "email", default: "", null: false + t.string "encrypted_password", default: "", null: false + t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" - t.integer "sign_in_count", default: 0, null: false + t.integer "sign_in_count", default: 0, null: false t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" - t.string "current_sign_in_ip" - t.string "last_sign_in_ip" - t.string "confirmation_token" + t.string "current_sign_in_ip" + t.string "last_sign_in_ip" + t.string "confirmation_token" t.datetime "confirmed_at" t.datetime "confirmation_sent_at" - t.string "unconfirmed_email" - t.integer "failed_attempts", default: 0, null: false - t.string "unlock_token" + t.string "unconfirmed_email" + t.integer "failed_attempts", default: 0, null: false + t.string "unlock_token" t.datetime "locked_at" t.datetime "created_at" t.datetime "updated_at" - t.boolean "is_allow_contact", default: true - t.integer "group_id" - t.string "stp_customer_id" - t.string "username" - t.string "slug" - t.boolean "is_active", default: true - t.string "provider" - t.string "uid" - t.string "auth_token" + t.boolean "is_allow_contact", default: true + t.integer "group_id" + t.string "stp_customer_id" + t.string "username" + t.string "slug" + t.boolean "is_active", default: true + t.string "provider" + t.string "uid" + t.string "auth_token" t.datetime "merged_at" - t.boolean "is_allow_newsletter" + t.boolean "is_allow_newsletter" + t.index ["auth_token"], name: "index_users_on_auth_token" + t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true + t.index ["email"], name: "index_users_on_email", unique: true + t.index ["group_id"], name: "index_users_on_group_id" + t.index ["provider"], name: "index_users_on_provider" + t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true + t.index ["slug"], name: "index_users_on_slug", unique: true + t.index ["uid"], name: "index_users_on_uid" + t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true + t.index ["username"], name: "index_users_on_username", unique: true end - add_index "users", ["auth_token"], name: "index_users_on_auth_token", using: :btree - add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree - add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree - add_index "users", ["group_id"], name: "index_users_on_group_id", using: :btree - add_index "users", ["provider"], name: "index_users_on_provider", using: :btree - add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree - add_index "users", ["slug"], name: "index_users_on_slug", unique: true, using: :btree - add_index "users", ["uid"], name: "index_users_on_uid", using: :btree - add_index "users", ["unlock_token"], name: "index_users_on_unlock_token", unique: true, using: :btree - add_index "users", ["username"], name: "index_users_on_username", unique: true, using: :btree - - create_table "users_credits", force: :cascade do |t| - t.integer "user_id" - t.integer "credit_id" - t.integer "hours_used" + create_table "users_credits", id: :serial, force: :cascade do |t| + t.integer "user_id" + t.integer "credit_id" + t.integer "hours_used" t.datetime "created_at" t.datetime "updated_at" + t.index ["credit_id"], name: "index_users_credits_on_credit_id" + t.index ["user_id"], name: "index_users_credits_on_user_id" end - add_index "users_credits", ["credit_id"], name: "index_users_credits_on_credit_id", using: :btree - add_index "users_credits", ["user_id"], name: "index_users_credits_on_user_id", using: :btree - create_table "users_roles", id: false, force: :cascade do |t| t.integer "user_id" t.integer "role_id" + t.index ["user_id", "role_id"], name: "index_users_roles_on_user_id_and_role_id" end - add_index "users_roles", ["user_id", "role_id"], name: "index_users_roles_on_user_id_and_role_id", using: :btree - - create_table "wallet_transactions", force: :cascade do |t| - t.integer "wallet_id" - t.integer "transactable_id" - t.string "transactable_type" - t.string "transaction_type" - t.integer "amount" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "invoicing_profile_id" + create_table "wallet_transactions", id: :serial, force: :cascade do |t| + t.integer "wallet_id" + t.string "transactable_type" + t.integer "transactable_id" + t.string "transaction_type" + t.integer "amount" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.integer "invoicing_profile_id" + t.index ["invoicing_profile_id"], name: "index_wallet_transactions_on_invoicing_profile_id" + t.index ["transactable_type", "transactable_id"], name: "index_wallet_transactions_on_transactable" + t.index ["wallet_id"], name: "index_wallet_transactions_on_wallet_id" end - add_index "wallet_transactions", ["invoicing_profile_id"], name: "index_wallet_transactions_on_invoicing_profile_id", using: :btree - add_index "wallet_transactions", ["transactable_type", "transactable_id"], name: "index_wallet_transactions_on_transactable", using: :btree - add_index "wallet_transactions", ["wallet_id"], name: "index_wallet_transactions_on_wallet_id", using: :btree - - create_table "wallets", force: :cascade do |t| - t.integer "amount", default: 0 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "invoicing_profile_id" + create_table "wallets", id: :serial, force: :cascade do |t| + t.integer "amount", default: 0 + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.integer "invoicing_profile_id" + t.index ["invoicing_profile_id"], name: "index_wallets_on_invoicing_profile_id" end - add_index "wallets", ["invoicing_profile_id"], name: "index_wallets_on_invoicing_profile_id", using: :btree - add_foreign_key "accounting_periods", "users", column: "closed_by" add_foreign_key "availability_tags", "availabilities" add_foreign_key "availability_tags", "tags" diff --git a/env.example b/env.example index 8ad8fee9e..f11006822 100644 --- a/env.example +++ b/env.example @@ -1,10 +1,10 @@ # Add application configuration variables here, as shown below. # Databases -POSTGRES_HOST=localhost +POSTGRES_HOST=fabmanager-postgres POSTGRES_PASSWORD= -REDIS_HOST=localhost -ELASTICSEARCH_HOST=localhost +REDIS_HOST=fabmanager-redis +ELASTICSEARCH_HOST=fabmanager-elastic # Stripe SECRET_KEY_BASE=83daf5e7b80d990f037407bab78dff9904aaf3c195a50f84fa8695a22287e707dfbd9524b403b1dcf116ae1d8c06844c3d7ed942564e5b46be6ae3ead93a9d30 diff --git a/package.json b/package.json index e9d0947c2..d289387b0 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "eslint-plugin-import": "~2.20.1", "eslint-plugin-node": "~11.0.0", "eslint-plugin-promise": "~4.2.1", - "eslint-plugin-standard": "~4.0.1" + "eslint-plugin-standard": "~4.0.1", + "maildev": "^1.1.0" }, "dependencies": { "@uirouter/angularjs": "0.4", diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index 93aa4c315..95245152a 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash +RAILS_ENV='test' bin/rails db:environment:set RAILS_ENV='test' rake db:drop RAILS_ENV='test' rake db:create RAILS_ENV='test' rake db:migrate diff --git a/yarn.lock b/yarn.lock index 540b24963..c4a6a017c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -39,6 +39,14 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== +accepts@~1.3.4, accepts@~1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + acorn-jsx@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" @@ -49,6 +57,16 @@ acorn@^7.1.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== +addressparser@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/addressparser/-/addressparser-1.0.1.tgz#47afbe1a2a9262191db6838e4fd1d39b40821746" + integrity sha1-R6++GiqSYhkdtoOOT9HTm0CCF0Y= + +after@0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" + integrity sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8= + ajv@^6.10.0, ajv@^6.10.2: version "6.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" @@ -266,6 +284,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + array-includes@^3.0.3: version "3.1.1" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.1.tgz#cdd67e6852bdf9c1215460786732255ed2459348" @@ -283,16 +306,79 @@ array.prototype.flat@^1.2.1: define-properties "^1.1.3" es-abstract "^1.17.0-next.1" +arraybuffer.slice@~0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz#3bbc4275dd584cc1b10809b89d4e8b63a69e7675" + integrity sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog== + astral-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== +async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== + +async@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720" + integrity sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw== + +backo2@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" + integrity sha1-MasayLEpNjRj41s+u2n038+6eUc= + balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= +base32.js@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/base32.js/-/base32.js-0.1.0.tgz#b582dec693c2f11e893cf064ee6ac5b6131a2202" + integrity sha1-tYLexpPC8R6JPPBk7mrFthMaIgI= + +base64-arraybuffer@0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" + integrity sha1-c5JncZI7Whl0etZmqlzUv5xunOg= + +base64id@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6" + integrity sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY= + +better-assert@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522" + integrity sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI= + dependencies: + callsite "1.0.0" + +blob@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.5.tgz#d680eeef25f8cd91ad533f5b01eed48e64caf683" + integrity sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig== + +body-parser@1.19.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" + integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== + dependencies: + bytes "3.1.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.7.2" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.7.0" + raw-body "2.4.0" + type-is "~1.6.17" + bootstrap-switch@3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/bootstrap-switch/-/bootstrap-switch-3.3.2.tgz#79ddb49fadc308fb731e257f95957af48996eea7" @@ -313,6 +399,16 @@ builtin-modules@^1.0.0: resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= +bytes@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" + integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== + +callsite@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" + integrity sha1-KAOY5dZkvXQDi28JBRU+borxvCA= + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -386,6 +482,26 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +component-bind@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" + integrity sha1-AMYIq33Nk4l8AAllGx06jh5zu9E= + +component-emitter@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= + +component-inherit@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" + integrity sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM= + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -396,6 +512,41 @@ contains-path@^0.1.0: resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= +content-disposition@0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" + integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== + dependencies: + safe-buffer "5.1.2" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + +cookie@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= + +cookie@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" + integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== + +cors@^2.8.5: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -412,7 +563,7 @@ d3@3.5: resolved "https://registry.yarnpkg.com/d3/-/d3-3.5.17.tgz#bc46748004378b21a360c9fc7cf5231790762fb8" integrity sha1-vEZ0gAQ3iyGjYMn8fPUjF5B2L7g= -debug@^2.6.9: +debug@2.6.9, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -426,6 +577,20 @@ debug@^4.0.1: dependencies: ms "^2.1.1" +debug@~3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + +debug@~4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -438,6 +603,16 @@ define-properties@^1.1.2, define-properties@^1.1.3: dependencies: object-keys "^1.0.12" +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + doctrine@1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" @@ -453,6 +628,11 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + elasticsearch-browser@3.1: version "3.1.4" resolved "https://registry.yarnpkg.com/elasticsearch-browser/-/elasticsearch-browser-3.1.4.tgz#7e7db76e96e02b8a69c7659a997df421d4035565" @@ -468,6 +648,51 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +engine.io-client@~3.3.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.3.2.tgz#04e068798d75beda14375a264bb3d742d7bc33aa" + integrity sha512-y0CPINnhMvPuwtqXfsGuWE8BB66+B6wTtCofQDRecMQPYX3MYUZXFNKDhdrSe3EVjgOu4V3rxdeqN/Tr91IgbQ== + dependencies: + component-emitter "1.2.1" + component-inherit "0.0.3" + debug "~3.1.0" + engine.io-parser "~2.1.1" + has-cors "1.1.0" + indexof "0.0.1" + parseqs "0.0.5" + parseuri "0.0.5" + ws "~6.1.0" + xmlhttprequest-ssl "~1.5.4" + yeast "0.1.2" + +engine.io-parser@~2.1.0, engine.io-parser@~2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.1.3.tgz#757ab970fbf2dfb32c7b74b033216d5739ef79a6" + integrity sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA== + dependencies: + after "0.8.2" + arraybuffer.slice "~0.0.7" + base64-arraybuffer "0.1.5" + blob "0.0.5" + has-binary2 "~1.0.2" + +engine.io@~3.3.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.3.2.tgz#18cbc8b6f36e9461c5c0f81df2b830de16058a59" + integrity sha512-AsaA9KG7cWPXWHp5FvHdDWY3AMWeZ8x+2pUVLcn71qE5AtAzgGbxuclOytygskw8XGmiQafTmnI9Bix3uihu2w== + dependencies: + accepts "~1.3.4" + base64id "1.0.0" + cookie "0.3.1" + debug "~3.1.0" + engine.io-parser "~2.1.0" + ws "~6.1.0" + error-ex@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -501,7 +726,12 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -escape-string-regexp@^1.0.5: +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +escape-string-regexp@^1.0.5, escape-string-regexp@~1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= @@ -683,6 +913,52 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +express@^4.17.1: + version "4.17.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" + integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== + dependencies: + accepts "~1.3.7" + array-flatten "1.1.1" + body-parser "1.19.0" + content-disposition "0.5.3" + content-type "~1.0.4" + cookie "0.4.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.5" + qs "6.7.0" + range-parser "~1.2.1" + safe-buffer "5.1.2" + send "0.17.1" + serve-static "1.14.1" + setprototypeof "1.1.1" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +extend@~3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + external-editor@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" @@ -721,6 +997,19 @@ file-entry-cache@^5.0.1: dependencies: flat-cache "^2.0.1" +finalhandler@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" @@ -747,6 +1036,16 @@ font-awesome@4.3.0: resolved "https://registry.yarnpkg.com/font-awesome/-/font-awesome-4.3.0.tgz#44eeb790cdf986642786f33fce784764f1841c40" integrity sha1-RO63kM35hmQnhvM/znhHZPGEHEA= +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -813,6 +1112,18 @@ graceful-fs@^4.1.2: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== +has-binary2@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-binary2/-/has-binary2-1.0.3.tgz#7776ac627f3ea77250cfc332dab7ddf5e4f5d11d" + integrity sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw== + dependencies: + isarray "2.0.1" + +has-cors@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39" + integrity sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk= + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -850,7 +1161,29 @@ hosted-git-info@^2.1.4: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== -iconv-lite@^0.4.24: +http-errors@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" + integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@~0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -880,6 +1213,11 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10= + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -888,11 +1226,16 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2: +inherits@2, inherits@2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + inquirer@^7.0.0: version "7.1.0" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.1.0.tgz#1298a01859883e17c7264b82870ae1034f92dd29" @@ -912,6 +1255,16 @@ inquirer@^7.0.0: strip-ansi "^6.0.0" through "^2.3.6" +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +ipv6-normalize@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ipv6-normalize/-/ipv6-normalize-1.0.1.tgz#1b3258290d365fa83239e89907dde4592e7620a8" + integrity sha1-GzJYKQ02X6gyOeiZB93kWS52IKg= + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -980,6 +1333,16 @@ is-symbol@^1.0.2: dependencies: has-symbols "^1.0.1" +is-wsl@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" + integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= + +isarray@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.1.tgz#a37d94ed9cda2d59865c9f76fe596ee1f338741e" + integrity sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4= + isarray@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -1061,6 +1424,33 @@ lodash@^4.17.14, lodash@^4.17.15: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== +maildev@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/maildev/-/maildev-1.1.0.tgz#8b6977f244373be00112c942ae15dd32f5c225c9" + integrity sha512-D7mrEM/i4c5AX72aRBN9mO5snsGhEs7MvNFWmrSsRL94sIH0/zVQ1GE+ysN9J7lFMLkXNy2xPG3SGP2cjPrCRw== + dependencies: + async "^3.1.0" + commander "^2.20.0" + cors "^2.8.5" + express "^4.17.1" + mailparser-mit "^1.0.0" + opn "^6.0.0" + rimraf "^2.6.3" + smtp-connection "4.0.2" + smtp-server "3.5.0" + socket.io "2.2.0" + wildstring "1.0.9" + +mailparser-mit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/mailparser-mit/-/mailparser-mit-1.0.0.tgz#19df8436c2a02e1d34a03ec518a2eb065e0a94a4" + integrity sha512-sckRITNb3VCT1sQ275g47MAN786pQ5lU20bLY5f794dF/ARGzuVATQ64gO13FOw8jayjFT10e5ttsripKGGXcw== + dependencies: + addressparser "^1.0.1" + iconv-lite "~0.4.24" + mime "^1.6.0" + uue "^3.1.0" + make-plural@~3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/make-plural/-/make-plural-3.0.6.tgz#2033a03bac290b8f3bb91258f65b9df7e8b01ca7" @@ -1068,11 +1458,21 @@ make-plural@~3.0.6: optionalDependencies: minimist "^1.2.0" +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + medium-editor@4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/medium-editor/-/medium-editor-4.4.0.tgz#ef188cc9cc5cba87177da8cb657a885dfbbe5760" integrity sha1-7xiMycxcuocXfajLZXqIXfu+V2A= +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + messageformat-parser@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/messageformat-parser/-/messageformat-parser-1.1.0.tgz#13ba2250a76bbde8e0fca0dbb3475f95c594a90a" @@ -1089,6 +1489,28 @@ messageformat@~1.0.2: nopt "~3.0.6" reserved-words "^0.1.1" +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + +mime-db@1.43.0: + version "1.43.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" + integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== + +mime-types@~2.1.24: + version "2.1.26" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" + integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== + dependencies: + mime-db "1.43.0" + +mime@1.6.0, mime@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -1135,7 +1557,7 @@ ms@2.0.0: resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= -ms@^2.1.1: +ms@2.1.1, ms@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== @@ -1150,6 +1572,11 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== + "ng-caps-lock@https://github.com/FabioMR/ng-caps-lock.git#1.0.3": version "0.0.0" resolved "https://github.com/FabioMR/ng-caps-lock.git#366cd5a6fcca736df53f1b1b882ef34645d58f1e" @@ -1168,6 +1595,16 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== +nodemailer@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-5.0.0.tgz#bcb409eca613114e85de42646d0ce7f1fa70b716" + integrity sha512-XI4PI5L7GYcJyHkPcHlvPyRrYohNYBNRNbt1tU8PXNU3E1ADJC84a13V0vbL9AM431OP+ETacaGXAF8fGn1JvA== + +nodemailer@^3.1.1: + version "3.1.8" + resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-3.1.8.tgz#febfaccb4bd273678473a309c6cb4b4a2f3c48e3" + integrity sha1-/r+sy0vSc2eEc6MJxstLSi88SOM= + nopt@~3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" @@ -1190,6 +1627,16 @@ nvd3@1.8: resolved "https://registry.yarnpkg.com/nvd3/-/nvd3-1.8.6.tgz#2d3eba74bf33363b5101ebf1d093c59a53ae73c4" integrity sha1-LT66dL8zNjtRAevx0JPFmlOuc8Q= +object-assign@^4: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-component@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" + integrity sha1-8MaapQ78lbhmwYb0AKM3acsvEpE= + object-inspect@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" @@ -1220,6 +1667,13 @@ object.values@^1.1.0: function-bind "^1.1.1" has "^1.0.3" +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -1234,6 +1688,13 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" +opn@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/opn/-/opn-6.0.0.tgz#3c5b0db676d5f97da1233d1ed42d182bc5a27d2d" + integrity sha512-I9PKfIZC+e4RXZ/qr1RhgyCnGgYX0UEIlXgWnCOVACIvFgaC9rz6Won7xbdhoHrd8IIhV7YEpHjreNUNkqCGkQ== + dependencies: + is-wsl "^1.1.0" + optionator@^0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -1284,6 +1745,25 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" +parseqs@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d" + integrity sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0= + dependencies: + better-assert "~1.0.0" + +parseuri@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.5.tgz#80204a50d4dbb779bfdc6ebe2778d90e4bce320a" + integrity sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo= + dependencies: + better-assert "~1.0.0" + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -1304,6 +1784,11 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + path-type@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" @@ -1333,11 +1818,39 @@ progress@^2.0.0: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.1.tgz#c9242169342b1c29d275889c95734621b1952e31" integrity sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg== +proxy-addr@~2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" + integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.9.1" + punycode@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +qs@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" + integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" + integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== + dependencies: + bytes "3.1.0" + http-errors "1.7.2" + iconv-lite "0.4.24" + unpipe "1.0.0" + read-pkg-up@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" @@ -1397,6 +1910,13 @@ rimraf@2.6.3: dependencies: glob "^7.1.3" +rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + run-async@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8" @@ -1411,6 +1931,11 @@ rxjs@^6.5.3: dependencies: tslib "^1.9.0" +safe-buffer@5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + "safer-buffer@>= 2.1.2 < 3": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -1426,6 +1951,40 @@ semver@^6.1.0, semver@^6.1.2: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +send@0.17.1: + version "0.17.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +serve-static@1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" + +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -1452,6 +2011,68 @@ slice-ansi@^2.1.0: astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" +smtp-connection@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/smtp-connection/-/smtp-connection-4.0.2.tgz#d9dd68d38569f3ad9265473670d09d8f3ea518db" + integrity sha1-2d1o04Vp862SZUc2cNCdjz6lGNs= + dependencies: + nodemailer "^3.1.1" + +smtp-server@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/smtp-server/-/smtp-server-3.5.0.tgz#eb2e7bd52f26b4136b9dfc2c9fa0ba70e18cdc81" + integrity sha512-7FUg09H1VmqMRlUq/QdkPxn/NK8VCFw7GMU5rdWWDbS00wbLhjRBe3Lme+AamjDSmVoP6e/WqFqsa7jVI+69pg== + dependencies: + base32.js "0.1.0" + ipv6-normalize "1.0.1" + nodemailer "5.0.0" + +socket.io-adapter@~1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz#ab3f0d6f66b8fc7fca3959ab5991f82221789be9" + integrity sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g== + +socket.io-client@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.2.0.tgz#84e73ee3c43d5020ccc1a258faeeb9aec2723af7" + integrity sha512-56ZrkTDbdTLmBIyfFYesgOxsjcLnwAKoN4CiPyTVkMQj3zTUh0QAx3GbvIvLpFEOvQWu92yyWICxB0u7wkVbYA== + dependencies: + backo2 "1.0.2" + base64-arraybuffer "0.1.5" + component-bind "1.0.0" + component-emitter "1.2.1" + debug "~3.1.0" + engine.io-client "~3.3.1" + has-binary2 "~1.0.2" + has-cors "1.1.0" + indexof "0.0.1" + object-component "0.0.3" + parseqs "0.0.5" + parseuri "0.0.5" + socket.io-parser "~3.3.0" + to-array "0.1.4" + +socket.io-parser@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.3.0.tgz#2b52a96a509fdf31440ba40fed6094c7d4f1262f" + integrity sha512-hczmV6bDgdaEbVqhAeVMM/jfUfzuEZHsQg6eOmLgJht6G3mPKMxYm75w2+qhAQZ+4X+1+ATZ+QFKeOZD5riHng== + dependencies: + component-emitter "1.2.1" + debug "~3.1.0" + isarray "2.0.1" + +socket.io@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-2.2.0.tgz#f0f633161ef6712c972b307598ecd08c9b1b4d5b" + integrity sha512-wxXrIuZ8AILcn+f1B4ez4hJTPG24iNgxBBDaJfT6MsyOhVYiTXWexGoPkd87ktJG8kQEcL/NBvRi64+9k4Kc0w== + dependencies: + debug "~4.1.0" + engine.io "~3.3.1" + has-binary2 "~1.0.2" + socket.io-adapter "~1.1.0" + socket.io-client "2.2.0" + socket.io-parser "~3.3.0" + spdx-correct@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.2.tgz#19bb409e91b47b1ad54159243f7312a858db3c2e" @@ -1483,6 +2104,11 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= +"statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + string-width@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" @@ -1592,6 +2218,16 @@ tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" +to-array@0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" + integrity sha1-F+bBH3PdTz10zaek/zI46a2b+JA= + +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + tslib@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" @@ -1619,6 +2255,14 @@ type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== +type-is@~1.6.17, type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + ui-select@0.19: version "0.19.8" resolved "https://registry.yarnpkg.com/ui-select/-/ui-select-0.19.8.tgz#74860848a7fd8bc494d9856d2f62776ea98637c1" @@ -1629,6 +2273,11 @@ underscore@1.7: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.7.0.tgz#6bbaf0877500d36be34ecaa584e0db9fef035209" integrity sha1-a7rwh3UA02vjTsqlhODbn+8DUgk= +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" @@ -1636,6 +2285,19 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + +uue@^3.1.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/uue/-/uue-3.1.2.tgz#e99368414e87200012eb37de4dbaebaa1c742ad2" + integrity sha512-axKLXVqwtdI/czrjG0X8hyV1KLgeWx8F4KvSbvVCnS+RUvsQMGRjx0kfuZDXXqj0LYvVJmx3B9kWlKtEdRrJLg== + dependencies: + escape-string-regexp "~1.0.5" + extend "~3.0.0" + v8-compile-cache@^2.0.3: version "2.1.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" @@ -1649,6 +2311,11 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" +vary@^1, vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -1656,6 +2323,11 @@ which@^1.2.9: dependencies: isexe "^2.0.0" +wildstring@1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/wildstring/-/wildstring-1.0.9.tgz#82a696d5653c7d4ec9ba716859b6b53aba2761c5" + integrity sha1-gqaW1WU8fU7JunFoWba1OronYcU= + word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" @@ -1672,3 +2344,20 @@ write@1.0.3: integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== dependencies: mkdirp "^0.5.1" + +ws@~6.1.0: + version "6.1.4" + resolved "https://registry.yarnpkg.com/ws/-/ws-6.1.4.tgz#5b5c8800afab925e94ccb29d153c8d02c1776ef9" + integrity sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA== + dependencies: + async-limiter "~1.0.0" + +xmlhttprequest-ssl@~1.5.4: + version "1.5.5" + resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e" + integrity sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4= + +yeast@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" + integrity sha1-AI4G2AlDIMNy28L47XagymyKxBk= From 36adddad534c334a8f9ec87e2669417e4aa1a378 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 24 Mar 2020 18:17:26 +0100 Subject: [PATCH 047/109] Syntax improvements in scss files --- CHANGELOG.md | 1 + app/assets/stylesheets/app.base.scss | 149 ++- app/assets/stylesheets/app.buttons.scss | 80 +- app/assets/stylesheets/app.colors.scss | 171 ++- app/assets/stylesheets/app.components.scss | 251 ++-- app/assets/stylesheets/app.functions.scss | 22 +- app/assets/stylesheets/app.layout.scss | 620 ++++----- app/assets/stylesheets/app.nav.scss | 932 +++++++------- app/assets/stylesheets/app.plugins.scss | 94 +- app/assets/stylesheets/app.printer.scss | 2 +- app/assets/stylesheets/app.responsive.scss | 57 +- app/assets/stylesheets/app.utilities.scss | 1115 +++++++++++++---- .../stylesheets/bootstrap_and_overrides.scss | 1041 ++++++++------- app/assets/stylesheets/modules/abuses.scss | 1 - app/assets/stylesheets/modules/cookies.scss | 9 +- app/assets/stylesheets/modules/icalendar.scss | 4 +- app/assets/stylesheets/modules/invoice.scss | 60 +- app/assets/stylesheets/modules/settings.scss | 7 + app/assets/stylesheets/modules/signup.scss | 5 + app/assets/stylesheets/modules/tour.scss | 23 +- 20 files changed, 2907 insertions(+), 1737 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94ed32207..7587c44f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Updated angular-translate - Updated eslint - Renamed production documentation +- Syntax improvements in scss files - Fix a bug: invalid translation keys in closing accounting period interface - Fix a bug: since PostgreSQL release 9.6.17, the new installations will fail to start complaining for missing password (#194) - Fix a bug: missing translations for some error messages diff --git a/app/assets/stylesheets/app.base.scss b/app/assets/stylesheets/app.base.scss index b2ea363f4..5964121b2 100644 --- a/app/assets/stylesheets/app.base.scss +++ b/app/assets/stylesheets/app.base.scss @@ -2,41 +2,54 @@ html { overflow-x: hidden; } + body { -webkit-font-smoothing: antialiased; } -.h1, .h2, .h3, .h4, .h5, .h6{ +.h1, .h2, .h3, .h4, .h5, .h6 { margin: 0; } h1, .page-title { - line-height: rem-calc(24); - text-transform: uppercase; - font-weight: 900; + line-height: rem-calc(24); + text-transform: uppercase; + font-weight: 900; } + h2 { - //color: $red; - line-height: rem-calc(24); - font-weight: 900; + //color: $red; + line-height: rem-calc(24); + font-weight: 900; } -h3 { font-weight: 600; } -h4 { font-weight: bold; } + +h3 { + font-weight: 600; +} + +h4 { + font-weight: bold; +} + h5 { - display: inline-block; - position: relative; - line-height: rem-calc(18); - //color: $red; - font-size: rem-calc(16); - &:after { - position: absolute; - top: 18px; - left: 0; - content: ''; - width: 35%; - height: 1px; - //background-color: $red; - } + display: inline-block; + position: relative; + line-height: rem-calc(18); + + //color: $red; + font-size: rem-calc(16); + + &:after { + position: absolute; + top: 18px; + left: 0; + content: ''; + width: 35%; + height: 1px; + + //background-color: $red; + + } } // Links @@ -46,78 +59,97 @@ a { //color: $link-color; text-decoration: none; } + a:hover, a:focus { //color: $link-hover-color; text-decoration: none; } -label{ font-weight: 600; } -small, .small{font-size: $font-size-sm;} +label { + font-weight: 600; +} -pre { padding: 0; } +small, .small { + font-size: $font-size-sm; +} + +pre { + padding: 0; +} p { - font-size: rem-calc($font-size-base); - line-height: rem-calc(24); + font-size: rem-calc($font-size-base); + line-height: rem-calc(24); - &.intro, .intro { - font-size: rem-calc(16); - line-height: rem-calc(24); - margin: 1.038em 0 30px 0; - } + &.intro, .intro { + font-size: rem-calc(16); + line-height: rem-calc(24); + margin: 1.038em 0 30px 0; + } } dt { color: $black-light; } + dd { color: $black-light; margin-bottom: 20px; } - // // ------------------------- -.col-0{clear:left;} +.col-0 { + clear: left; +} -.row.no-gutter{ +.row.no-gutter { margin-left: 0; margin-right: 0; } -.no-gutter > [class*="col"]{ +.no-gutter > [class*="col"] { padding: 0; } /* centered columns styles */ .row-centered { - text-align:center; + text-align: center; } + .col-centered { - display:inline-block; - float:none; - /* reset the text-align */ - text-align:left; - /* inline-block space fix */ - margin-right:-4px; + display: inline-block; + float: none; + + /* reset the text-align */ + text-align: left; + + /* inline-block space fix */ + margin-right: -4px; } +::-webkit-input-placeholder { + /* WebKit browsers */ + color: black; +} -::-webkit-input-placeholder { /* WebKit browsers */ - color: black; +:-moz-placeholder { + /* Mozilla Firefox 4 to 18 */ + color: black; + opacity: 1; } -:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ - color: black; - opacity: 1; + +::-moz-placeholder { + /* Mozilla Firefox 19+ */ + color: black; + opacity: 1; } -::-moz-placeholder { /* Mozilla Firefox 19+ */ - color: black; - opacity: 1; -} -:-ms-input-placeholder { /* Internet Explorer 10+ */ - color: black; + +:-ms-input-placeholder { + /* Internet Explorer 10+ */ + color: black; } // .ng-hide-remove-active { @@ -130,11 +162,13 @@ dd { position: absolute; left: 0; right: 0; - @include transition(all .7s ease-in-out); + + @include transition(all 0.7s ease-in-out); } [ui-view].ng-enter { opacity: 0; + // -webkit-transform:scale3d(0.5, 0.5, 0.5); // -moz-transform:scale3d(0.5, 0.5, 0.5); // transform:scale3d(0.5, 0.5, 0.5); @@ -142,6 +176,7 @@ dd { [ui-view].ng-enter-active { opacity: 1; + // -webkit-transform:scale3d(1, 1, 1); // -moz-transform:scale3d(1, 1, 1); // transform:scale3d(1, 1, 1); @@ -149,6 +184,7 @@ dd { [ui-view].ng-leave { opacity: 1; + /*padding-left: 0px;*/ // -webkit-transform:translate3d(0, 0, 0); // -moz-transform:translate3d(0, 0, 0); @@ -157,6 +193,7 @@ dd { [ui-view].ng-leave-active { opacity: 0; + /*padding-left: 100px;*/ // -webkit-transform:translate3d(100px, 0, 0); // -moz-transform:translate3d(100px, 0, 0); diff --git a/app/assets/stylesheets/app.buttons.scss b/app/assets/stylesheets/app.buttons.scss index 76fd2cf50..12c13c56c 100644 --- a/app/assets/stylesheets/app.buttons.scss +++ b/app/assets/stylesheets/app.buttons.scss @@ -1,27 +1,25 @@ - .btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active, .open > .btn-default.dropdown-toggle { - - background-color: #f2f2f2; - + background-color: #f2f2f2; } -.btn{ - > i{ - &.pull-left, - &.pull-right{ - line-height: 1.428571429; - } - } +.btn { + > i { + &.pull-left, + &.pull-right { + line-height: 1.428571429; + } + } } .btn-warning-full { - outline: 0; - text-transform: uppercase; - //border: 3px solid $yellow; - //background-color: $yellow; - &:hover { - background-color: white; - } + outline: 0; + text-transform: uppercase; + + //border: 3px solid $yellow; + //background-color: $yellow; + &:hover { + background-color: white; + } } .btn-facebook { @@ -48,23 +46,22 @@ } } - .btn-block { - padding-left: 12px; - padding-right: 12px; + padding-left: 12px; + padding-right: 12px; } -.btn-group-vertical > .btn:first-child:not(:last-child){ - border-top-right-radius: $border-radius-base; +.btn-group-vertical > .btn:first-child:not(:last-child) { + border-top-right-radius: $border-radius-base; } -.btn-group-vertical > .btn:last-child:not(:first-child){ - border-bottom-left-radius: $border-radius-base; +.btn-group-vertical > .btn:last-child:not(:first-child) { + border-bottom-left-radius: $border-radius-base; } -.btn-inactive{ - -webkit-box-shadow: none !important; - box-shadow: none !important; +.btn-inactive { + -webkit-box-shadow: none !important; + box-shadow: none !important; } .btn-loading:after { @@ -72,9 +69,9 @@ display: inline-block; content: "\f110"; font-family: FontAwesome; - -webkit-animation:spin 4s linear infinite; - -moz-animation:spin 4s linear infinite; - animation:spin 4s linear infinite; + -webkit-animation: spin 4s linear infinite; + -moz-animation: spin 4s linear infinite; + animation: spin 4s linear infinite; } .btn-no-overflow { @@ -84,6 +81,21 @@ text-overflow: ellipsis; } -@-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } } -@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } } -@keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } } +@-moz-keyframes spin { + 100% { + -moz-transform: rotate(360deg); + } +} + +@-webkit-keyframes spin { + 100% { + -webkit-transform: rotate(360deg); + } +} + +@keyframes spin { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} diff --git a/app/assets/stylesheets/app.colors.scss b/app/assets/stylesheets/app.colors.scss index e011b84b7..b5cd0baf6 100644 --- a/app/assets/stylesheets/app.colors.scss +++ b/app/assets/stylesheets/app.colors.scss @@ -1,49 +1,140 @@ +.bg-light { + background-color: $brand-light; +} -.bg-light { background-color: $brand-light; } //.bg-red { background-color: $red; color: white; } //.bg-red-dark { background-color: $red-dark; } //.bg-yellow { background-color: $yellow !important; } -.bg-token { background-color: rgba(230, 208, 137, 0.49); } -.bg-machine { background-color: $beige; } -.bg-space { background-color: $cyan } -.bg-formation { background-color: $violet; } -.bg-event { background-color: $japonica; } -.bg-atelier { background-color: $blue; } -.bg-stage { background-color: $violet; } -.bg-success { background-color: $brand-success; } -.bg-info { background-color: $brand-info; } -.border-machine { border-color: $beige !important; } -.border-space { border-color: $cyan !important; } -.border-formation { border-color: $violet !important; } -.border-event { border-color: $japonica !important; } +.bg-token { + background-color: rgba(230, 208, 137, 0.49); +} -.bg-black-light { background-color: #424242 !important; } +.bg-machine { + background-color: $beige; +} + +.bg-space { + background-color: $cyan; +} + +.bg-formation { + background-color: $violet; +} + +.bg-event { + background-color: $japonica; +} + +.bg-atelier { + background-color: $blue; +} + +.bg-stage { + background-color: $violet; +} + +.bg-success { + background-color: $brand-success; +} + +.bg-info { + background-color: $brand-info; +} + +.border-machine { + border-color: $beige !important; +} + +.border-space { + border-color: $cyan !important; +} + +.border-formation { + border-color: $violet !important; +} + +.border-event { + border-color: $japonica !important; +} + +.bg-black-light { + background-color: #424242 !important; +} .bg-white { - background-color: #fff; - color: $text-color; - a { - color: $link-color; - &:hover{ - color: darken($link-color, 10%); - } - } - .text-muted{color: $text-muted !important;} -} -.bg-white-only{background-color:#fff;} -.bg-empty{background-color: transparent;} + background-color: #fff; + color: $text-color; + + a { + color: $link-color; + + &:hover { + color: darken($link-color, 10%); + } + } + + .text-muted { + color: $text-muted !important; + } +} + +.bg-white-only { + background-color: #fff; +} + +.bg-empty { + background-color: transparent; +} + +.text-black { + color: #000 !important; +} + +.text-black-light { + color: #424242 !important; +} + +.text-gray { + color: #5a5a5a !important; +} + +.text-white { + color: #fff !important; +} -.text-black{ color: #000 !important; }; -.text-black-light { color: #424242 !important; } -.text-gray { color: #5a5a5a !important; } -.text-white { color: #fff !important; } //.text-yellow { color: $yellow !important; } -.text-blue { color: $blue; } -.text-muted { color: $text-muted; } -.text-danger, .red { color: $red !important; } -.text-red-only { color: $red !important; } -.text-purple { color: $violet !important; } -.text-japonica { color: $japonica !important; } -.text-beige { color: $beige !important; } -.text-cyan { color: $cyan !important; } -.text-green, .green { color: #79C84A !important; } +.text-blue { + color: $blue; +} + +.text-muted { + color: $text-muted; +} + +.text-danger, .red { + color: $red !important; +} + +.text-red-only { + color: $red !important; +} + +.text-purple { + color: $violet !important; +} + +.text-japonica { + color: $japonica !important; +} + +.text-beige { + color: $beige !important; +} + +.text-cyan { + color: $cyan !important; +} + +.text-green, .green { + color: #79C84A !important; +} diff --git a/app/assets/stylesheets/app.components.scss b/app/assets/stylesheets/app.components.scss index e58909ed6..1959242d2 100644 --- a/app/assets/stylesheets/app.components.scss +++ b/app/assets/stylesheets/app.components.scss @@ -1,47 +1,60 @@ .widget { - - h1, h2, h3 { - margin: 0; - line-height: rem-calc(18); - font-size: rem-calc(14); - font-weight: 600; - color: black; - } - h1 { - font-size: rem-calc(16); text-transform: uppercase; + h1, h2, h3 { + margin: 0; + line-height: rem-calc(18); + font-size: rem-calc(14); + font-weight: 600; + color: black; } - h2 { font-weight: bold; } - //h3 { color: $red; } + + h1 { + font-size: rem-calc(16); + text-transform: uppercase; + } + + h2 { + font-weight: bold; + } + + //h3 { color: $red; } h4 { font-size: rem-calc(12); margin: 8px 0; } + p { + font-size: rem-calc(14); + margin-top: 15px; + } - p { font-size: rem-calc(14); margin-top: 15px; } + a { + color: $black-light; - a { - color: $black-light; - &:hover { color: $red; } - } - .fa { - // color: $red; - } + &:hover { + color: $red; + } + } - .widget-content { - font-size: rem-calc(14); - } + .fa { + // color: $red; + + } - .list-group-item { - &.no-b { - padding: 10px 15px; - } - } + .widget-content { + font-size: rem-calc(14); + } + + .list-group-item { + &.no-b { + padding: 10px 15px; + } + } } - //modal -.modal-dialog { top: 90px; } +.modal-dialog { + top: 90px; +} .modal-header { .modal-logo { @@ -52,12 +65,15 @@ margin: 0 auto; max-height: 44px; } + h1 { margin: 25px 0 20px 0; font-weight: bold; text-transform: uppercase; text-align: center; + //color: $red; + } } @@ -90,16 +106,20 @@ top: 0; left: 0; right: 0; - background-color: rgba(43,46,56,0.8); + background-color: rgba(43, 46, 56, 0.8); text-align: center; opacity: 0; -webkit-transition: all 0.1s ease-out; transition: all 0.1s ease-out; height: 180px; cursor: pointer; - .btn-group { margin-top: 70px;} + + .btn-group { + margin-top: 70px; + } + .btn { - background: rgba(255,255,255,0.1); + background: rgba(255, 255, 255, 0.1); border: 1px solid #fff; color: #fff; } @@ -115,6 +135,7 @@ width: 100%; display: block; padding: 1.25rem; + .card-header-bg { background-size: cover; background-repeat: no-repeat; @@ -122,8 +143,10 @@ height: 180px; } } + .card-block { padding: 0 1.25rem 1.25rem 1.25rem; + .card-title { font-size: 1.5rem; line-height: 2rem; @@ -131,10 +154,11 @@ text-align: center; margin-top: 5px; } + .card-meta { font-size: 1.2rem; margin: 0; - text-align: center + text-align: center; } } } @@ -143,14 +167,20 @@ max-width: $screen-md-min; margin: 0 auto; - h2, h3, h4, h5 { margin: 1.8em 0 1em 0; } + h2, h3, h4, h5 { + margin: 1.8em 0 1em 0; + } h2, h3 { color: $red; font-size: rem-calc(18); font-weight: bold; } - h2 { text-transform: uppercase; } + + h2 { + text-transform: uppercase; + } + h4 { font-weight: 600; font-size: rem-calc(16); @@ -164,6 +194,7 @@ max-height: 400px; } } + img { display: block; max-width: 100%; @@ -172,47 +203,63 @@ } .label-staging { - position: absolute; - top: 50px; + position: absolute; + top: 50px; } .notification-open { a { position: relative; + .badge { position: absolute; - top: 18px; right: 18px; + top: 18px; + right: 18px; padding: 3px 6px 1px 6px; } + .menu-badge { position: absolute; - top: 0; right: 0; + top: 0; + right: 0; padding: 2px 4px 1px 3px; border: 2px solid white; } } - .fa { color: black; font-size: rem-calc(24); } -} + .fa { + color: black; + font-size: rem-calc(24); + } +} .panel { margin-bottom: 30px; + .panel-heading { &.small { padding: 15px 15px; } + &.picture { height: 250px; background-size: cover; background-position: center; - @include transition(opacity .5s ease); + + @include transition(opacity 0.5s ease); + cursor: pointer; - padding:0; - img { @include border-radius(6px 6px 0 0); } + padding: 0; + + img { + @include border-radius(6px 6px 0 0); + } + &:hover { opacity: 0.8; } } + .align { position: relative; top: -7px; @@ -225,32 +272,47 @@ &:first-child { border-right: none; + @include border-radius(3px 0 0 3px); } + &:last-child { @include border-radius(0 3px 3px 0); } + .title { margin: 10px 0; font-size: rem-calc(16); text-transform: uppercase; color: black; } + .content { padding: 15px 0; background-color: $bg-gray; + .wrap { - width: 100px; height: 100px; + width: 100px; + height: 100px; display: inline-block; background: white; + @include border-radius(50%); - border: 3px solid;// $yellow; + + border: 3px solid; + + // $yellow; + } + .price { position: relative; - top: 5px; left: 5px; - height: 84px; width: 84px; + top: 5px; + left: 5px; + height: 84px; + width: 84px; background-color: black; + @include border-radius(50%); .amount { @@ -261,6 +323,7 @@ font-size: rem-calc(18); color: white; } + .period { position: relative; top: -6px; @@ -269,8 +332,10 @@ } } } + .cta-button { margin: 20px 0; + .btn { outline: 0; font-weight: 600; @@ -278,7 +343,9 @@ background-color: white; padding-left: 30px; padding-right: 30px; + //&:hover { background-color: $yellow; } + } } } @@ -288,8 +355,10 @@ //border-color: #ffdc4e; //background-color: #ffdc4e; @include border-radius(3px); + padding: 5px 10px; } + &.well-disabled { border-color: $gray-lighter; background-color: $gray-lighter; @@ -310,25 +379,29 @@ } } -.avatar{ +.avatar { position: relative; display: block; border-radius: 500px; white-space: nowrap; + &.avatar-block { white-space: inherit; height: 76px; + .user-name { display: block; font-size: rem-calc(14); line-height: rem-calc(14); } } - img{ + + img { border-radius: 500px; width: 100%; } - i{ + + i { position: absolute; left: 0; top: 0; @@ -337,31 +410,38 @@ border-width: 2px; border-style: solid; border-radius: 100%; - &.md{ + + &.md { width: 12px; height: 12px; margin: 1px; } - &.right{ + + &.right { left: auto; right: 0; } - &.bottom{ + + &.bottom { left: auto; top: auto; bottom: 0; right: 0; } - &.on{ + + &.on { background-color: $brand-success; } - &.off{ + + &.off { background-color: $text-muted; } - &.busy{ + + &.busy { background-color: $brand-danger; } - &.away{ + + &.away { background-color: $brand-warning; } } @@ -369,6 +449,7 @@ .block-link { cursor: pointer; + //&:hover { background-color: $yellow; } } @@ -381,7 +462,11 @@ font-size: rem-calc(26); padding: 0px 10px 0px 11px; vertical-align: bottom; - &.label-icon { font-size: rem-calc(22); padding: 4px 9px 1px 10px; } + + &.label-icon { + font-size: rem-calc(22); + padding: 4px 9px 1px 10px; + } } } @@ -390,8 +475,10 @@ z-index: 101; height: 93%; background-color: white; - @include transition(.5s linear all); - opacity:1; + + @include transition(0.5s linear all); + + opacity: 1; .about-picture { padding: 70px 0; @@ -399,18 +486,23 @@ background-size: cover; margin-bottom: 30px; } + .about-title, .about-title p { margin: 0; font-size: rem-calc(50); line-height: rem-calc(48); color: #fff; - font-weight: 900; //black + font-weight: 900; + + //black + } .about-title-aside { margin-top: 0; font-size: rem-calc(18); } + p { font-size: rem-calc(18); line-height: rem-calc(30); @@ -420,20 +512,19 @@ &.ng-hide { opacity: 0; - @include transition(.5s linear all); + + @include transition(0.5s linear all); } &.ng-hide-add, &.ng-hide-remove { - display:block!important; + display: block !important; } - .last-update { text-align: right; margin-bottom: 2em; } - } .event { @@ -446,7 +537,6 @@ color: white; } - .event:hover * { color: #eee !important; border-color: #eee; @@ -460,12 +550,13 @@ .half-w { width: 50%; } + .b-light-dark { -border-color: #d0d0d0; + border-color: #d0d0d0; } .p-sm { -padding: 10px; + padding: 10px; } .crop-155 { @@ -496,24 +587,26 @@ padding: 10px; } } - // angular-bootstrap accordions (enlightened version) .light-accordion > .panel-heading { padding-top: 0.2em; padding-bottom: 0.2em; } + .light-accordion > .panel-heading > .panel-title { font-size: 12pt; } .app-generator { position: absolute; - bottom: 0; right: 10px; + bottom: 0; + right: 10px; z-index: 100; padding: 3px 15px; border: 1px solid $border-color; border-top-left-radius: 8px; background: $bg-gray; + @media only screen and (max-width: 768px) { display: none; } @@ -533,7 +626,7 @@ padding: 10px; right: 0; background: rgba(230, 230, 230, 0.7); position: absolute; - z-index:10; + z-index: 10; border-radius: 3px; } } @@ -573,6 +666,7 @@ padding: 10px; font-size: 1.2em; line-height: 0; } + .afterAmount { margin-left: -35px; font-weight: bold; @@ -592,10 +686,13 @@ padding: 10px; } } - .link-icon { color: #1c94c4; - i { margin: 0 5px 0 10px; } + + i { + margin: 0 5px 0 10px; + } + span { border-bottom: 1px dashed #00b3ee; text-decoration: none; @@ -603,7 +700,6 @@ padding: 10px; } } - .description-hover { span { display: inline-block; @@ -651,6 +747,7 @@ padding: 10px; text-transform: uppercase; } } + .calendar-legend-block { text-align: right; padding-right: 2em; @@ -659,10 +756,12 @@ padding: 10px; font-size: 12px; font-style: italic; } + .legends { display: flex; flex-direction: row-reverse; } + .calendar-legend { border: 1px solid; border-left: 3px solid; diff --git a/app/assets/stylesheets/app.functions.scss b/app/assets/stylesheets/app.functions.scss index 85119fe8e..44bc93ce1 100644 --- a/app/assets/stylesheets/app.functions.scss +++ b/app/assets/stylesheets/app.functions.scss @@ -1,13 +1,14 @@ // This is the default html and body font-size for the base rem value. $rem-base: 10px !default; - // IMPORT ONCE // We use this to prevent styles from being loaded multiple times for compenents that rely on other components. $modules: () !default; + @mixin exports($name) { - @if (index($modules, $name) == false) { + @if index($modules, $name) == false { $modules: append($modules, $name); + @content; } } @@ -16,7 +17,6 @@ $modules: () !default; // @functions // - // STRIP UNIT // It strips the unit of measure and returns it @function strip-unit($num) { @@ -24,13 +24,17 @@ $modules: () !default; } // CONVERT TO REM -@function convert-to-rem($value, $base-value: $rem-base) { +@function convert-to-rem($value, $base-value: $rem-base) { $value: strip-unit($value) / strip-unit($base-value) * 1rem; - @if ($value == 0rem) { $value: 0; } // Turn 0rem into 0 + + @if $value == 0rem { + $value: 0; + } + + // Turn 0rem into 0 @return $value; } - // REM CALC // New Syntax, allows to optionally calculate on a different base value to counter compounding effect of rem's. @@ -53,11 +57,15 @@ $modules: () !default; @function rem-calc($values, $base-value: $rem-base) { $max: length($values); - @if $max == 1 { @return convert-to-rem(nth($values, 1), $base-value); } + @if $max == 1 { + @return convert-to-rem(nth($values, 1), $base-value); + } $remValues: (); + @for $i from 1 through $max { $remValues: append($remValues, convert-to-rem(nth($values, $i), $base-value)); } + @return $remValues; } diff --git a/app/assets/stylesheets/app.layout.scss b/app/assets/stylesheets/app.layout.scss index 1c257746b..eb84fdb79 100644 --- a/app/assets/stylesheets/app.layout.scss +++ b/app/assets/stylesheets/app.layout.scss @@ -1,321 +1,364 @@ /*layout*/ .header, -.footer{ - min-height: 50px; - padding: 0 15px; - > p{ - margin-top: 15px; - display: inline-block; - } - > .btn, - > .btn-group, - > .btn-toolbar - { - margin-top: 14px; - } - > .btn-lg{ - margin-top: 0; - } - .nav-tabs { - border: none; - margin-left: -15px; - margin-right: -15px; - > li { - a{ - border: none !important; - border-radius: 0; - padding-top: 15px; - padding-bottom: 15px; - line-height: 20px; - &:hover, - &:focus - { - background-color: transparent; - } - } - &.active a{ - color: $text-color; - &, - &:hover{ - background-color: $body-bg; - } - } - } - &.nav-white{ - > li.active a{ - &, - &:hover{ - background-color: #fff; - } - } - } - } - &.navbar{ - border-radius: 0; - border: none; - margin-bottom: 0; - padding:0; - position: relative !important; - z-index: 1000; - } +.footer { + min-height: 50px; + padding: 0 15px; + + > p { + margin-top: 15px; + display: inline-block; + } + + > .btn, + > .btn-group, + > .btn-toolbar { + margin-top: 14px; + } + + > .btn-lg { + margin-top: 0; + } + + .nav-tabs { + border: none; + margin-left: -15px; + margin-right: -15px; + + > li { + a { + border: none !important; + border-radius: 0; + padding-top: 15px; + padding-bottom: 15px; + line-height: 20px; + + &:hover, + &:focus { + background-color: transparent; + } + } + + &.active a { + color: $text-color; + + &, + &:hover { + background-color: $body-bg; + } + } + } + + &.nav-white { + > li.active a { + &, + &:hover { + background-color: #fff; + } + } + } + } + + &.navbar { + border-radius: 0; + border: none; + margin-bottom: 0; + padding: 0; + position: relative !important; + z-index: 1000; + } } .header { - background-color: $header-bg; - @include box-shadow(0 1px 0px #cfcfcf); + background-color: $header-bg; + + @include box-shadow(0 1px 0px #cfcfcf); } - .heading { + .heading-btn { + a { + width: 100%; + padding: 35px 40%; + display: inline-block; + cursor: pointer; + color: black; + + &:hover { + //background-color: $yellow; + + } + + i:before { + content: "\f177"; + } + } + } - .heading-btn { - a { - width: 100%; - padding: 35px 40%; - display: inline-block; - cursor: pointer; - color: black; - &:hover { - //background-color: $yellow; - } - i:before { content: "\f177"; } - } - } .heading-icon { width: 100%; padding: 35px 40%; display: inline-block; color: black; } - .heading-title { - //overflow: hidden; - height: 94px; - h1 { - margin: 0 0 0 15px; - padding: 36px 15px; - } - } - .heading-actions { - height: 94px; - text-align: center; - } + + .heading-title { + //overflow: hidden; + height: 94px; + + h1 { + margin: 0 0 0 15px; + padding: 36px 15px; + } + } + + .heading-actions { + height: 94px; + text-align: center; + } } -body.container{ - padding: 0; +body.container { + padding: 0; } -.aside-md{ - width: 250px; +.aside-md { + width: 250px; } @media (min-width: 768px) { - body.container{ - @include box-shadow(0 3px 60px rgba(0,0,0,0.3)); - border-left: 1px solid darken($border-color, 10%); - border-right: 1px solid darken($border-color, 10%); - } - .app{ - &, - body{ - height:100%; - overflow: hidden; - } - .hbox{ - &.stretch{ - height:100%; - } - } - .vbox{ - > section, - > footer{ - position: absolute; - } - &.flex{ - > section{ - > section{ - overflow: auto; - } - } - } - } - } + body.container { + @include box-shadow(0 3px 60px rgba(0, 0, 0, 0.3)); - .hbox{ - display: table; - table-layout: fixed; - border-spacing: 0; - width: 100%; - > aside, - > section{ - display: table-cell; - vertical-align: top; - height: 100%; - float: none; - &.show, - &.hidden-sm { - display: table-cell !important; - } - } - } + border-left: 1px solid darken($border-color, 10%); + border-right: 1px solid darken($border-color, 10%); + } - .vbox{ - display: table; - border-spacing:0; - position: relative; - height: 100%; - width: 100%; - > section, - > footer { - top: 0; - bottom: 0; - width: 100%; - } - > header{ - ~ section { - top: 50px; - } - &.header-md{ - ~ section { - top: $header-md-height+2; - } - } - } - > section{ - &.w-f{ - bottom: 50px; - } - } - > footer { - top: auto; - z-index: 100; - ~ section { - bottom: 50px; - } - } - &.flex{ - > header, - > section, - > footer { - position: inherit; - } - > section{ - display: table-row; - height: 100%; - > section { - position: relative; - height: 100%; - -webkit-overflow-scrolling:touch; - .ie & { - display: table-cell; - } - > section { - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - } - } - } - } - } + .app { + &, + body { + height: 100%; + overflow: hidden; + } - .aside-xs{ - width: 60px; - } - .aside-sm{ - width: 150px; - } - .aside{ - width: 200px; - } - .aside-md{ - width: 250px; - } - .aside-lg{ - width: 300px; - } - .aside-xl{ - width: 360px; - } - .aside-xxl{ - width: 480px; - } + .hbox { + &.stretch { + height: 100%; + } + } - .header-md{ - height: $header-md-height; - .navbar-form{ - margin-top: floor( ($header-md-height - 30)/2 ); - margin-bottom: floor( ($header-md-height - 30)/2 ); - } - } + .vbox { + > section, + > footer { + position: absolute; + } - .scrollable{ - -webkit-overflow-scrolling:touch; - } + &.flex { + > section { + > section { + overflow: auto; + } + } + } + } + } - ::-webkit-scrollbar { - width: 10px; - height: 10px; - } - ::-webkit-scrollbar-thumb { - background-color:rgba(50,50,50,0.25); - border: 2px solid transparent; - border-radius: 10px; - background-clip: padding-box; - } - ::-webkit-scrollbar-thumb:hover{ - background-color:rgba(50,50,50,0.5); - } - ::-webkit-scrollbar-track { - background-color:rgba(50,50,50,0.05); - } + .hbox { + display: table; + table-layout: fixed; + border-spacing: 0; + width: 100%; + + > aside, + > section { + display: table-cell; + vertical-align: top; + height: 100%; + float: none; + + &.show, + &.hidden-sm { + display: table-cell !important; + } + } + } + + .vbox { + display: table; + border-spacing: 0; + position: relative; + height: 100%; + width: 100%; + + > section, + > footer { + top: 0; + bottom: 0; + width: 100%; + } + + > header { + ~ section { + top: 50px; + } + + &.header-md { + ~ section { + top: $header-md-height + 2; + } + } + } + + > section { + &.w-f { + bottom: 50px; + } + } + + > footer { + top: auto; + z-index: 100; + + ~ section { + bottom: 50px; + } + } + + &.flex { + > header, + > section, + > footer { + position: inherit; + } + + > section { + display: table-row; + height: 100%; + + > section { + position: relative; + height: 100%; + -webkit-overflow-scrolling: touch; + + .ie & { + display: table-cell; + } + + > section { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + } + } + } + } + } + + .aside-xs { + width: 60px; + } + + .aside-sm { + width: 150px; + } + + .aside { + width: 200px; + } + + .aside-md { + width: 250px; + } + + .aside-lg { + width: 300px; + } + + .aside-xl { + width: 360px; + } + + .aside-xxl { + width: 480px; + } + + .header-md { + height: $header-md-height; + + .navbar-form { + margin-top: floor(($header-md-height - 30) / 2); + margin-bottom: floor(($header-md-height - 30) / 2); + } + } + + .scrollable { + -webkit-overflow-scrolling: touch; + } + + ::-webkit-scrollbar { + width: 10px; + height: 10px; + } + + ::-webkit-scrollbar-thumb { + background-color: rgba(50, 50, 50, 0.25); + border: 2px solid transparent; + border-radius: 10px; + background-clip: padding-box; + } + + ::-webkit-scrollbar-thumb:hover { + background-color: rgba(50, 50, 50, 0.5); + } + + ::-webkit-scrollbar-track { + background-color: rgba(50, 50, 50, 0.05); + } } -.scrollable{ - overflow-x: hidden; - overflow-y: auto; +.scrollable { + overflow-x: hidden; + overflow-y: auto; } .no-touch { - .scrollable.hover { - overflow-y: hidden; - &:hover - { - overflow: visible; - overflow-y: auto; - } - } - ::-webkit-scrollbar-button { - width: 10px; - height: 6px; - background-color:rgba(50,50,50,0.05); - } + .scrollable.hover { + overflow-y: hidden; + + &:hover { + overflow: visible; + overflow-y: auto; + } + } + + ::-webkit-scrollbar-button { + width: 10px; + height: 6px; + background-color: rgba(50, 50, 50, 0.05); + } } -.slimScrollBar{ - border-radius: 5px; - border: 2px solid transparent; - border-radius: 10px; - background-clip: padding-box !important; +.slimScrollBar { + border-radius: 5px; + border: 2px solid transparent; + border-radius: 10px; + background-clip: padding-box !important; } - @media print { - html, body, .hbox, .vbox{ + html, body, .hbox, .vbox { height: auto; } - .vbox{ - > section, - > footer{ - position: relative; - } - } + + .vbox { + > section, + > footer { + position: relative; + } + } } - - .datepicker-container { position: relative; z-index: 100; @@ -327,7 +370,7 @@ body.container{ padding-top: 0.5em; padding-bottom: 0.5em; position: absolute; - right:0; + right: 0; left: 0; background-color: #ffffff; @@ -339,7 +382,7 @@ body.container{ vertical-align: middle; div.input-group { - float:right; + float: right; ul.dropdown-menu { left: -5em !important; @@ -355,10 +398,9 @@ body.container{ } .customMenuInput { - width:100% !important; + width: 100% !important; } - .reservations-locked { background-color: #f5f5f5; } @@ -369,8 +411,8 @@ body.container{ background-color: #e4e4e4; padding: 0.7em 0.7em; font-size: 90%; - display:inline-block; - vertical-align:middle; + display: inline-block; + vertical-align: middle; .reservation-time { color: #606060; @@ -387,7 +429,6 @@ body.container{ float: left; margin-right: 1em; } - } .custom-logo-container { @@ -410,7 +451,7 @@ body.container{ width: auto; max-height: 44px; max-width: 100%; - margin:auto; + margin: auto; } &:hover .tools-box { @@ -453,7 +494,7 @@ body.container{ width: auto; max-height: 16px; max-width: 16px; - margin:auto; + margin: auto; } &:hover .tools-box { @@ -491,7 +532,7 @@ body.container{ width: auto; max-height: 185px; max-width: 100%; - margin:auto; + margin: auto; } &:hover .tools-box { @@ -546,7 +587,6 @@ body.container{ .profile-top-infos { padding: 30px 15px 30px 15px; - .private-profile { color: #000; border: 1px solid $border-color; @@ -565,10 +605,10 @@ body.container{ padding: 43px 15px 15px 15px; text-align: center; - .avatar { display: inline-block; width: 140px; + img { border: 9px solid #fff; background-color: #fff; @@ -593,7 +633,9 @@ body.container{ color: $input-color; margin-bottom: 5px; - i { vertical-align: middle; } + i { + vertical-align: middle; + } } } diff --git a/app/assets/stylesheets/app.nav.scss b/app/assets/stylesheets/app.nav.scss index aa831b9ab..c6e4ab790 100644 --- a/app/assets/stylesheets/app.nav.scss +++ b/app/assets/stylesheets/app.nav.scss @@ -1,452 +1,529 @@ /*primary nav*/ -.navbar-header{ - position: relative; - > .btn{ - position: absolute; - font-size: 1.3em; - padding: 9px 16px; - line-height: 30px; - right: 0; - } - .navbar-brand + .btn{ - right: 0; - top:0; - left: auto; - } +.navbar-header { + position: relative; + + > .btn { + position: absolute; + font-size: 1.3em; + padding: 9px 16px; + line-height: 30px; + right: 0; + } + + .navbar-brand + .btn { + right: 0; + top: 0; + left: auto; + } } -.navbar-brand{ - float: none; - text-align: center; - font-size: 20px; - font-weight: 700; - height: auto; - line-height: 50px; - display: inline-block; - padding: 0 15px; - &:hover{ - text-decoration: none; - } - img{ - max-height: 20px; - margin-top: -4px; - vertical-align: middle; - display: initial; - } +.navbar-brand { + float: none; + text-align: center; + font-size: 20px; + font-weight: 700; + height: auto; + line-height: 50px; + display: inline-block; + padding: 0 15px; + + &:hover { + text-decoration: none; + } + + img { + max-height: 20px; + margin-top: -4px; + vertical-align: middle; + display: initial; + } } .nav-primary { - li { - > a > i{ - margin: floor(-($nav-primary-height - $line-height-computed)/2) -10px; - line-height: $nav-primary-height; - width: $nav-primary-height; - float: left; - margin-right: 5px; - text-align: center; - position: relative; - overflow: hidden; - &:before{ - position: relative; - z-index: 2; - } - } - } - ul.nav { - > li { - > a{ - padding: floor(($nav-primary-height - $line-height-computed)/2) 15px; - position: relative; - font-size: 14px; - @include transition(background-color .2s ease-in-out 0s); - .no-borders & { - border-width: 0 !important; - } - > .badge{ - font-size: 11px; - padding: 2px 5px 2px 4px; - margin-top: 2px; - } - > .text-muted{ - margin: 0 3px; - } - &.active{ - .text{ - display: none; - } - .text-active{ - display: inline-block !important; - } - } - } - li a{ - font-weight: normal; - text-transform: none; - } - &.active{ - > ul{ - display: block; - } - } - } - > li.menu-spacer { - height: 1px; - margin: 6px 80% 6px 5px; - background: linear-gradient(45deg, black, transparent); - } - ul{ - display: none; - } - } + li { + > a > i { + margin: floor(-($nav-primary-height - $line-height-computed) / 2) -10px; + line-height: $nav-primary-height; + width: $nav-primary-height; + float: left; + margin-right: 5px; + text-align: center; + position: relative; + overflow: hidden; - .bg-black &{ - > ul.nav-main{ - > li{ - &:hover, + &:before { + position: relative; + z-index: 2; + } + } + } + + ul.nav { + > li { + > a { + padding: floor(($nav-primary-height - $line-height-computed) / 2) 15px; + position: relative; + font-size: 14px; + + @include transition(background-color 0.2s ease-in-out 0s); + + .no-borders & { + border-width: 0 !important; + } + + > .badge { + font-size: 11px; + padding: 2px 5px 2px 4px; + margin-top: 2px; + } + + > .text-muted { + margin: 0 3px; + } + + &.active { + .text { + display: none; + } + + .text-active { + display: inline-block !important; + } + } + } + + li a { + font-weight: normal; + text-transform: none; + } + + &.active { + > ul { + display: block; + } + } + } + + > li.menu-spacer { + height: 1px; + margin: 6px 80% 6px 5px; + background: linear-gradient(45deg, black, transparent); + } + + ul { + display: none; + } + } + + .bg-black & { + > ul.nav-main { + > li { + &:hover, &:focus, &:active, - &.active{ - > a{ - background-color: $brand-success; - } + &.active { + > a { + background-color: $brand-success; + } } - } - } - } + } + } + } } @media (min-width: 768px) { - .visible-nav-xs{display: none;} - .nav-xs { - width: $nav-xs-width; - > .nav-container { width: $nav-xs-width; } - .slimScrollDiv, - .slim-scroll { - overflow: visible !important; - } - .slimScrollBar, - .slimScrollRail { - display: none !important; - } - .scrollable{ - overflow: visible; - } - .nav-primary{ - > ul { - > li { - > a { - position: relative; - padding: 0 !important; - font-size: 11px; - text-align: center; - height: $nav-xs-height; - overflow-y: hidden; - border: none !important; - span { - display: table-cell; - vertical-align: middle; - height: $nav-xs-height; - width: $nav-xs-width; - &.pull-right{ - display: none !important; - } - } - i{ - width: auto; - float: none; - display: block; - font-size: 16px; - margin: 0; - line-height: $nav-xs-height; - border: none !important; - @include transition(margin-top 0.2s); - b{ - left: 0 !important; - } - } - .badge{ - position: absolute; - right: 10px; - top: 4px; - z-index: 3; - } - } - &:hover, - &:focus, - &:active, - &.active - { - > a{ - i{ - margin-top: -$nav-xs-height; - } - } - } - } - ul{ - display: none !important; - position: absolute; - left: 100%; - top: 0; - z-index: 1050; - width: 220px; - -webkit-box-shadow: 0 2px 6px rgba(0,0,0,0.1); - box-shadow: 0 2px 6px rgba(0,0,0,0.1); - } - } - li:hover, - li:focus, - li:active - { - > ul{ - display: block !important; - } - } - } - &.nav-xs-right{ - .nav-primary > ul ul{ - left: auto; - right: 100%; - } - } - > .vbox > .header, - > .vbox > .footer { - padding:0 floor(($nav-xs-width - 30px)/2); - } - .hidden-nav-xs{ - display: none; - } - .visible-nav-xs{ - display: inherit; - } - .text-center-nav-xs{ - text-align: center; - } + .visible-nav-xs { + display: none; + } - .nav-user{ - padding-left: 0; - padding-right: 0; - .avatar{ - float: none !important; - margin-right: 0; - } - .dropdown{ - > a{ - display: block; - text-align: center; - } - } - } - .navbar-header{ - float: none; - } - .navbar-brand{ - display: block; - padding: 0; - img{ - margin-right:0; - } - } - .navbar{ - padding: 0 - } - } - .navbar-brand{ - .header-md &{ - line-height: $header-md-height; - img{ - max-height: 44px; - } - } - } - .navbar-nav{ - > li{ - > a{ - .header-md &{ - padding: floor(($header-md-height - $line-height-computed)/2 - 1); - } - } - } - } + .nav-xs { + width: $nav-xs-width; + + > .nav-container { + width: $nav-xs-width; + } + + .slimScrollDiv, + .slim-scroll { + overflow: visible !important; + } + + .slimScrollBar, + .slimScrollRail { + display: none !important; + } + + .scrollable { + overflow: visible; + } + + .nav-primary { + > ul { + > li { + > a { + position: relative; + padding: 0 !important; + font-size: 11px; + text-align: center; + height: $nav-xs-height; + overflow-y: hidden; + border: none !important; + + span { + display: table-cell; + vertical-align: middle; + height: $nav-xs-height; + width: $nav-xs-width; + + &.pull-right { + display: none !important; + } + } + + i { + width: auto; + float: none; + display: block; + font-size: 16px; + margin: 0; + line-height: $nav-xs-height; + border: none !important; + + @include transition(margin-top 0.2s); + + b { + left: 0 !important; + } + } + + .badge { + position: absolute; + right: 10px; + top: 4px; + z-index: 3; + } + } + + &:hover, + &:focus, + &:active, + &.active { + > a { + i { + margin-top: -$nav-xs-height; + } + } + } + } + + ul { + display: none !important; + position: absolute; + left: 100%; + top: 0; + z-index: 1050; + width: 220px; + -webkit-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); + } + } + + li:hover, + li:focus, + li:active { + > ul { + display: block !important; + } + } + } + + &.nav-xs-right { + .nav-primary > ul ul { + left: auto; + right: 100%; + } + } + + > .vbox > .header, + > .vbox > .footer { + padding: 0 floor(($nav-xs-width - 30px) / 2); + } + + .hidden-nav-xs { + display: none; + } + + .visible-nav-xs { + display: inherit; + } + + .text-center-nav-xs { + text-align: center; + } + + .nav-user { + padding-left: 0; + padding-right: 0; + + .avatar { + float: none !important; + margin-right: 0; + } + + .dropdown { + > a { + display: block; + text-align: center; + } + } + } + + .navbar-header { + float: none; + } + + .navbar-brand { + display: block; + padding: 0; + + img { + margin-right: 0; + } + } + + .navbar { + padding: 0; + } + } + + .navbar-brand { + .header-md & { + line-height: $header-md-height; + + img { + max-height: 44px; + } + } + } + + .navbar-nav { + > li { + > a { + .header-md & { + padding: floor(($header-md-height - $line-height-computed) / 2 - 1); + } + } + } + } } @media (max-width: 767px) { - .navbar-fixed-top-xs{ - position: fixed !important; - left: 0; - width: 100%; - z-index: 1100; - // + *{ - // padding-top: 50px !important; - // } - } - .nav-bar-fixed-bottom{ - position: fixed; - left: 0; - bottom: 0; - width: 100%; - z-index: 1100; - } - /* .off screen nav from left or right*/ - html, body{ - overflow-x: hidden; - min-height: 100%; - } - .nav-primary{ - .dropdown-menu{ - position: relative; - float:none; - left: 0; - margin-left: 0; - padding: 0; - a{ - padding: 15px; - border-bottom: 1px solid #eee; - } - li:last-child{ - a{ - border-bottom: none; - } - } - } - } - .navbar-header{ - text-align: center; - } - .nav-user{ - margin: 0; - padding: 15px; - &.open{ - display: inherit !important; - } - .dropdown-menu{ - display: block; - position: static; - float: none; - } - .dropdown > a{ - display: block; - text-align: center; - font-size: 18px; - padding-bottom: 10px; - } - .avatar{ - width: 160px !important; - float: none !important; - display: block; - margin: 20px auto; - padding: 5px; - background-color: rgba(255, 255, 255, 0.1); - position: relative; - &:before { - content: ""; - position: absolute; - left: 5px; - right: 5px; - bottom: 5px; - top: 5px; - border: 4px solid #fff; - border-radius: 500px; - } - } - } - .nav-off-screen { - display: block !important; - position: absolute; - left: 0; - top: 0; - bottom: 0; - width: $off-screen-nav-width; - visibility: visible; - overflow-x: hidden; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - .nav-primary{ - display: block !important; - } - .navbar-fixed-top-xs{ - width: $off-screen-nav-width; - } - &.push-right{ - .navbar-fixed-top-xs{ - left: 100% - $off-screen-nav-width; - } - } - &.push-right{ - left: auto; - right: 0; - + *{ - @include translate3d(-$off-screen-nav-width, 0px, 0px); - } - } - + *{ - background-color: $body-bg; - @include transition-transform(0.2s ease-in-out); - @include transition-delay(0s); - @include translate3d(0px, 0px, 0px); - @include backface-visibility(hidden); - @include translate3d($off-screen-nav-width, 0px, 0px); - overflow: hidden; - position: absolute; - width: 100%; - top: 0; - bottom: 0; - left: 0; - right: 0; - z-index: 2; - .nav-off-screen-block { - display:block !important; - position: absolute; - left: 0; - right: 0; - top: 0; - bottom: 0; - z-index: 1950; - } - } - } + .navbar-fixed-top-xs { + position: fixed !important; + left: 0; + width: 100%; + z-index: 1100; - .navbar + section{ - .nav-off-screen{ - top: 50px; - + *{ - top: 50px; - } - } - } + // + *{ + // padding-top: 50px !important; + // } + + } - .slimScrollDiv, - .slim-scroll { - overflow: visible !important; - height: auto !important; - } - .slimScrollBar, - .slimScrollRail { - display: none !important; - } + .nav-bar-fixed-bottom { + position: fixed; + left: 0; + bottom: 0; + width: 100%; + z-index: 1100; + } + + /* .off screen nav from left or right*/ + html, body { + overflow-x: hidden; + min-height: 100%; + } + + .nav-primary { + .dropdown-menu { + position: relative; + float: none; + left: 0; + margin-left: 0; + padding: 0; + + a { + padding: 15px; + border-bottom: 1px solid #eee; + } + + li:last-child { + a { + border-bottom: none; + } + } + } + } + + .navbar-header { + text-align: center; + } + + .nav-user { + margin: 0; + padding: 15px; + + &.open { + display: inherit !important; + } + + .dropdown-menu { + display: block; + position: static; + float: none; + } + + .dropdown > a { + display: block; + text-align: center; + font-size: 18px; + padding-bottom: 10px; + } + + .avatar { + width: 160px !important; + float: none !important; + display: block; + margin: 20px auto; + padding: 5px; + background-color: rgba(255, 255, 255, 0.1); + position: relative; + + &:before { + content: ""; + position: absolute; + left: 5px; + right: 5px; + bottom: 5px; + top: 5px; + border: 4px solid #fff; + border-radius: 500px; + } + } + } + + .nav-off-screen { + display: block !important; + position: absolute; + left: 0; + top: 0; + bottom: 0; + width: $off-screen-nav-width; + visibility: visible; + overflow-x: hidden; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + + .nav-primary { + display: block !important; + } + + .navbar-fixed-top-xs { + width: $off-screen-nav-width; + } + + &.push-right { + .navbar-fixed-top-xs { + left: 100% - $off-screen-nav-width; + } + } + + &.push-right { + left: auto; + right: 0; + + + * { + @include translate3d(-$off-screen-nav-width, 0px, 0px); + } + } + + + * { + background-color: $body-bg; + + @include transition-transform(0.2s ease-in-out); + @include transition-delay(0s); + @include translate3d(0px, 0px, 0px); + @include backface-visibility(hidden); + @include translate3d($off-screen-nav-width, 0px, 0px); + + overflow: hidden; + position: absolute; + width: 100%; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 2; + + .nav-off-screen-block { + display: block !important; + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: 1950; + } + } + } + + .navbar + section { + .nav-off-screen { + top: 50px; + + + * { + top: 50px; + } + } + } + + .slimScrollDiv, + .slim-scroll { + overflow: visible !important; + height: auto !important; + } + + .slimScrollBar, + .slimScrollRail { + display: none !important; + } } - #nav { - // border-right: 1px solid $red-dark; - .nav { - //background-color: $red; - > li { - > a { - padding: 13px 17px; - font-weight: 600; - color: white; - &:hover, - &:focus, &.active { - //background-color: $red-light; - color: white; - } - &.active { - border-left: 3px solid;// #870003; - } - } - } - } + // border-right: 1px solid $red-dark; + .nav { + //background-color: $red; + > li { + > a { + padding: 13px 17px; + font-weight: 600; + color: white; + + &:hover, + &:focus, &.active { + //background-color: $red-light; + color: white; + } + + &.active { + border-left: 3px solid; + + // #870003; + + } + } + } + } } // overrides bootstrap @@ -454,7 +531,6 @@ cursor: pointer; } - .user-profile-nav > a { display: inline-block !important; padding: 11px 44px !important; diff --git a/app/assets/stylesheets/app.plugins.scss b/app/assets/stylesheets/app.plugins.scss index 8145371a0..e83f96a01 100644 --- a/app/assets/stylesheets/app.plugins.scss +++ b/app/assets/stylesheets/app.plugins.scss @@ -1,23 +1,25 @@ // medium editor placeholder .medium-editor-placeholder { - min-height: 30px; // fix for firefox + min-height: 30px; + + // fix for firefox } //xeditable -.editable-buttons{ - button[type=submit].btn-primary{ +.editable-buttons { + button[type=submit].btn-primary { @extend .btn-warning; } } - //summernote .note-editor .note-editable { background-color: white; } + .note-editor { .form-group { - margin-left: 0px; + margin-left: 0px; margin-right: 0px; } @@ -30,7 +32,6 @@ } } - // Growl .growl { top: 90px; @@ -57,6 +58,7 @@ height: 40px; line-height: 18px; padding: 10px; + //&:hover, &:active, &.fc-state-active { background-color: $yellow; } } @@ -105,7 +107,10 @@ cursor: pointer; z-index: 9999; text-align: right; - .training-reserve &, .machine-reserve &, .public-calendar & { display: none; } + + .training-reserve &, .machine-reserve &, .public-calendar & { + display: none; + } } .fc-v-event.fc-end { @@ -127,18 +132,13 @@ } .fc-selected { - box-shadow: 0 6px 10px 0 rgba(0,0,0,0.14),0 1px 18px 0 rgba(0,0,0,0.12),0 3px 5px -1px rgba(0,0,0,0.2); + box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.2); } - - - .editable-input label { display: block; } - - /* ========================================================================== Slider ========================================================================== */ @@ -158,29 +158,37 @@ color: white; font-weight: 800; text-align: center; + a { color: white; - &:hover { color: $yellow; } + + &:hover { + color: $yellow; + } } } + .description { font-size: rem-calc(18); line-height: rem-calc(18); color: white; } - } .carousel-control { cursor: pointer; background: none; + @include border-radius($border-radius-base); + &:hover, &:focus { //color: $yellow; + } .glyphicon-chevron-left { font-family: 'fontawesome' !important; + &:before { content: "\f053" !important; } @@ -188,12 +196,13 @@ .glyphicon-chevron-right { font-family: 'fontawesome' !important; + &:before { content: "\f054" !important; } } - } + .carousel-indicators { display: none; } @@ -222,47 +231,55 @@ // } // } - - -.banner { } +.banner {} .slider { position: relative; width: 100%; height: 100%; overflow: hidden; + &.slider-min { .slider-arrows { bottom: 40%; position: relative; } + .slider-arrow { margin-bottom: 0; color: black; border: none; + &.slider-arrow--left { left: -16px; } + &.slider-arrow--right { right: -16px; } .icon { font-size: 24px; + &.icon-angle-left { width: 18px; } - &:hover { color: $yellow; } - } + &:hover { + color: $yellow; + } + } } } + &.slider-actu { .slider-arrows { - .slider-arrow--left { display: none; } + .slider-arrow--left { + display: none; + } + .slider-arrow--right { bottom: 41px; - } } } @@ -271,9 +288,11 @@ .slides { width: 100%; height: 100%; + /* Clear fix */ overflow: hidden; *zoom: 1; + /** * Prevent blinking issue * Not tested. Experimental. @@ -286,6 +305,7 @@ height: 100%; float: left; clear: none; + &.content_article { height: 620px; -webkit-background-size: cover; @@ -296,6 +316,7 @@ text-align: center; position: relative; } + .content_article-wrapper { position: absolute; bottom: 0; @@ -304,6 +325,7 @@ margin: 0 auto; left: 0; right: 0; + .content_article-h { font-weight: 900; color: white; @@ -314,6 +336,7 @@ margin-bottom: 20px; line-height: 50px; } + .content_article-c { color: $red; font-size: 20px; @@ -321,6 +344,7 @@ margin-top: 0; margin-bottom: 10px; } + .content_article-p { // font-family: $font-proxima-condensed; font-size: 20px; @@ -328,13 +352,16 @@ margin: 0; line-height: 30px; } + .content_article-btns { margin-top: 40px; clear: both; + .header_nav-item-a { color: #fff; text-decoration: none; } + .header_nav-item-a--btn { padding: 12px 20px; border-radius: 5px; @@ -343,6 +370,7 @@ text-transform: uppercase; font-family: $font-proxima-condensed; font-weight: 600; + &:hover { background-color: $yellow; color: black; @@ -358,11 +386,16 @@ margin-bottom: -20px; padding: 20px; color: white; - - width: 58px; height: 58px; + width: 58px; + height: 58px; border: 3px solid white; border-radius: 50%; - &:hover { border-color: $yellow; color: $yellow; } + + &:hover { + border-color: $yellow; + color: $yellow; + } + .icon { text-decoration: none; display: inline-block; @@ -373,12 +406,15 @@ right: 0; margin: 0 auto; width: 12px; + &.icon-angle-left { width: 18px; } - &:hover { color: $yellow; } - } + &:hover { + color: $yellow; + } + } } .home { @@ -420,12 +456,12 @@ background: #ccc; } - // Twitter #twitter { ul { margin: 0px 15px; padding-left: 0; + li { display: block; } diff --git a/app/assets/stylesheets/app.printer.scss b/app/assets/stylesheets/app.printer.scss index 5a7e2c1db..b178df287 100644 --- a/app/assets/stylesheets/app.printer.scss +++ b/app/assets/stylesheets/app.printer.scss @@ -1,3 +1,3 @@ /* *= require fullcalendar/dist/fullcalendar.print - */ \ No newline at end of file + */ diff --git a/app/assets/stylesheets/app.responsive.scss b/app/assets/stylesheets/app.responsive.scss index 1f447de78..7c2a30417 100644 --- a/app/assets/stylesheets/app.responsive.scss +++ b/app/assets/stylesheets/app.responsive.scss @@ -1,6 +1,8 @@ - @media screen and (max-width: $screen-sm-min) { - .modal-dialog { top: 0; } + .modal-dialog { + top: 0; + } + .modal-header { .modal-logo { display: none; @@ -8,38 +10,43 @@ } .about-fablab { - .about-title { - font-size: rem-calc(30); - line-height: rem-calc(28); - text-align: center; - } - .about-picture { - padding: 70px 0; - height: 226px; - } + .about-title { + font-size: rem-calc(30); + line-height: rem-calc(28); + text-align: center; + } + + .about-picture { + padding: 70px 0; + height: 226px; + } } // fix for full-calendar display on small devices .fc-toolbar { margin-bottom: 2.5em !important; } - } @media screen and (max-width: $screen-md-min) { + .heading { + .heading-title { + h1 { + font-size: rem-calc(16); + padding: 26px 15px; + } + } + } - .heading { - .heading-title { - h1 { - font-size: rem-calc(16); - padding: 26px 15px; - } - } - } + .m-t-xxl-on-md { + margin-top: 60px; + } - .m-t-xxl-on-md { margin-top: 60px; } - .m-t-3xl-on-md { margin-top: 80px; } - .m-t-4xl-on-md { margin-top: 100px; } + .m-t-3xl-on-md { + margin-top: 80px; + } + + .m-t-4xl-on-md { + margin-top: 100px; + } } - - diff --git a/app/assets/stylesheets/app.utilities.scss b/app/assets/stylesheets/app.utilities.scss index ad1d4241c..a4d5e85f6 100644 --- a/app/assets/stylesheets/app.utilities.scss +++ b/app/assets/stylesheets/app.utilities.scss @@ -1,67 +1,142 @@ .nopadding { - padding: 0 !important; - margin: 0 !important; + padding: 0 !important; + margin: 0 !important; } .no-upper { text-transform: none; } -.font-felt { font-family: $font-felt; } - -p.font-felt { - +.font-felt { + font-family: $font-felt; } + +p.font-felt {} + p, .widget p { - &.font-felt, .font-felt { font-size: rem-calc(18) !important; } + &.font-felt, .font-felt { + font-size: rem-calc(18) !important; + } + &.fleche-left { position: relative; padding-left: 5px; + span.or { border: 2px solid $yellow; border-radius: 50%; padding: 10px 17px 10px 17px; } } + img.fleche-left { position: absolute; left: -35px; top: 15px; } + img.fleche-right { position: absolute; right: -35px; top: 15px; } + img.fleche-left-from-top { transform: rotate(90deg) scaleX(-1); } + img.fleche-right-from-top { - transform: rotate(270deg) + transform: rotate(270deg); } } -.pos-rlt{position: relative;} -.pos-stc{position: static;} -.pos-abt{position: absolute;} -.line {*width: 100%;height: 2px;margin: 10px 0;font-size:0;overflow: hidden;} -.line-s{height: 1px;} -.line-xs{margin: 0} -.line-lg{margin-top:15px;margin-bottom: 15px} -.line-dashed{border-style: dashed !important;background-color: transparent;border-width:0;} -.no-line{border-width: 0} -.no-border, .no-borders{border-color:transparent;border-width:0} -.no-radius{border-radius: 0} -.block{display:block;} -.block.hide{display: none;} -.inline{display:inline-block !important;} -.none{display: none;} -.pull-left{float: left;} -.pull-right-lg{float: right;} -.pull-none{float: none;} -.rounded{border-radius: 500px;} +.pos-rlt { + position: relative; +} -.h480 { height: 480px; } +.pos-stc { + position: static; +} + +.pos-abt { + position: absolute; +} + +.line { + *width: 100%; + height: 2px; + margin: 10px 0; + font-size: 0; + overflow: hidden; +} + +.line-s { + height: 1px; +} + +.line-xs { + margin: 0; +} + +.line-lg { + margin-top: 15px; + margin-bottom: 15px; +} + +.line-dashed { + border-style: dashed !important; + background-color: transparent; + border-width: 0; +} + +.no-line { + border-width: 0; +} + +.no-border, .no-borders { + border-color: transparent; + border-width: 0; +} + +.no-radius { + border-radius: 0; +} + +.block { + display: block; +} + +.block.hide { + display: none; +} + +.inline { + display: inline-block !important; +} + +.none { + display: none; +} + +.pull-left { + float: left; +} + +.pull-right-lg { + float: right; +} + +.pull-none { + float: none; +} + +.rounded { + border-radius: 500px; +} + +.h480 { + height: 480px; +} // .btn-s-xs{min-width: 90px} // .btn-s-sm{min-width: 100px} @@ -69,251 +144,747 @@ p, .widget p { // .btn-s-lg{min-width: 150px} // .btn-s-xl{min-width: 200px} -.l-h-2x{line-height: rem-calc(18);} +.l-h-2x { + line-height: rem-calc(18); +} + // .l-h-1x{line-height: 1.2;} // .l-h{line-height: 1.5;} -.l-n { line-height: 1em; } -.v-middle{vertical-align: middle !important;} -.v-top{vertical-align: top !important;} -.v-bottom{vertical-align: bottom !important;} +.l-n { + line-height: 1em; +} -.font-normal{font-weight: normal;} -.font-thin{font-weight: 300;} -.font-sbold{font-weight: 600;} -.font-bold{font-weight: 700;} -.font-ebold{font-weight: 900;} +.v-middle { + vertical-align: middle !important; +} -.text-xl{font-size: $font-size-xl;} -.text-lg{font-size: $font-size-lg;} -.text-md{font-size: $font-size-md;} -.text-sm{font-size: $font-size-sm;} -.text-xs{font-size: $font-size-xs;} -.text-base{font-size: $font-size-base;} -.text-ellipsis{ +.v-top { + vertical-align: top !important; +} + +.v-bottom { + vertical-align: bottom !important; +} + +.font-normal { + font-weight: normal; +} + +.font-thin { + font-weight: 300; +} + +.font-sbold { + font-weight: 600; +} + +.font-bold { + font-weight: 700; +} + +.font-ebold { + font-weight: 900; +} + +.text-xl { + font-size: $font-size-xl; +} + +.text-lg { + font-size: $font-size-lg; +} + +.text-md { + font-size: $font-size-md; +} + +.text-sm { + font-size: $font-size-sm; +} + +.text-xs { + font-size: $font-size-xs; +} + +.text-base { + font-size: $font-size-base; +} + +.text-ellipsis { display: block; white-space: nowrap; overflow: hidden; - text-overflow:ellipsis; + text-overflow: ellipsis; } -.text-u-c, .upper{text-transform: uppercase;} -.text-l-t{text-decoration: line-through;} -.text-u-l, .underline {text-decoration: underline;} -.text-c { text-transform: capitalize; } -.text-italic { font-style: italic; } +.text-u-c, .upper { + text-transform: uppercase; +} -.text-left { text-align: left !important; } -.text-center { text-align: center; } -.text-right { text-align: right; } +.text-l-t { + text-decoration: line-through; +} -.text-active, .active > .text, .active > .auto .text{display: none !important;} -.active > .text-active, .active > .auto .text-active{display: inline-block !important;} -.box-shadow{ +.text-u-l, .underline { + text-decoration: underline; +} + +.text-c { + text-transform: capitalize; +} + +.text-italic { + font-style: italic; +} + +.text-left { + text-align: left !important; +} + +.text-center { + text-align: center; +} + +.text-right { + text-align: right; +} + +.text-active, .active > .text, .active > .auto .text { + display: none !important; +} + +.active > .text-active, .active > .auto .text-active { + display: inline-block !important; +} + +.box-shadow { box-shadow: 0 2px 2px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(0, 0, 0, 0.05); } -.cover { background-size:cover; } -.break-word { word-wrap: break-word; } +.cover { + background-size: cover; +} -.wrapper-xxs{padding: 4px 6px;} -.wrapper-sm{padding: 5px 10px;} -.wrapper{padding: 15px;} -.wrapper-md{padding: 20px;} -.wrapper-lg{padding: 30px;} -.wrapper-xl{padding: 50px;} -.padder{padding-left:15px;padding-right: 15px} -.padder-icon{padding-left:30px;padding-right: 0px; padding-top: 3px; height: 21px} -.padder-v{padding-top:15px;padding-bottom: 15px} -.no-padder{padding: 0 !important;} -.pull-in{margin-left: -15px;margin-right: -15px;} -.pull-out{margin:-10px -15px;} +.break-word { + word-wrap: break-word; +} -.width-35 { width: 35% !important; } -.width-70 { width: 70%; } -.width-90 { width: 90%; } +.wrapper-xxs { + padding: 4px 6px; +} -.b{border: 1px solid rgba(0, 0, 0, 0.05)} -.b-a{border: 1px solid $border-color} -.b-t{border-top: 1px solid $border-color} -.b-r{border-right: 1px solid $border-color !important;} -.b-b{border-bottom: 1px solid $border-color} -.b-l{border-left: 1px solid $border-color} -.b-light{border-color: darken($brand-light, 5%)} -.b-dark{border-color: lighten($brand-dark, 5%)} -.b-primary{border-color: lighten($brand-primary, 5%)} -.b-success{border-color: lighten($brand-success, 5%)} -.b-info{border-color: lighten($brand-info, 5%)} -.b-warning{border-color: lighten($brand-warning, 5%)} -.b-danger{border-color: lighten($brand-danger, 5%)} -.b-black{border-color: lighten($brand-black, 5%)} -.b-white{border-color: #fff} -.b-dashed{border-style: dashed !important;} +.wrapper-sm { + padding: 5px 10px; +} -.b-2x{border-width: 2px} -.b-3x{border-width: 3px} -.b-4x{border-width: 4px} -.b-5x{border-width: 5px} +.wrapper { + padding: 15px; +} -.no-b { border: none !important; } +.wrapper-md { + padding: 20px; +} -.r{ +.wrapper-lg { + padding: 30px; +} + +.wrapper-xl { + padding: 50px; +} + +.padder { + padding-left: 15px; + padding-right: 15px; +} + +.padder-icon { + padding-left: 30px; + padding-right: 0px; + padding-top: 3px; + height: 21px; +} + +.padder-v { + padding-top: 15px; + padding-bottom: 15px; +} + +.no-padder { + padding: 0 !important; +} + +.pull-in { + margin-left: -15px; + margin-right: -15px; +} + +.pull-out { + margin: -10px -15px; +} + +.width-35 { + width: 35% !important; +} + +.width-70 { + width: 70%; +} + +.width-90 { + width: 90%; +} + +.b { + border: 1px solid rgba(0, 0, 0, 0.05); +} + +.b-a { + border: 1px solid $border-color; +} + +.b-t { + border-top: 1px solid $border-color; +} + +.b-r { + border-right: 1px solid $border-color !important; +} + +.b-b { + border-bottom: 1px solid $border-color; +} + +.b-l { + border-left: 1px solid $border-color; +} + +.b-light { + border-color: darken($brand-light, 5%); +} + +.b-dark { + border-color: lighten($brand-dark, 5%); +} + +.b-primary { + border-color: lighten($brand-primary, 5%); +} + +.b-success { + border-color: lighten($brand-success, 5%); +} + +.b-info { + border-color: lighten($brand-info, 5%); +} + +.b-warning { + border-color: lighten($brand-warning, 5%); +} + +.b-danger { + border-color: lighten($brand-danger, 5%); +} + +.b-black { + border-color: lighten($brand-black, 5%); +} + +.b-white { + border-color: #fff; +} + +.b-dashed { + border-style: dashed !important; +} + +.b-2x { + border-width: 2px; +} + +.b-3x { + border-width: 3px; +} + +.b-4x { + border-width: 4px; +} + +.b-5x { + border-width: 5px; +} + +.no-b { + border: none !important; +} + +.r { border-radius: $border-radius-base $border-radius-base $border-radius-base $border-radius-base; } -.r-l{ + +.r-l { border-radius: $border-radius-base 0 0 $border-radius-base; } -.r-r{ +.r-r { border-radius: 0 $border-radius-base $border-radius-base 0; } -.r-t{ +.r-t { border-radius: $border-radius-base $border-radius-base 0 0; } -.r-b{ +.r-b { border-radius: 0 0 $border-radius-base $border-radius-base; } -.r-n { border-radius: 0 0 0 0; } -.p-xs { padding: 5px;} -.p-s { padding: 10px;} -.p-lg { padding: 30px; } -.p-l { padding: 16px; } +.r-n { + border-radius: 0 0 0 0; +} -.p-h-xs { padding-left: 5px; padding-right: 5px; } -.p-h-s { padding-left: 10px; padding-right: 10px; } -.p-h-l { padding-left: 16px; padding-right: 16px; } -.p-h-lg { padding-left: 30px; padding-right: 30px; } +.p-xs { + padding: 5px; +} -.m-xxs{margin: 2px 4px} -.m-xs{margin: 5px;} -.m-sm{margin: 10px;} -.m{margin: 15px;} -.m-md{margin: 20px;} -.m-lg{margin: 30px;} -.m-xl{margin: 50px;} -.m-n{margin: 0 !important} +.p-s { + padding: 10px; +} -.m-l-none{margin-left: 0} -.m-l-xs{margin-left: 5px;} -.m-l-sm{margin-left: 10px;} -.m-l{margin-left: 15px} -.m-l-md{margin-left: 20px;} -.m-l-lg{margin-left: 30px;} -.m-l-xl{margin-left: 40px;} +.p-lg { + padding: 30px; +} -.m-l-n-xxs{margin-left: -1px} -.m-l-n-xs{margin-left: -5px} -.m-l-n-sm{margin-left: -10px} -.m-l-n{margin-left: -15px} -.m-l-n-md{margin-left: -20px} -.m-l-n-lg{margin-left: -30px} -.m-l-n-xl{margin-left: -40px} +.p-l { + padding: 16px; +} -.m-t-none{margin-top:0} -.m-t-xxs{margin-top: 1px;} -.m-t-xs{margin-top: 5px;} -.m-t-sm{margin-top: 10px;} -.m-t{margin-top: 15px} -.m-t-md{margin-top: 20px;} -.m-t-lg{margin-top: 30px;} -.m-t-xl{margin-top: 40px;} +.p-h-xs { + padding-left: 5px; + padding-right: 5px; +} -.m-t-n-xxs{margin-top: -1px} -.m-t-n-xs{margin-top: -5px} -.m-t-n-sm{margin-top: -10px} -.m-t-n{margin-top: -15px} -.m-t-n-md{margin-top: -20px} -.m-t-n-lg{margin-top: -30px} -.m-t-n-xl{margin-top: -40px} +.p-h-s { + padding-left: 10px; + padding-right: 10px; +} -.m-r-none{margin-right: 0} -.m-r-xxs{margin-right: 1px} -.m-r-xs{margin-right: 5px} -.m-r-sm{margin-right: 10px} -.m-r{margin-right: 15px} -.m-r-md{margin-right: 20px} -.m-r-lg{margin-right: 30px} -.m-r-xl{margin-right: 40px} +.p-h-l { + padding-left: 16px; + padding-right: 16px; +} -.m-r-n-xxs{margin-right: -1px} -.m-r-n-xs{margin-right: -5px} -.m-r-n-sm{margin-right: -10px} -.m-r-n{margin-right: -15px} -.m-r-n-md{margin-right: -20px} -.m-r-n-lg{margin-right: -30px} -.m-r-n-xl{margin-right: -40px} +.p-h-lg { + padding-left: 30px; + padding-right: 30px; +} -.m-b-none{margin-bottom: 0} -.m-b-xxs{margin-bottom: 1px;} -.m-b-xs{margin-bottom: 5px;} -.m-b-sm{margin-bottom: 10px;} -.m-b{margin-bottom: 15px;} -.m-b-md{margin-bottom: 20px;} -.m-b-lg{margin-bottom: 30px;} -.m-b-xl{margin-bottom: 40px;} +.m-xxs { + margin: 2px 4px; +} -.m-b-n-xxs{margin-bottom: -1px} -.m-b-n-xs{margin-bottom: -5px} -.m-b-n-sm{margin-bottom: -10px} -.m-b-n{margin-bottom: -15px} -.m-b-n-md{margin-bottom: -20px} -.m-b-n-lg{margin-bottom: -30px} -.m-b-n-xl{margin-bottom: -40px} +.m-xs { + margin: 5px; +} -.m-h-none{margin-left: 0; margin-right: 0;} -.m-h-xs{margin-left: 5px; margin-right: 5px;} -.m-h-sm{margin-left: 10px; margin-right: 10px;} -.m-h{margin-left: 15px; margin-right: 15px;} -.m-h-md{margin-left: 20px; margin-right: 20px;} -.m-h-lg{margin-left: 30px; margin-right: 30px;} -.m-h-xl{margin-left: 40px; margin-right: 40px;} +.m-sm { + margin: 10px; +} -.media-xs{min-width: 50px} -.media-sm{min-width: 80px} -.media-md{min-width: 90px} -.media-lg{min-width: 120px} +.m { + margin: 15px; +} + +.m-md { + margin: 20px; +} + +.m-lg { + margin: 30px; +} + +.m-xl { + margin: 50px; +} + +.m-n { + margin: 0 !important; +} + +.m-l-none { + margin-left: 0; +} + +.m-l-xs { + margin-left: 5px; +} + +.m-l-sm { + margin-left: 10px; +} + +.m-l { + margin-left: 15px; +} + +.m-l-md { + margin-left: 20px; +} + +.m-l-lg { + margin-left: 30px; +} + +.m-l-xl { + margin-left: 40px; +} + +.m-l-n-xxs { + margin-left: -1px; +} + +.m-l-n-xs { + margin-left: -5px; +} + +.m-l-n-sm { + margin-left: -10px; +} + +.m-l-n { + margin-left: -15px; +} + +.m-l-n-md { + margin-left: -20px; +} + +.m-l-n-lg { + margin-left: -30px; +} + +.m-l-n-xl { + margin-left: -40px; +} + +.m-t-none { + margin-top: 0; +} + +.m-t-xxs { + margin-top: 1px; +} + +.m-t-xs { + margin-top: 5px; +} + +.m-t-sm { + margin-top: 10px; +} + +.m-t { + margin-top: 15px; +} + +.m-t-md { + margin-top: 20px; +} + +.m-t-lg { + margin-top: 30px; +} + +.m-t-xl { + margin-top: 40px; +} + +.m-t-n-xxs { + margin-top: -1px; +} + +.m-t-n-xs { + margin-top: -5px; +} + +.m-t-n-sm { + margin-top: -10px; +} + +.m-t-n { + margin-top: -15px; +} + +.m-t-n-md { + margin-top: -20px; +} + +.m-t-n-lg { + margin-top: -30px; +} + +.m-t-n-xl { + margin-top: -40px; +} + +.m-r-none { + margin-right: 0; +} + +.m-r-xxs { + margin-right: 1px; +} + +.m-r-xs { + margin-right: 5px; +} + +.m-r-sm { + margin-right: 10px; +} + +.m-r { + margin-right: 15px; +} + +.m-r-md { + margin-right: 20px; +} + +.m-r-lg { + margin-right: 30px; +} + +.m-r-xl { + margin-right: 40px; +} + +.m-r-n-xxs { + margin-right: -1px; +} + +.m-r-n-xs { + margin-right: -5px; +} + +.m-r-n-sm { + margin-right: -10px; +} + +.m-r-n { + margin-right: -15px; +} + +.m-r-n-md { + margin-right: -20px; +} + +.m-r-n-lg { + margin-right: -30px; +} + +.m-r-n-xl { + margin-right: -40px; +} + +.m-b-none { + margin-bottom: 0; +} + +.m-b-xxs { + margin-bottom: 1px; +} + +.m-b-xs { + margin-bottom: 5px; +} + +.m-b-sm { + margin-bottom: 10px; +} + +.m-b { + margin-bottom: 15px; +} + +.m-b-md { + margin-bottom: 20px; +} + +.m-b-lg { + margin-bottom: 30px; +} + +.m-b-xl { + margin-bottom: 40px; +} + +.m-b-n-xxs { + margin-bottom: -1px; +} + +.m-b-n-xs { + margin-bottom: -5px; +} + +.m-b-n-sm { + margin-bottom: -10px; +} + +.m-b-n { + margin-bottom: -15px; +} + +.m-b-n-md { + margin-bottom: -20px; +} + +.m-b-n-lg { + margin-bottom: -30px; +} + +.m-b-n-xl { + margin-bottom: -40px; +} + +.m-h-none { + margin-left: 0; + margin-right: 0; +} + +.m-h-xs { + margin-left: 5px; + margin-right: 5px; +} + +.m-h-sm { + margin-left: 10px; + margin-right: 10px; +} + +.m-h { + margin-left: 15px; + margin-right: 15px; +} + +.m-h-md { + margin-left: 20px; + margin-right: 20px; +} + +.m-h-lg { + margin-left: 30px; + margin-right: 30px; +} + +.m-h-xl { + margin-left: 40px; + margin-right: 40px; +} + +.media-xs { + min-width: 50px; +} + +.media-sm { + min-width: 80px; +} + +.media-md { + min-width: 90px; +} + +.media-lg { + min-width: 120px; +} + +.thumb-38 { + width: 38px !important; + height: 38px; +} + +.thumb-50 { + width: 50px !important; + height: 50px; +} + +.thumb-128 { + width: 128px !important; + height: 128px; +} + +.thumb-140 { + width: 140px !important; + height: 140px; +} -.thumb-38 { width: 38px !important; height: 38px; } -.thumb-50 { width: 50px !important; height: 50px; } -.thumb-128 { width: 128px !important; height: 128px; } -.thumb-140 { width: 140px !important; height: 140px; } .thumb-128-wrapper { img { - width: 128px !important; height: 128px; - @extend .img-circle; - } -} -.thumb-140-wrapper { - img { - width: 140px !important; height: 140px; + width: 128px !important; + height: 128px; + @extend .img-circle; } } -.thumb-lg{width: 128px;display: inline-block} -.thumb-md{width: 64px;display: inline-block} -.thumb{width: 50px;display: inline-block} -.thumb-sm{width: 34px;display: inline-block} -.thumb-xs{width: 24px;display: inline-block} -.thumb-wrapper{padding: 2px; border: 1px solid #ddd} +.thumb-140-wrapper { + img { + width: 140px !important; + height: 140px; + + @extend .img-circle; + } +} + +.thumb-lg { + width: 128px; + display: inline-block; +} + +.thumb-md { + width: 64px; + display: inline-block; +} + +.thumb { + width: 50px; + display: inline-block; +} + +.thumb-sm { + width: 34px; + display: inline-block; +} + +.thumb-xs { + width: 24px; + display: inline-block; +} + +.thumb-wrapper { + padding: 2px; + border: 1px solid #ddd; +} + .thumb img, .thumb-xs img, .thumb-sm img, .thumb-md img, .thumb-lg img, -.thumb-btn img{ +.thumb-btn img { // height: auto; // max-width: 100%; vertical-align: middle; } -.img-full{ + +.img-full { max-width: 100%; - > img{ + + > img { max-width: 100%; } } + .fa-img { display: inline-block; height: 0.9em; @@ -331,36 +902,57 @@ p, .widget p { line-height: 1.7em !important; } -.contrast-250 { -webkit-filter: contrast(250%); filter: contrast(250%); } -.clear{display:block;overflow: hidden;} +.contrast-250 { + -webkit-filter: contrast(250%); + filter: contrast(250%); +} + +.clear { + display: block; + overflow: hidden; +} + +.scroll-x, .scroll-y { + overflow: hidden; + -webkit-overflow-scrolling: touch; +} + +.scroll-y { + overflow-y: auto; +} + +.scroll-x { + overflow-x: auto; +} -.scroll-x, .scroll-y{overflow:hidden;-webkit-overflow-scrolling:touch;} -.scroll-y{overflow-y:auto;} -.scroll-x{overflow-x:auto;} .no-touch { .scroll-x, - .scroll-y{ + .scroll-y { overflow: hidden; } - .scroll-x{ + + .scroll-x { &:hover, &:focus, - &:active{ + &:active { overflow-x: auto; } } - .scroll-y{ + + .scroll-y { &:hover, &:focus, - &:active{ + &:active { overflow-y: auto; } } - .hover-action{ + + .hover-action { display: none; } + .hover:hover { - .hover-action{ + .hover-action { display: inherit; } } @@ -368,7 +960,7 @@ p, .widget p { .exponent { font-size: 0.7em; - vertical-align: super + vertical-align: super; } .help-cursor { @@ -385,33 +977,76 @@ p, .widget p { } @media screen and (min-width: $screen-lg-min) { - .b-r-lg {border-right: 1px solid $border-color; } - .hide-b-r-lg { border: none !important; } + .b-r-lg { + border-right: 1px solid $border-color; + } + + .hide-b-r-lg { + border: none !important; + } } - - /*desktop*/ @media screen and (min-width: $screen-md-min) { - .b-r-md {border-right: 1px solid $border-color; } - .col-lg-2-4{width: 20.000%;float: left;} + .b-r-md { + border-right: 1px solid $border-color; + } - .hide-b-md { border: none; } + .col-lg-2-4 { + width: 20.000%; + float: left; + } + + .hide-b-md { + border: none; + } } /*phone*/ @media (max-width: 767px) { - .shift{display: none !important;} - .shift.in{display: block !important;} - .row-2 [class*="col"]{width: 50%;float: left} - .row-2 .col-0{clear: none} - .row-2 li:nth-child(odd) { clear: left;margin-left: 0} - .text-center-xs{text-align: center;} - .text-left-xs{text-align: left;} - .pull-none-xs{float: none !important;} - .dropdown-menu.pull-none-xs{left: 0;} - .hidden-xs.show{display: inherit !important;} - .wrapper-lg{padding: 15px;} + .shift { + display: none !important; + } + + .shift.in { + display: block !important; + } + + .row-2 [class*="col"] { + width: 50%; + float: left; + } + + .row-2 .col-0 { + clear: none; + } + + .row-2 li:nth-child(odd) { + clear: left; + margin-left: 0; + } + + .text-center-xs { + text-align: center; + } + + .text-left-xs { + text-align: left; + } + + .pull-none-xs { + float: none !important; + } + + .dropdown-menu.pull-none-xs { + left: 0; + } + + .hidden-xs.show { + display: inherit !important; + } + + .wrapper-lg { + padding: 15px; + } } - - diff --git a/app/assets/stylesheets/bootstrap_and_overrides.scss b/app/assets/stylesheets/bootstrap_and_overrides.scss index f9a115dd2..a356d9073 100644 --- a/app/assets/stylesheets/bootstrap_and_overrides.scss +++ b/app/assets/stylesheets/bootstrap_and_overrides.scss @@ -1,60 +1,70 @@ // a flag to toggle asset pipeline / compass integration // defaults to true if twbs-font-path function is present (no function => twbs-font-path('') parsed as string == right side) // in Sass 3.3 this can be improved with: function-exists(twbs-font-path) -$bootstrap-sass-asset-helper: (twbs-font-path("") != unquote('twbs-font-path("")')) !default; +$bootstrap-sass-asset-helper: twbs-font-path("") != unquote('twbs-font-path("")') !default; + // // Variables // -------------------------------------------------- - //== Colors // //## Gray and brand colors for use across Bootstrap. -$gray-darker: lighten(#000, 13.5%) !default; // #222 -$gray-dark: lighten(#000, 20%) !default; // #333 -$gray: lighten(#000, 33.5%) !default; // #555 -$gray-light: lighten(#000, 60%) !default; // #999 -$gray-lighter: lighten(#000, 93.5%) !default; // #eee +$gray-darker: lighten(#000, 13.5%) !default; -$brand-primary: #d92227 !default; -$brand-success: #7bca38 !default; -$brand-info: #1d98ec !default; -$brand-warning: #fdde3f !default; -$brand-danger: $brand-primary !default; +// #222 +$gray-dark: lighten(#000, 20%) !default; +// #333 +$gray: lighten(#000, 33.5%) !default; + +// #555 +$gray-light: lighten(#000, 60%) !default; + +// #999 +$gray-lighter: lighten(#000, 93.5%) !default; + +// #eee + +$brand-primary: #d92227 !default; +$brand-success: #7bca38 !default; +$brand-info: #1d98ec !default; +$brand-warning: #fdde3f !default; +$brand-danger: $brand-primary !default; // ADD by sleede ------------------ -$brand-black: #12131a; -$brand-dark: #222733; -$brand-light: #f4f3f3; //#f1f3f7 -$brand-inverse: #433599; +$brand-black: #12131a; +$brand-dark: #222733; +$brand-light: #f4f3f3; -$black-light: #444444; +//#f1f3f7 +$brand-inverse: #433599; -$bg-gray: #f5f5f5; +$black-light: #444444; -$red-dark: #cb1117; -$red: $red-dark; -$red-light: #e13f45; +$bg-gray: #f5f5f5; -$yellow: #fd0; -$blue: $brand-info; -$green: $brand-success; -$beige: #e4cd78; -$violet: #bd7ae9; -$cyan: #3fc7ff; +$red-dark: #cb1117; +$red: $red-dark; +$red-light: #e13f45; + +$yellow: #fd0; +$blue: $brand-info; +$green: $brand-success; +$beige: #e4cd78; +$violet: #bd7ae9; +$cyan: #3fc7ff; $japonica: #dd7e6b; -$border-color: #dddddd; -$header-bg: $bg-gray; - -$off-screen-nav-width: 75%; -$nav-primary-height: 36px; -$nav-xs-width: 90px; -$nav-xs-height: 50px; -$header-md-height: 73px; +$border-color: #dddddd; +$header-bg: $bg-gray; +$off-screen-nav-width: 75%; +$nav-primary-height: 36px; +$nav-xs-width: 90px; +$nav-xs-height: 50px; +$header-md-height: 73px; //------------------------------------------ @@ -63,14 +73,17 @@ $header-md-height: 73px; //## Settings for some of the most global styles. //** Background color for ``. -$body-bg: #fff !default; +$body-bg: #fff !default; + //** Global text color on ``. -$text-color: black !default; +$text-color: black !default; //** Global textual link color. -$link-color: #cb1117 !default; +$link-color: #cb1117 !default; + //** Link hover color set via `darken()` function. -$link-hover-color: #840b0f !default; +$link-hover-color: #840b0f !default; + //** Link hover decoration. $link-hover-decoration: underline; @@ -80,52 +93,75 @@ $link-hover-decoration: underline; // Semibold = 600, Bold = 700, ExtraB = 800 -$font-family-sans-serif: 'proxima-nova', 'Open Sans', Helvetica, Arial, sans-serif !default; -$font-proxima-condensed: 'proxima-nova-condensed', 'Open Sans Condensed', Helvetica, Arial, sans-serif !default; -$font-family-serif: Georgia, 'Times New Roman', Times, serif !default; -$font-felt: 'felt-tip-roman', 'Loved by the King', cursive, sans-serif; +$font-family-sans-serif: "proxima-nova", "Open Sans", Helvetica, Arial, sans-serif !default; +$font-proxima-condensed: "proxima-nova-condensed", "Open Sans Condensed", Helvetica, Arial, sans-serif !default; +$font-family-serif: Georgia, "Times New Roman", Times, serif !default; +$font-felt: "felt-tip-roman", "Loved by the King", cursive, sans-serif; //** Default monospace fonts for ``, ``, and `
`.
 // $font-family-monospace:   Menlo, Monaco, Consolas, "Courier New", monospace !default;
 
-$font-family-base:        $font-family-sans-serif !default;
-$font-family-monospace:   $font-family-base;
+$font-family-base: $font-family-sans-serif !default;
+$font-family-monospace: $font-family-base;
 
-$font-size-base:          16px !default;
-$font-size-large:         ceil(($font-size-base * 1.125)) !default; // ~18px
-$font-size-medium:        ceil(($font-size-base * 0.875)) !default; // ~14px
-$font-size-small:         ceil(($font-size-base * 0.75)) !default; // ~12px
+$font-size-base: 16px !default;
+$font-size-large: ceil($font-size-base * 1.125) !default;
+
+// ~18px
+$font-size-medium: ceil($font-size-base * 0.875) !default;
+
+// ~14px
+$font-size-small: ceil($font-size-base * 0.75) !default;
+
+// ~12px
 
 //add sleede
-$font-size-xl:            rem-calc(32);
-$font-size-lg:            rem-calc(20);
-$font-size-md:            rem-calc(18);
-$font-size-sm:            rem-calc(14);
-$font-size-xs:            rem-calc(12); // ~11px
+$font-size-xl: rem-calc(32);
+$font-size-lg: rem-calc(20);
+$font-size-md: rem-calc(18);
+$font-size-sm: rem-calc(14);
+$font-size-xs: rem-calc(12);
 
-$font-size-h1:            rem-calc(24) !default; // ~24px
-$font-size-h2:            rem-calc(20) !default; // ~20px
-$font-size-h3:            rem-calc(18) !default; // ~18px
-$font-size-h4:            rem-calc(16) !default; // ~16px
-$font-size-h5:            rem-calc(14) !default; // ~14px
-$font-size-h6:            rem-calc(12) !default; // ~12px
+// ~11px
 
+$font-size-h1: rem-calc(24) !default;
 
+// ~24px
+$font-size-h2: rem-calc(20) !default;
+
+// ~20px
+$font-size-h3: rem-calc(18) !default;
+
+// ~18px
+$font-size-h4: rem-calc(16) !default;
+
+// ~16px
+$font-size-h5: rem-calc(14) !default;
+
+// ~14px
+$font-size-h6: rem-calc(12) !default;
+
+// ~12px
 
 //** Unit-less `line-height` for use in components like buttons.
-$line-height-base:        1.5 !default; // 24/16
+$line-height-base: 1.5 !default;
+
+// 24/16
 //** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
-$line-height-computed:    floor(($font-size-base * $line-height-base)) !default; // ~20px
+$line-height-computed: floor($font-size-base * $line-height-base) !default;
+
+// ~20px
 
 //** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
-$line-height-computed:    floor(($font-size-base * $line-height-base)) !default; // ~20px
+$line-height-computed: floor($font-size-base * $line-height-base) !default;
+
+// ~20px
 
 //** By default, this inherits from the ``.
-$headings-font-family:    $font-family-base !default;
-$headings-font-weight:    400 !default;
-$headings-line-height:    1.5 !default;
-$headings-color:          black !default;
-
+$headings-font-family: $font-family-base !default;
+$headings-font-weight: 400 !default;
+$headings-line-height: 1.5 !default;
+$headings-color: black !default;
 
 //== Iconography
 //
@@ -133,148 +169,161 @@ $headings-color:          black !default;
 
 //** Load fonts from this directory.
 $icon-font-path: "bootstrap/" !default;
+
 //** File name for all font files.
-$icon-font-name:          "glyphicons-halflings-regular" !default;
+$icon-font-name: "glyphicons-halflings-regular" !default;
+
 //** Element ID within SVG icon file.
-$icon-font-svg-id:        "glyphicons_halflingsregular" !default;
-
-$icon-css-prefix:		  fa;
+$icon-font-svg-id: "glyphicons_halflingsregular" !default;
 
+$icon-css-prefix: fa;
 
 //== Components
 //
 //## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
 
-$padding-base-vertical:     6px !default;
-$padding-base-horizontal:   12px !default;
+$padding-base-vertical: 6px !default;
+$padding-base-horizontal: 12px !default;
 
-$padding-large-vertical:    10px !default;
-$padding-large-horizontal:  16px !default;
+$padding-large-vertical: 10px !default;
+$padding-large-horizontal: 16px !default;
 
-$padding-small-vertical:    5px !default;
-$padding-small-horizontal:  10px !default;
+$padding-small-vertical: 5px !default;
+$padding-small-horizontal: 10px !default;
 
-$padding-xs-vertical:       1px !default;
-$padding-xs-horizontal:     5px !default;
+$padding-xs-vertical: 1px !default;
+$padding-xs-horizontal: 5px !default;
 
-$line-height-large:         1.33 !default;
-$line-height-small:         1.5 !default;
+$line-height-large: 1.33 !default;
+$line-height-small: 1.5 !default;
 
-$border-radius-base:        4px !default;
-$border-radius-large:       6px !default;
-$border-radius-small:       3px !default;
+$border-radius-base: 4px !default;
+$border-radius-large: 6px !default;
+$border-radius-small: 3px !default;
 
 //** Global color for active items (e.g., navs or dropdowns).
-$component-active-color:    #fff !default;
+$component-active-color: #fff !default;
+
 //** Global background color for active items (e.g., navs or dropdowns).
-$component-active-bg:       $gray-lighter !default;
+$component-active-bg: $gray-lighter !default;
 
 //** Width of the `border` for generating carets that indicator dropdowns.
-$caret-width-base:          4px !default;
-//** Carets increase slightly in size for larger components.
-$caret-width-large:         5px !default;
+$caret-width-base: 4px !default;
 
+//** Carets increase slightly in size for larger components.
+$caret-width-large: 5px !default;
 
 //== Tables
 //
 //## Customizes the `.table` component with basic values, each used across all table variations.
 
 //** Padding for ``s and ``s.
-$table-cell-padding:            8px !default;
+$table-cell-padding: 8px !default;
+
 //** Padding for cells in `.table-condensed`.
-$table-condensed-cell-padding:  5px !default;
+$table-condensed-cell-padding: 5px !default;
 
 //** Default background color used for all tables.
-$table-bg:                      transparent !default;
+$table-bg: transparent !default;
+
 //** Background color used for `.table-striped`.
-$table-bg-accent:               #f9f9f9 !default;
+$table-bg-accent: #f9f9f9 !default;
+
 //** Background color used for `.table-hover`.
-$table-bg-hover:                $bg-gray !default;
-$table-bg-active:               $table-bg-hover !default;
+$table-bg-hover: $bg-gray !default;
+$table-bg-active: $table-bg-hover !default;
 
 //** Border color for table and cell borders.
-$table-border-color:            #ddd !default;
-
+$table-border-color: #ddd !default;
 
 //== Buttons
 //
 //## For each of Bootstrap's buttons, define text, background and border color.
 
-$btn-font-weight:                normal !default;
+$btn-font-weight: normal !default;
 
-$btn-default-color:              $text-color !default;
-$btn-default-bg:                 lighten($brand-light, 3%) !default;
-$btn-default-border:             darken($border-color, 8%) !default;
+$btn-default-color: $text-color !default;
+$btn-default-bg: lighten($brand-light, 3%) !default;
+$btn-default-border: darken($border-color, 8%) !default;
 
-$btn-primary-color:              #fff !default;;
-$btn-primary-bg:                 $brand-primary !default;;
-$btn-primary-border:             $btn-primary-bg !default;;
+$btn-primary-color: #fff !default;
+$btn-primary-bg: $brand-primary !default;
+$btn-primary-border: $btn-primary-bg !default;
 
-$btn-success-color:              #fff  !default;
-$btn-success-bg:                 $brand-success !default;
-$btn-success-border:             $btn-success-bg !default;
+$btn-success-color: #fff !default;
+$btn-success-bg: $brand-success !default;
+$btn-success-border: $btn-success-bg !default;
 
-$btn-info-color:                 #fff !default;
-$btn-info-bg:                    $brand-info !default;
-$btn-info-border:                $btn-info-bg !default;
+$btn-info-color: #fff !default;
+$btn-info-bg: $brand-info !default;
+$btn-info-border: $btn-info-bg !default;
 
-$btn-warning-color:              #000 !default;
-$btn-warning-bg:                 $brand-warning !default;
-$btn-warning-border:             $btn-warning-bg !default;
+$btn-warning-color: #000 !default;
+$btn-warning-bg: $brand-warning !default;
+$btn-warning-border: $btn-warning-bg !default;
 
-$btn-danger-color:               #fff !default;
-$btn-danger-bg:                  $red !default;
-$btn-danger-border:              $btn-default-border !default;
+$btn-danger-color: #fff !default;
+$btn-danger-bg: $red !default;
+$btn-danger-border: $btn-default-border !default;
 
-$btn-link-disabled-color:        $gray-light !default;
+$btn-link-disabled-color: $gray-light !default;
 
 // Allows for customizing button radius independently from global border radius
-$btn-border-radius-base:         $border-radius-base;
-$btn-border-radius-large:        $border-radius-large;
-$btn-border-radius-small:        $border-radius-small;
-
+$btn-border-radius-base: $border-radius-base;
+$btn-border-radius-large: $border-radius-large;
+$btn-border-radius-small: $border-radius-small;
 
 //== Forms
 //
 //##
 
 //** `` background color
-$input-bg:                       #fff !default;
+$input-bg: #fff !default;
+
 //** `` background color
-$input-bg-disabled:              $gray-lighter !default;
+$input-bg-disabled: $gray-lighter !default;
 
 //** Text color for ``s
-$input-color:                    $gray !default;
+$input-color: $gray !default;
+
 //** `` border color
-$input-border:                   darken($border-color, 10%) !default;
+$input-border: darken($border-color, 10%) !default;
+
 //** `` border radius
-$input-border-radius:            $border-radius-base !default;
+$input-border-radius: $border-radius-base !default;
+
 //** Border color for inputs on focus
-$input-border-focus:             $brand-warning !default;
+$input-border-focus: $brand-warning !default;
+
 //** Large `.form-control` border radius
-$input-border-radius-large:      $border-radius-large;
+$input-border-radius-large: $border-radius-large;
+
 //** Small `.form-control` border radius
-$input-border-radius-small:      $border-radius-small;
+$input-border-radius-small: $border-radius-small;
 
 //** Placeholder text color
-$input-color-placeholder:        $gray-light !default;
+$input-color-placeholder: $gray-light !default;
 
 //** Default `.form-control` height
-$input-height-base:              ($line-height-computed + ($padding-base-vertical * 2) + 2) !default;
-//** Large `.form-control` height
-$input-height-large:             (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2) !default;
-//** Small `.form-control` height
-$input-height-small:             (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2) !default;
+$input-height-base: $line-height-computed + $padding-base-vertical * 2 + 2 !default;
 
-$legend-color:                   $gray-dark !default;
-$legend-border-color:            #e5e5e5 !default;
+//** Large `.form-control` height
+$input-height-large: ceil($font-size-large * $line-height-large) + $padding-large-vertical * 2 + 2 !default;
+
+//** Small `.form-control` height
+$input-height-small: floor($font-size-small * $line-height-small) + $padding-small-vertical * 2 + 2 !default;
+
+$legend-color: $gray-dark !default;
+$legend-border-color: #e5e5e5 !default;
 
 //** Background color for textual input addons
-$input-group-addon-bg:           $gray-lighter !default;
+$input-group-addon-bg: $gray-lighter !default;
+
 //** Border color for textual input addons
 $input-group-addon-border-color: $input-border !default;
+
 //** Disabled cursor for form controls and buttons.
-$cursor-disabled:                not-allowed;
+$cursor-disabled: not-allowed;
 $form-group-margin-bottom: 15px !default;
 
 //== Dropdowns
@@ -282,35 +331,40 @@ $form-group-margin-bottom: 15px !default;
 //## Dropdown menu container and contents.
 
 //** Background for the dropdown menu.
-$dropdown-bg:                    #fff !default;
+$dropdown-bg: #fff !default;
+
 //** Dropdown menu `border-color`.
-$dropdown-border:                rgba(0,0,0,.15) !default;
+$dropdown-border: rgba(0, 0, 0, 0.15) !default;
+
 //** Dropdown menu `border-color` **for IE8**.
-$dropdown-fallback-border:       #ccc !default;
+$dropdown-fallback-border: #ccc !default;
+
 //** Divider color for between dropdown items.
-$dropdown-divider-bg:            #e5e5e5 !default;
+$dropdown-divider-bg: #e5e5e5 !default;
 
 //** Dropdown link text color.
-$dropdown-link-color:            $gray-dark !default;
+$dropdown-link-color: $gray-dark !default;
+
 //** Hover color for dropdown links.
-$dropdown-link-hover-color:      darken($gray-dark, 5%) !default;
+$dropdown-link-hover-color: darken($gray-dark, 5%) !default;
+
 //** Hover background for dropdown links.
-$dropdown-link-hover-bg:         $bg-gray !default;
+$dropdown-link-hover-bg: $bg-gray !default;
 
 //** Active dropdown menu item text color.
-$dropdown-link-active-color:     $component-active-color !default;
+$dropdown-link-active-color: $component-active-color !default;
+
 //** Active dropdown menu item background color.
-$dropdown-link-active-bg:        $component-active-bg !default;
+$dropdown-link-active-bg: $component-active-bg !default;
 
 //** Disabled dropdown menu item background color.
-$dropdown-link-disabled-color:   $gray-light !default;
+$dropdown-link-disabled-color: $gray-light !default;
 
 //** Text color for headers within dropdown menus.
-$dropdown-header-color:          $gray-light !default;
+$dropdown-header-color: $gray-light !default;
 
 //** Deprecated `$dropdown-caret-color` as of v3.1.0
-$dropdown-caret-color:           #000 !default;
-
+$dropdown-caret-color: #000 !default;
 
 //-- Z-index master list
 //
@@ -319,14 +373,13 @@ $dropdown-caret-color:           #000 !default;
 //
 // Note: These variables are not generated into the Customizer.
 
-$zindex-navbar:            1000 !default;
-$zindex-dropdown:          1000 !default;
-$zindex-popover:           1060 !default;
-$zindex-tooltip:           1070 !default;
-$zindex-navbar-fixed:      1030 !default;
-$zindex-modal-background:  1040 !default;
-$zindex-modal:             1050 !default;
-
+$zindex-navbar: 1000 !default;
+$zindex-dropdown: 1000 !default;
+$zindex-popover: 1060 !default;
+$zindex-tooltip: 1070 !default;
+$zindex-navbar-fixed: 1030 !default;
+$zindex-modal-background: 1040 !default;
+$zindex-modal: 1050 !default;
 
 //== Media queries breakpoints
 //
@@ -334,608 +387,648 @@ $zindex-modal:             1050 !default;
 
 // Extra small screen / phone
 //** Deprecated `$screen-xs` as of v3.0.1
-$screen-xs:                  480px !default;
+$screen-xs: 480px !default;
+
 //** Deprecated `$screen-xs-min` as of v3.2.0
-$screen-xs-min:              $screen-xs !default;
+$screen-xs-min: $screen-xs !default;
+
 //** Deprecated `$screen-phone` as of v3.0.1
-$screen-phone:               $screen-xs-min !default;
+$screen-phone: $screen-xs-min !default;
 
 // Small screen / tablet
 //** Deprecated `$screen-sm` as of v3.0.1
-$screen-sm:                  768px !default;
-$screen-sm-min:              $screen-sm !default;
+$screen-sm: 768px !default;
+$screen-sm-min: $screen-sm !default;
+
 //** Deprecated `$screen-tablet` as of v3.0.1
-$screen-tablet:              $screen-sm-min !default;
+$screen-tablet: $screen-sm-min !default;
 
 // Medium screen / desktop
 //** Deprecated `$screen-md` as of v3.0.1
-$screen-md:                  992px !default;
-$screen-md-min:              $screen-md !default;
+$screen-md: 992px !default;
+$screen-md-min: $screen-md !default;
+
 //** Deprecated `$screen-desktop` as of v3.0.1
-$screen-desktop:             $screen-md-min !default;
+$screen-desktop: $screen-md-min !default;
 
 // Large screen / wide desktop
 //** Deprecated `$screen-lg` as of v3.0.1
-$screen-lg:                  1200px !default;
-$screen-lg-min:              $screen-lg !default;
+$screen-lg: 1200px !default;
+$screen-lg-min: $screen-lg !default;
+
 //** Deprecated `$screen-lg-desktop` as of v3.0.1
-$screen-lg-desktop:          $screen-lg-min !default;
+$screen-lg-desktop: $screen-lg-min !default;
 
 // So media queries don't overlap when required, provide a maximum
-$screen-xs-max:              ($screen-sm-min - 1) !default;
-$screen-sm-max:              ($screen-md-min - 1) !default;
-$screen-md-max:              ($screen-lg-min - 1) !default;
-
+$screen-xs-max: $screen-sm-min - 1 !default;
+$screen-sm-max: $screen-md-min - 1 !default;
+$screen-md-max: $screen-lg-min - 1 !default;
 
 //== Grid system
 //
 //## Define your custom responsive grid.
 
 //** Number of columns in the grid.
-$grid-columns:              12 !default;
+$grid-columns: 12 !default;
+
 //** Padding between columns. Gets divided in half for the left and right.
-$grid-gutter-width:         30px !default;
+$grid-gutter-width: 30px !default;
+
 // Navbar collapse
 //** Point at which the navbar becomes uncollapsed.
-$grid-float-breakpoint:     $screen-sm-min !default;
-//** Point at which the navbar begins collapsing.
-$grid-float-breakpoint-max: ($grid-float-breakpoint - 1) !default;
+$grid-float-breakpoint: $screen-sm-min !default;
 
+//** Point at which the navbar begins collapsing.
+$grid-float-breakpoint-max: $grid-float-breakpoint - 1 !default;
 
 //== Container sizes
 //
 //## Define the maximum width of `.container` for different screen sizes.
 
 // Small screen / tablet
-$container-tablet:             ((720px + $grid-gutter-width)) !default;
+$container-tablet: 720px + $grid-gutter-width !default;
+
 //** For `$screen-sm-min` and up.
-$container-sm:                 $container-tablet !default;
+$container-sm: $container-tablet !default;
 
 // Medium screen / desktop
-$container-desktop:            ((940px + $grid-gutter-width)) !default;
+$container-desktop: 940px + $grid-gutter-width !default;
+
 //** For `$screen-md-min` and up.
-$container-md:                 $container-desktop !default;
+$container-md: $container-desktop !default;
 
 // Large screen / wide desktop
-$container-large-desktop:      ((1140px + $grid-gutter-width)) !default;
-//** For `$screen-lg-min` and up.
-$container-lg:                 $container-large-desktop !default;
+$container-large-desktop: 1140px + $grid-gutter-width !default;
 
+//** For `$screen-lg-min` and up.
+$container-lg: $container-large-desktop !default;
 
 //== Navbar
 //
 //##
 
 // Basics of a navbar
-$navbar-height:                    50px !default;
-$navbar-margin-bottom:             $line-height-computed !default;
-$navbar-border-radius:             $border-radius-base !default;
-$navbar-padding-horizontal:        floor(($grid-gutter-width / 2)) !default;
-$navbar-padding-vertical:          (($navbar-height - $line-height-computed) / 2) !default;
-$navbar-collapse-max-height:       340px !default;
+$navbar-height: 50px !default;
+$navbar-margin-bottom: $line-height-computed !default;
+$navbar-border-radius: $border-radius-base !default;
+$navbar-padding-horizontal: floor($grid-gutter-width / 2) !default;
+$navbar-padding-vertical: ($navbar-height - $line-height-computed) / 2 !default;
+$navbar-collapse-max-height: 340px !default;
 
-$navbar-default-color:             #777 !default;
-$navbar-default-bg:                #f8f8f8 !default;
-$navbar-default-border:            darken($navbar-default-bg, 6.5%) !default;
+$navbar-default-color: #777 !default;
+$navbar-default-bg: #f8f8f8 !default;
+$navbar-default-border: darken($navbar-default-bg, 6.5%) !default;
 
 // Navbar links
-$navbar-default-link-color:                #777 !default;
-$navbar-default-link-hover-color:          #333 !default;
-$navbar-default-link-hover-bg:             transparent !default;
-$navbar-default-link-active-color:         #555 !default;
-$navbar-default-link-active-bg:            darken($navbar-default-bg, 6.5%) !default;
-$navbar-default-link-disabled-color:       #ccc !default;
-$navbar-default-link-disabled-bg:          transparent !default;
+$navbar-default-link-color: #777 !default;
+$navbar-default-link-hover-color: #333 !default;
+$navbar-default-link-hover-bg: transparent !default;
+$navbar-default-link-active-color: #555 !default;
+$navbar-default-link-active-bg: darken($navbar-default-bg, 6.5%) !default;
+$navbar-default-link-disabled-color: #ccc !default;
+$navbar-default-link-disabled-bg: transparent !default;
 
 // Navbar brand label
-$navbar-default-brand-color:               $navbar-default-link-color !default;
-$navbar-default-brand-hover-color:         darken($navbar-default-brand-color, 10%) !default;
-$navbar-default-brand-hover-bg:            transparent !default;
+$navbar-default-brand-color: $navbar-default-link-color !default;
+$navbar-default-brand-hover-color: darken($navbar-default-brand-color, 10%) !default;
+$navbar-default-brand-hover-bg: transparent !default;
 
 // Navbar toggle
-$navbar-default-toggle-hover-bg:           #ddd !default;
-$navbar-default-toggle-icon-bar-bg:        #888 !default;
-$navbar-default-toggle-border-color:       #ddd !default;
-
+$navbar-default-toggle-hover-bg: #ddd !default;
+$navbar-default-toggle-icon-bar-bg: #888 !default;
+$navbar-default-toggle-border-color: #ddd !default;
 
 // Inverted navbar
 // Reset inverted navbar basics
-$navbar-inverse-color:                      $gray-light !default;
-$navbar-inverse-bg:                         #222 !default;
-$navbar-inverse-border:                     darken($navbar-inverse-bg, 10%) !default;
+$navbar-inverse-color: $gray-light !default;
+$navbar-inverse-bg: #222 !default;
+$navbar-inverse-border: darken($navbar-inverse-bg, 10%) !default;
 
 // Inverted navbar links
-$navbar-inverse-link-color:                 $gray-light !default;
-$navbar-inverse-link-hover-color:           #fff !default;
-$navbar-inverse-link-hover-bg:              transparent !default;
-$navbar-inverse-link-active-color:          $navbar-inverse-link-hover-color !default;
-$navbar-inverse-link-active-bg:             darken($navbar-inverse-bg, 10%) !default;
-$navbar-inverse-link-disabled-color:        #444 !default;
-$navbar-inverse-link-disabled-bg:           transparent !default;
+$navbar-inverse-link-color: $gray-light !default;
+$navbar-inverse-link-hover-color: #fff !default;
+$navbar-inverse-link-hover-bg: transparent !default;
+$navbar-inverse-link-active-color: $navbar-inverse-link-hover-color !default;
+$navbar-inverse-link-active-bg: darken($navbar-inverse-bg, 10%) !default;
+$navbar-inverse-link-disabled-color: #444 !default;
+$navbar-inverse-link-disabled-bg: transparent !default;
 
 // Inverted navbar brand label
-$navbar-inverse-brand-color:                $navbar-inverse-link-color !default;
-$navbar-inverse-brand-hover-color:          #fff !default;
-$navbar-inverse-brand-hover-bg:             transparent !default;
+$navbar-inverse-brand-color: $navbar-inverse-link-color !default;
+$navbar-inverse-brand-hover-color: #fff !default;
+$navbar-inverse-brand-hover-bg: transparent !default;
 
 // Inverted navbar toggle
-$navbar-inverse-toggle-hover-bg:            #333 !default;
-$navbar-inverse-toggle-icon-bar-bg:         #fff !default;
-$navbar-inverse-toggle-border-color:        #333 !default;
-
+$navbar-inverse-toggle-hover-bg: #333 !default;
+$navbar-inverse-toggle-icon-bar-bg: #fff !default;
+$navbar-inverse-toggle-border-color: #333 !default;
 
 //== Navs
 //
 //##
 
 //=== Shared nav styles
-$nav-link-padding:                          10px 15px !default;
-$nav-link-hover-bg:                         $gray-lighter !default;
+$nav-link-padding: 10px 15px !default;
+$nav-link-hover-bg: $gray-lighter !default;
 
-$nav-disabled-link-color:                   $gray-light !default;
-$nav-disabled-link-hover-color:             $gray-light !default;
+$nav-disabled-link-color: $gray-light !default;
+$nav-disabled-link-hover-color: $gray-light !default;
 
-$nav-open-link-hover-color:                 #fff !default;
+$nav-open-link-hover-color: #fff !default;
 
 //== Tabs
-$nav-tabs-border-color:                     #ddd !default;
+$nav-tabs-border-color: #ddd !default;
 
-$nav-tabs-link-hover-border-color:          $gray-lighter !default;
+$nav-tabs-link-hover-border-color: $gray-lighter !default;
 
-$nav-tabs-active-link-hover-bg:             $body-bg !default;
-$nav-tabs-active-link-hover-color:          $gray !default;
-$nav-tabs-active-link-hover-border-color:   #ddd !default;
+$nav-tabs-active-link-hover-bg: $body-bg !default;
+$nav-tabs-active-link-hover-color: $gray !default;
+$nav-tabs-active-link-hover-border-color: #ddd !default;
 
-$nav-tabs-justified-link-border-color:            #ddd !default;
-$nav-tabs-justified-active-link-border-color:     $body-bg !default;
+$nav-tabs-justified-link-border-color: #ddd !default;
+$nav-tabs-justified-active-link-border-color: $body-bg !default;
 
 //== Pills
-$nav-pills-border-radius:                   $border-radius-base !default;
-$nav-pills-active-link-hover-bg:            $component-active-bg !default;
-$nav-pills-active-link-hover-color:         $component-active-color !default;
-
+$nav-pills-border-radius: $border-radius-base !default;
+$nav-pills-active-link-hover-bg: $component-active-bg !default;
+$nav-pills-active-link-hover-color: $component-active-color !default;
 
 //== Pagination
 //
 //##
 
-$pagination-color:                     $link-color !default;
-$pagination-bg:                        #fff !default;
-$pagination-border:                    #ddd !default;
+$pagination-color: $link-color !default;
+$pagination-bg: #fff !default;
+$pagination-border: #ddd !default;
 
-$pagination-hover-color:               $link-hover-color !default;
-$pagination-hover-bg:                  $gray-lighter !default;
-$pagination-hover-border:              #ddd !default;
+$pagination-hover-color: $link-hover-color !default;
+$pagination-hover-bg: $gray-lighter !default;
+$pagination-hover-border: #ddd !default;
 
-$pagination-active-color:              #fff !default;
-$pagination-active-bg:                 $brand-primary !default;
-$pagination-active-border:             $brand-primary !default;
-
-$pagination-disabled-color:            $gray-light !default;
-$pagination-disabled-bg:               #fff !default;
-$pagination-disabled-border:           #ddd !default;
+$pagination-active-color: #fff !default;
+$pagination-active-bg: $brand-primary !default;
+$pagination-active-border: $brand-primary !default;
 
+$pagination-disabled-color: $gray-light !default;
+$pagination-disabled-bg: #fff !default;
+$pagination-disabled-border: #ddd !default;
 
 //== Pager
 //
 //##
 
-$pager-bg:                             $pagination-bg !default;
-$pager-border:                         $pagination-border !default;
-$pager-border-radius:                  15px !default;
+$pager-bg: $pagination-bg !default;
+$pager-border: $pagination-border !default;
+$pager-border-radius: 15px !default;
 
-$pager-hover-bg:                       $pagination-hover-bg !default;
+$pager-hover-bg: $pagination-hover-bg !default;
 
-$pager-active-bg:                      $pagination-active-bg !default;
-$pager-active-color:                   $pagination-active-color !default;
-
-$pager-disabled-color:                 $pagination-disabled-color !default;
+$pager-active-bg: $pagination-active-bg !default;
+$pager-active-color: $pagination-active-color !default;
 
+$pager-disabled-color: $pagination-disabled-color !default;
 
 //== Jumbotron
 //
 //##
 
-$jumbotron-padding:              30px !default;
-$jumbotron-color:                inherit !default;
-$jumbotron-bg:                   $gray-lighter !default;
-$jumbotron-heading-color:        inherit !default;
-$jumbotron-font-size:            ceil(($font-size-base * 1.5)) !default;
-$jumbotron-heading-font-size:    ceil(($font-size-base * 4.5));
-
+$jumbotron-padding: 30px !default;
+$jumbotron-color: inherit !default;
+$jumbotron-bg: $gray-lighter !default;
+$jumbotron-heading-color: inherit !default;
+$jumbotron-font-size: ceil($font-size-base * 1.5) !default;
+$jumbotron-heading-font-size: ceil($font-size-base * 4.5);
 
 //== Form states and alerts
 //
 //## Define colors for form feedback states and, by default, alerts.
 
-$state-success-text:             #3c763d !default;
-$state-success-bg:               #dff0d8 !default;
-$state-success-border:           darken(adjust-hue($state-success-bg, -10), 5%) !default;
+$state-success-text: #3c763d !default;
+$state-success-bg: #dff0d8 !default;
+$state-success-border: darken(adjust-hue($state-success-bg, -10), 5%) !default;
 
-$state-info-text:                #31708f !default;
-$state-info-bg:                  #d9edf7 !default;
-$state-info-border:              darken(adjust-hue($state-info-bg, -10), 7%) !default;
+$state-info-text: #31708f !default;
+$state-info-bg: #d9edf7 !default;
+$state-info-border: darken(adjust-hue($state-info-bg, -10), 7%) !default;
 
-$state-warning-text:             #8a6d3b !default;
-$state-warning-bg:               #fcf8e3 !default;
-$state-warning-border:           darken(adjust-hue($state-warning-bg, -10), 5%) !default;
-
-$state-danger-text:              #a94442 !default;
-$state-danger-bg:                #f2dede !default;
-$state-danger-border:            darken(adjust-hue($state-danger-bg, -10), 5%) !default;
+$state-warning-text: #8a6d3b !default;
+$state-warning-bg: #fcf8e3 !default;
+$state-warning-border: darken(adjust-hue($state-warning-bg, -10), 5%) !default;
 
+$state-danger-text: #a94442 !default;
+$state-danger-bg: #f2dede !default;
+$state-danger-border: darken(adjust-hue($state-danger-bg, -10), 5%) !default;
 
 //== Tooltips
 //
 //##
 
 //** Tooltip max width
-$tooltip-max-width:           200px !default;
+$tooltip-max-width: 200px !default;
+
 //** Tooltip text color
-$tooltip-color:               white !default;
+$tooltip-color: white !default;
+
 //** Tooltip background color
-$tooltip-bg:                  #424242 !default;
-$tooltip-opacity:             .9 !default;
+$tooltip-bg: #424242 !default;
+$tooltip-opacity: 0.9 !default;
 
 //** Tooltip arrow width
-$tooltip-arrow-width:         5px !default;
+$tooltip-arrow-width: 5px !default;
+
 //** Tooltip arrow color
-$tooltip-arrow-color:         $tooltip-bg !default;
+$tooltip-arrow-color: $tooltip-bg !default;
 
 //add sleede
-$tooltip-fallback-color:	  rgba(0,0,0,.9) !default;
+$tooltip-fallback-color: rgba(0, 0, 0, 0.9) !default;
 
 //== Arrow
 // add by sleede
 //##
-$arrow-width:         			 7px;
-$arrow-color:         			 #fff;
-$arrow-outer-width:   			 ($arrow-width + 1);
-$arrow-outer-color:   			 rgba(0,0,0,.1);
-$arrow-outer-fallback-color:  	 #eee;
-
+$arrow-width: 7px;
+$arrow-color: #fff;
+$arrow-outer-width: $arrow-width + 1;
+$arrow-outer-color: rgba(0, 0, 0, 0.1);
+$arrow-outer-fallback-color: #eee;
 
 //== Popovers
 //
 //##
 
 //** Popover body background color
-$popover-bg:                          #fff !default;
+$popover-bg: #fff !default;
+
 //** Popover maximum width
-$popover-max-width:                   276px !default;
+$popover-max-width: 276px !default;
+
 //** Popover border color
-$popover-border-color:                rgba(0,0,0,.2) !default;
+$popover-border-color: rgba(0, 0, 0, 0.2) !default;
+
 //** Popover fallback border color
-$popover-fallback-border-color:       #ccc !default;
+$popover-fallback-border-color: #ccc !default;
 
 //** Popover title background color
-$popover-title-bg:                    darken($popover-bg, 3%) !default;
+$popover-title-bg: darken($popover-bg, 3%) !default;
 
 //** Popover arrow width
-$popover-arrow-width:                 10px !default;
+$popover-arrow-width: 10px !default;
+
 //** Popover arrow color
-$popover-arrow-color:                 #fff !default;
+$popover-arrow-color: #fff !default;
 
 //** Popover outer arrow width
-$popover-arrow-outer-width:           ($popover-arrow-width + 1) !default;
-//** Popover outer arrow color
-$popover-arrow-outer-color:           fade_in($popover-border-color, 0.05) !default;
-//** Popover outer arrow fallback color
-$popover-arrow-outer-fallback-color:  darken($popover-fallback-border-color, 20%) !default;
+$popover-arrow-outer-width: $popover-arrow-width + 1 !default;
 
+//** Popover outer arrow color
+$popover-arrow-outer-color: fade_in($popover-border-color, 0.05) !default;
+
+//** Popover outer arrow fallback color
+$popover-arrow-outer-fallback-color: darken($popover-fallback-border-color, 20%) !default;
 
 //== Labels
 //
 //##
 
 //** Default label background color
-$label-default-bg:            $gray-light !default;
+$label-default-bg: $gray-light !default;
+
 //** Primary label background color
-$label-primary-bg:            $brand-primary !default;
+$label-primary-bg: $brand-primary !default;
+
 //** Success label background color
-$label-success-bg:            $brand-success !default;
+$label-success-bg: $brand-success !default;
+
 //** Info label background color
-$label-info-bg:               $brand-info !default;
+$label-info-bg: $brand-info !default;
+
 //** Warning label background color
-$label-warning-bg:            $brand-warning !default;
+$label-warning-bg: $brand-warning !default;
+
 //** Danger label background color
-$label-danger-bg:             $brand-danger !default;
+$label-danger-bg: $brand-danger !default;
 
 //** Default label text color
-$label-color:                 #424242 !default;
-//** Default text color of a linked label
-$label-link-hover-color:      $red !default;
+$label-color: #424242 !default;
 
+//** Default text color of a linked label
+$label-link-hover-color: $red !default;
 
 //== Modals
 //
 //##
 
 //** Padding applied to the modal body
-$modal-inner-padding:         15px !default;
+$modal-inner-padding: 15px !default;
 
 //** Padding applied to the modal title
-$modal-title-padding:         8px !default;
+$modal-title-padding: 8px !default;
+
 //** Modal title line-height
-$modal-title-line-height:     $line-height-base !default;
+$modal-title-line-height: $line-height-base !default;
 
 //** Background color of modal content area
-$modal-content-bg:                             #fff !default;
+$modal-content-bg: #fff !default;
+
 //** Modal content border color
-$modal-content-border-color:                   rgba(0,0,0,.2) !default;
+$modal-content-border-color: rgba(0, 0, 0, 0.2) !default;
+
 //** Modal content border color **for IE8**
-$modal-content-fallback-border-color:          #999 !default;
+$modal-content-fallback-border-color: #999 !default;
 
 //** Modal backdrop background color
-$modal-backdrop-bg:           #000 !default;
+$modal-backdrop-bg: #000 !default;
+
 //** Modal backdrop opacity
-$modal-backdrop-opacity:      .9 !default;
+$modal-backdrop-opacity: 0.9 !default;
+
 //** Modal header border color
-$modal-header-border-color:   #e5e5e5 !default;
+$modal-header-border-color: #e5e5e5 !default;
+
 //** Modal footer border color
-$modal-footer-border-color:   $modal-header-border-color !default;
-
-$modal-lg:                    600px !default;
-$modal-md:                    440px !default;
-$modal-sm:                    340px !default;
+$modal-footer-border-color: $modal-header-border-color !default;
 
+$modal-lg: 600px !default;
+$modal-md: 440px !default;
+$modal-sm: 340px !default;
 
 //== Alerts
 //
 //## Define alert colors, border radius, and padding.
 
-$alert-padding:               15px !default;
-$alert-border-radius:         $border-radius-base !default;
-$alert-link-font-weight:      bold !default;
+$alert-padding: 15px !default;
+$alert-border-radius: $border-radius-base !default;
+$alert-link-font-weight: bold !default;
 
-$alert-success-bg:            $state-success-bg !default;
-$alert-success-text:          $state-success-text !default;
-$alert-success-border:        $state-success-border !default;
+$alert-success-bg: $state-success-bg !default;
+$alert-success-text: $state-success-text !default;
+$alert-success-border: $state-success-border !default;
 
-$alert-info-bg:               $state-info-bg !default;
-$alert-info-text:             $state-info-text !default;
-$alert-info-border:           $state-info-border !default;
+$alert-info-bg: $state-info-bg !default;
+$alert-info-text: $state-info-text !default;
+$alert-info-border: $state-info-border !default;
 
-$alert-warning-bg:            $state-warning-bg !default;
-$alert-warning-text:          $state-warning-text !default;
-$alert-warning-border:        $state-warning-border !default;
-
-$alert-danger-bg:             $state-danger-bg !default;
-$alert-danger-text:           $state-danger-text !default;
-$alert-danger-border:         $state-danger-border !default;
+$alert-warning-bg: $state-warning-bg !default;
+$alert-warning-text: $state-warning-text !default;
+$alert-warning-border: $state-warning-border !default;
 
+$alert-danger-bg: $state-danger-bg !default;
+$alert-danger-text: $state-danger-text !default;
+$alert-danger-border: $state-danger-border !default;
 
 //== Progress bars
 //
 //##
 
 //** Background color of the whole progress component
-$progress-bg:                 $bg-gray !default;
+$progress-bg: $bg-gray !default;
+
 //** Progress bar text color
-$progress-bar-color:          #fff !default;
+$progress-bar-color: #fff !default;
+
 //** Variable for setting rounded corners on progress bar.
-$progress-border-radius:      $border-radius-base;
+$progress-border-radius: $border-radius-base;
 
 //** Default progress bar color
-$progress-bar-bg:             $brand-primary !default;
-//** Success progress bar color
-$progress-bar-success-bg:     $brand-success !default;
-//** Warning progress bar color
-$progress-bar-warning-bg:     $brand-warning !default;
-//** Danger progress bar color
-$progress-bar-danger-bg:      $brand-danger !default;
-//** Info progress bar color
-$progress-bar-info-bg:        $brand-info !default;
+$progress-bar-bg: $brand-primary !default;
 
+//** Success progress bar color
+$progress-bar-success-bg: $brand-success !default;
+
+//** Warning progress bar color
+$progress-bar-warning-bg: $brand-warning !default;
+
+//** Danger progress bar color
+$progress-bar-danger-bg: $brand-danger !default;
+
+//** Info progress bar color
+$progress-bar-info-bg: $brand-info !default;
 
 //== List group
 //
 //##
 
 //** Background color on `.list-group-item`
-$list-group-bg:                 #fff !default;
+$list-group-bg: #fff !default;
+
 //** `.list-group-item` border color
-$list-group-border:             #ddd !default;
+$list-group-border: #ddd !default;
+
 //** List group border radius
-$list-group-border-radius:      $border-radius-base !default;
+$list-group-border-radius: $border-radius-base !default;
 
 //** Background color of single list items on hover
-$list-group-hover-bg:           $bg-gray !default;
+$list-group-hover-bg: $bg-gray !default;
+
 //** Text color of active list items
-$list-group-active-color:       $brand-info !default;
+$list-group-active-color: $brand-info !default;
+
 //** Background color of active list items
-$list-group-active-bg:          $component-active-bg !default;
+$list-group-active-bg: $component-active-bg !default;
+
 //** Border color of active list elements
-$list-group-active-border:      $list-group-active-bg !default;
+$list-group-active-border: $list-group-active-bg !default;
+
 //** Text color for content within active list items
-$list-group-active-text-color:  lighten($list-group-active-bg, 40%) !default;
+$list-group-active-text-color: lighten($list-group-active-bg, 40%) !default;
 
 //** Text color of disabled list items
-$list-group-disabled-color:      $gray-light !default;
+$list-group-disabled-color: $gray-light !default;
+
 //** Background color of disabled list items
-$list-group-disabled-bg:         $gray-lighter !default;
+$list-group-disabled-bg: $gray-lighter !default;
+
 //** Text color for content within disabled list items
 $list-group-disabled-text-color: $list-group-disabled-color !default;
 
-$list-group-link-color:         #555 !default;
-$list-group-link-hover-color:   $list-group-link-color !default;
+$list-group-link-color: #555 !default;
+$list-group-link-hover-color: $list-group-link-color !default;
 $list-group-link-heading-color: #333 !default;
 
-
 //== Panels
 //
 //##
 
-$panel-bg:                    #fff !default;
-$panel-body-padding:          15px !default;
-$panel-heading-padding:       18px 15px !default;
-$panel-footer-padding:        $panel-heading-padding !default;
-$panel-border-radius:         $border-radius-large !default;
+$panel-bg: #fff !default;
+$panel-body-padding: 15px !default;
+$panel-heading-padding: 18px 15px !default;
+$panel-footer-padding: $panel-heading-padding !default;
+$panel-border-radius: $border-radius-large !default;
 
 // add sleede
-$panel-border:                $border-color !default;
-$panel-heading-bg:            #fff !default;
-$panel-footer-bg:             #fff !default;
+$panel-border: $border-color !default;
+$panel-heading-bg: #fff !default;
+$panel-footer-bg: #fff !default;
 
 //** Border color for elements within panels
-$panel-inner-border:          #ddd !default;
-$panel-footer-bg:             $bg-gray !default;
+$panel-inner-border: #ddd !default;
+$panel-footer-bg: $bg-gray !default;
 
-$panel-default-text:          $gray-dark !default;
-$panel-default-border:        #ddd !default;
-$panel-default-heading-bg:    $bg-gray !default;
+$panel-default-text: $gray-dark !default;
+$panel-default-border: #ddd !default;
+$panel-default-heading-bg: $bg-gray !default;
 
-$panel-primary-text:          #fff !default;
-$panel-primary-border:        #cbcbcb !default;
-$panel-primary-heading-bg:    #fff !default;
+$panel-primary-text: #fff !default;
+$panel-primary-border: #cbcbcb !default;
+$panel-primary-heading-bg: #fff !default;
 
-$panel-success-text:          $state-success-text !default;
-$panel-success-border:        $state-success-border !default;
-$panel-success-heading-bg:    $state-success-bg !default;
+$panel-success-text: $state-success-text !default;
+$panel-success-border: $state-success-border !default;
+$panel-success-heading-bg: $state-success-bg !default;
 
-$panel-info-text:             $state-info-text !default;
-$panel-info-border:           $state-info-border !default;
-$panel-info-heading-bg:       $state-info-bg !default;
+$panel-info-text: $state-info-text !default;
+$panel-info-border: $state-info-border !default;
+$panel-info-heading-bg: $state-info-bg !default;
 
-$panel-warning-text:          $state-warning-text !default;
-$panel-warning-border:        $state-warning-border !default;
-$panel-warning-heading-bg:    $state-warning-bg !default;
-
-$panel-danger-text:           $state-danger-text !default;
-$panel-danger-border:         $state-danger-border !default;
-$panel-danger-heading-bg:     $state-danger-bg !default;
+$panel-warning-text: $state-warning-text !default;
+$panel-warning-border: $state-warning-border !default;
+$panel-warning-heading-bg: $state-warning-bg !default;
 
+$panel-danger-text: $state-danger-text !default;
+$panel-danger-border: $state-danger-border !default;
+$panel-danger-heading-bg: $state-danger-bg !default;
 
 //== Thumbnails
 //
 //##
 
 //** Padding around the thumbnail image
-$thumbnail-padding:           4px !default;
+$thumbnail-padding: 4px !default;
+
 //** Thumbnail background color
-$thumbnail-bg:                $body-bg !default;
+$thumbnail-bg: $body-bg !default;
+
 //** Thumbnail border color
-$thumbnail-border:            #ddd !default;
+$thumbnail-border: #ddd !default;
+
 //** Thumbnail border radius
-$thumbnail-border-radius:     $border-radius-base !default;
+$thumbnail-border-radius: $border-radius-base !default;
 
 //** Custom text color for thumbnail captions
-$thumbnail-caption-color:     $text-color !default;
-//** Padding around the thumbnail caption
-$thumbnail-caption-padding:   9px !default;
+$thumbnail-caption-color: $text-color !default;
 
+//** Padding around the thumbnail caption
+$thumbnail-caption-padding: 9px !default;
 
 //== Wells
 //
 //##
 
-$well-bg:                     #fff !default;
-$well-border:                 darken($well-bg, 7%) !default;
-
+$well-bg: #fff !default;
+$well-border: darken($well-bg, 7%) !default;
 
 //== Badges
 //
 //##
 
-$badge-color:                 #fff !default;
+$badge-color: #fff !default;
+
 //** Linked badge text color on hover
-$badge-link-hover-color:      #fff !default;
-$badge-bg:                    $gray-light !default;
+$badge-link-hover-color: #fff !default;
+$badge-bg: $gray-light !default;
 
 //** Badge text color in active nav link
-$badge-active-color:          $link-color !default;
+$badge-active-color: $link-color !default;
+
 //** Badge background color in active nav link
-$badge-active-bg:             #fff !default;
-
-$badge-font-weight:           bold !default;
-$badge-line-height:           1 !default;
-$badge-border-radius:         10px !default;
+$badge-active-bg: #fff !default;
 
+$badge-font-weight: bold !default;
+$badge-line-height: 1 !default;
+$badge-border-radius: 10px !default;
 
 //== Breadcrumbs
 //
 //##
 
-$breadcrumb-padding-vertical:   8px !default;
+$breadcrumb-padding-vertical: 8px !default;
 $breadcrumb-padding-horizontal: 15px !default;
-//** Breadcrumb background color
-$breadcrumb-bg:                 $bg-gray !default;
-//** Breadcrumb text color
-$breadcrumb-color:              #ccc !default;
-//** Text color of current page in the breadcrumb
-$breadcrumb-active-color:       $gray-light !default;
-//** Textual separator for between breadcrumb elements
-$breadcrumb-separator:          "/" !default;
 
+//** Breadcrumb background color
+$breadcrumb-bg: $bg-gray !default;
+
+//** Breadcrumb text color
+$breadcrumb-color: #ccc !default;
+
+//** Text color of current page in the breadcrumb
+$breadcrumb-active-color: $gray-light !default;
+
+//** Textual separator for between breadcrumb elements
+$breadcrumb-separator: "/" !default;
 
 //== Carousel
 //
 //##
 
-$carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6) !default;
+$carousel-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !default;
 
-$carousel-control-color:                      #fff !default;
-$carousel-control-width:                      15% !default;
-$carousel-control-opacity:                    .5 !default;
-$carousel-control-font-size:                  20px !default;
+$carousel-control-color: #fff !default;
+$carousel-control-width: 15% !default;
+$carousel-control-opacity: 0.5 !default;
+$carousel-control-font-size: 20px !default;
 
-$carousel-indicator-active-bg:                #fff !default;
-$carousel-indicator-border-color:             #fff !default;
-
-$carousel-caption-color:                      #fff !default;
+$carousel-indicator-active-bg: #fff !default;
+$carousel-indicator-border-color: #fff !default;
 
+$carousel-caption-color: #fff !default;
 
 //== Close
 //
 //##
 
-$close-font-weight:           bold !default;
-$close-color:                 #000 !default;
-$close-text-shadow:           0 1px 0 #fff !default;
-
+$close-font-weight: bold !default;
+$close-color: #000 !default;
+$close-text-shadow: 0 1px 0 #fff !default;
 
 //== Code
 //
 //##
 
-$code-color:                  #c7254e !default;
-$code-bg:                     #f9f2f4 !default;
+$code-color: #c7254e !default;
+$code-bg: #f9f2f4 !default;
 
-$kbd-color:                   #fff !default;
-$kbd-bg:                      #333 !default;
-
-$pre-bg:                      transparent !default;
-$pre-color:                   $gray-dark !default;
-$pre-border-color:            transparent !default;
-$pre-scrollable-max-height:   340px !default;
+$kbd-color: #fff !default;
+$kbd-bg: #333 !default;
 
+$pre-bg: transparent !default;
+$pre-color: $gray-dark !default;
+$pre-border-color: transparent !default;
+$pre-scrollable-max-height: 340px !default;
 
 //== Type
 //
 //##
 //** Horizontal offset for forms and lists.
 $component-offset-horizontal: 180px !default;
-//** Text muted color
-$text-muted:                  $gray-light !default;
-//** Abbreviations and acronyms border color
-$abbr-border-color:           $gray-light !default;
-//** Headings small color
-$headings-small-color:        $gray-light !default;
-//** Blockquote small color
-$blockquote-small-color:      $gray-light !default;
-//** Blockquote font size
-$blockquote-font-size:        ($font-size-base * 1.25) !default;
-//** Blockquote border color
-$blockquote-border-color:     $gray-lighter !default;
-//** Page header border color
-$page-header-border-color:    $gray-lighter !default;
-//** Width of horizontal description list titles
-$dl-horizontal-offset:        $component-offset-horizontal !default;
-//** Point at which .dl-horizontal becomes horizontal
-$dl-horizontal-breakpoint:    $grid-float-breakpoint;
-//** Horizontal line color.
-$hr-border:                   $gray-lighter !default;
 
+//** Text muted color
+$text-muted: $gray-light !default;
+
+//** Abbreviations and acronyms border color
+$abbr-border-color: $gray-light !default;
+
+//** Headings small color
+$headings-small-color: $gray-light !default;
+
+//** Blockquote small color
+$blockquote-small-color: $gray-light !default;
+
+//** Blockquote font size
+$blockquote-font-size: $font-size-base * 1.25 !default;
+
+//** Blockquote border color
+$blockquote-border-color: $gray-lighter !default;
+
+//** Page header border color
+$page-header-border-color: $gray-lighter !default;
+
+//** Width of horizontal description list titles
+$dl-horizontal-offset: $component-offset-horizontal !default;
+
+//** Point at which .dl-horizontal becomes horizontal
+$dl-horizontal-breakpoint: $grid-float-breakpoint;
+
+//** Horizontal line color.
+$hr-border: $gray-lighter !default;
 
 // Core variables and mixins
 // @import "bootstrap/variables";  //overrides
diff --git a/app/assets/stylesheets/modules/abuses.scss b/app/assets/stylesheets/modules/abuses.scss
index fbd61f222..61f2c0411 100644
--- a/app/assets/stylesheets/modules/abuses.scss
+++ b/app/assets/stylesheets/modules/abuses.scss
@@ -1,5 +1,4 @@
 li.abuse {
-
   list-style: none;
   border: 1px solid #ddd;
   border-radius: 2px;
diff --git a/app/assets/stylesheets/modules/cookies.scss b/app/assets/stylesheets/modules/cookies.scss
index 77afd4977..f33282a79 100644
--- a/app/assets/stylesheets/modules/cookies.scss
+++ b/app/assets/stylesheets/modules/cookies.scss
@@ -8,19 +8,22 @@
   padding: 3rem;
   flex-direction: column;
   z-index: 100;
-  -webkit-box-shadow: 0 4px 10px 2px rgba(224,224,224,0.43);
-  -moz-box-shadow: 0 4px 10px 2px rgba(224,224,224,0.43);
-  box-shadow: 0 4px 10px 2px rgba(224,224,224,0.43);
+  -webkit-box-shadow: 0 4px 10px 2px rgba(224, 224, 224, 0.43);
+  -moz-box-shadow: 0 4px 10px 2px rgba(224, 224, 224, 0.43);
+  box-shadow: 0 4px 10px 2px rgba(224, 224, 224, 0.43);
 
   .cookies-actions {
     display: flex;
+
     button {
       flex-basis: 50%;
     }
+
     button.decline {
       background-color: transparent;
       border: 0;
     }
+
     button.accept {
       background-color: red;
       border: 0;
diff --git a/app/assets/stylesheets/modules/icalendar.scss b/app/assets/stylesheets/modules/icalendar.scss
index d97ed60f7..fb0c0d0b2 100644
--- a/app/assets/stylesheets/modules/icalendar.scss
+++ b/app/assets/stylesheets/modules/icalendar.scss
@@ -1,5 +1,5 @@
 .calendar-form {
-  margin : 2em;
+  margin: 2em;
   border: 1px solid #ddd;
   border-radius: 3px;
   padding: 1em;
@@ -21,4 +21,4 @@
 .external-calendar-legend {
   border-left: 3px solid;
   border-radius: 3px;
-}
\ No newline at end of file
+}
diff --git a/app/assets/stylesheets/modules/invoice.scss b/app/assets/stylesheets/modules/invoice.scss
index fb524d20e..06e77339d 100644
--- a/app/assets/stylesheets/modules/invoice.scss
+++ b/app/assets/stylesheets/modules/invoice.scss
@@ -1,4 +1,3 @@
-
 // admin invoices
 
 .chained {
@@ -18,8 +17,7 @@
   border-width: 1px;
   border-style: solid;
   border-color: #aeaeae #979797 #7b7b7b;
-  box-shadow: 2px 3px 6px 0 #898989,
-              -2px 3px 6px 0 #898989;
+  box-shadow: 2px 3px 6px 0 #898989, -2px 3px 6px 0 #898989;
   padding: 2em;
 
   .invoice-buyer-infos {
@@ -61,7 +59,7 @@
   }
 
   .invoice-data table {
-    width: 100%
+    width: 100%;
   }
 
   .invoice-data tr, .invoice-data th, .invoice-data td {
@@ -93,11 +91,10 @@
     border: 1px dashed #c4c4c4;
   }
 
-
   &:after {
-    content:"";
-    display:block;
-    margin-top:30%;
+    content: "";
+    display: block;
+    margin-top: 30%;
   }
 
   .vat-line {
@@ -116,26 +113,27 @@
   .right {
     text-align: right;
   }
-
 }
 
 .custom-invoice {
   .modal-header {
     @extend .modal-header;
+
     // padding-left: 4em;
     text-align: center;
     background-color: #e6e6e6;
   }
 
   .modal-body {
-
     .elements ul {
       @extend .list-unstyled;
     }
 
     .elements li {
       @extend .btn;
+
       @extend .btn-default;
+
       width: 100%;
     }
 
@@ -151,18 +149,23 @@
     .bottom-notes {
       font-style: italic;
     }
-
   }
-
 }
 
-
 .partial-avoir-table tr {
-  float:left;
+  float: left;
 
-  .input-col { min-width: 2em; }
-  .label-col { min-width: 18em; }
-  .amount-col { min-width: 6em; }
+  .input-col {
+    min-width: 2em;
+  }
+
+  .label-col {
+    min-width: 18em;
+  }
+
+  .amount-col {
+    min-width: 6em;
+  }
 }
 
 .partial-avoir-selected-item {
@@ -171,8 +174,8 @@
   position: relative;
 
   &:after {
-    content:"Rembourser";
-    display:inline-block;
+    content: "Rembourser";
+    display: inline-block;
     position: absolute;
     right: 0.8em;
     top: 1.8em;
@@ -193,7 +196,6 @@
   color: #5a5a5a;
 }
 
-
 table.closings-table {
   @extend table.scrollable-3-cols;
 
@@ -223,6 +225,7 @@ table.closings-table {
     i {
       display: none;
     }
+
     &:after {
       content: '\f019';
       font-family: 'fontawesome';
@@ -234,22 +237,26 @@ table.scrollable-3-cols {
   width: 100%;
   border-spacing: 0;
 
-  thead, tbody, tr, th, td { display: block; }
+  thead, tbody, tr, th, td {
+    display: block;
+  }
 
   thead tr {
     /* fallback */
     width: 97%;
+
     /* minus scroll bar width */
     width: -webkit-calc(100% - 16px);
-    width:    -moz-calc(100% - 16px);
-    width:         calc(100% - 16px);
+    width: -moz-calc(100% - 16px);
+    width: calc(100% - 16px);
   }
 
   thead tr th {
     border-bottom: 0;
   }
 
-  tr:after {  /* clearing float */
+  tr:after {
+    /* clearing float */
     content: ' ';
     display: block;
     visibility: hidden;
@@ -263,12 +270,13 @@ table.scrollable-3-cols {
   }
 
   tbody td, thead th {
-    width: 32%;  /* 32% is less than (100% / 3 cols) = 33.33% */
+    width: 32%;
+
+    /* 32% is less than (100% / 3 cols) = 33.33% */
     float: left;
   }
 }
 
-
 .period-info-title {
   font-weight: bold;
 }
diff --git a/app/assets/stylesheets/modules/settings.scss b/app/assets/stylesheets/modules/settings.scss
index 2536f61d2..7414033a5 100644
--- a/app/assets/stylesheets/modules/settings.scss
+++ b/app/assets/stylesheets/modules/settings.scss
@@ -5,6 +5,7 @@
         .note-toolbar .note-btn-group .note-btn .nugget {
           font-family: "FontAwesome";
         }
+
         .note-editing-area .note-editable {
           #news {
             width: 100%;
@@ -20,29 +21,35 @@
 
           #projects {
             @extend #news;
+
             line-height: 523px;
           }
 
           #twitter {
             @extend #news;
+
             line-height: 162px;
           }
 
           #members {
             @extend #news;
+
             line-height: 320px;
           }
 
           #events {
             @extend #news;
+
             line-height: 621px;
           }
         }
       }
     }
+
     .home-page-style {
       .panel {
         border: 0;
+
         .panel-heading {
           background: none;
 
diff --git a/app/assets/stylesheets/modules/signup.scss b/app/assets/stylesheets/modules/signup.scss
index 986bb11e4..712d28d35 100644
--- a/app/assets/stylesheets/modules/signup.scss
+++ b/app/assets/stylesheets/modules/signup.scss
@@ -5,24 +5,29 @@
       display: inline-block;
     }
   }
+
   .required-row {
     div.input-group {
       width: 95%;
       display: inline-table;
     }
+
     select.form-control {
       width: 95%;
       display: inline-block;
     }
+
     .exponent {
       position: relative;
       top: -14px;
       right: -4px;
     }
+
     .exponent-select {
       top: -1px;
     }
   }
+
   .info-required {
     color: #5a5a5a;
     font-size: 8pt;
diff --git a/app/assets/stylesheets/modules/tour.scss b/app/assets/stylesheets/modules/tour.scss
index 8e0fdb8fe..49f7baba4 100644
--- a/app/assets/stylesheets/modules/tour.scss
+++ b/app/assets/stylesheets/modules/tour.scss
@@ -4,7 +4,6 @@
   z-index: 10000;
 }
 
-
 .ui-tour-popup.popover {
   max-width: 414px;
 }
@@ -22,10 +21,22 @@
   }
 }
 
-.shift-right-40 { margin-left: 40px; }
+.shift-right-40 {
+  margin-left: 40px;
+}
 
-.shift-left-40 { margin-left: -40px; }
-.shift-left-50 { margin-left: -50px; }
-.shift-left-80 { margin-left: -80px; }
+.shift-left-40 {
+  margin-left: -40px;
+}
 
-.width-350 { width: 350px; }
+.shift-left-50 {
+  margin-left: -50px;
+}
+
+.shift-left-80 {
+  margin-left: -80px;
+}
+
+.width-350 {
+  width: 350px;
+}

From 9069139bc4dd926d9c007e3b067a9d558e293e17 Mon Sep 17 00:00:00 2001
From: Sylvain 
Date: Tue, 24 Mar 2020 18:18:27 +0100
Subject: [PATCH 048/109] fix accounting archive generation

---
 app/views/archive/_reservation.json.jbuilder | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/views/archive/_reservation.json.jbuilder b/app/views/archive/_reservation.json.jbuilder
index c859372c7..bc0ea910f 100644
--- a/app/views/archive/_reservation.json.jbuilder
+++ b/app/views/archive/_reservation.json.jbuilder
@@ -1,6 +1,6 @@
 # frozen_string_literal: true
 
-json.extract! invoiced, :created_at, :stp_invoice_id
+json.extract! invoiced, :created_at
 json.reservable do
   json.type invoiced.reservable_type
   json.id invoiced.reservable_id

From 2bbce711d99e13c7b07a6375c57b3580f4456978 Mon Sep 17 00:00:00 2001
From: Sylvain 
Date: Tue, 24 Mar 2020 18:52:53 +0100
Subject: [PATCH 049/109] fix stylesheet view

---
 app/controllers/api/stylesheets_controller.rb | 4 ----
 app/views/api/stylesheets/show.css.erb        | 1 +
 2 files changed, 1 insertion(+), 4 deletions(-)
 create mode 100644 app/views/api/stylesheets/show.css.erb

diff --git a/app/controllers/api/stylesheets_controller.rb b/app/controllers/api/stylesheets_controller.rb
index 67a5f2afb..acc8b0b03 100644
--- a/app/controllers/api/stylesheets_controller.rb
+++ b/app/controllers/api/stylesheets_controller.rb
@@ -7,9 +7,5 @@ class API::StylesheetsController < API::ApiController
 
   def show
     @stylesheet = Stylesheet.find(params[:id])
-    respond_to do |format|
-      format.html # regular ERB template
-      format.css { render text: @stylesheet.contents, content_type: 'text/css' }
-    end
   end
 end
diff --git a/app/views/api/stylesheets/show.css.erb b/app/views/api/stylesheets/show.css.erb
new file mode 100644
index 000000000..531891984
--- /dev/null
+++ b/app/views/api/stylesheets/show.css.erb
@@ -0,0 +1 @@
+<%= @stylesheet.contents %>
\ No newline at end of file

From 467c6351b1bf586b835519fc40fc893de4d702cb Mon Sep 17 00:00:00 2001
From: Sylvain 
Date: Tue, 24 Mar 2020 18:53:25 +0100
Subject: [PATCH 050/109] fix deprecated sass extend

---
 app/assets/stylesheets/modules/invoice.scss | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/assets/stylesheets/modules/invoice.scss b/app/assets/stylesheets/modules/invoice.scss
index 06e77339d..9832248d5 100644
--- a/app/assets/stylesheets/modules/invoice.scss
+++ b/app/assets/stylesheets/modules/invoice.scss
@@ -197,7 +197,7 @@
 }
 
 table.closings-table {
-  @extend table.scrollable-3-cols;
+  @extend .scrollable-3-cols;
 
   tbody .actions {
     padding-left: 2em;

From c25ff0d1aba7f13209904452731b705c6efb0890 Mon Sep 17 00:00:00 2001
From: Sylvain 
Date: Tue, 24 Mar 2020 18:53:43 +0100
Subject: [PATCH 051/109] updated compass

---
 Gemfile      | 2 +-
 Gemfile.lock | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Gemfile b/Gemfile
index 0b532cf71..66ab9e6f9 100644
--- a/Gemfile
+++ b/Gemfile
@@ -2,7 +2,7 @@
 
 source 'https://rubygems.org'
 
-gem 'compass-rails', '3.0.2'
+gem 'compass-rails', '3.1.0'
 # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
 gem 'rails', '~> 5.1.7'
 # Use Puma as web server
diff --git a/Gemfile.lock b/Gemfile.lock
index 58694a2ca..5b6b7acb5 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -97,7 +97,7 @@ GEM
       sass (>= 3.3.0, < 3.5)
     compass-import-once (1.0.5)
       sass (>= 3.2, < 3.5)
-    compass-rails (3.0.2)
+    compass-rails (3.1.0)
       compass (~> 1.0.0)
       sass-rails (< 5.1)
       sprockets (< 4.0)
@@ -457,7 +457,7 @@ DEPENDENCIES
   caxlsx
   caxlsx_rails
   chroma
-  compass-rails (= 3.0.2)
+  compass-rails (= 3.1.0)
   coveralls
   database_cleaner
   devise (>= 4.6.0)

From 6b66d601e1c9ae059ef8742842d2460eccb5f0ee Mon Sep 17 00:00:00 2001
From: Sylvain 
Date: Wed, 25 Mar 2020 10:16:47 +0100
Subject: [PATCH 052/109] inherit models from ApplicationRecord

---
 app/models/abuse.rb                        | 2 +-
 app/models/accounting_period.rb            | 2 +-
 app/models/address.rb                      | 2 +-
 app/models/age_range.rb                    | 2 +-
 app/models/application_record.rb           | 7 +++++++
 app/models/asset.rb                        | 2 +-
 app/models/auth_provider.rb                | 2 +-
 app/models/availability.rb                 | 2 +-
 app/models/availability_tag.rb             | 2 +-
 app/models/category.rb                     | 2 +-
 app/models/component.rb                    | 2 +-
 app/models/coupon.rb                       | 2 +-
 app/models/credit.rb                       | 2 +-
 app/models/custom_asset.rb                 | 2 +-
 app/models/database_provider.rb            | 2 +-
 app/models/event.rb                        | 2 +-
 app/models/event_price_category.rb         | 2 +-
 app/models/event_theme.rb                  | 2 +-
 app/models/export.rb                       | 2 +-
 app/models/group.rb                        | 2 +-
 app/models/history_value.rb                | 2 +-
 app/models/i_calendar.rb                   | 2 +-
 app/models/i_calendar_event.rb             | 2 +-
 app/models/import.rb                       | 2 +-
 app/models/invoice.rb                      | 2 +-
 app/models/invoice_item.rb                 | 2 +-
 app/models/invoicing_profile.rb            | 2 +-
 app/models/licence.rb                      | 2 +-
 app/models/machine.rb                      | 2 +-
 app/models/machines_availability.rb        | 2 +-
 app/models/notification.rb                 | 2 +-
 app/models/o_auth2_mapping.rb              | 2 +-
 app/models/o_auth2_provider.rb             | 2 +-
 app/models/offer_day.rb                    | 2 +-
 app/models/open_api/calls_count_tracing.rb | 2 +-
 app/models/open_api/client.rb              | 2 +-
 app/models/organization.rb                 | 2 +-
 app/models/plan.rb                         | 2 +-
 app/models/plans_availability.rb           | 2 +-
 app/models/price.rb                        | 2 +-
 app/models/price_category.rb               | 2 +-
 app/models/profile.rb                      | 2 +-
 app/models/project.rb                      | 2 +-
 app/models/project_step.rb                 | 2 +-
 app/models/project_user.rb                 | 2 +-
 app/models/reservation.rb                  | 2 +-
 app/models/role.rb                         | 2 +-
 app/models/setting.rb                      | 2 +-
 app/models/slot.rb                         | 2 +-
 app/models/slots_reservation.rb            | 2 +-
 app/models/space.rb                        | 2 +-
 app/models/spaces_availability.rb          | 2 +-
 app/models/statistic_custom_aggregation.rb | 2 +-
 app/models/statistic_field.rb              | 2 +-
 app/models/statistic_graph.rb              | 2 +-
 app/models/statistic_index.rb              | 2 +-
 app/models/statistic_profile.rb            | 2 +-
 app/models/statistic_profile_training.rb   | 2 +-
 app/models/statistic_sub_type.rb           | 2 +-
 app/models/statistic_type.rb               | 2 +-
 app/models/statistic_type_sub_type.rb      | 2 +-
 app/models/stylesheet.rb                   | 2 +-
 app/models/subscription.rb                 | 2 +-
 app/models/tag.rb                          | 2 +-
 app/models/theme.rb                        | 2 +-
 app/models/ticket.rb                       | 2 +-
 app/models/training.rb                     | 2 +-
 app/models/trainings_availability.rb       | 2 +-
 app/models/trainings_pricing.rb            | 2 +-
 app/models/user.rb                         | 2 +-
 app/models/user_tag.rb                     | 2 +-
 app/models/users_credit.rb                 | 2 +-
 app/models/wallet.rb                       | 2 +-
 app/models/wallet_transaction.rb           | 2 +-
 doc/sso_authentication.md                  | 2 +-
 75 files changed, 81 insertions(+), 74 deletions(-)
 create mode 100644 app/models/application_record.rb

diff --git a/app/models/abuse.rb b/app/models/abuse.rb
index e1438c8e3..c3b9e0e54 100644
--- a/app/models/abuse.rb
+++ b/app/models/abuse.rb
@@ -2,7 +2,7 @@
 
 # Abuse is a report made by a visitor (not especially a logged user) who has signaled a content that seems abusive to his eyes.
 # It is currently used with projects.
-class Abuse < ActiveRecord::Base
+class Abuse < ApplicationRecord
   include NotifyWith::NotificationAttachedObject
 
   belongs_to :signaled, polymorphic: true
diff --git a/app/models/accounting_period.rb b/app/models/accounting_period.rb
index acfcc196c..5402781f9 100644
--- a/app/models/accounting_period.rb
+++ b/app/models/accounting_period.rb
@@ -6,7 +6,7 @@ require 'zip'
 
 # AccountingPeriod is a period of N days (N > 0) which as been closed by an admin
 # to prevent writing new accounting lines (invoices & refunds) during this period of time.
-class AccountingPeriod < ActiveRecord::Base
+class AccountingPeriod < ApplicationRecord
   before_destroy { false }
   before_update { false }
   before_create :compute_totals
diff --git a/app/models/address.rb b/app/models/address.rb
index 68019e2ef..70f3b207c 100644
--- a/app/models/address.rb
+++ b/app/models/address.rb
@@ -1,3 +1,3 @@
-class Address < ActiveRecord::Base
+class Address < ApplicationRecord
   belongs_to :placeable, polymorphic: true
 end
diff --git a/app/models/age_range.rb b/app/models/age_range.rb
index b2f508588..b831d160e 100644
--- a/app/models/age_range.rb
+++ b/app/models/age_range.rb
@@ -1,4 +1,4 @@
-class AgeRange < ActiveRecord::Base
+class AgeRange < ApplicationRecord
   extend FriendlyId
   friendly_id :name, use: :slugged
 
diff --git a/app/models/application_record.rb b/app/models/application_record.rb
new file mode 100644
index 000000000..d22916875
--- /dev/null
+++ b/app/models/application_record.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+# SuperClass for all app models.
+# This is a single spot to configure app-wide model behavior.
+class ApplicationRecord < ActiveRecord::Base
+  self.abstract_class = true
+end
\ No newline at end of file
diff --git a/app/models/asset.rb b/app/models/asset.rb
index 439ee708d..b58211fd6 100644
--- a/app/models/asset.rb
+++ b/app/models/asset.rb
@@ -3,6 +3,6 @@
 require 'file_size_validator'
 
 # Generic class, parent of uploadable items
-class Asset < ActiveRecord::Base
+class Asset < ApplicationRecord
   belongs_to :viewable, polymorphic: true
 end
diff --git a/app/models/auth_provider.rb b/app/models/auth_provider.rb
index 1440d2d8b..56f18fa24 100644
--- a/app/models/auth_provider.rb
+++ b/app/models/auth_provider.rb
@@ -1,6 +1,6 @@
 # frozen_string_literal: true
 
-class AuthProvider < ActiveRecord::Base
+class AuthProvider < ApplicationRecord
   # this is a simple stub used for database creation & configuration
   class SimpleAuthProvider < Object
     def providable_type
diff --git a/app/models/availability.rb b/app/models/availability.rb
index eefba45c2..d9a7f458c 100644
--- a/app/models/availability.rb
+++ b/app/models/availability.rb
@@ -3,7 +3,7 @@
 # Availability stores time slots that are available to reservation for an associated reservable
 # Eg. a 3D printer will be reservable on thursday from 9 to 11 pm
 # Availabilities may be subdivided into Slots (of 1h), for some types of reservables (eg. Machine)
-class Availability < ActiveRecord::Base
+class Availability < ApplicationRecord
   # elastic initialisations
   include Elasticsearch::Model
   index_name 'fablab'
diff --git a/app/models/availability_tag.rb b/app/models/availability_tag.rb
index b6a06a962..7ef0d7f76 100644
--- a/app/models/availability_tag.rb
+++ b/app/models/availability_tag.rb
@@ -1,4 +1,4 @@
-class AvailabilityTag < ActiveRecord::Base
+class AvailabilityTag < ApplicationRecord
   belongs_to :availability
   belongs_to :tag
 end
diff --git a/app/models/category.rb b/app/models/category.rb
index 39e801744..8848a0209 100644
--- a/app/models/category.rb
+++ b/app/models/category.rb
@@ -1,4 +1,4 @@
-class Category < ActiveRecord::Base
+class Category < ApplicationRecord
   extend FriendlyId
   friendly_id :name, use: :slugged
 
diff --git a/app/models/component.rb b/app/models/component.rb
index d1613fd48..867e49db0 100644
--- a/app/models/component.rb
+++ b/app/models/component.rb
@@ -1,4 +1,4 @@
-class Component < ActiveRecord::Base
+class Component < ApplicationRecord
   has_and_belongs_to_many :projects, join_table: 'projects_components'
   validates :name, presence: true, length: { maximum: 50 }
 end
diff --git a/app/models/coupon.rb b/app/models/coupon.rb
index f510cae51..54cae97a7 100644
--- a/app/models/coupon.rb
+++ b/app/models/coupon.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 # Coupon is a textual code associated with a discount rate or an amount of discount
-class Coupon < ActiveRecord::Base
+class Coupon < ApplicationRecord
   has_many :invoices
 
   after_commit :create_stripe_coupon, on: [:create]
diff --git a/app/models/credit.rb b/app/models/credit.rb
index 754af399c..fbd1bd8a7 100644
--- a/app/models/credit.rb
+++ b/app/models/credit.rb
@@ -1,4 +1,4 @@
-class Credit < ActiveRecord::Base
+class Credit < ApplicationRecord
   belongs_to :creditable, polymorphic: true
   belongs_to :plan
   has_many :users_credits, dependent: :destroy
diff --git a/app/models/custom_asset.rb b/app/models/custom_asset.rb
index a2fff8321..922631729 100644
--- a/app/models/custom_asset.rb
+++ b/app/models/custom_asset.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 # Admin defined assets (like PDF or images uploaded)
-class CustomAsset < ActiveRecord::Base
+class CustomAsset < ApplicationRecord
   has_one :custom_asset_file, as: :viewable, dependent: :destroy
   accepts_nested_attributes_for :custom_asset_file, allow_destroy: true
 
diff --git a/app/models/database_provider.rb b/app/models/database_provider.rb
index 94ac52563..33dcb77b3 100644
--- a/app/models/database_provider.rb
+++ b/app/models/database_provider.rb
@@ -1,4 +1,4 @@
-class DatabaseProvider < ActiveRecord::Base
+class DatabaseProvider < ApplicationRecord
   has_one :auth_provider, as: :providable, dependent: :destroy
 
   def protected_fields
diff --git a/app/models/event.rb b/app/models/event.rb
index d1b12bb6c..6e0fd0c1d 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -1,4 +1,4 @@
-class Event < ActiveRecord::Base
+class Event < ApplicationRecord
   include NotifyWith::NotificationAttachedObject
   include ApplicationHelper
 
diff --git a/app/models/event_price_category.rb b/app/models/event_price_category.rb
index 623c4013f..756cf8a3d 100644
--- a/app/models/event_price_category.rb
+++ b/app/models/event_price_category.rb
@@ -1,4 +1,4 @@
-class EventPriceCategory < ActiveRecord::Base
+class EventPriceCategory < ApplicationRecord
   belongs_to :event
   belongs_to :price_category
 
diff --git a/app/models/event_theme.rb b/app/models/event_theme.rb
index 9fc600e7a..216af975a 100644
--- a/app/models/event_theme.rb
+++ b/app/models/event_theme.rb
@@ -1,4 +1,4 @@
-class EventTheme < ActiveRecord::Base
+class EventTheme < ApplicationRecord
   extend FriendlyId
   friendly_id :name, use: :slugged
 
diff --git a/app/models/export.rb b/app/models/export.rb
index 74056d3a9..4c2ba8165 100644
--- a/app/models/export.rb
+++ b/app/models/export.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 # Export is a reference to a file asynchronously generated by the system and downloadable by the user
-class Export < ActiveRecord::Base
+class Export < ApplicationRecord
   require 'fileutils'
 
   belongs_to :user
diff --git a/app/models/group.rb b/app/models/group.rb
index c50136872..4c726a98d 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 # Group is way to bind users with prices. Different prices can be defined for each plan/reservable, for each group
-class Group < ActiveRecord::Base
+class Group < ApplicationRecord
   has_many :plans
   has_many :users
   has_many :statistic_profiles
diff --git a/app/models/history_value.rb b/app/models/history_value.rb
index d4994aa92..c4844433c 100644
--- a/app/models/history_value.rb
+++ b/app/models/history_value.rb
@@ -3,7 +3,7 @@
 require 'checksum'
 
 # Setting values, kept history of modifications
-class HistoryValue < ActiveRecord::Base
+class HistoryValue < ApplicationRecord
   belongs_to :setting
   belongs_to :invoicing_profile
 
diff --git a/app/models/i_calendar.rb b/app/models/i_calendar.rb
index ecd0c5f0d..ba0283b8f 100644
--- a/app/models/i_calendar.rb
+++ b/app/models/i_calendar.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 # iCalendar (RFC 5545) files, stored by URL and kept with their display configuration
-class ICalendar < ActiveRecord::Base
+class ICalendar < ApplicationRecord
   has_many :i_calendar_events, dependent: :destroy
 
   after_create :sync_events
diff --git a/app/models/i_calendar_event.rb b/app/models/i_calendar_event.rb
index bfa940e9b..52db838da 100644
--- a/app/models/i_calendar_event.rb
+++ b/app/models/i_calendar_event.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 # iCalendar (RFC 5545) event, belonging to an ICalendar object (its source)
-class ICalendarEvent < ActiveRecord::Base
+class ICalendarEvent < ApplicationRecord
   belongs_to :i_calendar
 
   def self.update_or_create_by(args, attributes)
diff --git a/app/models/import.rb b/app/models/import.rb
index eab704afc..e70297926 100644
--- a/app/models/import.rb
+++ b/app/models/import.rb
@@ -4,7 +4,7 @@ require 'file_size_validator'
 
 # An Import is a file uploaded by an user that provides some data to the database.
 # Currently, this is used to import some users from a CSV file
-class Import < ActiveRecord::Base
+class Import < ApplicationRecord
   mount_uploader :attachment, ImportUploader
 
   belongs_to :user
diff --git a/app/models/invoice.rb b/app/models/invoice.rb
index 58d159b68..732393c5e 100644
--- a/app/models/invoice.rb
+++ b/app/models/invoice.rb
@@ -4,7 +4,7 @@ require 'checksum'
 
 # Invoice correspond to a single purchase made by an user. This purchase may
 # include reservation(s) and/or a subscription
-class Invoice < ActiveRecord::Base
+class Invoice < ApplicationRecord
   include NotifyWith::NotificationAttachedObject
   require 'fileutils'
   scope :only_invoice, -> { where(type: nil) }
diff --git a/app/models/invoice_item.rb b/app/models/invoice_item.rb
index e6ff29e1d..ea1db81da 100644
--- a/app/models/invoice_item.rb
+++ b/app/models/invoice_item.rb
@@ -3,7 +3,7 @@
 require 'checksum'
 
 # A single line inside an invoice. Can be a subscription or a reservation
-class InvoiceItem < ActiveRecord::Base
+class InvoiceItem < ApplicationRecord
   belongs_to :invoice
   belongs_to :subscription
 
diff --git a/app/models/invoicing_profile.rb b/app/models/invoicing_profile.rb
index 3cd8c6b5e..68d890b80 100644
--- a/app/models/invoicing_profile.rb
+++ b/app/models/invoicing_profile.rb
@@ -3,7 +3,7 @@
 # This table will save the user's profile data needed for legal accounting (invoices, wallet, etc.)
 # Legal accounting must be kept for 10 years but GDPR requires that an user can delete his account at any time.
 # The data will be kept even if the user is deleted, but it will be unlinked from the user's account.
-class InvoicingProfile < ActiveRecord::Base
+class InvoicingProfile < ApplicationRecord
   belongs_to :user
   has_one :address, as: :placeable, dependent: :destroy
   accepts_nested_attributes_for :address, allow_destroy: true
diff --git a/app/models/licence.rb b/app/models/licence.rb
index 36fcdaccb..e3eb5514e 100644
--- a/app/models/licence.rb
+++ b/app/models/licence.rb
@@ -1,4 +1,4 @@
-class Licence < ActiveRecord::Base
+class Licence < ApplicationRecord
 
   has_many :projects
   validates :name, presence: true, length: { maximum: 160 }
diff --git a/app/models/machine.rb b/app/models/machine.rb
index fb4ad0242..f272b5f43 100644
--- a/app/models/machine.rb
+++ b/app/models/machine.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 # Machine is an hardware equipment hosted in the fablab that is available for reservation to the members
-class Machine < ActiveRecord::Base
+class Machine < ApplicationRecord
   extend FriendlyId
   friendly_id :name, use: :slugged
 
diff --git a/app/models/machines_availability.rb b/app/models/machines_availability.rb
index 31db2b1a4..fa59e9679 100644
--- a/app/models/machines_availability.rb
+++ b/app/models/machines_availability.rb
@@ -1,4 +1,4 @@
-class MachinesAvailability < ActiveRecord::Base
+class MachinesAvailability < ApplicationRecord
   belongs_to :machine
   belongs_to :availability
   after_destroy :cleanup_availability
diff --git a/app/models/notification.rb b/app/models/notification.rb
index 49b6a241b..e73d225e6 100644
--- a/app/models/notification.rb
+++ b/app/models/notification.rb
@@ -1,4 +1,4 @@
-class Notification < ActiveRecord::Base
+class Notification < ApplicationRecord
   include NotifyWith::Notification
 
   def get_meta_data(key)
diff --git a/app/models/o_auth2_mapping.rb b/app/models/o_auth2_mapping.rb
index 933925c2b..5821cef06 100644
--- a/app/models/o_auth2_mapping.rb
+++ b/app/models/o_auth2_mapping.rb
@@ -1,3 +1,3 @@
-class OAuth2Mapping < ActiveRecord::Base
+class OAuth2Mapping < ApplicationRecord
   belongs_to :o_auth2_provider
 end
diff --git a/app/models/o_auth2_provider.rb b/app/models/o_auth2_provider.rb
index 6e918bfb4..027dc3f84 100644
--- a/app/models/o_auth2_provider.rb
+++ b/app/models/o_auth2_provider.rb
@@ -1,4 +1,4 @@
-class OAuth2Provider < ActiveRecord::Base
+class OAuth2Provider < ApplicationRecord
   has_one :auth_provider, as: :providable
   has_many :o_auth2_mappings, dependent: :destroy
   accepts_nested_attributes_for :o_auth2_mappings, allow_destroy: true
diff --git a/app/models/offer_day.rb b/app/models/offer_day.rb
index 6f9c18f75..b2f4d3e82 100644
--- a/app/models/offer_day.rb
+++ b/app/models/offer_day.rb
@@ -1,4 +1,4 @@
-class OfferDay < ActiveRecord::Base
+class OfferDay < ApplicationRecord
   include NotifyWith::NotificationAttachedObject
 
   has_many :invoices, as: :invoiced, dependent: :destroy
diff --git a/app/models/open_api/calls_count_tracing.rb b/app/models/open_api/calls_count_tracing.rb
index c460e06f4..4b6a3a79b 100644
--- a/app/models/open_api/calls_count_tracing.rb
+++ b/app/models/open_api/calls_count_tracing.rb
@@ -1,4 +1,4 @@
-class OpenAPI::CallsCountTracing < ActiveRecord::Base
+class OpenAPI::CallsCountTracing < ApplicationRecord
   belongs_to :client, foreign_key: :open_api_client_id
   validates :client, :at, presence: true
 end
diff --git a/app/models/open_api/client.rb b/app/models/open_api/client.rb
index 05d248335..2dc2bf231 100644
--- a/app/models/open_api/client.rb
+++ b/app/models/open_api/client.rb
@@ -1,4 +1,4 @@
-class OpenAPI::Client < ActiveRecord::Base
+class OpenAPI::Client < ApplicationRecord
   has_many :calls_count_tracings, foreign_key: :open_api_client_id, dependent: :destroy
   has_secure_token
   validates :name, presence: true
diff --git a/app/models/organization.rb b/app/models/organization.rb
index 1c21f4fed..9b8f19f15 100644
--- a/app/models/organization.rb
+++ b/app/models/organization.rb
@@ -1,4 +1,4 @@
-class Organization < ActiveRecord::Base
+class Organization < ApplicationRecord
   belongs_to :profile
   belongs_to :invoicing_profile
   has_one :address, as: :placeable, dependent: :destroy
diff --git a/app/models/plan.rb b/app/models/plan.rb
index a4d1b0d7a..4e19c7eb1 100644
--- a/app/models/plan.rb
+++ b/app/models/plan.rb
@@ -2,7 +2,7 @@
 
 # Plan is a generic description of a subscription plan, which can be subscribed by a member to benefit from advantageous prices.
 # Subscribers can also get some Credits for some reservable items
-class Plan < ActiveRecord::Base
+class Plan < ApplicationRecord
   belongs_to :group
 
   has_many :credits, dependent: :destroy
diff --git a/app/models/plans_availability.rb b/app/models/plans_availability.rb
index baa30c111..c35d9e5ff 100644
--- a/app/models/plans_availability.rb
+++ b/app/models/plans_availability.rb
@@ -1,6 +1,6 @@
 # frozen_string_literal: true
 
-class PlansAvailability < ActiveRecord::Base
+class PlansAvailability < ApplicationRecord
   belongs_to :plan
   belongs_to :availability
 end
diff --git a/app/models/price.rb b/app/models/price.rb
index fb2dade11..4164c12d4 100644
--- a/app/models/price.rb
+++ b/app/models/price.rb
@@ -2,7 +2,7 @@
 
 # Store customized price for various items (Machine, Space), depending on the group and on the plan
 # Also provides a static helper method to compute the price details of a shopping cart
-class Price < ActiveRecord::Base
+class Price < ApplicationRecord
   belongs_to :group
   belongs_to :plan
   belongs_to :priceable, polymorphic: true
diff --git a/app/models/price_category.rb b/app/models/price_category.rb
index 62036d790..ae94a6bff 100644
--- a/app/models/price_category.rb
+++ b/app/models/price_category.rb
@@ -1,4 +1,4 @@
-class PriceCategory < ActiveRecord::Base
+class PriceCategory < ApplicationRecord
   has_many :event_price_category
   has_many :events, through: :event_price_categories
 
diff --git a/app/models/profile.rb b/app/models/profile.rb
index 09699a453..47030775f 100644
--- a/app/models/profile.rb
+++ b/app/models/profile.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 # Personal data attached to an user (like first_name, date of birth, etc.)
-class Profile < ActiveRecord::Base
+class Profile < ApplicationRecord
   belongs_to :user
   has_one :user_avatar, as: :viewable, dependent: :destroy
   accepts_nested_attributes_for :user_avatar,
diff --git a/app/models/project.rb b/app/models/project.rb
index 395eca909..c3ad73f78 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -2,7 +2,7 @@
 
 # Project is the documentation about an object built by a fab-user
 # It can describe the steps taken by the fab-user to build his object, provide photos, description, attached CAO files, etc.
-class Project < ActiveRecord::Base
+class Project < ApplicationRecord
   include AASM
   include NotifyWith::NotificationAttachedObject
   include OpenlabSync
diff --git a/app/models/project_step.rb b/app/models/project_step.rb
index eee123c0c..6e7b738e5 100644
--- a/app/models/project_step.rb
+++ b/app/models/project_step.rb
@@ -1,4 +1,4 @@
-class ProjectStep < ActiveRecord::Base
+class ProjectStep < ApplicationRecord
   belongs_to :project
   has_many :project_step_images, as: :viewable, dependent: :destroy
   accepts_nested_attributes_for :project_step_images, allow_destroy: true, reject_if: :all_blank
diff --git a/app/models/project_user.rb b/app/models/project_user.rb
index fc973afd1..238f15283 100644
--- a/app/models/project_user.rb
+++ b/app/models/project_user.rb
@@ -1,4 +1,4 @@
-class ProjectUser < ActiveRecord::Base
+class ProjectUser < ApplicationRecord
   include NotifyWith::NotificationAttachedObject
 
   belongs_to :project
diff --git a/app/models/reservation.rb b/app/models/reservation.rb
index d95c8060e..39ac4f5dd 100644
--- a/app/models/reservation.rb
+++ b/app/models/reservation.rb
@@ -1,6 +1,6 @@
 # frozen_string_literal: true
 
-class Reservation < ActiveRecord::Base
+class Reservation < ApplicationRecord
   include NotifyWith::NotificationAttachedObject
 
   belongs_to :statistic_profile
diff --git a/app/models/role.rb b/app/models/role.rb
index d82c7e694..88d1531d7 100644
--- a/app/models/role.rb
+++ b/app/models/role.rb
@@ -1,4 +1,4 @@
-class Role < ActiveRecord::Base
+class Role < ApplicationRecord
   has_and_belongs_to_many :users, join_table: 'users_roles'
   belongs_to :resource, polymorphic: true
 
diff --git a/app/models/setting.rb b/app/models/setting.rb
index 2fe9e39a0..7923e21ca 100644
--- a/app/models/setting.rb
+++ b/app/models/setting.rb
@@ -4,7 +4,7 @@
 # For some settings, changing them will involve some callback actions (like rebuilding the stylesheets if the theme color Setting is changed).
 # A full history of the previous values is kept in database with the date and the author of the change
 # after_update callback is handled by SettingService
-class Setting < ActiveRecord::Base
+class Setting < ApplicationRecord
   has_many :history_values
   validates :name, inclusion:
                     { in: %w[about_title
diff --git a/app/models/slot.rb b/app/models/slot.rb
index 964c3ac24..3aad0c948 100644
--- a/app/models/slot.rb
+++ b/app/models/slot.rb
@@ -3,7 +3,7 @@
 # Time range of duration defined by ApplicationHelper::SLOT_DURATION, slicing an Availability.
 # During a slot a Reservation is possible
 # Only reserved slots are persisted in DB, others are instanciated on the fly
-class Slot < ActiveRecord::Base
+class Slot < ApplicationRecord
   include NotifyWith::NotificationAttachedObject
 
   has_many :slots_reservations, dependent: :destroy
diff --git a/app/models/slots_reservation.rb b/app/models/slots_reservation.rb
index fdac26e2d..7dcbbd00c 100644
--- a/app/models/slots_reservation.rb
+++ b/app/models/slots_reservation.rb
@@ -1,4 +1,4 @@
-class SlotsReservation < ActiveRecord::Base
+class SlotsReservation < ApplicationRecord
   belongs_to :slot
   belongs_to :reservation
   after_destroy :cleanup_slots
diff --git a/app/models/space.rb b/app/models/space.rb
index dd5b03d15..4d04c3acf 100644
--- a/app/models/space.rb
+++ b/app/models/space.rb
@@ -1,4 +1,4 @@
-class Space < ActiveRecord::Base
+class Space < ApplicationRecord
   extend FriendlyId
   friendly_id :name, use: :slugged
 
diff --git a/app/models/spaces_availability.rb b/app/models/spaces_availability.rb
index 570e38b87..8d6e5db7a 100644
--- a/app/models/spaces_availability.rb
+++ b/app/models/spaces_availability.rb
@@ -1,4 +1,4 @@
-class SpacesAvailability < ActiveRecord::Base
+class SpacesAvailability < ApplicationRecord
   belongs_to :space
   belongs_to :availability
   after_destroy :cleanup_availability
diff --git a/app/models/statistic_custom_aggregation.rb b/app/models/statistic_custom_aggregation.rb
index 8abc66704..2e69b0522 100644
--- a/app/models/statistic_custom_aggregation.rb
+++ b/app/models/statistic_custom_aggregation.rb
@@ -1,3 +1,3 @@
-class StatisticCustomAggregation < ActiveRecord::Base
+class StatisticCustomAggregation < ApplicationRecord
   belongs_to :statistic_type
 end
diff --git a/app/models/statistic_field.rb b/app/models/statistic_field.rb
index b4c37da4b..3daba6c21 100644
--- a/app/models/statistic_field.rb
+++ b/app/models/statistic_field.rb
@@ -1,3 +1,3 @@
-class StatisticField < ActiveRecord::Base
+class StatisticField < ApplicationRecord
   has_one :statistic_index
 end
diff --git a/app/models/statistic_graph.rb b/app/models/statistic_graph.rb
index 0a46996cb..f1ff52b39 100644
--- a/app/models/statistic_graph.rb
+++ b/app/models/statistic_graph.rb
@@ -1,3 +1,3 @@
-class StatisticGraph < ActiveRecord::Base
+class StatisticGraph < ApplicationRecord
   belongs_to :statistic_index
 end
diff --git a/app/models/statistic_index.rb b/app/models/statistic_index.rb
index c491b428d..df5c1fe6e 100644
--- a/app/models/statistic_index.rb
+++ b/app/models/statistic_index.rb
@@ -1,4 +1,4 @@
-class StatisticIndex < ActiveRecord::Base
+class StatisticIndex < ApplicationRecord
   has_many :statistic_types
   has_many :statistic_fields
   has_one :statistic_graph
diff --git a/app/models/statistic_profile.rb b/app/models/statistic_profile.rb
index 599208b68..d27389a79 100644
--- a/app/models/statistic_profile.rb
+++ b/app/models/statistic_profile.rb
@@ -6,7 +6,7 @@ AVG_DAYS_PER_YEAR = 365.2425
 # GDPR requires that an user can delete his account at any time but we need to keep the statistics original data to being able to
 # rebuild them at any time.
 # The data will be kept even if the user is deleted, but it will be unlinked from the user's account (ie. anonymized)
-class StatisticProfile < ActiveRecord::Base
+class StatisticProfile < ApplicationRecord
   belongs_to :user
   belongs_to :group
   belongs_to :role
diff --git a/app/models/statistic_profile_training.rb b/app/models/statistic_profile_training.rb
index 167c42cc7..d0364fea8 100644
--- a/app/models/statistic_profile_training.rb
+++ b/app/models/statistic_profile_training.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 # Stores trainings validated per user (non validated trainings are only recorded in reservations)
-class StatisticProfileTraining < ActiveRecord::Base
+class StatisticProfileTraining < ApplicationRecord
   include NotifyWith::NotificationAttachedObject
 
   belongs_to :statistic_profile
diff --git a/app/models/statistic_sub_type.rb b/app/models/statistic_sub_type.rb
index bed0465cd..c9317f5af 100644
--- a/app/models/statistic_sub_type.rb
+++ b/app/models/statistic_sub_type.rb
@@ -1,4 +1,4 @@
-class StatisticSubType < ActiveRecord::Base
+class StatisticSubType < ApplicationRecord
   has_many :statistic_type_sub_types, dependent: :destroy
   has_many :statistic_types, through: :statistic_type_sub_types
 end
diff --git a/app/models/statistic_type.rb b/app/models/statistic_type.rb
index 47909d644..58a016ae8 100644
--- a/app/models/statistic_type.rb
+++ b/app/models/statistic_type.rb
@@ -1,4 +1,4 @@
-class StatisticType < ActiveRecord::Base
+class StatisticType < ApplicationRecord
   has_one :statistic_index
   has_many :statistic_type_sub_types
   has_many :statistic_sub_types, through: :statistic_type_sub_types
diff --git a/app/models/statistic_type_sub_type.rb b/app/models/statistic_type_sub_type.rb
index 66d1efc60..c39bc1e3c 100644
--- a/app/models/statistic_type_sub_type.rb
+++ b/app/models/statistic_type_sub_type.rb
@@ -1,4 +1,4 @@
-class StatisticTypeSubType < ActiveRecord::Base
+class StatisticTypeSubType < ApplicationRecord
   belongs_to :statistic_type
   belongs_to :statistic_sub_type
 end
diff --git a/app/models/stylesheet.rb b/app/models/stylesheet.rb
index 1576be93a..aceeab8de 100644
--- a/app/models/stylesheet.rb
+++ b/app/models/stylesheet.rb
@@ -3,7 +3,7 @@
 # Stylesheet is a cached CSS file that allows to easily customize the interface of Fab-manager with some configurable colors and
 # a picture for the background of the user's profile.
 # There's only one stylesheet record in the database, which is updated on each colour change.
-class Stylesheet < ActiveRecord::Base
+class Stylesheet < ApplicationRecord
   validates_presence_of :contents
 
   ## ===== THEME =====
diff --git a/app/models/subscription.rb b/app/models/subscription.rb
index 10a4afb20..0bc6e93c3 100644
--- a/app/models/subscription.rb
+++ b/app/models/subscription.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 # Subscription is an active or archived subscription of an User to a Plan
-class Subscription < ActiveRecord::Base
+class Subscription < ApplicationRecord
   include NotifyWith::NotificationAttachedObject
 
   belongs_to :plan
diff --git a/app/models/tag.rb b/app/models/tag.rb
index b8fbd17a6..1fc6a82fe 100644
--- a/app/models/tag.rb
+++ b/app/models/tag.rb
@@ -1,4 +1,4 @@
-class Tag < ActiveRecord::Base
+class Tag < ApplicationRecord
   has_many :user_tags, dependent: :destroy
   has_many :users, through: :user_tags
 
diff --git a/app/models/theme.rb b/app/models/theme.rb
index bf16b1542..ca70f8568 100644
--- a/app/models/theme.rb
+++ b/app/models/theme.rb
@@ -1,4 +1,4 @@
-class Theme < ActiveRecord::Base
+class Theme < ApplicationRecord
   has_and_belongs_to_many :projects, join_table: :projects_themes
   validates :name, presence: true, length: { maximum: 80 }
 end
\ No newline at end of file
diff --git a/app/models/ticket.rb b/app/models/ticket.rb
index f98dae596..5351e9804 100644
--- a/app/models/ticket.rb
+++ b/app/models/ticket.rb
@@ -1,4 +1,4 @@
-class Ticket < ActiveRecord::Base
+class Ticket < ApplicationRecord
   belongs_to :reservation
   belongs_to :event_price_category
 
diff --git a/app/models/training.rb b/app/models/training.rb
index b92bf0af5..8bf724d4f 100644
--- a/app/models/training.rb
+++ b/app/models/training.rb
@@ -1,4 +1,4 @@
-class Training < ActiveRecord::Base
+class Training < ApplicationRecord
   extend FriendlyId
   friendly_id :name, use: :slugged
 
diff --git a/app/models/trainings_availability.rb b/app/models/trainings_availability.rb
index d027d0577..fd648465f 100644
--- a/app/models/trainings_availability.rb
+++ b/app/models/trainings_availability.rb
@@ -1,4 +1,4 @@
-class TrainingsAvailability < ActiveRecord::Base
+class TrainingsAvailability < ApplicationRecord
   belongs_to :training
   belongs_to :availability
   after_destroy :cleanup_availability
diff --git a/app/models/trainings_pricing.rb b/app/models/trainings_pricing.rb
index 0fc0af8e7..14e1146aa 100644
--- a/app/models/trainings_pricing.rb
+++ b/app/models/trainings_pricing.rb
@@ -1,4 +1,4 @@
-class TrainingsPricing < ActiveRecord::Base
+class TrainingsPricing < ApplicationRecord
   belongs_to :training
   belongs_to :group
 
diff --git a/app/models/user.rb b/app/models/user.rb
index 899f14b58..9be7b4efb 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -2,7 +2,7 @@
 
 # User is a physical or moral person with its authentication parameters
 # It is linked to the Profile model with hold informations about this person (like address, name, etc.)
-class User < ActiveRecord::Base
+class User < ApplicationRecord
   include NotifyWith::NotificationReceiver
   include NotifyWith::NotificationAttachedObject
   # Include default devise modules. Others available are:
diff --git a/app/models/user_tag.rb b/app/models/user_tag.rb
index eebb02295..cc2ef37c8 100644
--- a/app/models/user_tag.rb
+++ b/app/models/user_tag.rb
@@ -1,4 +1,4 @@
-class UserTag < ActiveRecord::Base
+class UserTag < ApplicationRecord
   belongs_to :user
   belongs_to :tag
 end
diff --git a/app/models/users_credit.rb b/app/models/users_credit.rb
index a0a41381e..f1b804dbb 100644
--- a/app/models/users_credit.rb
+++ b/app/models/users_credit.rb
@@ -1,4 +1,4 @@
-class UsersCredit < ActiveRecord::Base
+class UsersCredit < ApplicationRecord
   belongs_to :user
   belongs_to :credit
 
diff --git a/app/models/wallet.rb b/app/models/wallet.rb
index fdc419416..3ff32dffa 100644
--- a/app/models/wallet.rb
+++ b/app/models/wallet.rb
@@ -3,7 +3,7 @@
 # user's virtual wallet which can be credited by an admin
 # all subsequent user's transactions will charge the wallet, as the default payment mean, if the wallet amount > 0
 # if the wallet amount is not sufficient, a secondary payment mean will be requested (card or cash, depending on the login context)
-class Wallet < ActiveRecord::Base
+class Wallet < ApplicationRecord
   include AmountConcern
 
   belongs_to :invoicing_profile
diff --git a/app/models/wallet_transaction.rb b/app/models/wallet_transaction.rb
index 2fef76657..ba071b33f 100644
--- a/app/models/wallet_transaction.rb
+++ b/app/models/wallet_transaction.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 # track of all transactions payed using the given wallet
-class WalletTransaction < ActiveRecord::Base
+class WalletTransaction < ApplicationRecord
   include AmountConcern
 
   belongs_to :invoicing_profile
diff --git a/doc/sso_authentication.md b/doc/sso_authentication.md
index 835c313fa..68f299b0c 100644
--- a/doc/sso_authentication.md
+++ b/doc/sso_authentication.md
@@ -31,7 +31,7 @@ rails g model LdapMapping ldap_provider:belongs_to local_field:string local_mode
 Complete the Provider Model ( **app/model/ldap_provider.rb** )
 
 ```ruby
-class LdapProvider < ActiveRecord::Base
+class LdapProvider < ApplicationRecord
   has_one :auth_provider, as: :providable
   has_many :ldap_mappings, dependent: :destroy
   accepts_nested_attributes_for :ldap_mappings, allow_destroy: true

From 5ed1880adaa60355b153019f337819880c3e6bf6 Mon Sep 17 00:00:00 2001
From: Sylvain 
Date: Wed, 25 Mar 2020 10:17:48 +0100
Subject: [PATCH 053/109] fix stylesheets fixtures

---
 test/fixtures/stylesheets.yml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/test/fixtures/stylesheets.yml b/test/fixtures/stylesheets.yml
index 9dac239f7..9c299633c 100644
--- a/test/fixtures/stylesheets.yml
+++ b/test/fixtures/stylesheets.yml
@@ -35,5 +35,11 @@ stylesheet_1:
          .pricing-panel .cta-button .btn:hover, .pricing-panel .cta-button .custom-invoice .modal-body .elements li:hover, .custom-invoice .modal-body .elements .pricing-panel .cta-button li:hover { background-color: #ffdd00 !important; }
          a.label:hover, .form-control.form-control-ui-select .select2-choices a.select2-search-choice:hover, a.label:focus, .form-control.form-control-ui-select .select2-choices a.select2-search-choice:focus { color: #cb1117; }
          .about-picture { background: linear-gradient( rgba(255,255,255,0.12), rgba(255,255,255,0.13) ), linear-gradient( rgba(203, 17, 23, 0.78), rgba(203, 17, 23, 0.82) ), url('/about-fablab.jpg') no-repeat; }
+  name: theme
   created_at: 2016-04-04 14:11:34.712927000 Z
   updated_at: 2016-04-04 14:11:34.712927000 Z
+
+stylesheet_2:
+  id: 2
+  contents: ".home-page { }"
+  name: home_page
\ No newline at end of file

From 553759bc901bd691a8ecd2c815b24050e9e19ec4 Mon Sep 17 00:00:00 2001
From: Sylvain 
Date: Wed, 25 Mar 2020 10:41:19 +0100
Subject: [PATCH 054/109] fix fixtures

---
 test/fixtures/history_values.yml | 28 ++++++++++++++++++++++++++++
 test/fixtures/settings.yml       |  8 +++++++-
 test/fixtures/stylesheets.yml    |  4 ++++
 3 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/test/fixtures/history_values.yml b/test/fixtures/history_values.yml
index 00685c3f0..b1bcc1aab 100644
--- a/test/fixtures/history_values.yml
+++ b/test/fixtures/history_values.yml
@@ -556,3 +556,31 @@ value_history_59:
   created_at: 2019-09-20 11:02:32.125400000 Z
   updated_at: 2019-09-20 11:02:32.125400000 Z
   footprint:
+
+value_history_60:
+  id: 60
+  setting_id: 60
+  invoicing_profile_id: 1
+  value: |-
+    
+
+
#{I18n.t('app.admin.settings.item_news')}
+
+
+
+
#{I18n.t('app.admin.settings.item_projects')}
+
+
+
#{I18n.t('app.admin.settings.item_twitter')}
+
#{I18n.t('app.admin.settings.item_members')}
+
+
+
+
+
#{I18n.t('app.admin.settings.item_events')}
+
+
+
+ created_at: 2020-03-25 09:24:09.016676894 Z + updated_at: 2020-03-25 09:24:09.016676894 Z + footprint: diff --git a/test/fixtures/settings.yml b/test/fixtures/settings.yml index 9c884726f..0264f52e5 100644 --- a/test/fixtures/settings.yml +++ b/test/fixtures/settings.yml @@ -345,4 +345,10 @@ setting_59: id: 59 name: accounting_Space_label created_at: 2019-09-20 11:02:32.125400000 Z - updated_at: 2019-09-20 11:02:32.125400000 Z \ No newline at end of file + updated_at: 2019-09-20 11:02:32.125400000 Z + +setting_60: + id: 60 + name: home_content + created_at: 2020-03-25 09:21:35.200795784 Z + updated_at: 2020-03-25 09:21:35.200795784 Z \ No newline at end of file diff --git a/test/fixtures/stylesheets.yml b/test/fixtures/stylesheets.yml index 9c299633c..182cefe56 100644 --- a/test/fixtures/stylesheets.yml +++ b/test/fixtures/stylesheets.yml @@ -35,6 +35,10 @@ stylesheet_1: .pricing-panel .cta-button .btn:hover, .pricing-panel .cta-button .custom-invoice .modal-body .elements li:hover, .custom-invoice .modal-body .elements .pricing-panel .cta-button li:hover { background-color: #ffdd00 !important; } a.label:hover, .form-control.form-control-ui-select .select2-choices a.select2-search-choice:hover, a.label:focus, .form-control.form-control-ui-select .select2-choices a.select2-search-choice:focus { color: #cb1117; } .about-picture { background: linear-gradient( rgba(255,255,255,0.12), rgba(255,255,255,0.13) ), linear-gradient( rgba(203, 17, 23, 0.78), rgba(203, 17, 23, 0.82) ), url('/about-fablab.jpg') no-repeat; } + .social-icons > div:hover { background-color: #ffdd00; } + .profile-top { background: linear-gradient( rgba(255,255,255,0.12), rgba(255,255,255,0.13) ), linear-gradient(rgba(203, 17, 23, 0.78), rgba(203, 17, 23, 0.82) ), url('/about-fablab.jpg') no-repeat; } + .profile-top .social-links a:hover { background-color: #ffdd00 !important; border-color: #ffdd00 !important; } + section#cookies-modal div.cookies-consent .cookies-actions button.accept { background-color: #ffdd00; } name: theme created_at: 2016-04-04 14:11:34.712927000 Z updated_at: 2016-04-04 14:11:34.712927000 Z From b052cc9057f75108b8511f48e040b17fc80a5756 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 25 Mar 2020 11:29:09 +0100 Subject: [PATCH 055/109] updated compass-core to fix deprecations --- CHANGELOG.md | 1 + Gemfile | 4 ++++ Gemfile.lock | 31 +++++++++++++++++++------------ 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7587c44f2..87d4d9987 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Updated translations - Updated angular-translate - Updated eslint +- Updated compass-rails & compass-core - Renamed production documentation - Syntax improvements in scss files - Fix a bug: invalid translation keys in closing accounting period interface diff --git a/Gemfile b/Gemfile index 66ab9e6f9..4cbb44ff1 100644 --- a/Gemfile +++ b/Gemfile @@ -2,6 +2,10 @@ source 'https://rubygems.org' +git 'https://github.com/judynjagi/compass.git', branch: 'stable' do + gem 'compass-core' +end + gem 'compass-rails', '3.1.0' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.1.7' diff --git a/Gemfile.lock b/Gemfile.lock index 5b6b7acb5..81f156d7e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,21 @@ +GIT + remote: https://github.com/judynjagi/compass.git + revision: 1692c0a7fd8ada392ad5f524bef756ab74e300d0 + branch: stable + specs: + compass (1.0.3) + chunky_png (~> 1.2) + compass-core (~> 1.0.2) + compass-import-once (~> 1.0.5) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + sass (>= 3.3.13, < 3.5) + compass-core (1.0.2) + multi_json (~> 1.0) + sass (>= 3.3.0, < 3.5) + compass-import-once (1.0.5) + sass (>= 3.2, < 3.5) + GEM remote: https://rubygems.org/ specs: @@ -85,18 +103,6 @@ GEM cldr-plurals-runtime-rb (1.0.1) coercible (1.0.0) descendants_tracker (~> 0.0.1) - compass (1.0.3) - chunky_png (~> 1.2) - compass-core (~> 1.0.2) - compass-import-once (~> 1.0.5) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) - sass (>= 3.3.13, < 3.5) - compass-core (1.0.3) - multi_json (~> 1.0) - sass (>= 3.3.0, < 3.5) - compass-import-once (1.0.5) - sass (>= 3.2, < 3.5) compass-rails (3.1.0) compass (~> 1.0.0) sass-rails (< 5.1) @@ -457,6 +463,7 @@ DEPENDENCIES caxlsx caxlsx_rails chroma + compass-core! compass-rails (= 3.1.0) coveralls database_cleaner From 3d34fd7261b59ea7b405c44e7294714d404bd139 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 25 Mar 2020 11:42:49 +0100 Subject: [PATCH 056/109] Removed `MESSAGEFORMAT_LOCALE` as it is now handled by make-plural --- CHANGELOG.md | 1 + app/views/application/index.html.erb | 1 - config/application.yml.default | 1 - config/initializers/assets.rb | 1 - config/secrets.yml | 4 ---- doc/environment.md | 7 ------- env.example | 1 - setup/env.example | 1 - setup/setup.sh | 2 +- 9 files changed, 2 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87d4d9987..4512a739b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - Docker build will no longer embed development dependencies - Updated instructions to setup a development environment - Updated translations +- Removed `MESSAGEFORMAT_LOCALE` as it is now handled by make-plural - Updated angular-translate - Updated eslint - Updated compass-rails & compass-core diff --git a/app/views/application/index.html.erb b/app/views/application/index.html.erb index d8ab4e02e..3c6efd282 100644 --- a/app/views/application/index.html.erb +++ b/app/views/application/index.html.erb @@ -139,7 +139,6 @@ - <% if Rails.env.staging? && Rails.application.secrets.enable_in_context_translation %> <% end %> diff --git a/config/application.yml.default b/config/application.yml.default index 83d64de33..c897a115b 100644 --- a/config/application.yml.default +++ b/config/application.yml.default @@ -69,7 +69,6 @@ APP_LOCALE: 'fr' MOMENT_LOCALE: 'fr' SUMMERNOTE_LOCALE: 'fr-FR' ANGULAR_LOCALE: 'fr-fr' -MESSAGEFORMAT_LOCALE: 'fr' FULLCALENDAR_LOCALE: 'fr' ELASTICSEARCH_LANGUAGE_ANALYZER: 'french' diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 23ba0d052..e90e44416 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -35,6 +35,5 @@ Rails.application.config.assets.precompile += %w[ angular-i18n/angular-locale_*.js moment/locale/*.js summernote/lang/*.js - messageformat/locale/*.js fullcalendar/dist/lang/*.js ] diff --git a/config/secrets.yml b/config/secrets.yml index ab37bf8e2..4324d057b 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -39,7 +39,6 @@ development: moment_locale: <%= ENV["MOMENT_LOCALE"] %> summernote_locale: <%= ENV["SUMMERNOTE_LOCALE"] %> angular_locale: <%= ENV["ANGULAR_LOCALE"] %> - messageformat_locale: <%= ENV["MESSAGEFORMAT_LOCALE"] %> fullcalendar_locale: <%= ENV["FULLCALENDAR_LOCALE"] %> elasticsearch_language_analyzer: <%= ENV["ELASTICSEARCH_LANGUAGE_ANALYZER"] %> openlab_app_secret: <%= ENV["OPENLAB_APP_SECRET"] %> @@ -88,7 +87,6 @@ test: moment_locale: en summernote_locale: en-US angular_locale: en-us - messageformat_locale: en fullcalendar_locale: en elasticsearch_language_analyzer: french openlab_app_secret: @@ -145,7 +143,6 @@ staging: moment_locale: <%= ENV["MOMENT_LOCALE"] %> summernote_locale: <%= ENV["SUMMERNOTE_LOCALE"] %> angular_locale: <%= ENV["ANGULAR_LOCALE"] %> - messageformat_locale: <%= ENV["MESSAGEFORMAT_LOCALE"] %> fullcalendar_locale: <%= ENV["FULLCALENDAR_LOCALE"] %> elasticsearch_language_analyzer: <%= ENV["ELASTICSEARCH_LANGUAGE_ANALYZER"] %> openlab_app_secret: <%= ENV["OPENLAB_APP_SECRET"] %> @@ -206,7 +203,6 @@ production: moment_locale: <%= ENV["MOMENT_LOCALE"] %> summernote_locale: <%= ENV["SUMMERNOTE_LOCALE"] %> angular_locale: <%= ENV["ANGULAR_LOCALE"] %> - messageformat_locale: <%= ENV["MESSAGEFORMAT_LOCALE"] %> fullcalendar_locale: <%= ENV["FULLCALENDAR_LOCALE"] %> elasticsearch_language_analyzer: <%= ENV["ELASTICSEARCH_LANGUAGE_ANALYZER"] %> openlab_app_secret: <%= ENV["OPENLAB_APP_SECRET"] %> diff --git a/doc/environment.md b/doc/environment.md index 6fd008ec2..e85b3143d 100644 --- a/doc/environment.md +++ b/doc/environment.md @@ -312,13 +312,6 @@ Please, be aware that **the configured locale will imply the CURRENCY displayed _Eg.: configuring **fr-fr** will set the currency symbol to **€** but **fr-ca** will set **$** as currency symbol, so setting the `ANGULAR_LOCALE` to simple **fr** (without country indication) will probably not do what you expect._ See [code.angularjs.org/i18n/angular-locale_*.js](https://code.angularjs.org/1.6.10/i18n/) for a list of available locales. Default is **en**. - - - MESSAGEFORMAT_LOCALE - -Configure the messageformat.js library, used by angular-translate. - -See [github.com/messageformat/messageformat/locale/*.js](https://github.com/messageformat/messageformat/tree/v0.1.8/locale) for a list of available locales. FULLCALENDAR_LOCALE diff --git a/env.example b/env.example index f11006822..9891a3ac6 100644 --- a/env.example +++ b/env.example @@ -69,7 +69,6 @@ APP_LOCALE=fr MOMENT_LOCALE=fr SUMMERNOTE_LOCALE=fr-FR ANGULAR_LOCALE=fr-fr -MESSAGEFORMAT_LOCALE=fr FULLCALENDAR_LOCALE=fr ELASTICSEARCH_LANGUAGE_ANALYZER=french diff --git a/setup/env.example b/setup/env.example index a185b829f..786c7eac2 100644 --- a/setup/env.example +++ b/setup/env.example @@ -51,7 +51,6 @@ APP_LOCALE=fr MOMENT_LOCALE=fr SUMMERNOTE_LOCALE=fr-FR ANGULAR_LOCALE=fr-fr -MESSAGEFORMAT_LOCALE=fr FULLCALENDAR_LOCALE=fr ELASTICSEARCH_LANGUAGE_ANALYZER=french diff --git a/setup/setup.sh b/setup/setup.sh index 784a2ed26..f2983762e 100755 --- a/setup/setup.sh +++ b/setup/setup.sh @@ -224,7 +224,7 @@ configure_env_file() PHONE_REQUIRED BOOK_SLOT_AT_SAME_TIME USER_CONFIRMATION_NEEDED_TO_SIGN_IN EVENTS_IN_CALENDAR SLOT_DURATION DEFAULT_MAIL_FROM DELIVERY_METHOD DEFAULT_HOST DEFAULT_PROTOCOL SMTP_ADDRESS SMTP_PORT SMTP_USER_NAME SMTP_PASSWORD SMTP_AUTHENTICATION \ SMTP_ENABLE_STARTTLS_AUTO SMTP_OPENSSL_VERIFY_MODE SMTP_TLS GA_ID RECAPTCHA_SITE_KEY RECAPTCHA_SECRET_KEY DISQUS_SHORTNAME TWITTER_NAME \ FACEBOOK_APP_ID LOG_LEVEL ALLOWED_EXTENSIONS ALLOWED_MIME_TYPES MAX_IMAGE_SIZE MAX_CAO_SIZE MAX_IMPORT_SIZE DISK_SPACE_MB_ALERT FEATURE_TOUR_DISPLAY \ - SUPERADMIN_EMAIL APP_LOCALE RAILS_LOCALE MOMENT_LOCALE SUMMERNOTE_LOCALE ANGULAR_LOCALE MESSAGEFORMAT_LOCALE FULLCALENDAR_LOCALE ELASTICSEARCH_LANGUAGE_ANALYZER TIME_ZONE \ + SUPERADMIN_EMAIL APP_LOCALE RAILS_LOCALE MOMENT_LOCALE SUMMERNOTE_LOCALE ANGULAR_LOCALE FULLCALENDAR_LOCALE ELASTICSEARCH_LANGUAGE_ANALYZER TIME_ZONE \ WEEK_STARTING_DAY D3_DATE_FORMAT UIB_DATE_FORMAT EXCEL_DATE_FORMAT OPENLAB_APP_ID OPENLAB_APP_SECRET OPENLAB_DEFAULT) for variable in "${variables[@]}"; do local var_doc current From e046f9823f85f070d67fa58a63b86cddc43f30e2 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 25 Mar 2020 15:04:29 +0100 Subject: [PATCH 057/109] fix fixtures --- test/fixtures/history_values.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/fixtures/history_values.yml b/test/fixtures/history_values.yml index b1bcc1aab..8215e9c52 100644 --- a/test/fixtures/history_values.yml +++ b/test/fixtures/history_values.yml @@ -564,20 +564,20 @@ value_history_60: value: |-
-
#{I18n.t('app.admin.settings.item_news')}
+
News
-
#{I18n.t('app.admin.settings.item_projects')}
+
Projects
-
#{I18n.t('app.admin.settings.item_twitter')}
-
#{I18n.t('app.admin.settings.item_members')}
+
Last tweet
+
Last members
-
#{I18n.t('app.admin.settings.item_events')}
+
Next events
From 68cb4fc5cfe3e41c4f41016006a53e02e6d8c8e0 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 25 Mar 2020 15:05:50 +0100 Subject: [PATCH 058/109] updated twitter feed --- test/fixtures/history_values.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fixtures/history_values.yml b/test/fixtures/history_values.yml index 8215e9c52..d149519a4 100644 --- a/test/fixtures/history_values.yml +++ b/test/fixtures/history_values.yml @@ -42,7 +42,7 @@ value_history_4: id: 4 setting_id: 4 invoicing_profile_id: 1 - value: fablabgrenoble + value: fab_manager created_at: 2018-12-17 11:23:01.572468000 Z updated_at: 2018-12-17 11:23:01.572468000 Z footprint: c9c1ae97e6f6cf1363f5d942419534c8f729752fa6c0d389b441caad9a7dbbc3 From 68b88274992edc9ddf952581d53938f0341e8b87 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 25 Mar 2020 16:49:13 +0100 Subject: [PATCH 059/109] removed unused PlanImage --- app/models/plan.rb | 1 - app/models/plan_image.rb | 4 -- app/uploaders/plan_image_uploader.rb | 62 ---------------------------- 3 files changed, 67 deletions(-) delete mode 100644 app/models/plan_image.rb delete mode 100644 app/uploaders/plan_image_uploader.rb diff --git a/app/models/plan.rb b/app/models/plan.rb index 4e19c7eb1..cdb99e49c 100644 --- a/app/models/plan.rb +++ b/app/models/plan.rb @@ -10,7 +10,6 @@ class Plan < ApplicationRecord has_many :machine_credits, -> { where(creditable_type: 'Machine') }, class_name: 'Credit' has_many :space_credits, -> { where(creditable_type: 'Space') }, class_name: 'Credit' has_many :subscriptions - has_one :plan_image, as: :viewable, dependent: :destroy has_one :plan_file, as: :viewable, dependent: :destroy has_many :prices, dependent: :destroy diff --git a/app/models/plan_image.rb b/app/models/plan_image.rb deleted file mode 100644 index 24962b1fb..000000000 --- a/app/models/plan_image.rb +++ /dev/null @@ -1,4 +0,0 @@ -class PlanImage < Asset - include ImageValidatorConcern - mount_uploader :attachment, PlanImageUploader -end diff --git a/app/uploaders/plan_image_uploader.rb b/app/uploaders/plan_image_uploader.rb deleted file mode 100644 index 2e283b4f4..000000000 --- a/app/uploaders/plan_image_uploader.rb +++ /dev/null @@ -1,62 +0,0 @@ -class PlanImageUploader < CarrierWave::Uploader::Base - # Include RMagick or MiniMagick support: - # include CarrierWave::RMagick - include CarrierWave::MiniMagick - include UploadHelper - - # Choose what kind of storage to use for this uploader: - storage :file - after :remove, :delete_empty_dirs - # storage :fog - - # Override the directory where uploaded files will be stored. - # This is a sensible default for uploaders that are meant to be mounted: - - def store_dir - "#{base_store_dir}/#{model.id}" - end - - def base_store_dir - "uploads/#{model.class.to_s.underscore}" - end - - # Provide a default URL as a default if there hasn't been a file uploaded: - # def default_url - # # For Rails 3.1+ asset pipeline compatibility: - # # ActionController::Base.helpers.asset_path("fallback/" + [version_name, "default.png"].compact.join('_')) - # - # "/images/fallback/" + [version_name, "default.png"].compact.join('_') - # end - - # Process files as they are uploaded: - # process :scale => [200, 300] - # - # def scale(width, height) - # # do something - # end - - # Create different versions of your uploaded files: - version :normal do - process :resize_to_fit => [140, 140] - end - - version :small do - process :resize_to_fit => [80, 80] - end - - version :tiny do - process :resize_to_fit => [40, 40] - end - - # Add a white list of extensions which are allowed to be uploaded. - # For images you might use something like this: - def extension_white_list - %w(jpg jpeg gif png) - end - - # Override the filename of the uploaded files: - # Avoid using model.id or version_name here, see uploader/store.rb for details. - def filename - "#{model.class.to_s.underscore}.#{file.extension}" if original_filename - end -end From d33c6c0d3018e67375b38d3683694ad8977466b5 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 25 Mar 2020 17:45:53 +0100 Subject: [PATCH 060/109] documented all models until StatisticField + fixes halting callback chains via returning false + improved some code --- app/models/address.rb | 3 +++ app/models/age_range.rb | 3 +++ app/models/auth_provider.rb | 1 + app/models/availability_tag.rb | 4 ++++ app/models/category.rb | 4 ++++ app/models/component.rb | 3 +++ app/models/credit.rb | 3 +++ app/models/custom_asset_file.rb | 3 +++ app/models/database_provider.rb | 4 ++++ app/models/event.rb | 3 +++ app/models/event_file.rb | 2 +- app/models/event_image.rb | 3 +++ app/models/event_price_category.rb | 6 +++++- app/models/event_theme.rb | 7 +++++-- app/models/invoice_item.rb | 2 +- app/models/licence.rb | 3 +++ app/models/machine.rb | 2 +- app/models/machine_file.rb | 4 ++++ app/models/machine_image.rb | 3 +++ app/models/machines_availability.rb | 14 +++++++++----- app/models/notification.rb | 3 +++ app/models/notification_type.rb | 3 +++ app/models/o_auth2_mapping.rb | 4 ++++ app/models/o_auth2_provider.rb | 4 ++++ app/models/offer_day.rb | 3 +++ app/models/open_api.rb | 3 +++ app/models/organization.rb | 4 ++++ app/models/plan_file.rb | 4 ++++ app/models/plans_availability.rb | 2 ++ app/models/price.rb | 20 ++++++++++---------- app/models/price_category.rb | 14 ++++++++++---- app/models/project_cao.rb | 2 +- app/models/project_step.rb | 3 +++ app/models/project_step_image.rb | 2 +- app/models/project_user.rb | 10 ++++++++-- app/models/reservation.rb | 3 +++ app/models/role.rb | 4 ++++ app/models/slot.rb | 2 +- app/models/slots_reservation.rb | 9 ++++++--- app/models/space.rb | 5 +++++ app/models/space_file.rb | 3 +++ app/models/space_image.rb | 2 ++ app/models/spaces_availability.rb | 10 +++++++--- app/models/statistic_custom_aggregation.rb | 5 +++++ 44 files changed, 165 insertions(+), 36 deletions(-) diff --git a/app/models/address.rb b/app/models/address.rb index 70f3b207c..080a6fe4a 100644 --- a/app/models/address.rb +++ b/app/models/address.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# Address is a database record that can be placed on a map. class Address < ApplicationRecord belongs_to :placeable, polymorphic: true end diff --git a/app/models/age_range.rb b/app/models/age_range.rb index b831d160e..31e8738ff 100644 --- a/app/models/age_range.rb +++ b/app/models/age_range.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# AgeRange is an optional filter used to categorize Events class AgeRange < ApplicationRecord extend FriendlyId friendly_id :name, use: :slugged diff --git a/app/models/auth_provider.rb b/app/models/auth_provider.rb index 56f18fa24..8ec142979 100644 --- a/app/models/auth_provider.rb +++ b/app/models/auth_provider.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true +# AuthProvider is a configuration record, storing parameters of an external Single-Sign On server class AuthProvider < ApplicationRecord # this is a simple stub used for database creation & configuration class SimpleAuthProvider < Object diff --git a/app/models/availability_tag.rb b/app/models/availability_tag.rb index 7ef0d7f76..3f368d16f 100644 --- a/app/models/availability_tag.rb +++ b/app/models/availability_tag.rb @@ -1,3 +1,7 @@ +# frozen_string_literal: true + +# Abuse is a relation table between Availability and Tag. +# Associating a Tag to an Availability restrict it for reservation to users with the same Tag. class AvailabilityTag < ApplicationRecord belongs_to :availability belongs_to :tag diff --git a/app/models/category.rb b/app/models/category.rb index 8848a0209..57e132569 100644 --- a/app/models/category.rb +++ b/app/models/category.rb @@ -1,3 +1,7 @@ +# frozen_string_literal: true + +# Category is a first-level filter, used to categorize Events. +# It is mandatory to choose a Category when creating an event. class Category < ApplicationRecord extend FriendlyId friendly_id :name, use: :slugged diff --git a/app/models/component.rb b/app/models/component.rb index 867e49db0..7477b47c6 100644 --- a/app/models/component.rb +++ b/app/models/component.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# Component is a material that can be used in Projects. class Component < ApplicationRecord has_and_belongs_to_many :projects, join_table: 'projects_components' validates :name, presence: true, length: { maximum: 50 } diff --git a/app/models/credit.rb b/app/models/credit.rb index fbd1bd8a7..6ff66d63d 100644 --- a/app/models/credit.rb +++ b/app/models/credit.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# Credit is a way to offer free reservations for subscribing members. class Credit < ApplicationRecord belongs_to :creditable, polymorphic: true belongs_to :plan diff --git a/app/models/custom_asset_file.rb b/app/models/custom_asset_file.rb index 34127283b..0506deddc 100644 --- a/app/models/custom_asset_file.rb +++ b/app/models/custom_asset_file.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# CustomAssetFile is a file stored on the file system, associated with a CustomAsset. class CustomAssetFile < Asset mount_uploader :attachment, CustomAssetsUploader end diff --git a/app/models/database_provider.rb b/app/models/database_provider.rb index 33dcb77b3..6c4c9fb95 100644 --- a/app/models/database_provider.rb +++ b/app/models/database_provider.rb @@ -1,3 +1,7 @@ +# frozen_string_literal: true + +# DatabaseProvider is a special type of AuthProvider which provides the default app authentication method. +# This method uses Devise and the local database. class DatabaseProvider < ApplicationRecord has_one :auth_provider, as: :providable, dependent: :destroy diff --git a/app/models/event.rb b/app/models/event.rb index 6e0fd0c1d..2e5a251c2 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# Event is an happening organized by the Fablab about a general topic, which does not involve Machines or trainings member's skills. class Event < ApplicationRecord include NotifyWith::NotificationAttachedObject include ApplicationHelper diff --git a/app/models/event_file.rb b/app/models/event_file.rb index 34d788366..9f51d11de 100644 --- a/app/models/event_file.rb +++ b/app/models/event_file.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Event PDF attachements +# EventFile is a PDF attachment for Events class EventFile < Asset mount_uploader :attachment, EventFileUploader diff --git a/app/models/event_image.rb b/app/models/event_image.rb index cd658fed2..66c83c6d4 100644 --- a/app/models/event_image.rb +++ b/app/models/event_image.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# EventImage is the main picture for an Events. class EventImage < Asset include ImageValidatorConcern mount_uploader :attachment, EventImageUploader diff --git a/app/models/event_price_category.rb b/app/models/event_price_category.rb index 756cf8a3d..13a51c672 100644 --- a/app/models/event_price_category.rb +++ b/app/models/event_price_category.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# EventPriceCategory is the relation table between Event and PriceCategory. class EventPriceCategory < ApplicationRecord belongs_to :event belongs_to :price_category @@ -10,8 +13,9 @@ class EventPriceCategory < ApplicationRecord before_destroy :verify_no_associated_tickets protected + def verify_no_associated_tickets - tickets.count == 0 + throw(:abort) if tickets.count.zero? end end diff --git a/app/models/event_theme.rb b/app/models/event_theme.rb index 216af975a..9c960d7be 100644 --- a/app/models/event_theme.rb +++ b/app/models/event_theme.rb @@ -1,11 +1,14 @@ +# frozen_string_literal: true + +# EventTheme is an optional filter used to categorize Events class EventTheme < ApplicationRecord extend FriendlyId friendly_id :name, use: :slugged - has_and_belongs_to_many :events, join_table: :events_event_themes, dependent: :destroy + has_and_belongs_to_many :events, join_table: 'events_event_themes', dependent: :destroy def safe_destroy - if self.events.count == 0 + if events.count.zero? destroy else false diff --git a/app/models/invoice_item.rb b/app/models/invoice_item.rb index ea1db81da..54b4f45a6 100644 --- a/app/models/invoice_item.rb +++ b/app/models/invoice_item.rb @@ -7,7 +7,7 @@ class InvoiceItem < ApplicationRecord belongs_to :invoice belongs_to :subscription - has_one :invoice_item # to associated invoice_items of an invoice to invoice_items of an avoir + has_one :invoice_item # associates invoice_items of an invoice to invoice_items of an Avoir after_create :chain_record after_update :log_changes diff --git a/app/models/licence.rb b/app/models/licence.rb index e3eb5514e..7925e966a 100644 --- a/app/models/licence.rb +++ b/app/models/licence.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# Licence is an agreement about intellectual property that can be used in Projects. class Licence < ApplicationRecord has_many :projects diff --git a/app/models/machine.rb b/app/models/machine.rb index f272b5f43..0f86af708 100644 --- a/app/models/machine.rb +++ b/app/models/machine.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Machine is an hardware equipment hosted in the fablab that is available for reservation to the members +# Machine is an hardware equipment hosted in the Fablab that is available for reservation to the members class Machine < ApplicationRecord extend FriendlyId friendly_id :name, use: :slugged diff --git a/app/models/machine_file.rb b/app/models/machine_file.rb index 5a78b0d9b..767158f0d 100644 --- a/app/models/machine_file.rb +++ b/app/models/machine_file.rb @@ -1,3 +1,7 @@ +# frozen_string_literal: true + +# MachineFile is a file stored on the file system, associated with a Machine. +# It is known as an attachment for a space, in the user interface. class MachineFile < Asset mount_uploader :attachment, MachineFileUploader end diff --git a/app/models/machine_image.rb b/app/models/machine_image.rb index 101cfd339..c44559f4b 100644 --- a/app/models/machine_image.rb +++ b/app/models/machine_image.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# MachineImage is the main picture for a Machine class MachineImage < Asset mount_uploader :attachment, MachineImageUploader end diff --git a/app/models/machines_availability.rb b/app/models/machines_availability.rb index fa59e9679..0d61ec698 100644 --- a/app/models/machines_availability.rb +++ b/app/models/machines_availability.rb @@ -1,3 +1,7 @@ +# frozen_string_literal: true + +# MachinesAvailability is the relation table between a Machine and an Availability. +# It defines periods in the agenda, when the given machine can be reserved by members. class MachinesAvailability < ApplicationRecord belongs_to :machine belongs_to :availability @@ -7,10 +11,10 @@ class MachinesAvailability < ApplicationRecord # availability if the deleted machine was the last of this availability slot, and the availability is not # currently being destroyed. def cleanup_availability - unless availability.destroying - if availability.machines_availabilities.size == 0 - availability.safe_destroy - end - end + return if availability.destroying + + return unless availability.machines_availabilities.empty? + + availability.safe_destroy end end diff --git a/app/models/notification.rb b/app/models/notification.rb index e73d225e6..c2ac344db 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# Notification is an in-system alert that is shown to a specific user until it is marked as read. class Notification < ApplicationRecord include NotifyWith::Notification diff --git a/app/models/notification_type.rb b/app/models/notification_type.rb index 45efb7ae3..6b01b9104 100644 --- a/app/models/notification_type.rb +++ b/app/models/notification_type.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# NotificationType defines the different types of Notification. class NotificationType include NotifyWith::NotificationType diff --git a/app/models/o_auth2_mapping.rb b/app/models/o_auth2_mapping.rb index 5821cef06..6f097dea7 100644 --- a/app/models/o_auth2_mapping.rb +++ b/app/models/o_auth2_mapping.rb @@ -1,3 +1,7 @@ +# frozen_string_literal: true + +# OAuth2Mapping defines a database field, saving user's data, that is mapped to an external API, that is authorized +# through an external SSO of type oAuth 2 class OAuth2Mapping < ApplicationRecord belongs_to :o_auth2_provider end diff --git a/app/models/o_auth2_provider.rb b/app/models/o_auth2_provider.rb index 027dc3f84..99b6edd86 100644 --- a/app/models/o_auth2_provider.rb +++ b/app/models/o_auth2_provider.rb @@ -1,3 +1,7 @@ +# frozen_string_literal: true + +# OAuth2Provider is a special type of AuthProvider which provides authentication through an external SSO server using +# the oAuth 2.0 protocol. class OAuth2Provider < ApplicationRecord has_one :auth_provider, as: :providable has_many :o_auth2_mappings, dependent: :destroy diff --git a/app/models/offer_day.rb b/app/models/offer_day.rb index b2f4d3e82..5e9d07a7b 100644 --- a/app/models/offer_day.rb +++ b/app/models/offer_day.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# OfferDay provides a way for admins to extend the subscription of a member for free. class OfferDay < ApplicationRecord include NotifyWith::NotificationAttachedObject diff --git a/app/models/open_api.rb b/app/models/open_api.rb index 1e18b02f2..d2de9dc12 100644 --- a/app/models/open_api.rb +++ b/app/models/open_api.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# OpenAPI provides an way for external apps to use Fab-manager's data through a REST API. module OpenAPI def self.table_name_prefix 'open_api_' diff --git a/app/models/organization.rb b/app/models/organization.rb index 9b8f19f15..ade34b4c7 100644 --- a/app/models/organization.rb +++ b/app/models/organization.rb @@ -1,3 +1,7 @@ +# frozen_string_literal: true + +# Organization is a special attribute for a member, used to mark him as corporation or a non-profit organization. +# This is mainly used for invoicing. class Organization < ApplicationRecord belongs_to :profile belongs_to :invoicing_profile diff --git a/app/models/plan_file.rb b/app/models/plan_file.rb index 1dc896995..33178c1ab 100644 --- a/app/models/plan_file.rb +++ b/app/models/plan_file.rb @@ -1,3 +1,7 @@ +# frozen_string_literal: true + +# PlanFile is a file stored on the file system, associated with a Plan. +# It is known as an information sheet for a plan, in the user interface. class PlanFile < Asset mount_uploader :attachment, PlanFileUploader end diff --git a/app/models/plans_availability.rb b/app/models/plans_availability.rb index c35d9e5ff..eb0e996ef 100644 --- a/app/models/plans_availability.rb +++ b/app/models/plans_availability.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +# PlansAvailability is the relation table between a Plan and an Availability. +# An Availability which is associated with a Plan can only be booked by members having subscribed to this Plan. class PlansAvailability < ApplicationRecord belongs_to :plan belongs_to :availability diff --git a/app/models/price.rb b/app/models/price.rb index 4164c12d4..7132fd2dd 100644 --- a/app/models/price.rb +++ b/app/models/price.rb @@ -29,16 +29,16 @@ class Price < ApplicationRecord all_elements[:slots] = [] # initialize Plan - if user.subscribed_plan - plan = user.subscribed_plan - new_plan_being_bought = false - elsif plan_id - plan = Plan.find(plan_id) - new_plan_being_bought = true - else - plan = nil - new_plan_being_bought = false - end + plan = if user.subscribed_plan + new_plan_being_bought = false + user.subscribed_plan + elsif plan_id + new_plan_being_bought = true + Plan.find(plan_id) + else + new_plan_being_bought = false + nil + end # === compute reservation price === diff --git a/app/models/price_category.rb b/app/models/price_category.rb index ae94a6bff..5273f40c3 100644 --- a/app/models/price_category.rb +++ b/app/models/price_category.rb @@ -1,13 +1,19 @@ +# frozen_string_literal: true + +# PriceCategory is a way to segment prices for an Event. +# By default, each Events have a standard price but you may want, for example, to define a reduced fare for students, +# and another reduced fare for children under 8. Each of these prices are defined in an EventPriceCategory. +# You can choose to use each PriceCategory or not, for each Event you create. class PriceCategory < ApplicationRecord has_many :event_price_category has_many :events, through: :event_price_categories - validates :name, :presence => true - validates :name, uniqueness: {case_sensitive: false} - validates :conditions, :presence => true + validates :name, presence: true + validates :name, uniqueness: { case_sensitive: false } + validates :conditions, presence: true def safe_destroy - if event_price_category.count == 0 + if event_price_category.count.zero? destroy else false diff --git a/app/models/project_cao.rb b/app/models/project_cao.rb index b2fd80b0c..0878d3d77 100644 --- a/app/models/project_cao.rb +++ b/app/models/project_cao.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# CAO file attached to a project documentation +# CAD file attached to a project documentation class ProjectCao < Asset mount_uploader :attachment, ProjectCaoUploader diff --git a/app/models/project_step.rb b/app/models/project_step.rb index 6e7b738e5..ca0b52ade 100644 --- a/app/models/project_step.rb +++ b/app/models/project_step.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# ProjectStep is a detail in the documentation of a Project. class ProjectStep < ApplicationRecord belongs_to :project has_many :project_step_images, as: :viewable, dependent: :destroy diff --git a/app/models/project_step_image.rb b/app/models/project_step_image.rb index b1bb4ea4b..871708c13 100644 --- a/app/models/project_step_image.rb +++ b/app/models/project_step_image.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Images for the documentation of a project step +# Images for the documentation of a ProjectStep class ProjectStepImage < Asset include ImageValidatorConcern mount_uploader :attachment, ProjectImageUploader diff --git a/app/models/project_user.rb b/app/models/project_user.rb index 238f15283..06ccab3c5 100644 --- a/app/models/project_user.rb +++ b/app/models/project_user.rb @@ -1,3 +1,7 @@ +# frozen_string_literal: true + +# ProjectUser is the relation table between a Project and an User. +# Users are collaborators to a Project, with write access if they have confirmed their participation. class ProjectUser < ApplicationRecord include NotifyWith::NotificationAttachedObject @@ -9,10 +13,12 @@ class ProjectUser < ApplicationRecord after_update :notify_project_author_when_collaborator_valid, if: :saved_change_to_is_valid? private + def generate_valid_token - begin + loop do self.valid_token = SecureRandom.hex - end while self.class.exists?(valid_token: valid_token) + break unless self.class.exists?(valid_token: valid_token) + end end def notify_project_collaborator_to_valid diff --git a/app/models/reservation.rb b/app/models/reservation.rb index 39ac4f5dd..cd9ff8d76 100644 --- a/app/models/reservation.rb +++ b/app/models/reservation.rb @@ -1,5 +1,8 @@ # frozen_string_literal: true +# Reservation is a Slot or a Ticket booked by a member. +# Slots are for Machine, Space and Training reservations. +# Tickets are for Event reservations. class Reservation < ApplicationRecord include NotifyWith::NotificationAttachedObject diff --git a/app/models/role.rb b/app/models/role.rb index 88d1531d7..6a88bee27 100644 --- a/app/models/role.rb +++ b/app/models/role.rb @@ -1,3 +1,7 @@ +# frozen_string_literal: true + +# Role is a authorization level for users in the application. +# Currently, possible roles are: admin or member class Role < ApplicationRecord has_and_belongs_to_many :users, join_table: 'users_roles' belongs_to :resource, polymorphic: true diff --git a/app/models/slot.rb b/app/models/slot.rb index 3aad0c948..b44e30775 100644 --- a/app/models/slot.rb +++ b/app/models/slot.rb @@ -2,7 +2,7 @@ # Time range of duration defined by ApplicationHelper::SLOT_DURATION, slicing an Availability. # During a slot a Reservation is possible -# Only reserved slots are persisted in DB, others are instanciated on the fly +# Only reserved slots are persisted in DB, others are instantiated on the fly class Slot < ApplicationRecord include NotifyWith::NotificationAttachedObject diff --git a/app/models/slots_reservation.rb b/app/models/slots_reservation.rb index 7dcbbd00c..ab339e6d9 100644 --- a/app/models/slots_reservation.rb +++ b/app/models/slots_reservation.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# SlotsReservation is the relation table between a Slot and a Reservation. class SlotsReservation < ApplicationRecord belongs_to :slot belongs_to :reservation @@ -6,8 +9,8 @@ class SlotsReservation < ApplicationRecord # when the SlotsReservation is deleted (from Reservation destroy cascade), we delete the # corresponding slot def cleanup_slots - unless slot.destroying - slot.destroy - end + return unless slot.destroying + + slot.destroy end end diff --git a/app/models/space.rb b/app/models/space.rb index 4d04c3acf..fabb7be98 100644 --- a/app/models/space.rb +++ b/app/models/space.rb @@ -1,3 +1,8 @@ +# frozen_string_literal: true + +# Space is a reservable item that can be booked by multiple people on the same Slot. +# It represents a physical place, in the Fablab, like a meeting room where multiple people will be able to work at +# the same time. class Space < ApplicationRecord extend FriendlyId friendly_id :name, use: :slugged diff --git a/app/models/space_file.rb b/app/models/space_file.rb index d8f100698..e0543ff0a 100644 --- a/app/models/space_file.rb +++ b/app/models/space_file.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# SpaceFile is a file stored on the file system, associated with a Space. class SpaceFile < Asset mount_uploader :attachment, SpaceFileUploader end diff --git a/app/models/space_image.rb b/app/models/space_image.rb index 65089575b..5d08bbfdb 100644 --- a/app/models/space_image.rb +++ b/app/models/space_image.rb @@ -1,4 +1,6 @@ +# frozen_string_literal: true +# SpaceImage is the main picture for a Space class SpaceImage < Asset mount_uploader :attachment, SpaceImageUploader end \ No newline at end of file diff --git a/app/models/spaces_availability.rb b/app/models/spaces_availability.rb index 8d6e5db7a..edc062d84 100644 --- a/app/models/spaces_availability.rb +++ b/app/models/spaces_availability.rb @@ -1,3 +1,7 @@ +# frozen_string_literal: true + +# SpacesAvailability is the relation table between a Space and an Availability. +# It defines periods in the agenda, when the given space can be reserved by members. class SpacesAvailability < ApplicationRecord belongs_to :space belongs_to :availability @@ -7,8 +11,8 @@ class SpacesAvailability < ApplicationRecord # availability. We don't use 'dependent: destroy' as we need to prevent conflicts if the destroy came from # the Availability destroy cascade. def cleanup_availability - unless availability.destroying - availability.safe_destroy - end + return unless availability.destroying + + availability.safe_destroy end end diff --git a/app/models/statistic_custom_aggregation.rb b/app/models/statistic_custom_aggregation.rb index 2e69b0522..09bc623de 100644 --- a/app/models/statistic_custom_aggregation.rb +++ b/app/models/statistic_custom_aggregation.rb @@ -1,3 +1,8 @@ +# frozen_string_literal: true + +# StatisticCustomAggregation is an ElasticSearch aggregation that will run when the end-user is browsing the statistics +# page for the related statisticType. +# See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html class StatisticCustomAggregation < ApplicationRecord belongs_to :statistic_type end From 83f1e9039bc701b3ffd16e2e37848cd83cdd2268 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 25 Mar 2020 17:50:57 +0100 Subject: [PATCH 061/109] revert new_framwork_defaults --- config/initializers/new_framework_defaults.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb index 61448a3c4..9fa84bbea 100644 --- a/config/initializers/new_framework_defaults.rb +++ b/config/initializers/new_framework_defaults.rb @@ -8,6 +8,9 @@ # # Read the Guide for Upgrading Ruby on Rails for more info on each option. +# DEPRECATION WARNING: raise_on_unfiltered_parameters is deprecated and has no effect in Rails 5.1. +Rails.application.config.action_controller.raise_on_unfiltered_parameters = true + # Enable per-form CSRF tokens. Previous versions had false. Rails.application.config.action_controller.per_form_csrf_tokens = false @@ -20,3 +23,7 @@ ActiveSupport.to_time_preserves_timezone = false # Require `belongs_to` associations by default. Previous versions had false. Rails.application.config.active_record.belongs_to_required_by_default = false + +# DEPRECATION WARNING: ActiveSupport.halt_callback_chains_on_return_false= is deprecated and will be removed in Rails 5.2. +# Do not halt callback chains when a callback returns false. Previous versions had true. +ActiveSupport.halt_callback_chains_on_return_false = true From d74790e3da5a9b98efa43084d4c67ce8fa3af801 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 25 Mar 2020 17:58:53 +0100 Subject: [PATCH 062/109] use rails instead of rake --- doc/development_readme.md | 16 ++++++++-------- doc/elastic_upgrade.md | 6 +++--- doc/environment.md | 8 ++++---- doc/production_readme.md | 4 ++-- doc/sso_with_github.md | 8 ++++---- doc/virtual-machine.md | 12 ++++++------ docker/database.yml | 2 +- lib/tasks/fablab/setup.rake | 2 +- 8 files changed, 29 insertions(+), 29 deletions(-) diff --git a/doc/development_readme.md b/doc/development_readme.md index 47e8cf8c2..84a2b2d94 100644 --- a/doc/development_readme.md +++ b/doc/development_readme.md @@ -112,19 +112,19 @@ This procedure is not easy to follow so if you don't need to write some code for ``` 13. Build the databases. - > **⚠ Warning**: **DO NOT** run `rake db:setup` instead of these commands, as this will not run some required raw SQL instructions. + > **⚠ Warning**: **DO NOT** run `rails db:setup` instead of these commands, as this will not run some required raw SQL instructions. > **🛈 Please note**: Your password length must be between 8 and 128 characters, otherwise db:seed will be rejected. This is configured in [config/initializers/devise.rb](config/initializers/devise.rb) ```bash # for dev - rake db:create - rake db:migrate - ADMIN_EMAIL='youradminemail' ADMIN_PASSWORD='youradminpassword' rake db:seed - rake fablab:es:build_stats + rails db:create + rails db:migrate + ADMIN_EMAIL='youradminemail' ADMIN_PASSWORD='youradminpassword' rails db:seed + rails fablab:es:build_stats # for tests - RAILS_ENV=test rake db:create - RAILS_ENV=test rake db:migrate + RAILS_ENV=test rails db:create + RAILS_ENV=test rails db:migrate ``` 14. Create the pids folder used by Sidekiq. If you want to use a different location, you can configure it in `config/sidekiq.yml` @@ -170,7 +170,7 @@ If the scheduled task wasn't executed for any reason (eg. you are in a dev envir ```bash # Here for the 50 last days -rake fablab:es:generate_stats[50] +rails fablab:es:generate_stats[50] ``` diff --git a/doc/elastic_upgrade.md b/doc/elastic_upgrade.md index ceb62b652..274de5190 100644 --- a/doc/elastic_upgrade.md +++ b/doc/elastic_upgrade.md @@ -147,7 +147,7 @@ Copy [elasticsearch.yml](../docker/elasticsearch.yml) and [log4j2.properties](.. Finally reindex your data: ```bash -rake fablab:es:build_stats -rake fablab:es:generate_stats[3000] -rake fablab:es:build_projects_index +rails fablab:es:build_stats +rails fablab:es:generate_stats[3000] +rails fablab:es:build_projects_index ``` diff --git a/doc/environment.md b/doc/environment.md index e85b3143d..3179dd29c 100644 --- a/doc/environment.md +++ b/doc/environment.md @@ -50,7 +50,7 @@ When using docker-compose, you should provide the name of the service in your [d Used by the authentication system to generate random tokens, eg. for resetting passwords. Used by Rails to verify the integrity of signed cookies. -You can generate such a random key by running `rake secret`. +You can generate such a random key by running `rails secret`. STRIPE_API_KEY & STRIPE_PUBLISHABLE_KEY @@ -60,7 +60,7 @@ Retrieve them from https://dashboard.stripe.com/account/apikeys. **MANDATORY**: Even if you don't want to charge your customers, you must fill this settings. For this purpose, you can use a stripe account in test mode, which will provide you test keys. -If you change these keys during the application lifecycle, you must run `rake fablab:stripe:sync_members`, otherwise your users won't be able to do card payments. +If you change these keys during the application lifecycle, you must run `rails fablab:stripe:sync_members`, otherwise your users won't be able to do card payments. STRIPE_CURRENCY @@ -239,7 +239,7 @@ The check will run every weeks and if the threshold is exceeded, an alert will b ADMIN_EMAIL, ADMIN_PASSWORD Credentials for the first admin user created when seeding the project. -By default, theses variables are not present in application.yml because they are only used once, when running the database seed with the command `rake db:seed`. +By default, theses variables are not present in application.yml because they are only used once, when running the database seed with the command `rails db:seed`. SUPERADMIN_EMAIL @@ -329,7 +329,7 @@ See [ElasticSearch guide](https://www.elastic.co/guide/en/elasticsearch/referenc TIME_ZONE -In Rails: set Time.zone default to the specified zone and make Active Record auto-convert to this zone. Run `rake time:zones:all` for a list of available time zone names. +In Rails: set Time.zone default to the specified zone and make Active Record auto-convert to this zone. Run `rails time:zones:all` for a list of available time zone names. Default is **UTC**. diff --git a/doc/production_readme.md b/doc/production_readme.md index 6a031d055..7b12fc3af 100644 --- a/doc/production_readme.md +++ b/doc/production_readme.md @@ -137,7 +137,7 @@ docker-compose restart nginx ``` - Example of command passing env variables ```bash -docker-compose run --rm -e ADMIN_EMAIL=xxx -e ADMIN_PASSWORD=xxx fabmanager bundle exec rake db:seed +docker-compose run --rm -e ADMIN_EMAIL=xxx -e ADMIN_PASSWORD=xxx fabmanager bundle exec rails db:seed ``` ## Update Fab-manager @@ -170,7 +170,7 @@ You can subscribe to [this atom feed](https://github.com/sleede/fab-manager/rele 5. compile new assets - `docker-compose run --rm fabmanager bundle exec rake assets:precompile` + `docker-compose run --rm fabmanager bundle exec rails assets:precompile` 6. run specific commands diff --git a/doc/sso_with_github.md b/doc/sso_with_github.md index 5275b91f4..ee61dcf76 100644 --- a/doc/sso_with_github.md +++ b/doc/sso_with_github.md @@ -54,14 +54,14 @@ For this guide, we will use [GitHub](https://developer.github.com/v3/oauth/) as ```bash # replace GitHub with the name of the provider you just created -rake fablab:auth:switch_provider[GitHub] +rails fablab:auth:switch_provider[GitHub] ``` - As the command just prompted you, you have to re-compile the assets - - In development, `rake tmp:clear` will do the job. - - In production with Docker, `rm -rf public/assets`, followed by `docker-compose run --rm fabmanager bundle exec rake assets:precompile` + - In development, `rails tmp:clear` will do the job. + - In production with Docker, `rm -rf public/assets`, followed by `docker-compose run --rm fabmanager bundle exec rails assets:precompile` - Then restart the web-server or the container. - Finally, to notify all existing users about the change (and send them their migration code/link), run: ```bash -rake fablab:auth:notify_changed +rails fablab:auth:notify_changed ``` diff --git a/doc/virtual-machine.md b/doc/virtual-machine.md index 9bbf1b63d..ca01359eb 100644 --- a/doc/virtual-machine.md +++ b/doc/virtual-machine.md @@ -50,14 +50,14 @@ the host can provide but will usually be much more slower than a production envi included in the migrations. Password minimal length is 8 characters): ```bash - rake db:create - rake db:migrate + rails db:create + rails db:migrate # Be sure not to use the default values below in production - ADMIN_EMAIL='admin@email' ADMIN_PASSWORD='adminpass' rake db:seed - rake fablab:es:build_stats + ADMIN_EMAIL='admin@email' ADMIN_PASSWORD='adminpass' rails db:seed + rails fablab:es:build_stats # for tests - RAILS_ENV=test rake db:create - RAILS_ENV=test rake db:migrate + RAILS_ENV=test rails db:create + RAILS_ENV=test rails db:migrate ``` 8. Start the application and visit `localhost:3000` on your browser to check that it works: diff --git a/docker/database.yml b/docker/database.yml index ab1dcb5c0..b5a319899 100644 --- a/docker/database.yml +++ b/docker/database.yml @@ -14,7 +14,7 @@ development: database: fablab_development # Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". +# re-generated from your development database when you run "rails". # Do not set this db to the same as development or production. test: <<: *default diff --git a/lib/tasks/fablab/setup.rake b/lib/tasks/fablab/setup.rake index f017aa80a..86f34c554 100644 --- a/lib/tasks/fablab/setup.rake +++ b/lib/tasks/fablab/setup.rake @@ -59,7 +59,7 @@ namespace :fablab do desc 'add missing VAT rate to history' task :add_vat_rate, %i[rate date] => :environment do |_task, args| - raise 'Missing argument. Usage exemple: rake fablab:setup:add_vat_rate[20,2014-01-01]. Use 0 to disable' unless args.rate && args.date + raise 'Missing argument. Usage exemple: rails fablab:setup:add_vat_rate[20,2014-01-01]. Use 0 to disable' unless args.rate && args.date if args.rate == '0' setting = Setting.find_by(name: 'invoice_VAT-active') From f9837747f6fafeeac442253fc76094d9a9c155f6 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 30 Mar 2020 10:59:11 +0200 Subject: [PATCH 063/109] fix running tests --- scripts/run-tests.sh | 8 ++++---- test/integration/abuses_test.rb | 2 ++ test/models/price_category_test.rb | 2 +- test/test_helper.rb | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index 95245152a..ee14217e4 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash RAILS_ENV='test' bin/rails db:environment:set -RAILS_ENV='test' rake db:drop -RAILS_ENV='test' rake db:create -RAILS_ENV='test' rake db:migrate -RAILS_ENV='test' bundle exec rake test "$@" +RAILS_ENV='test' bin/rails db:drop +RAILS_ENV='test' bin/rails db:create +RAILS_ENV='test' bin/rails db:migrate +RAILS_ENV='test' bundle exec bin/rails test "$@" diff --git a/test/integration/abuses_test.rb b/test/integration/abuses_test.rb index 030145105..ed417032f 100644 --- a/test/integration/abuses_test.rb +++ b/test/integration/abuses_test.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'test_helper' + class AbusesTest < ActionDispatch::IntegrationTest # Called before every test method runs. Can be used # to set up fixture information. diff --git a/test/models/price_category_test.rb b/test/models/price_category_test.rb index 374b6a916..a41deaf46 100644 --- a/test/models/price_category_test.rb +++ b/test/models/price_category_test.rb @@ -2,7 +2,7 @@ require 'test_helper' class PriceCategoryTest < ActiveSupport::TestCase test 'price category name must be unique' do - pc = PriceCategory.new({name: '- DE 25 ANS', conditions: 'Tarif préférentiel pour les jeunes'}) + pc = PriceCategory.new(name: '- DE 25 ANS', conditions: 'Tarif préférentiel pour les jeunes') assert pc.invalid? assert pc.errors[:name].present? end diff --git a/test/test_helper.rb b/test/test_helper.rb index d1111775d..1258a3558 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -5,6 +5,7 @@ Coveralls.wear!('rails') ENV['RAILS_ENV'] ||= 'test' require File.expand_path('../config/environment', __dir__) +require 'action_dispatch' require 'rails/test_help' require 'vcr' require 'sidekiq/testing' From 02c101441223b103b6fe84ec220776551db4b874 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 30 Mar 2020 11:33:12 +0200 Subject: [PATCH 064/109] class documentation --- app/models/age_range.rb | 2 +- app/models/statistic_custom_aggregation.rb | 2 +- app/models/tag.rb | 3 +++ app/models/theme.rb | 3 +++ app/models/ticket.rb | 4 ++++ app/models/training.rb | 5 +++++ app/models/training_image.rb | 2 ++ app/models/trainings_availability.rb | 4 ++++ app/models/trainings_pricing.rb | 3 +++ app/models/user.rb | 2 +- app/models/user_avatar.rb | 3 +++ app/models/user_tag.rb | 4 ++++ app/models/users_credit.rb | 8 ++++++-- 13 files changed, 40 insertions(+), 5 deletions(-) diff --git a/app/models/age_range.rb b/app/models/age_range.rb index 31e8738ff..64df20ed6 100644 --- a/app/models/age_range.rb +++ b/app/models/age_range.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# AgeRange is an optional filter used to categorize Events +# AgeRange class AgeRange < ApplicationRecord extend FriendlyId friendly_id :name, use: :slugged diff --git a/app/models/statistic_custom_aggregation.rb b/app/models/statistic_custom_aggregation.rb index 09bc623de..4c6f45087 100644 --- a/app/models/statistic_custom_aggregation.rb +++ b/app/models/statistic_custom_aggregation.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # StatisticCustomAggregation is an ElasticSearch aggregation that will run when the end-user is browsing the statistics -# page for the related statisticType. +# page for the related StatisticType. # See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html class StatisticCustomAggregation < ApplicationRecord belongs_to :statistic_type diff --git a/app/models/tag.rb b/app/models/tag.rb index 1fc6a82fe..89a6f6957 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# Tag is a way to restrict an Availability for reservation to users with the same Tag. class Tag < ApplicationRecord has_many :user_tags, dependent: :destroy has_many :users, through: :user_tags diff --git a/app/models/theme.rb b/app/models/theme.rb index ca70f8568..c4813a1a4 100644 --- a/app/models/theme.rb +++ b/app/models/theme.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# Theme is an optional filter used to categorize Projects class Theme < ApplicationRecord has_and_belongs_to_many :projects, join_table: :projects_themes validates :name, presence: true, length: { maximum: 80 } diff --git a/app/models/ticket.rb b/app/models/ticket.rb index 5351e9804..2da7fa2a0 100644 --- a/app/models/ticket.rb +++ b/app/models/ticket.rb @@ -1,3 +1,7 @@ +# frozen_string_literal: true + +# Ticket is an reservation of a member for an Event, with a specific PriceCategory +# For example, Member John Smith smith has book 2 places on Event "Arduino initiation" at price "reduces fare" class Ticket < ApplicationRecord belongs_to :reservation belongs_to :event_price_category diff --git a/app/models/training.rb b/app/models/training.rb index 8bf724d4f..abb7a2c95 100644 --- a/app/models/training.rb +++ b/app/models/training.rb @@ -1,3 +1,8 @@ +# frozen_string_literal: true + +# Training is a course for members to acquire knowledge on a specific matter. +# Trainings are designed to be scheduled periodically through Availabilities. +# A Training can be a prerequisite before members can book a Machine. class Training < ApplicationRecord extend FriendlyId friendly_id :name, use: :slugged diff --git a/app/models/training_image.rb b/app/models/training_image.rb index f8b5909e0..f06397812 100644 --- a/app/models/training_image.rb +++ b/app/models/training_image.rb @@ -1,4 +1,6 @@ +# frozen_string_literal: true +# TrainingImage is the main picture for a Training class TrainingImage < Asset mount_uploader :attachment, TrainingImageUploader end \ No newline at end of file diff --git a/app/models/trainings_availability.rb b/app/models/trainings_availability.rb index fd648465f..3ccab5bd9 100644 --- a/app/models/trainings_availability.rb +++ b/app/models/trainings_availability.rb @@ -1,3 +1,7 @@ +# frozen_string_literal: true + +# TrainingsAvailability is the relation table between a Training and an Availability. +# Is is used to schedule a training session, for members to be able to book it. class TrainingsAvailability < ApplicationRecord belongs_to :training belongs_to :availability diff --git a/app/models/trainings_pricing.rb b/app/models/trainings_pricing.rb index 14e1146aa..689f8946e 100644 --- a/app/models/trainings_pricing.rb +++ b/app/models/trainings_pricing.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# TrainingsPricing configures the price of a Training session, per Group class TrainingsPricing < ApplicationRecord belongs_to :training belongs_to :group diff --git a/app/models/user.rb b/app/models/user.rb index 9be7b4efb..175ab6fc3 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # User is a physical or moral person with its authentication parameters -# It is linked to the Profile model with hold informations about this person (like address, name, etc.) +# It is linked to the Profile model with hold information about this person (like address, name, etc.) class User < ApplicationRecord include NotifyWith::NotificationReceiver include NotifyWith::NotificationAttachedObject diff --git a/app/models/user_avatar.rb b/app/models/user_avatar.rb index 0e172a01c..15e878841 100644 --- a/app/models/user_avatar.rb +++ b/app/models/user_avatar.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# UserAvatar is the profile picture for an User class UserAvatar < Asset include ImageValidatorConcern mount_uploader :attachment, ProfilImageUploader diff --git a/app/models/user_tag.rb b/app/models/user_tag.rb index cc2ef37c8..2740753ec 100644 --- a/app/models/user_tag.rb +++ b/app/models/user_tag.rb @@ -1,3 +1,7 @@ +# frozen_string_literal: true + +# UserTag is the relation table between a Tag and an User. +# Users with Tags, can book Availabilities associated with the same Tags. class UserTag < ApplicationRecord belongs_to :user belongs_to :tag diff --git a/app/models/users_credit.rb b/app/models/users_credit.rb index f1b804dbb..17a6019b9 100644 --- a/app/models/users_credit.rb +++ b/app/models/users_credit.rb @@ -1,7 +1,11 @@ +# frozen_string_literal: true + +# UserCredit is the relation table between a Credit and an User. +# It saves the consumed credits only class UsersCredit < ApplicationRecord belongs_to :user belongs_to :credit - belongs_to :training_credit, ->{ where('credits.creditable_type = ?', 'Training') }, foreign_key: 'credit_id', class_name: 'Credit' - belongs_to :machine_credit, ->{ where('credits.creditable_type = ?', 'Machine') }, foreign_key: 'credit_id', class_name: 'Credit' + belongs_to :training_credit, -> { where('credits.creditable_type = ?', 'Training') }, foreign_key: 'credit_id', class_name: 'Credit' + belongs_to :machine_credit, -> { where('credits.creditable_type = ?', 'Machine') }, foreign_key: 'credit_id', class_name: 'Credit' end From 3dc8d66c638df754134d43083692ccd5ef363189 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 30 Mar 2020 15:29:48 +0200 Subject: [PATCH 065/109] remove dead code of WebhooksController --- app/controllers/webhooks_controller.rb | 10 ---------- config/routes.rb | 2 -- 2 files changed, 12 deletions(-) delete mode 100644 app/controllers/webhooks_controller.rb diff --git a/app/controllers/webhooks_controller.rb b/app/controllers/webhooks_controller.rb deleted file mode 100644 index 6c29ad365..000000000 --- a/app/controllers/webhooks_controller.rb +++ /dev/null @@ -1,10 +0,0 @@ -class WebhooksController < ApplicationController - - protect_from_forgery :except => :create - - def create - # data_json = JSON.parse request.body.read - - render nothing: true - end -end diff --git a/config/routes.rb b/config/routes.rb index 302eebfe6..85da46c1c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -4,8 +4,6 @@ require 'sidekiq/web' require 'sidekiq/cron/web' Rails.application.routes.draw do - post 'webhooks' => 'webhooks#create' - if AuthProvider.active.providable_type == DatabaseProvider.name # with local authentification we do not use omniAuth so we must differentiate the config devise_for :users, controllers: { From 44f927d38e6cb25971eafb86620e94d5570d62f1 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 30 Mar 2020 15:32:14 +0200 Subject: [PATCH 066/109] fix typo --- config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index 85da46c1c..001f3a4d2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -5,7 +5,7 @@ require 'sidekiq/cron/web' Rails.application.routes.draw do if AuthProvider.active.providable_type == DatabaseProvider.name - # with local authentification we do not use omniAuth so we must differentiate the config + # with local authentication we do not use omniAuth so we must differentiate the config devise_for :users, controllers: { registrations: 'registrations', sessions: 'sessions', confirmations: 'confirmations', passwords: 'passwords' } From f9e18ca58004a4981caab64e16fb2768a21fd300 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 30 Mar 2020 16:17:32 +0200 Subject: [PATCH 067/109] removed dependency to discoutinued protected_attributes + fixed auth_provider --- app/models/auth_provider.rb | 4 +--- app/models/profile.rb | 2 +- app/models/user.rb | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/models/auth_provider.rb b/app/models/auth_provider.rb index 8ec142979..e5be9b285 100644 --- a/app/models/auth_provider.rb +++ b/app/models/auth_provider.rb @@ -17,12 +17,10 @@ class AuthProvider < ApplicationRecord belongs_to :providable, polymorphic: true, dependent: :destroy accepts_nested_attributes_for :providable - # add gem 'protected_attributes_continued' for Rails 5+ - # attr_accessible :name, :providable_type, :providable_attributes before_create :set_initial_state - def build_providable(params, _assignment_options) + def build_providable(params) raise "Unknown providable_type: #{providable_type}" unless PROVIDABLE_TYPES.include?(providable_type) self.providable = providable_type.constantize.new(params) diff --git a/app/models/profile.rb b/app/models/profile.rb index 47030775f..bea552509 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -28,7 +28,7 @@ class Profile < ApplicationRecord blacklist = %w[id user_id created_at updated_at] # model-relationships must be added manually additional = [%w[avatar string], %w[address string], %w[organization_name string], %w[organization_address string]] - Profile.column_types + Profile.columns_hash .map { |k, v| [k, v.type.to_s] } .delete_if { |col| blacklist.include?(col[0]) } .concat(additional) diff --git a/app/models/user.rb b/app/models/user.rb index 175ab6fc3..9f580e3e1 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -278,7 +278,7 @@ class User < ApplicationRecord sign_in_count current_sign_in_at last_sign_in_at current_sign_in_ip last_sign_in_ip confirmation_token confirmed_at confirmation_sent_at unconfirmed_email failed_attempts unlock_token locked_at created_at updated_at stp_customer_id slug provider auth_token merged_at] - User.column_types + User.columns_hash .map { |k, v| [k, v.type.to_s] } .delete_if { |col| blacklist.include?(col[0]) } end From 8075ca69e135ea1a27818986ecce8b50026853bf Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 30 Mar 2020 16:33:36 +0200 Subject: [PATCH 068/109] updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4512a739b..5135b8db5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Updated instructions to setup a development environment - Updated translations - Removed `MESSAGEFORMAT_LOCALE` as it is now handled by make-plural +- Updated rails framework to v5 - Updated angular-translate - Updated eslint - Updated compass-rails & compass-core From 2f1853295adb4aeca9c4dc67209a20553407065e Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 30 Mar 2020 16:46:37 +0200 Subject: [PATCH 069/109] [ongoing] upgrade to rails 5.2 --- Gemfile | 2 +- Gemfile.lock | 87 ++++++++++++++++++++++++++++------------------------ 2 files changed, 48 insertions(+), 41 deletions(-) diff --git a/Gemfile b/Gemfile index 4cbb44ff1..1fd353788 100644 --- a/Gemfile +++ b/Gemfile @@ -8,7 +8,7 @@ end gem 'compass-rails', '3.1.0' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '~> 5.1.7' +gem 'rails', '~> 5.2.4' # Use Puma as web server gem 'puma', '3.12.4' # Use SCSS for stylesheets diff --git a/Gemfile.lock b/Gemfile.lock index 81f156d7e..3f7fec553 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -22,42 +22,46 @@ GEM Ascii85 (1.0.3) aasm (5.0.8) concurrent-ruby (~> 1.0) - actioncable (5.1.7) - actionpack (= 5.1.7) + actioncable (5.2.4.2) + actionpack (= 5.2.4.2) nio4r (~> 2.0) - websocket-driver (~> 0.6.1) - actionmailer (5.1.7) - actionpack (= 5.1.7) - actionview (= 5.1.7) - activejob (= 5.1.7) + websocket-driver (>= 0.6.1) + actionmailer (5.2.4.2) + actionpack (= 5.2.4.2) + actionview (= 5.2.4.2) + activejob (= 5.2.4.2) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.1.7) - actionview (= 5.1.7) - activesupport (= 5.1.7) - rack (~> 2.0) + actionpack (5.2.4.2) + actionview (= 5.2.4.2) + activesupport (= 5.2.4.2) + rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) actionpack-page_caching (1.1.0) actionpack (>= 4.0.0, < 6) - actionview (5.1.7) - activesupport (= 5.1.7) + actionview (5.2.4.2) + activesupport (= 5.2.4.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) active_record_query_trace (1.7) - activejob (5.1.7) - activesupport (= 5.1.7) + activejob (5.2.4.2) + activesupport (= 5.2.4.2) globalid (>= 0.3.6) - activemodel (5.1.7) - activesupport (= 5.1.7) - activerecord (5.1.7) - activemodel (= 5.1.7) - activesupport (= 5.1.7) - arel (~> 8.0) - activesupport (5.1.7) + activemodel (5.2.4.2) + activesupport (= 5.2.4.2) + activerecord (5.2.4.2) + activemodel (= 5.2.4.2) + activesupport (= 5.2.4.2) + arel (>= 9.0) + activestorage (5.2.4.2) + actionpack (= 5.2.4.2) + activerecord (= 5.2.4.2) + marcel (~> 0.3.1) + activesupport (5.2.4.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -69,7 +73,7 @@ GEM api-pagination (4.8.2) apipie-rails (0.5.17) rails (>= 4.1) - arel (8.0.0) + arel (9.0.0) ast (2.4.0) autoprefixer-rails (9.7.4) execjs @@ -220,9 +224,11 @@ GEM nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) + marcel (0.3.3) + mimemagic (~> 0.3.2) message_format (0.0.6) twitter_cldr (~> 5.0) - method_source (0.9.2) + method_source (1.0.0) mime-types (3.3.1) mime-types-data (~> 3.2015) mime-types-data (3.2019.1009) @@ -295,17 +301,18 @@ GEM rack-test (1.1.0) rack (>= 1.0, < 3) railroady (1.5.3) - rails (5.1.7) - actioncable (= 5.1.7) - actionmailer (= 5.1.7) - actionpack (= 5.1.7) - actionview (= 5.1.7) - activejob (= 5.1.7) - activemodel (= 5.1.7) - activerecord (= 5.1.7) - activesupport (= 5.1.7) + rails (5.2.4.2) + actioncable (= 5.2.4.2) + actionmailer (= 5.2.4.2) + actionpack (= 5.2.4.2) + actionview (= 5.2.4.2) + activejob (= 5.2.4.2) + activemodel (= 5.2.4.2) + activerecord (= 5.2.4.2) + activestorage (= 5.2.4.2) + activesupport (= 5.2.4.2) bundler (>= 1.3.0) - railties (= 5.1.7) + railties (= 5.2.4.2) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) @@ -319,12 +326,12 @@ GEM rails_stdout_logging rails_serve_static_assets (0.0.5) rails_stdout_logging (0.0.5) - railties (5.1.7) - actionpack (= 5.1.7) - activesupport (= 5.1.7) + railties (5.2.4.2) + actionpack (= 5.2.4.2) + activesupport (= 5.2.4.2) method_source rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) + thor (>= 0.19.0, < 2.0) rainbow (3.0.0) rake (13.0.1) rb-fsevent (0.10.3) @@ -444,7 +451,7 @@ GEM addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - websocket-driver (0.6.5) + websocket-driver (0.7.1) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.4) @@ -500,7 +507,7 @@ DEPENDENCIES puma (= 3.12.4) pundit railroady - rails (~> 5.1.7) + rails (~> 5.2.4) rails-observers rails_12factor rb-readline From b019af7f837ea380b9ed89e66e3e4d23cd9d995d Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 11:28:00 +0200 Subject: [PATCH 070/109] app:update for 5.2 --- Gemfile | 2 ++ Gemfile.lock | 4 +++ bin/bundle | 2 +- bin/setup | 4 +-- bin/update | 6 ++-- bin/yarn | 6 ++-- config/application.rb | 2 +- config/boot.rb | 1 + config/cable.yml | 2 +- config/environments/development.rb | 11 ++++-- config/environments/production.rb | 12 +++++-- config/environments/test.rb | 6 +++- .../initializers/content_security_policy.rb | 25 ++++++++++++++ config/initializers/new_framework_defaults.rb | 29 ---------------- .../new_framework_defaults_5_1.rb | 18 ---------- config/puma.rb | 16 +++++---- config/secrets.yml | 4 --- config/spring.rb | 6 ++-- config/storage.yml | 34 +++++++++++++++++++ 19 files changed, 115 insertions(+), 75 deletions(-) create mode 100644 config/initializers/content_security_policy.rb delete mode 100644 config/initializers/new_framework_defaults.rb delete mode 100644 config/initializers/new_framework_defaults_5_1.rb create mode 100644 config/storage.yml diff --git a/Gemfile b/Gemfile index 1fd353788..dfe35d9bd 100644 --- a/Gemfile +++ b/Gemfile @@ -9,6 +9,8 @@ end gem 'compass-rails', '3.1.0' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.2.4' +# Used by rails 5.2 to reduce the app boot time by over 50% +gem 'bootsnap' # Use Puma as web server gem 'puma', '3.12.4' # Use SCSS for stylesheets diff --git a/Gemfile.lock b/Gemfile.lock index 3f7fec553..5513821f6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -84,6 +84,8 @@ GEM thread_safe (~> 0.3, >= 0.3.1) bcrypt (3.1.13) bindex (0.8.1) + bootsnap (1.4.6) + msgpack (~> 1.0) bootstrap-sass (3.4.1) autoprefixer-rails (>= 5.2.1) sassc (>= 2.0.0) @@ -242,6 +244,7 @@ GEM builder minitest (>= 5.0) ruby-progressbar + msgpack (1.3.3) multi_json (1.14.1) multi_xml (0.6.0) multipart-post (2.1.1) @@ -465,6 +468,7 @@ DEPENDENCIES api-pagination apipie-rails awesome_print + bootsnap bootstrap-sass (>= 3.4.1) carrierwave caxlsx diff --git a/bin/bundle b/bin/bundle index 66e9889e8..f19acf5b5 100755 --- a/bin/bundle +++ b/bin/bundle @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) load Gem.bin_path('bundler', 'bundle') diff --git a/bin/setup b/bin/setup index 78c4e861d..94fd4d797 100755 --- a/bin/setup +++ b/bin/setup @@ -1,10 +1,9 @@ #!/usr/bin/env ruby -require 'pathname' require 'fileutils' include FileUtils # path to your application root. -APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) +APP_ROOT = File.expand_path('..', __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") @@ -21,7 +20,6 @@ chdir APP_ROOT do # Install JavaScript dependencies if using Yarn # system('bin/yarn') - # puts "\n== Copying sample files ==" # unless File.exist?('config/database.yml') # cp 'config/database.yml.sample', 'config/database.yml' diff --git a/bin/update b/bin/update index a8e4462f2..58bfaed51 100755 --- a/bin/update +++ b/bin/update @@ -1,10 +1,9 @@ #!/usr/bin/env ruby -require 'pathname' require 'fileutils' include FileUtils # path to your application root. -APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) +APP_ROOT = File.expand_path('..', __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") @@ -18,6 +17,9 @@ chdir APP_ROOT do system! 'gem install bundler --conservative' system('bundle check') || system!('bundle install') + # Install JavaScript dependencies if using Yarn + # system('bin/yarn') + puts "\n== Updating database ==" system! 'bin/rails db:migrate' diff --git a/bin/yarn b/bin/yarn index c2bacef83..460dd565b 100755 --- a/bin/yarn +++ b/bin/yarn @@ -1,8 +1,8 @@ #!/usr/bin/env ruby -VENDOR_PATH = File.expand_path('..', __dir__) -Dir.chdir(VENDOR_PATH) do +APP_ROOT = File.expand_path('..', __dir__) +Dir.chdir(APP_ROOT) do begin - exec "yarnpkg #{ARGV.join(" ")}" + exec "yarnpkg", *ARGV rescue Errno::ENOENT $stderr.puts "Yarn executable was not detected in the system." $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" diff --git a/config/application.rb b/config/application.rb index d4b2d1b61..979eaf54d 100644 --- a/config/application.rb +++ b/config/application.rb @@ -16,7 +16,7 @@ module Fablab require 'fab_manager' # Initialize configuration defaults for originally generated Rails version. - # config.load_defaults 5.1 + config.load_defaults 5.2 # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers diff --git a/config/boot.rb b/config/boot.rb index 30f5120df..b9e460cef 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,3 +1,4 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) require 'bundler/setup' # Set up gems listed in the Gemfile. +require 'bootsnap/setup' # Speed up boot time by caching expensive operations. diff --git a/config/cable.yml b/config/cable.yml index 04aa64721..95565ff9a 100644 --- a/config/cable.yml +++ b/config/cable.yml @@ -6,5 +6,5 @@ test: production: adapter: redis - url: redis://localhost:6379/1 + url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> channel_prefix: fablab_production diff --git a/config/environments/development.rb b/config/environments/development.rb index 475302274..af5ea2cce 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -15,12 +15,13 @@ Rails.application.configure do config.consider_all_requests_local = true # Enable/disable caching. By default caching is disabled. - if Rails.root.join('tmp/caching-dev.txt').exist? + # Run rails dev:cache to toggle caching. + if Rails.root.join('tmp', 'caching-dev.txt').exist? config.action_controller.perform_caching = true config.cache_store = :memory_store config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}" + 'Cache-Control' => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false @@ -33,6 +34,9 @@ Rails.application.configure do protocol: Rails.application.secrets.default_protocol } + # Store uploaded files on the local file system (see config/storage.yml for options) + config.active_storage.service = :local + # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false @@ -52,6 +56,9 @@ Rails.application.configure do # Raise an error on page load if there are pending migrations. config.active_record.migration_error = :page_load + # Highlight code that triggered database queries in logs. + config.active_record.verbose_query_logs = true + # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. diff --git a/config/environments/production.rb b/config/environments/production.rb index db94dcabe..95593749b 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -16,6 +16,10 @@ 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). + # config.require_master_key = true + config.action_controller.default_url_options = { host: Rails.application.secrets.default_host, protocol: Rails.application.secrets.default_protocol @@ -45,6 +49,9 @@ Rails.application.configure do # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + # Store uploaded files on the local file system (see config/storage.yml for options) + config.active_storage.service = :local + # Mount Action Cable outside main process or domain # config.action_cable.mount_path = nil # config.action_cable.url = 'wss://example.com/cable' @@ -56,7 +63,7 @@ Rails.application.configure do # Use the lowest log level to ensure availability of diagnostic information # when problems arise. # config.log_level = :debug - config.log_level = Rails.application.secrets.log_level.blank? ? :debug : Rails.application.secrets.log_level + config.log_level = ENV.fetch('LOG_LEVEL') { :debug }.to_sym # Prepend all log lines with the following tags. # config.log_tags = [ :request_id ] @@ -67,6 +74,7 @@ Rails.application.configure do # Use a real queuing backend for Active Job (and separate queues per environment) # config.active_job.queue_adapter = :resque # config.active_job.queue_name_prefix = "fablab_#{Rails.env}" + config.action_mailer.perform_caching = false config.action_mailer.default_url_options = { @@ -110,7 +118,7 @@ Rails.application.configure do if ENV['RAILS_LOG_TO_STDOUT'].present? logger = ActiveSupport::Logger.new(STDOUT) logger.formatter = config.log_formatter - config.logger = ActiveSupport::TaggedLogging.new(logger) + config.logger = ActiveSupport::TaggedLogging.new(logger) end # Do not dump schema after migrations. diff --git a/config/environments/test.rb b/config/environments/test.rb index 37a4056d5..1dadd30e0 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -17,7 +17,7 @@ Rails.application.configure do # Configure public file server for tests with Cache-Control for performance. config.public_file_server.enabled = true config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}" + 'Cache-Control' => "public, max-age=#{1.hour.to_i}" } # Show full error reports and disable caching. @@ -34,6 +34,10 @@ Rails.application.configure do # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false + + # Store uploaded files on the local file system in a temporary directory + config.active_storage.service = :test + config.action_mailer.perform_caching = false # Tell Action Mailer not to deliver emails to the real world. diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb new file mode 100644 index 000000000..d3bcaa5ec --- /dev/null +++ b/config/initializers/content_security_policy.rb @@ -0,0 +1,25 @@ +# Be sure to restart your server when you modify this file. + +# Define an application-wide content security policy +# For further information see the following documentation +# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy + +# Rails.application.config.content_security_policy do |policy| +# policy.default_src :self, :https +# policy.font_src :self, :https, :data +# policy.img_src :self, :https, :data +# policy.object_src :none +# policy.script_src :self, :https +# policy.style_src :self, :https + +# # Specify URI for violation reports +# # policy.report_uri "/csp-violation-report-endpoint" +# end + +# If you are using UJS then enable automatic nonce generation +# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } + +# Report CSP violations to a specified URI +# For further information see the following documentation: +# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only +# Rails.application.config.content_security_policy_report_only = true diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb deleted file mode 100644 index 9fa84bbea..000000000 --- a/config/initializers/new_framework_defaults.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -# Be sure to restart your server when you modify this file. -# -# This file contains migration options to ease your Rails 5.0 upgrade. -# -# Once upgraded flip defaults one by one to migrate to the new default. -# -# Read the Guide for Upgrading Ruby on Rails for more info on each option. - -# DEPRECATION WARNING: raise_on_unfiltered_parameters is deprecated and has no effect in Rails 5.1. -Rails.application.config.action_controller.raise_on_unfiltered_parameters = true - -# Enable per-form CSRF tokens. Previous versions had false. -Rails.application.config.action_controller.per_form_csrf_tokens = false - -# Enable origin-checking CSRF mitigation. Previous versions had false. -Rails.application.config.action_controller.forgery_protection_origin_check = false - -# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. -# Previous versions had false. -ActiveSupport.to_time_preserves_timezone = false - -# Require `belongs_to` associations by default. Previous versions had false. -Rails.application.config.active_record.belongs_to_required_by_default = false - -# DEPRECATION WARNING: ActiveSupport.halt_callback_chains_on_return_false= is deprecated and will be removed in Rails 5.2. -# Do not halt callback chains when a callback returns false. Previous versions had true. -ActiveSupport.halt_callback_chains_on_return_false = true diff --git a/config/initializers/new_framework_defaults_5_1.rb b/config/initializers/new_framework_defaults_5_1.rb deleted file mode 100644 index 514117a6e..000000000 --- a/config/initializers/new_framework_defaults_5_1.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -# Be sure to restart your server when you modify this file. -# -# This file contains migration options to ease your Rails 5.1 upgrade. -# -# Once upgraded flip defaults one by one to migrate to the new default. -# -# Read the Guide for Upgrading Ruby on Rails for more info on each option. - -# Make `form_with` generate non-remote forms. -Rails.application.config.action_view.form_with_generates_remote_forms = false - -# Unknown asset fallback will return the path passed in when the given -# asset is not present in the asset pipeline. -# Rails.application.config.assets.unknown_asset_fallback = false - -# ActiveSupport::Deprecation.silenced = true diff --git a/config/puma.rb b/config/puma.rb index 1e19380dc..edbcaf6de 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,19 +1,25 @@ +# frozen_string_literal: true + # Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers: a minimum and maximum. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum; this matches the default thread size of Active Record. # -threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } +threads_count = ENV.fetch('RAILS_MAX_THREADS') { 5 } threads threads_count, threads_count # Specifies the `port` that Puma will listen on to receive requests; default is 3000. # -port ENV.fetch("PORT") { 3000 } +port ENV.fetch('PORT') { 5000 } # Specifies the `environment` that Puma will run in. # -environment ENV.fetch("RAILS_ENV") { "development" } +environment ENV.fetch('RAILS_ENV') { 'development' } + +# Specifies the `pidfile` that Puma will use. +# +pidfile ENV.fetch('PIDFILE') { 'tmp/pids/server.pid' } # Specifies the number of `workers` to boot in clustered mode. # Workers are forked webserver processes. If using threads and workers together @@ -26,9 +32,7 @@ environment ENV.fetch("RAILS_ENV") { "development" } # Use the `preload_app!` method when specifying a `workers` number. # This directive tells Puma to first boot the application and load code # before forking the application. This takes advantage of Copy On Write -# process behavior so workers use less memory. If you use this option -# you need to make sure to reconnect any threads in the `on_worker_boot` -# block. +# process behavior so workers use less memory. # # preload_app! diff --git a/config/secrets.yml b/config/secrets.yml index 4324d057b..f864f9dc1 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -47,7 +47,6 @@ development: openlab_base_uri: <%= ENV["OPENLAB_BASE_URI"] %> navinum_api_login: <%= ENV["NAVINUM_API_LOGIN"] %> navinum_api_password: <%= ENV["NAVINUM_API_PASSWORD"] %> - log_level: <%= ENV["LOG_LEVEL"] %> facebook_app_id: <%= ENV["FACEBOOK_APP_ID"] %> elaticsearch_host: <%= ENV["ELASTICSEARCH_HOST"] %> max_image_size: <%= ENV["MAX_IMAGE_SIZE"] %> @@ -95,7 +94,6 @@ test: openlab_base_uri: navinum_api_login: navinum_api_password: - log_level: <%= ENV["LOG_LEVEL"] %> facebook_app_id: <%= ENV["FACEBOOK_APP_ID"] %> elaticsearch_host: <%= ENV["ELASTICSEARCH_HOST"] %> max_image_size: <%= ENV["MAX_IMAGE_SIZE"] %> @@ -152,7 +150,6 @@ staging: google_analytics_id: <%= ENV["GA_ID"] %> navinum_api_login: <%= ENV["NAVINUM_API_LOGIN"] %> navinum_api_password: <%= ENV["NAVINUM_API_PASSWORD"] %> - log_level: <%= ENV["LOG_LEVEL"] %> facebook_app_id: <%= ENV["FACEBOOK_APP_ID"] %> elaticsearch_host: <%= ENV["ELASTICSEARCH_HOST"] %> max_image_size: <%= ENV["MAX_IMAGE_SIZE"] %> @@ -212,7 +209,6 @@ production: google_analytics_id: <%= ENV["GA_ID"] %> navinum_api_login: <%= ENV["NAVINUM_API_LOGIN"] %> navinum_api_password: <%= ENV["NAVINUM_API_PASSWORD"] %> - log_level: <%= ENV["LOG_LEVEL"] %> facebook_app_id: <%= ENV["FACEBOOK_APP_ID"] %> elaticsearch_host: <%= ENV["ELASTICSEARCH_HOST"] %> max_image_size: <%= ENV["MAX_IMAGE_SIZE"] %> diff --git a/config/spring.rb b/config/spring.rb index c9119b40c..c5933e491 100644 --- a/config/spring.rb +++ b/config/spring.rb @@ -1,6 +1,8 @@ -%w( +# frozen_string_literal: true + +%w[ .ruby-version .rbenv-vars tmp/restart.txt tmp/caching-dev.txt -).each { |path| Spring.watch(path) } +].each { |path| Spring.watch(path) } diff --git a/config/storage.yml b/config/storage.yml new file mode 100644 index 000000000..d32f76e8f --- /dev/null +++ b/config/storage.yml @@ -0,0 +1,34 @@ +test: + service: Disk + root: <%= Rails.root.join("tmp/storage") %> + +local: + service: Disk + root: <%= Rails.root.join("storage") %> + +# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) +# amazon: +# service: S3 +# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %> +# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %> +# region: us-east-1 +# bucket: your_own_bucket + +# Remember not to checkin your GCS keyfile to a repository +# google: +# service: GCS +# project: your_project +# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %> +# bucket: your_own_bucket + +# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key) +# microsoft: +# service: AzureStorage +# storage_account_name: your_account_name +# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %> +# container: your_container_name + +# mirror: +# service: Mirror +# primary: local +# mirrors: [ amazon, google, microsoft ] From 4645f9accc52e63975078978b60f37083955d0c9 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 12:19:32 +0200 Subject: [PATCH 071/109] belongs_to_required_by_default = false --- config/application.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/application.rb b/config/application.rb index 979eaf54d..0d8263695 100644 --- a/config/application.rb +++ b/config/application.rb @@ -17,6 +17,7 @@ module Fablab # Initialize configuration defaults for originally generated Rails version. config.load_defaults 5.2 + config.active_record.belongs_to_required_by_default = false # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers From c670dbeccd9925cdb9429ae92f7e142bd522dbfe Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 12:24:36 +0200 Subject: [PATCH 072/109] update comment --- config/application.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/application.rb b/config/application.rb index 0d8263695..ddfc717f4 100644 --- a/config/application.rb +++ b/config/application.rb @@ -17,6 +17,8 @@ module Fablab # Initialize configuration defaults for originally generated Rails version. config.load_defaults 5.2 + # prevent this new behavior with rails >= 5.0 + # see https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#active-record-belongs-to-required-by-default-option config.active_record.belongs_to_required_by_default = false # Settings in config/environments/* take precedence over those specified here. From 6dc7a7edd9ae7728781a209b1631501914db3dc5 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 15:39:05 +0200 Subject: [PATCH 073/109] [bug] unable to export accounting data to ACD --- CHANGELOG.md | 1 + app/assets/javascripts/controllers/admin/invoices.js.erb | 5 +++-- .../templates/admin/invoices/accountingExportModal.html | 2 +- package.json | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5135b8db5..766ac5b42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Fix a bug: since PostgreSQL release 9.6.17, the new installations will fail to start complaining for missing password (#194) - Fix a bug: missing translations for some error messages - Fix a bug: invalid footprints in invoices fixtures +- Fix a bug: unable to export accounting data to ACD - Fix a security issue: updated mkdirp to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) - Fix a security issue: updated acorn to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) diff --git a/app/assets/javascripts/controllers/admin/invoices.js.erb b/app/assets/javascripts/controllers/admin/invoices.js.erb index c5bd0c3b6..381272707 100644 --- a/app/assets/javascripts/controllers/admin/invoices.js.erb +++ b/app/assets/javascripts/controllers/admin/invoices.js.erb @@ -1117,9 +1117,10 @@ Application.Controllers.controller('AccountingExportModalController', ['$scope', /** * Will fill the export settings, according to the selected software + * @param software {String} must be one of SETTINGS.* */ - $scope.fillSettings = function() { - $scope.exportTarget.settings = SETTINGS[$scope.exportTarget.software]; + $scope.fillSettings = function(software) { + $scope.exportTarget.settings = SETTINGS[software]; }; /** diff --git a/app/assets/templates/admin/invoices/accountingExportModal.html b/app/assets/templates/admin/invoices/accountingExportModal.html index d1782e8d7..4c952b4c9 100644 --- a/app/assets/templates/admin/invoices/accountingExportModal.html +++ b/app/assets/templates/admin/invoices/accountingExportModal.html @@ -45,7 +45,7 @@

{{ 'app.admin.invoices.export_to' }}

diff --git a/package.json b/package.json index d289387b0..e221f2e0a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fab-manager", - "version": "4.3.2", + "version": "4.3.3-dev", "description": "Fab-manager is the FabLab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks and your marker's projects.", "keywords": [ "fablab", From a502a7061eb6c48bb0e8af6f77ff72b806a4dfb0 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 16:09:13 +0200 Subject: [PATCH 074/109] change translation to prevent button overflow --- config/locales/app.admin.en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.admin.en.yml b/config/locales/app.admin.en.yml index 4dec6111e..f03336081 100644 --- a/config/locales/app.admin.en.yml +++ b/config/locales/app.admin.en.yml @@ -682,7 +682,7 @@ en: tags: "Tags" tag_name: "Tag name" tag_identifier: "Identifier to use" - download_example: "Download the exemple file" + download_example: "Example file" select_file: "Choose a file" import: "Import" update_field: "Reference field for users to update" From f596859c781b10cd1bed8a4c5d12dcd76ff5124d Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 16:12:32 +0200 Subject: [PATCH 075/109] updated changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 766ac5b42..da6d2c101 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - Updated instructions to setup a development environment - Updated translations - Removed `MESSAGEFORMAT_LOCALE` as it is now handled by make-plural -- Updated rails framework to v5 +- Updated rails framework to v5.2 - Updated angular-translate - Updated eslint - Updated compass-rails & compass-core @@ -17,6 +17,7 @@ - Fix a bug: unable to export accounting data to ACD - Fix a security issue: updated mkdirp to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) - Fix a security issue: updated acorn to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) +- Fix a security issue: updated actionview to fix [CVE-2020-5267](https://nvd.nist.gov/vuln/detail/CVE-2020-5267) ## v4.3.2 2020 March 11 From 3f8625c24a6bef913c8379bb792e2eb86692d45a Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 16:15:40 +0200 Subject: [PATCH 076/109] New translations app.admin.en.yml (Acholi) --- config/locales/app.admin.ach.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.admin.ach.yml b/config/locales/app.admin.ach.yml index 200970f56..ef5200604 100644 --- a/config/locales/app.admin.ach.yml +++ b/config/locales/app.admin.ach.yml @@ -682,7 +682,7 @@ ach: tags: "crwdns7907:0crwdne7907:0" tag_name: "crwdns7909:0crwdne7909:0" tag_identifier: "crwdns7911:0crwdne7911:0" - download_example: "crwdns7913:0crwdne7913:0" + download_example: "crwdns20276:0crwdne20276:0" select_file: "crwdns7915:0crwdne7915:0" import: "crwdns7917:0crwdne7917:0" update_field: "crwdns7919:0crwdne7919:0" From 8741074c578d51ed7962f2d334ad9fc2cbda9eee Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 16:16:05 +0200 Subject: [PATCH 077/109] New translations app.admin.en.yml (Spanish) --- config/locales/app.admin.es.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.admin.es.yml b/config/locales/app.admin.es.yml index cd147876d..64fc3cc30 100644 --- a/config/locales/app.admin.es.yml +++ b/config/locales/app.admin.es.yml @@ -682,7 +682,7 @@ es: tags: "Tags" tag_name: "Tag name" tag_identifier: "Identifier to use" - download_example: "Download the exemple file" + download_example: "Example file" select_file: "Choose a file" import: "Import" update_field: "Reference field for users to update" From 6255ce0709ffeb7bb8f3f69173f0ac258c00668c Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 16:17:00 +0200 Subject: [PATCH 078/109] New translations app.admin.en.yml (Portuguese) --- config/locales/app.admin.pt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.admin.pt.yml b/config/locales/app.admin.pt.yml index f3e20cf2b..efd18b6e5 100755 --- a/config/locales/app.admin.pt.yml +++ b/config/locales/app.admin.pt.yml @@ -682,7 +682,7 @@ pt: tags: "Tags" tag_name: "Tag name" tag_identifier: "Identifier to use" - download_example: "Download the exemple file" + download_example: "Example file" select_file: "Choose a file" import: "Import" update_field: "Reference field for users to update" From b8ce9f7fd7f0c44dd4beeeb486ca37786c3ecbc6 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 16:17:32 +0200 Subject: [PATCH 079/109] New translations app.admin.en.yml (French) --- config/locales/app.admin.fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.admin.fr.yml b/config/locales/app.admin.fr.yml index e7e06dbdd..38e6956f1 100644 --- a/config/locales/app.admin.fr.yml +++ b/config/locales/app.admin.fr.yml @@ -682,7 +682,7 @@ fr: tags: "Étiquettes" tag_name: "Nom de l'étiquette" tag_identifier: "Identifiant à utiliser" - download_example: "Télécharger le fichier d'exemple" + download_example: "Example file" select_file: "Choisissez un fichier" import: "Importer" update_field: "Champ de référence pour les utilisateurs à mettre à jour" From 570f61c5df1e4afedf6bf65f15473d54ed12bcc7 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 16:53:30 +0200 Subject: [PATCH 080/109] [bug] report error on invalid encoding in members import --- CHANGELOG.md | 1 + app/services/members/import_service.rb | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index da6d2c101..0ba403a13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - Fix a bug: missing translations for some error messages - Fix a bug: invalid footprints in invoices fixtures - Fix a bug: unable to export accounting data to ACD +- Fix a bug: report error on invalid encoding in members import - Fix a security issue: updated mkdirp to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) - Fix a security issue: updated acorn to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) - Fix a security issue: updated actionview to fix [CVE-2020-5267](https://nvd.nist.gov/vuln/detail/CVE-2020-5267) diff --git a/app/services/members/import_service.rb b/app/services/members/import_service.rb index cc0441a53..305610750 100644 --- a/app/services/members/import_service.rb +++ b/app/services/members/import_service.rb @@ -6,6 +6,7 @@ class Members::ImportService def import(import) require 'csv' log = [] + begin CSV.foreach(import.attachment.url, headers: true, col_sep: ';') do |row| begin password = hide_password(row) @@ -31,6 +32,11 @@ class Members::ImportService puts e.backtrace end end + rescue ArgumentError => e + log << e.to_s + puts e + puts e.backtrace + end log end From e200f6ba1ece9597616de36febf065201c986f88 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 17:00:42 +0200 Subject: [PATCH 081/109] New translations en.yml (French) --- config/locales/fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 8fe18b1dc..e04a54ba0 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -257,7 +257,7 @@ fr: notify_member_slot_is_modified: your_reservation_slot_was_successfully_changed: "Votre créneau de réservation a bien été modifié." notify_member_subscribed_plan: - you_have_subscribed_to_PLAN_html: "You have subscribed to %{PLAN}." + you_have_subscribed_to_PLAN_html: "Vous avez souscrit à l'abonnement %{PLAN}." notify_member_subscribed_plan_is_changed: you_have_changed_your_subscription_to_PLAN_html: "Vous avez changé votre abonnement à %{PLAN}." notify_member_subscription_canceled: From 9ed6244582a98ebee4e6cd731db92272e0c4bb42 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 17:00:59 +0200 Subject: [PATCH 082/109] New translations app.admin.en.yml (French) --- config/locales/app.admin.fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.admin.fr.yml b/config/locales/app.admin.fr.yml index 38e6956f1..c778d10db 100644 --- a/config/locales/app.admin.fr.yml +++ b/config/locales/app.admin.fr.yml @@ -185,7 +185,7 @@ fr: to_date: "au" #eg: from 01/01 to 01/05 to_time: "à" #eg. from 18:00 to 21:00 title: "Titre" - dates: "Dates" + dates: "Date" booking: "Réservations" sold_out: "Complet" cancelled: "Annulé" From 37d49c9b8403e2d71f14057942ad13bca79032a6 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 17:10:31 +0200 Subject: [PATCH 083/109] updated translations --- config/locales/app.admin.en.yml | 2 +- config/locales/app.public.en.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/app.admin.en.yml b/config/locales/app.admin.en.yml index f03336081..81657a02c 100644 --- a/config/locales/app.admin.en.yml +++ b/config/locales/app.admin.en.yml @@ -1148,7 +1148,7 @@ en: title: "Machines" content: "Define here the prices of the machine slots, by user group. These prices will be applied to users who do not have subscriptions." spaces: - title: "Espaces" + title: "Spaces" content: "In the same way, define here the prices of the spaces slots, for the users without subscriptions." credits: title: "Credits" diff --git a/config/locales/app.public.en.yml b/config/locales/app.public.en.yml index 84ea109e3..c4b48c82e 100644 --- a/config/locales/app.public.en.yml +++ b/config/locales/app.public.en.yml @@ -247,7 +247,7 @@ en: your_subscription_has_expired_on_the_DATE: "Your subscription has expired on the {DATE}" subscription_price: "Subscription price" you_ve_just_selected_a_subscription_html: "You've just selected a subscription:" - confirm_and_pay: "Valider et payer" + confirm_and_pay: "Confirm and pay" you_ve_just_payed_the_subscription_html: "You've just paid the subscription:" thank_you_your_subscription_is_successful: "Thank you. Your subscription is successful!" your_invoice_will_be_available_soon_from_your_dashboard: "Your invoice will be available soon from your dashboard" From 24ef335659c773eb8da7e7de188addcb971f5034 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 17:11:24 +0200 Subject: [PATCH 084/109] New translations app.public.en.yml (Acholi) --- config/locales/app.public.ach.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.public.ach.yml b/config/locales/app.public.ach.yml index cafee8408..2ee368b28 100644 --- a/config/locales/app.public.ach.yml +++ b/config/locales/app.public.ach.yml @@ -247,7 +247,7 @@ ach: your_subscription_has_expired_on_the_DATE: "crwdns9191:0{DATE}crwdne9191:0" subscription_price: "crwdns9193:0crwdne9193:0" you_ve_just_selected_a_subscription_html: "crwdns9195:0crwdne9195:0" - confirm_and_pay: "crwdns9197:0crwdne9197:0" + confirm_and_pay: "crwdns20280:0crwdne20280:0" you_ve_just_payed_the_subscription_html: "crwdns9199:0crwdne9199:0" thank_you_your_subscription_is_successful: "crwdns9201:0crwdne9201:0" your_invoice_will_be_available_soon_from_your_dashboard: "crwdns9203:0crwdne9203:0" From fae69840b14dc539ca6e779169db4e84644a2a27 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 17:11:26 +0200 Subject: [PATCH 085/109] New translations app.admin.en.yml (Acholi) --- config/locales/app.admin.ach.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.admin.ach.yml b/config/locales/app.admin.ach.yml index ef5200604..b4f930429 100644 --- a/config/locales/app.admin.ach.yml +++ b/config/locales/app.admin.ach.yml @@ -1148,7 +1148,7 @@ ach: title: "crwdns20026:0crwdne20026:0" content: "crwdns20028:0crwdne20028:0" spaces: - title: "crwdns20030:0crwdne20030:0" + title: "crwdns20278:0crwdne20278:0" content: "crwdns20032:0crwdne20032:0" credits: title: "crwdns20034:0crwdne20034:0" From 89195638028297fd1bc948c2be5e0bd6eb8a8cec Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 17:11:31 +0200 Subject: [PATCH 086/109] New translations app.public.en.yml (Spanish) --- config/locales/app.public.es.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.public.es.yml b/config/locales/app.public.es.yml index ef55e6759..92fcaebac 100644 --- a/config/locales/app.public.es.yml +++ b/config/locales/app.public.es.yml @@ -247,7 +247,7 @@ es: your_subscription_has_expired_on_the_DATE: "Sus suscripcion expiró el {DATE}" subscription_price: "Subscription price" you_ve_just_selected_a_subscription_html: "You've just selected a subscription:" - confirm_and_pay: "Valider et payer" + confirm_and_pay: "Confirm and pay" you_ve_just_payed_the_subscription_html: "You've just paid the subscription:" thank_you_your_subscription_is_successful: "Gracias. Su suscripción ha tenido éxito" your_invoice_will_be_available_soon_from_your_dashboard: "Your invoice will be available soon from your dashboard" From dbdb57f4138793a70136c26a4a7c0037b49dc962 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 17:11:34 +0200 Subject: [PATCH 087/109] New translations app.admin.en.yml (Spanish) --- config/locales/app.admin.es.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.admin.es.yml b/config/locales/app.admin.es.yml index 64fc3cc30..3718165cf 100644 --- a/config/locales/app.admin.es.yml +++ b/config/locales/app.admin.es.yml @@ -1148,7 +1148,7 @@ es: title: "Machines" content: "Define here the prices of the machine slots, by user group. These prices will be applied to users who do not have subscriptions." spaces: - title: "Espaces" + title: "Spaces" content: "In the same way, define here the prices of the spaces slots, for the users without subscriptions." credits: title: "Credits" From 171348d7ef8e3075f007ab13545fe807d399941f Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 17:11:40 +0200 Subject: [PATCH 088/109] New translations app.public.en.yml (Portuguese) --- config/locales/app.public.pt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.public.pt.yml b/config/locales/app.public.pt.yml index 0804af9be..889e1fbeb 100755 --- a/config/locales/app.public.pt.yml +++ b/config/locales/app.public.pt.yml @@ -247,7 +247,7 @@ pt: your_subscription_has_expired_on_the_DATE: "Sua inscrição expirou em {DATE}" subscription_price: "Subscription price" you_ve_just_selected_a_subscription_html: "You've just selected a subscription:" - confirm_and_pay: "Valider et payer" + confirm_and_pay: "Confirm and pay" you_ve_just_payed_the_subscription_html: "Você acabou de pagar o inscrição:" thank_you_your_subscription_is_successful: "Obrigado. Sua inscrição foi feita com sucesso!" your_invoice_will_be_available_soon_from_your_dashboard: "Your invoice will be available soon from your dashboard" From 23fccaaabed7e71564f1a7a0d92e2642babd7e78 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 17:11:45 +0200 Subject: [PATCH 089/109] New translations app.admin.en.yml (Portuguese) --- config/locales/app.admin.pt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/app.admin.pt.yml b/config/locales/app.admin.pt.yml index efd18b6e5..110f8ee0b 100755 --- a/config/locales/app.admin.pt.yml +++ b/config/locales/app.admin.pt.yml @@ -1148,7 +1148,7 @@ pt: title: "Machines" content: "Define here the prices of the machine slots, by user group. These prices will be applied to users who do not have subscriptions." spaces: - title: "Espaces" + title: "Spaces" content: "In the same way, define here the prices of the spaces slots, for the users without subscriptions." credits: title: "Credits" From 24fc713bec45cc4910c8491aaf7655dd89bcb969 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 17:11:50 +0200 Subject: [PATCH 090/109] New translations app.public.en.yml (French) --- config/locales/app.public.fr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/locales/app.public.fr.yml b/config/locales/app.public.fr.yml index c6c003178..fa943d94f 100644 --- a/config/locales/app.public.fr.yml +++ b/config/locales/app.public.fr.yml @@ -247,7 +247,7 @@ fr: your_subscription_has_expired_on_the_DATE: "Votre abonnement a expiré au {DATE}" subscription_price: "Coût de l'abonnement" you_ve_just_selected_a_subscription_html: "Vous venez de sélectionner un abonnement :" - confirm_and_pay: "Valider et payer" + confirm_and_pay: "Confirm and pay" you_ve_just_payed_the_subscription_html: "Vous venez de régler l'abonnement :" thank_you_your_subscription_is_successful: "Merci. Votre abonnement a bien été pris en compte !" your_invoice_will_be_available_soon_from_your_dashboard: "Votre facture sera bientôt disponible depuis votre tableau de bord" @@ -280,7 +280,7 @@ fr: event_description: "Description de l'évènement" downloadable_documents: "Documents à télécharger" information_and_booking: "Informations et réservation" - dates: "Dates" + dates: "Date" beginning: "Début :" ending: "Fin :" opening_hours: "Horaires :" @@ -357,7 +357,7 @@ fr: tour: conclusion: title: "Merci de votre attention" - content: "

If you want to restart this contextual help, press F1 at any time or click on « ? Help » from the user's menu.

If you need additional help, you can check the user guide (only in French for now).

The Fab-manager's team also provides personalized support (help with getting started, help with installation, customization, etc.), contact-us for more info.

" + content: "

Si vous souhaitez relancer cette aide contextuelle, appuyez sur F1 à n'importe quel moment ou cliquez sur « ? Aide » depuis le menu utilisateur.

Si vous avez besoin d'aide supplémentaire, vous pouvez consulter le guide d'utilisation disponible en Français.

L'équipe de Fab-manager propose également du support personnalisé (aide à la prise en main, aide à l'installation, personnalisation, etc.), contactez-nous pour plus d'informations.

" welcome: welcome: title: "Bienvenue dans Fab-manager" From 4fae34a5b223f83ef6f5c1c043b7193104100a5a Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 17:11:52 +0200 Subject: [PATCH 091/109] New translations app.admin.en.yml (French) --- config/locales/app.admin.fr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/app.admin.fr.yml b/config/locales/app.admin.fr.yml index c778d10db..055b708ff 100644 --- a/config/locales/app.admin.fr.yml +++ b/config/locales/app.admin.fr.yml @@ -411,7 +411,7 @@ fr: year: "Année" month: "Mois" day: "Jour" - num_of_invoice: "Num. of invoice" + num_of_invoice: "N° de facture" online_sales: "Vente en ligne" wallet: "Porte-monnaie" refund: "Remboursement" @@ -682,7 +682,7 @@ fr: tags: "Étiquettes" tag_name: "Nom de l'étiquette" tag_identifier: "Identifiant à utiliser" - download_example: "Example file" + download_example: "Ficher d'exemple" select_file: "Choisissez un fichier" import: "Importer" update_field: "Champ de référence pour les utilisateurs à mettre à jour" From 9eae157449cd3a2dc22cfc5e88c174abb4152bcd Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 17:19:57 +0200 Subject: [PATCH 092/109] New translations en.yml (Spanish) --- config/locales/es.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/es.yml b/config/locales/es.yml index 73cb7cab9..46a05c0b8 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -257,7 +257,7 @@ es: notify_member_slot_is_modified: your_reservation_slot_was_successfully_changed: "Su reserva ha sido cambiada correctamente." notify_member_subscribed_plan: - you_have_subscribed_to_PLAN_html: "You have subscribed to %{PLAN}." + you_have_subscribed_to_PLAN_html: "Se ha suscrito al %{PLAN}." notify_member_subscribed_plan_is_changed: you_have_changed_your_subscription_to_PLAN_html: "Ha cambiado su suscripción a %{PLAN}." notify_member_subscription_canceled: From c403b486f54291a600c7d939535646e2e2c81899 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 17:20:07 +0200 Subject: [PATCH 093/109] New translations en.yml (Portuguese) --- config/locales/pt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 601826155..01bf18932 100755 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -257,7 +257,7 @@ pt: notify_member_slot_is_modified: your_reservation_slot_was_successfully_changed: "Seu slot de reserva foi alterado com sucesso." notify_member_subscribed_plan: - you_have_subscribed_to_PLAN_html: "You have subscribed to %{PLAN}." + you_have_subscribed_to_PLAN_html: "Você assinou %{PLAN}." notify_member_subscribed_plan_is_changed: you_have_changed_your_subscription_to_PLAN_html: "Você alterou sua assinatura para %{PLAN} ." notify_member_subscription_canceled: From ade3ec80ebbc111a94177725c1b03149c03418fa Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 17:20:10 +0200 Subject: [PATCH 094/109] New translations app.public.en.yml (French) --- config/locales/app.public.fr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/app.public.fr.yml b/config/locales/app.public.fr.yml index fa943d94f..c9807097b 100644 --- a/config/locales/app.public.fr.yml +++ b/config/locales/app.public.fr.yml @@ -247,7 +247,7 @@ fr: your_subscription_has_expired_on_the_DATE: "Votre abonnement a expiré au {DATE}" subscription_price: "Coût de l'abonnement" you_ve_just_selected_a_subscription_html: "Vous venez de sélectionner un abonnement :" - confirm_and_pay: "Confirm and pay" + confirm_and_pay: "Valider et payer" you_ve_just_payed_the_subscription_html: "Vous venez de régler l'abonnement :" thank_you_your_subscription_is_successful: "Merci. Votre abonnement a bien été pris en compte !" your_invoice_will_be_available_soon_from_your_dashboard: "Votre facture sera bientôt disponible depuis votre tableau de bord" @@ -280,7 +280,7 @@ fr: event_description: "Description de l'évènement" downloadable_documents: "Documents à télécharger" information_and_booking: "Informations et réservation" - dates: "Date" + dates: "Dates" beginning: "Début :" ending: "Fin :" opening_hours: "Horaires :" From a63071342c46d3ada51cbda1be4fbbed5cb3f1ef Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 17:27:51 +0200 Subject: [PATCH 095/109] New translations app.admin.en.yml (French) --- config/locales/app.admin.fr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/app.admin.fr.yml b/config/locales/app.admin.fr.yml index 055b708ff..37f08b720 100644 --- a/config/locales/app.admin.fr.yml +++ b/config/locales/app.admin.fr.yml @@ -4,7 +4,7 @@ fr: #add a new machine machines_new: declare_a_new_machine: "Déclarer une nouvelle machine" - watch_out_when_creating_a_new_machine_its_prices_are_initialized_at_0_for_all_subscriptions: "Attention, lors de la création d'une machine, ses tarifs de réservation sont initialisés à zero pour tous les abonnements." + watch_out_when_creating_a_new_machine_its_prices_are_initialized_at_0_for_all_subscriptions: "Attention ! Lors de la création d'une machine, ses tarifs de réservation sont initialisés à zéro pour tous les abonnements." consider_changing_them_before_creating_any_reservation_slot: "Pensez à les modifier avant de créer des créneaux pour cette machine." #machine edition machines_edit: @@ -185,7 +185,7 @@ fr: to_date: "au" #eg: from 01/01 to 01/05 to_time: "à" #eg. from 18:00 to 21:00 title: "Titre" - dates: "Date" + dates: "Dates" booking: "Réservations" sold_out: "Complet" cancelled: "Annulé" From 34a59eabe6c99428ec718297151f8d6cc7ae3eb8 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 31 Mar 2020 17:36:00 +0200 Subject: [PATCH 096/109] upgrade to new assets pipeline api --- app/views/application/index.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/application/index.html.erb b/app/views/application/index.html.erb index 3c6efd282..df0bee2cf 100644 --- a/app/views/application/index.html.erb +++ b/app/views/application/index.html.erb @@ -143,7 +143,7 @@ <% end %> -<% if Rails.application.assets.find_asset "moment/locale/#{Rails.application.secrets.moment_locale}.js" %> +<% if Rails.application.assets_manifest.find("moment/locale/#{Rails.application.secrets.moment_locale}.js").first %> <% elsif Rails.application.secrets.moment_locale != 'en' @@ -151,7 +151,7 @@ end %> -<% if Rails.application.assets.find_asset "summernote/lang/summernote-#{Rails.application.secrets.summernote_locale}.js" %> +<% if Rails.application.assets_manifest.find("summernote/lang/summernote-#{Rails.application.secrets.summernote_locale}.js").first %> <% elsif Rails.application.secrets.summernote_locale != 'en-US' @@ -159,7 +159,7 @@ end %> -<% if Rails.application.assets.find_asset "fullcalendar/dist/lang/#{Rails.application.secrets.fullcalendar_locale}.js" %> +<% if Rails.application.assets_manifest.find("fullcalendar/dist/lang/#{Rails.application.secrets.fullcalendar_locale}.js").first %> <% elsif Rails.application.secrets.fullcalendar_locale != 'en' From 705bedc25c4bcce78dfae87c7b191dfba1268bb3 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 1 Apr 2020 12:51:18 +0200 Subject: [PATCH 097/109] [bug] crediting a wallet w/ refund invoice prevent statistics generation (#196) --- CHANGELOG.md | 3 +++ app/services/statistic_service.rb | 6 +++++- app/services/wallet_service.rb | 13 +++++++++++-- lib/tasks/fablab/fix.rake | 14 ++++++++++++++ 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ba403a13..7470d394a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Updated compass-rails & compass-core - Renamed production documentation - Syntax improvements in scss files +- Fix a bug: crediting a wallet w/ refund invoice prevent statistics generation (#196) - Fix a bug: invalid translation keys in closing accounting period interface - Fix a bug: since PostgreSQL release 9.6.17, the new installations will fail to start complaining for missing password (#194) - Fix a bug: missing translations for some error messages @@ -19,6 +20,8 @@ - Fix a security issue: updated mkdirp to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) - Fix a security issue: updated acorn to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) - Fix a security issue: updated actionview to fix [CVE-2020-5267](https://nvd.nist.gov/vuln/detail/CVE-2020-5267) +- [TODO DEPLOY] `rails fablab:fix:avoirs_wallet_transaction` +- [TODO DEPLOY] `rails fablab:es:generate_stats[289]` only if you had missing statistics since some date ago. You can replace 289 by the difference of days between the day you run this task and the last day you had statistics ## v4.3.2 2020 March 11 diff --git a/app/services/statistic_service.rb b/app/services/statistic_service.rb index abb7f883d..5e4e36064 100644 --- a/app/services/statistic_service.rb +++ b/app/services/statistic_service.rb @@ -273,10 +273,12 @@ class StatisticService Avoir.where('invoices.created_at >= :start_date AND invoices.created_at <= :end_date', options) .eager_load(:invoice_items, statistic_profile: [:group]) .each do |i| + # the following line is a workaround for issue #196 + profile = i.statistic_profile || i.invoiced&.wallet&.user&.statistic_profile avoirs_ca_list.push OpenStruct.new({ date: options[:start_date].to_date, ca: calcul_avoir_ca(i) - }.merge(user_info(i.statistic_profile))) + }.merge(user_info(profile))) end reservations_ca_list.concat(subscriptions_ca_list).concat(avoirs_ca_list).each do |e| profile = StatisticProfile.find(e.statistic_profile_id) @@ -365,6 +367,8 @@ class StatisticService end def user_info(statistic_profile) + return {} unless statistic_profile + { statistic_profile_id: statistic_profile.id, user_id: statistic_profile.user_id, diff --git a/app/services/wallet_service.rb b/app/services/wallet_service.rb index 3dd88bc7c..ff3fd1e11 100644 --- a/app/services/wallet_service.rb +++ b/app/services/wallet_service.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# Provides methods to manage wallets class WalletService def initialize(user: nil, wallet: nil) @user = user @@ -8,7 +11,12 @@ class WalletService def credit(amount) ActiveRecord::Base.transaction do if @wallet.credit(amount) - transaction = WalletTransaction.new(invoicing_profile: @user.invoicing_profile, wallet: @wallet, transaction_type: 'credit', amount: amount) + transaction = WalletTransaction.new( + invoicing_profile: @user.invoicing_profile, + wallet: @wallet, + transaction_type: 'credit', + amount: amount + ) if transaction.save NotificationCenter.call type: 'notify_user_wallet_is_credited', receiver: @wallet.user, @@ -53,7 +61,8 @@ class WalletService avoir.description = description avoir.payment_method = 'wallet' avoir.subscription_to_expire = false - avoir.invoicing_profile_id = wallet_transaction.wallet.user.invoicing_profile.id + avoir.invoicing_profile_id = wallet_transaction.invoicing_profile_id + avoir.statistic_profile_id = wallet_transaction.wallet.user.statistic_profile.id avoir.total = wallet_transaction.amount * 100.0 avoir.save! diff --git a/lib/tasks/fablab/fix.rake b/lib/tasks/fablab/fix.rake index e8c06892c..af7836254 100644 --- a/lib/tasks/fablab/fix.rake +++ b/lib/tasks/fablab/fix.rake @@ -150,5 +150,19 @@ namespace :fablab do name: 'theme' ) end + + desc '[release 4.3.3] add statistic_profile_id to refund invoices for WalletTransactions' + task avoirs_wallet_transaction: :environment do + Avoir.where(invoiced_type: WalletTransaction.name).each do |a| + next unless a.statistic_profile_id.nil? + + begin + a.statistic_profile_id = a.invoiced.wallet.user&.statistic_profile&.id + a.save! + rescue ActiveRecord::RecordInvalid => e + printf "Unable to modify the refund invoice (id %s): %s\nIgnoring that record...\n", id: a.id, error: e + end + end + end end end From 0b81f957ef00c5d7c351a6d82a27fa0faa697ea3 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 1 Apr 2020 12:51:46 +0200 Subject: [PATCH 098/109] fix testing assets with rails 5 --- app/helpers/application_helper.rb | 11 +++++++++++ app/views/application/index.html.erb | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 31267a0a7..4513e0d63 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -94,6 +94,17 @@ module ApplicationHelper res end + ## + # check if the provided asset file is available + # @see https://github.com/rails/sprockets-rails/issues/298 + # + def asset_available?(logical_path) + if Rails.configuration.assets.compile + Rails.application.precompiled_assets.include? logical_path + else + Rails.application.assets_manifest.assets[logical_path].present? + end + end private diff --git a/app/views/application/index.html.erb b/app/views/application/index.html.erb index df0bee2cf..226d14a8f 100644 --- a/app/views/application/index.html.erb +++ b/app/views/application/index.html.erb @@ -143,7 +143,7 @@ <% end %> -<% if Rails.application.assets_manifest.find("moment/locale/#{Rails.application.secrets.moment_locale}.js").first %> +<% if asset_available?("moment/locale/#{Rails.application.secrets.moment_locale}.js") %> <% elsif Rails.application.secrets.moment_locale != 'en' @@ -151,7 +151,7 @@ end %> -<% if Rails.application.assets_manifest.find("summernote/lang/summernote-#{Rails.application.secrets.summernote_locale}.js").first %> +<% if asset_available?("summernote/lang/summernote-#{Rails.application.secrets.summernote_locale}.js") %> <% elsif Rails.application.secrets.summernote_locale != 'en-US' @@ -159,7 +159,7 @@ end %> -<% if Rails.application.assets_manifest.find("fullcalendar/dist/lang/#{Rails.application.secrets.fullcalendar_locale}.js").first %> +<% if asset_available?("fullcalendar/dist/lang/#{Rails.application.secrets.fullcalendar_locale}.js") %> <% elsif Rails.application.secrets.fullcalendar_locale != 'en' From 40903721fae191b2b415fae0775603b0412f7deb Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 1 Apr 2020 16:03:08 +0200 Subject: [PATCH 099/109] add kibana to development toolbox --- doc/development_readme.md | 7 +++++++ docker/development/docker-compose.yml | 13 +++++++++++++ docker/development/hosts | 2 ++ 3 files changed, 22 insertions(+) diff --git a/doc/development_readme.md b/doc/development_readme.md index 84a2b2d94..309f78e75 100644 --- a/doc/development_readme.md +++ b/doc/development_readme.md @@ -9,6 +9,7 @@ This document will guide you through all the steps needed to set up a developmen 3. [ElasticSearch](#elasticsearch)
3.1. [Rebuild statistics](#rebuild-stats)
3.2. [Backup and Restore](#backup-and-restore-elasticsearch) +3.3. [Debugging](debugging-elasticsearch) This procedure is not easy to follow so if you don't need to write some code for Fab-manager, please prefer the [production installation method](doc/production_readme.md). @@ -180,3 +181,9 @@ To backup and restore the ElasticSearch database, use the [elasticsearch-dump](h Dump the database with: `elasticdump --input=http://localhost:9200/stats --output=fablab_stats.json`. Restore it with: `elasticdump --input=fablab_stats.json --output=http://localhost:9200/stats`. + + + +### Debugging + +In development, visit http://fabmanager-kibana:5601 to use Kibana, the web UI for ElasticSearch \ No newline at end of file diff --git a/docker/development/docker-compose.yml b/docker/development/docker-compose.yml index e8eca948a..913892132 100644 --- a/docker/development/docker-compose.yml +++ b/docker/development/docker-compose.yml @@ -38,6 +38,19 @@ services: # - "9200:9200" # - "9300:9300" + kibana: + image: kibana:5.6 + environment: + ELASTICSEARCH_HOSTS: http://fabmanager-elastic:9200 + restart: always + ## linux + networks: + fabmanager: + ipv4_address: 172.18.0.5 + ## osx + #ports: + # - "5601:5601" + redis: image: redis:5 volumes: diff --git a/docker/development/hosts b/docker/development/hosts index f69380840..fac56b5d5 100644 --- a/docker/development/hosts +++ b/docker/development/hosts @@ -1,10 +1,12 @@ ## == fab-manager == ## linux +172.18.0.5 fabmanager-kibana 172.18.0.4 fabmanager-redis 172.18.0.3 fabmanager-elastic 172.18.0.2 fabmanager-postgres ## osx +# 127.0.0.1 fabmanager-kibana # 127.0.0.1 fabmanager-redis # 127.0.0.1 fabmanager-elastic # 127.0.0.1 fabmanager-postgres From 3917d6042c2ca5879aa39d28a34894aec16e216c Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 1 Apr 2020 17:25:55 +0200 Subject: [PATCH 100/109] [bug] no statistics for subscriptions (#196) + [bug] issing translation for subscriptions statistics > duration --- CHANGELOG.md | 4 +++- app/models/plan.rb | 12 ++++++++++-- app/services/statistic_service.rb | 2 +- config/locales/en.yml | 1 + config/locales/es.yml | 1 + config/locales/fr.yml | 1 + config/locales/pt.yml | 1 + 7 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7470d394a..e3eb21e8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,17 +11,19 @@ - Renamed production documentation - Syntax improvements in scss files - Fix a bug: crediting a wallet w/ refund invoice prevent statistics generation (#196) +- Fix a bug: no statistics for subscriptions (#196) - Fix a bug: invalid translation keys in closing accounting period interface - Fix a bug: since PostgreSQL release 9.6.17, the new installations will fail to start complaining for missing password (#194) - Fix a bug: missing translations for some error messages - Fix a bug: invalid footprints in invoices fixtures - Fix a bug: unable to export accounting data to ACD - Fix a bug: report error on invalid encoding in members import +- Fix a bug: missing translation for subscriptions statistics > duration - Fix a security issue: updated mkdirp to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) - Fix a security issue: updated acorn to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) - Fix a security issue: updated actionview to fix [CVE-2020-5267](https://nvd.nist.gov/vuln/detail/CVE-2020-5267) - [TODO DEPLOY] `rails fablab:fix:avoirs_wallet_transaction` -- [TODO DEPLOY] `rails fablab:es:generate_stats[289]` only if you had missing statistics since some date ago. You can replace 289 by the difference of days between the day you run this task and the last day you had statistics +- [TODO DEPLOY] `rails fablab:es:generate_stats[289]` only if you had missing statistics since some date ago (here 289 days) ## v4.3.2 2020 March 11 diff --git a/app/models/plan.rb b/app/models/plan.rb index cdb99e49c..84696e026 100644 --- a/app/models/plan.rb +++ b/app/models/plan.rb @@ -84,12 +84,12 @@ class Plan < ApplicationRecord # must be publicly accessible for the migration def create_statistic_type stat_index = StatisticIndex.where(es_type_key: 'subscription') - type = StatisticType.find_by(statistic_index_id: stat_index.first.id, key: duration.to_i) + type = find_statistic_type if type.nil? type = StatisticType.create!( statistic_index_id: stat_index.first.id, key: duration.to_i, - label: "Durée : #{human_readable_duration}", + label: "#{I18n.t('statistics.duration')} : #{human_readable_duration}", graph: true, simple: true ) @@ -98,6 +98,14 @@ class Plan < ApplicationRecord create_statistic_association(type, subtype) end + def find_statistic_type + stat_index = StatisticIndex.where(es_type_key: 'subscription') + type = StatisticType.find_by(statistic_index_id: stat_index.first.id, key: duration.to_i) + return type if type + + StatisticType.where(statistic_index_id: stat_index.first.id).where('label LIKE ?', "%#{human_readable_duration}%").first + end + private def create_statistic_subtype diff --git a/app/services/statistic_service.rb b/app/services/statistic_service.rb index 5e4e36064..5b4c8725a 100644 --- a/app/services/statistic_service.rb +++ b/app/services/statistic_service.rb @@ -147,7 +147,7 @@ class StatisticService plan_interval_count: p.interval_count, plan_group_name: p.group.name, slug: p.slug, - duration: p.duration.to_i, + duration: p.find_statistic_type.key, subscription_id: sub.id, invoice_item_id: i.id, ca: ca diff --git a/config/locales/en.yml b/config/locales/en.yml index 39f4fd0ec..f7ecd4c5d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -356,6 +356,7 @@ en: revenue: "Revenue" account_creation: "Account creation" project_publication: "Project publication" + duration: "Duration" #statistics exports to the excel file format export: entries: "Entries" diff --git a/config/locales/es.yml b/config/locales/es.yml index 46a05c0b8..be0e91d15 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -356,6 +356,7 @@ es: revenue: "Ingresos" account_creation: "Creación de cuenta" project_publication: "Publicación de proyectos" + duration: "Duración" #statistics exports to the excel file format export: entries: "Entradas" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index e04a54ba0..fa6295007 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -356,6 +356,7 @@ fr: revenue: "Chiffre d'affaires" account_creation: "Création de compte" project_publication: "Publication de projet" + duration: "Durée" #statistics exports to the excel file format export: entries: "Entrées" diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 01bf18932..2cae55d34 100755 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -356,6 +356,7 @@ pt: revenue: "Receita" account_creation: "Criação de conta" project_publication: "Publicação de projeto" + duration: "Duração" #statistics exports to the excel file format export: entries: "Entradas" From a992596102c00c0ecb2c1d502bdd9ac02a629506 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 1 Apr 2020 17:28:03 +0200 Subject: [PATCH 101/109] New translations en.yml (French) --- config/locales/fr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/locales/fr.yml b/config/locales/fr.yml index e04a54ba0..db5941ad9 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -356,6 +356,7 @@ fr: revenue: "Chiffre d'affaires" account_creation: "Création de compte" project_publication: "Publication de projet" + duration: "Duration" #statistics exports to the excel file format export: entries: "Entrées" From f1c21307d79991a1b3e14efa71a38d8f01b5642c Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 1 Apr 2020 17:28:08 +0200 Subject: [PATCH 102/109] New translations en.yml (Acholi) --- config/locales/ach.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/locales/ach.yml b/config/locales/ach.yml index 1c3f07fb0..5f15d541c 100644 --- a/config/locales/ach.yml +++ b/config/locales/ach.yml @@ -356,6 +356,7 @@ ach: revenue: "crwdns3733:0crwdne3733:0" account_creation: "crwdns3735:0crwdne3735:0" project_publication: "crwdns3737:0crwdne3737:0" + duration: "crwdns20282:0crwdne20282:0" #statistics exports to the excel file format export: entries: "crwdns3739:0crwdne3739:0" From 7952a091918158670fb17d511e8f688c4a363aa8 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 1 Apr 2020 17:28:14 +0200 Subject: [PATCH 103/109] New translations en.yml (Spanish) --- config/locales/es.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/locales/es.yml b/config/locales/es.yml index 46a05c0b8..2abb14c34 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -356,6 +356,7 @@ es: revenue: "Ingresos" account_creation: "Creación de cuenta" project_publication: "Publicación de proyectos" + duration: "Duration" #statistics exports to the excel file format export: entries: "Entradas" From e1bdc04a78a5486cfc5d90b3d05db948d54f62f4 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 1 Apr 2020 17:28:22 +0200 Subject: [PATCH 104/109] New translations en.yml (Portuguese) --- config/locales/pt.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 01bf18932..1a349ca80 100755 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -356,6 +356,7 @@ pt: revenue: "Receita" account_creation: "Criação de conta" project_publication: "Publicação de projeto" + duration: "Duration" #statistics exports to the excel file format export: entries: "Entradas" From cf3ae8a6144b5db5872336c350482471f7c4f668 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 1 Apr 2020 17:40:07 +0200 Subject: [PATCH 105/109] New translations en.yml (French) --- config/locales/fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/fr.yml b/config/locales/fr.yml index db5941ad9..fa6295007 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -356,7 +356,7 @@ fr: revenue: "Chiffre d'affaires" account_creation: "Création de compte" project_publication: "Publication de projet" - duration: "Duration" + duration: "Durée" #statistics exports to the excel file format export: entries: "Entrées" From f2db6133c62442ef57327c1ed7322b9f57ac35f6 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 1 Apr 2020 17:40:19 +0200 Subject: [PATCH 106/109] New translations en.yml (Spanish) --- config/locales/es.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/es.yml b/config/locales/es.yml index 2abb14c34..be0e91d15 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -356,7 +356,7 @@ es: revenue: "Ingresos" account_creation: "Creación de cuenta" project_publication: "Publicación de proyectos" - duration: "Duration" + duration: "Duración" #statistics exports to the excel file format export: entries: "Entradas" From b4c5ac7118aeaf52f81c11d8cce7a96b0e26699a Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 1 Apr 2020 17:40:26 +0200 Subject: [PATCH 107/109] New translations en.yml (Portuguese) --- config/locales/pt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 1a349ca80..2cae55d34 100755 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -356,7 +356,7 @@ pt: revenue: "Receita" account_creation: "Criação de conta" project_publication: "Publicação de projeto" - duration: "Duration" + duration: "Duração" #statistics exports to the excel file format export: entries: "Entradas" From f24d94b97954343dd04355a9b77ae541dd6929f8 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 1 Apr 2020 17:58:32 +0200 Subject: [PATCH 108/109] set correct invoicing_profile_id for refund invoice during wallet credit --- app/services/wallet_service.rb | 2 +- test/integration/wallets_test.rb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/services/wallet_service.rb b/app/services/wallet_service.rb index ff3fd1e11..51eb093f6 100644 --- a/app/services/wallet_service.rb +++ b/app/services/wallet_service.rb @@ -61,7 +61,7 @@ class WalletService avoir.description = description avoir.payment_method = 'wallet' avoir.subscription_to_expire = false - avoir.invoicing_profile_id = wallet_transaction.invoicing_profile_id + avoir.invoicing_profile_id = wallet_transaction.wallet.user.invoicing_profile.id avoir.statistic_profile_id = wallet_transaction.wallet.user.statistic_profile.id avoir.total = wallet_transaction.amount * 100.0 avoir.save! diff --git a/test/integration/wallets_test.rb b/test/integration/wallets_test.rb index b0c711a26..4a9242984 100644 --- a/test/integration/wallets_test.rb +++ b/test/integration/wallets_test.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'test_helper' + class WalletsTest < ActionDispatch::IntegrationTest # Called before every test method runs. Can be used # to set up fixture information. From 729a070ea2ff212e9bc3f52b7f5c153b57c34099 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 1 Apr 2020 18:05:05 +0200 Subject: [PATCH 109/109] Version 4.3.3 --- CHANGELOG.md | 2 ++ Procfile | 2 +- package.json | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3eb21e8d..2fd684e6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog Fab-manager +## v4.3.3 2020 April 1st + - Docker build will no longer embed development dependencies - Updated instructions to setup a development environment - Updated translations diff --git a/Procfile b/Procfile index 62d2b1e51..05816cdf6 100644 --- a/Procfile +++ b/Procfile @@ -1,3 +1,3 @@ web: bundle exec rails server puma -p $PORT worker: bundle exec sidekiq -C ./config/sidekiq.yml -mail: node_modules/maildev/bin/maildev --ip 0.0.0.0 +#mail: node_modules/maildev/bin/maildev --ip 0.0.0.0 diff --git a/package.json b/package.json index e221f2e0a..56f16c5ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fab-manager", - "version": "4.3.3-dev", + "version": "4.3.3", "description": "Fab-manager is the FabLab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks and your marker's projects.", "keywords": [ "fablab",