demarches-normaliennes/lib/tasks
Pierre de La Morinerie 790704ef58 tasks: silence output of tasks during tests
Currently, when running specs, the output of rake tasks is spamming
the tests results.

This PR configures Rake so that it runs in quiet mode during specs. This
disables the internal messages of rake during tests.

However our own `puts` also need to be conditionned to the verbosity of
rake. Using a simple `rake_puts` helper allows the info messages to be
displayed when running the rake task manually, but not during tests.

Before:

```
$ bin/rspec spec/lib/rake
Randomized with seed 6544
1 Mails::ClosedMail to clean
cleaning Mails::ClosedMail #1
1 Mails::InitiatedMail to clean
cleaning Mails::InitiatedMail #1
1 Mails::ReceivedMail to clean
cleaning Mails::ReceivedMail #1
1 Mails::RefusedMail to clean
cleaning Mails::RefusedMail #1
1 Mails::WithoutContinuationMail to clean
cleaning Mails::WithoutContinuationMail #1
.....Champ 0/1
.Champ 0/1
.
```

After:

```
$ bin/rspec spec/lib/rake

Randomized with seed 6544
.......
```
2018-06-13 11:05:15 +02:00
..
.keep Fix rake tasks 2017-01-11 17:36:28 +01:00
2017_07_18_clean_followed_dossiers.rake Rake: add tasks to clean followed_dossiers 2017-07-18 15:00:00 +02:00
2017_07_26_clean_birthdate_on_individual.rake tasks: silence output of tasks during tests 2018-06-13 11:05:15 +02:00
2017_08_01_clean_assign_to.rake Clean assign_to duplicates with a rake task 2017-08-28 10:42:29 +02:00
2017_09_19_set_confidentialite_to_old_avis.rake Avis: add confidentiel field 2017-09-20 15:42:26 +02:00
2017_09_22_set_dossier_updated_replied_to_initiated.rake [Fix #503] Lib task: move updated, replied state to initiated 2017-09-26 14:42:54 +02:00
2017_10_06_set_follow_date.rake Enable the Layout/MultilineMethodCallBraceLayout cop 2018-01-15 22:33:13 +01:00
2017_10_18_regenerate_attestation.rake tasks: silence output of tasks during tests 2018-06-13 11:05:15 +02:00
2017_10_30_copy_commentaire_piece_justificative_to_file.rake tasks: silence output of tasks during tests 2018-06-13 11:05:15 +02:00
2017_12_04_translate_dossier_state_to_french.rake Rake: french translation dossier : add revert task 2017-12-15 12:10:54 +01:00
2017_12_05_initialize_timestamps_for_entreprises.rake tasks: silence output of tasks during tests 2018-06-13 11:05:15 +02:00
2017_12_20_delete_old_administration.rake tasks: silence output of tasks during tests 2018-06-13 11:05:15 +02:00
2017_12_21_replace_deprecated_mail_template_tags.rake Enable the Layout/SpaceInsideBrackets cop 2018-01-18 10:53:34 +01:00
2018_01_11_add_active_state_to_administrators.rake Add active attribute to administrateur model 2018-01-16 10:49:07 +01:00
2018_01_18_clean_datetime_in_champs.rake tasks: silence output of tasks during tests 2018-06-13 11:05:15 +02:00
2018_02_13_fill_champ_private_and_type.rake some old champ live in a parallel space time continuum without valid dossier or type_de_champ 2018-02-27 11:00:34 +01:00
2018_02_14_clean_double_champ_private.rake Cleanup rake task for public/private champ outage 2018-02-14 19:03:05 +01:00
2018_02_20_remove_duplicated_assign_tos.rake Fix a typo 2018-02-20 15:25:01 +01:00
2018_02_20_set_processed_at.rake Moulinette™ for unprocessed accepted dossiers 2018-02-21 16:38:25 +01:00
2018_02_28_clean_gestionnaire_emails.rake [Fix #1808] Use &. where possible 2018-05-31 11:49:25 +02:00
2018_03_06_clean_html_textareas.rake tasks: silence output of tasks during tests 2018-06-13 11:05:15 +02:00
2018_03_08_send_missed_accuse_reception.rake [#1545] secure task for production 2018-03-09 19:02:47 +01:00
2018_03_29_inline_entreprise_association.rake Entreprise/Association moulinettes™ 2018-04-04 11:48:06 +02:00
2018_03_29_procedure_description_markup.rake [Fix #1690] Strip html markup from procedure descriptions 2018-03-29 11:13:34 +02:00
2018_03_29_remove_code_tags_from_mail_templates.rake tasks: silence output of tasks during tests 2018-06-13 11:05:15 +02:00
2018_04_03_attestation_closed_mail_discrepancy.rake Do not use deliver_late 2018-04-11 09:33:06 +02:00
2018_04_03_type_individual_date.rake Task: parse individual_date 2018-04-03 16:23:15 +02:00
2018_04_04_fetch_etablissement_with_no_entreprise.rake tasks: silence output of tasks during tests 2018-06-13 11:05:15 +02:00
2018_04_11_admin_or_gestionnaire_users.rake Create User accounts for existing Admin accounts that don’t have one 2018-04-12 16:40:24 +02:00
2018_05_09_add_test_started_at_to_procedure.rake Task to add test_started_at to all procedures 2018-05-15 11:00:20 +02:00
2018_05_14_add_annotation_privee_to_procedure.rake [fix #1922] add one annotation to a procedure 2018-05-18 11:48:19 +02:00
2018_05_15_add_aasm_state_to_procedure.rake Add aasm_state to procedures 2018-05-17 14:46:48 +02:00
2018_05_21_cerfa_to_pj.rake Convert CERFA to PJ 2018-05-29 15:00:24 +02:00
2018_05_24_optional_durees_conservation_for_legacy_procedures.rake [#1946] Temporarily allow legacy procedures not to have a retention time 2018-06-01 16:46:39 +02:00
2018_05_30_missed_ar_messages.rake Remove the contact_email locale 2018-06-01 00:00:11 +02:00
2018_06_01_optional_juridique_for_legacy_procedures.rake Procedure: add rake task to set juridique_required to false for legacy procedures 2018-06-01 11:12:53 +02:00
2018_06_04_scan_pjs.rake Add task to scan old champs pj 2018-06-12 15:12:40 +02:00
2018_06_05_resend_attestations.rake tasks: silence output of tasks during tests 2018-06-13 11:05:15 +02:00
2018_06_05_send_new_attestations.rake tasks: silence output of tasks during tests 2018-06-13 11:05:15 +02:00
2018_06_06_users_for_admins_and_gestionnaires.rake tasks: silence output of tasks during tests 2018-06-13 11:05:15 +02:00
admin.rake Improve super admin management 2018-01-03 12:17:44 +01:00
cloud_storage.rake Enable some Rails cops 2018-03-06 17:18:44 +01:00
dev.rake Do not download backup if exists 2018-05-31 13:59:16 +02:00
task_helper.rb tasks: silence output of tasks during tests 2018-06-13 11:05:15 +02:00