Commit graph

45 commits

Author SHA1 Message Date
Pierre de La Morinerie
fda59c9231 lib: remove outdated tasks 2021-07-20 15:34:31 +02:00
Pierre de La Morinerie
77b65f3aa0 tasks: remove older after_party tasks 2021-05-06 15:19:37 +02:00
simon lehericey
ed404f129b remove now falling spec of obsolete task 2021-05-05 14:28:20 +02:00
simon lehericey
c683fad3f3 [#6084] add after_party task to fill missing data 2021-04-13 09:59:28 +02:00
Pierre de La Morinerie
150ddab660 zeitwerk: Api -> API 2021-02-09 13:07:30 +01:00
Paul Chavard
d2bcbaa180 Fix stable filters migration 2020-12-17 17:10:56 +01:00
clemkeirua
c93d17bcaa add rake task to update typedechamp 2020-07-15 09:00:12 +00:00
Pierre de La Morinerie
c41afc425e tasks: remove old after_party tasks
Fixes a task that since became invalid:

> NameError: uninitialized constant SeekAndDestroyExpiredDossiersJob
> /lib/tasks/deployment/20191203142402_enable_seek_and_destroy_job
2020-07-09 18:18:09 +02:00
Paul Chavard
c4896b45ad Prepare to remove dossier procedure_id 2020-06-11 16:13:44 +02:00
Pierre de La Morinerie
4cb747fdb6 specs: always require rails_helper
Test helpers are separated between two files: spec_helper and
rails_helper. This separation is meant to allow tests that do not
require Rails (like testing standalone libs) to boot faster.

The spec_helper file is always loaded, through `--require spec_helper`
in the `.rspec` config file. When needed, the rails_helper file is
expected to be required manually.

This is fine, but:
- Many test files have a redundant `require 'spec_helper'` line;
- Many test files should require `rails_helper`, but don't.

Not requiring `rails_helper` will cause the Rails-concerned section of
the test environment not to be configured–which may cause subtle bugs
(like the test database not being properly initialized).

Moreover, Spring loads all the Rails files on preloading anyway. So the
gains from using only `spec_helper` are thin.

To streamline this process, this commit:
- Configures `.rspec` to require `rails_helper` by default;
- Remove all manual requires to spec_helper or rails_helper.

Reference: https://stackoverflow.com/questions/24145329/how-is-spec-rails-helper-rb-different-from-spec-spec-helper-rb-do-i-need-it
2020-03-31 12:48:32 +02:00
Paul Chavard
1ce1c1e6d0 use discard 2020-02-13 12:31:59 +01:00
Paul Chavard
a3cf7fce3a Remove old (< 2019) migration tasks 2020-02-13 11:42:11 +01:00
simon lehericey
8ae592fe25 [fix #4361] administrateur active 2019-10-24 18:32:48 +02:00
simon lehericey
725798da6a [fix #4361] Update user table sign_in 2019-10-08 10:09:16 +02:00
Paul Chavard
5a7eb734ff Dump graphql schema for reference 2019-09-24 10:47:21 +02:00
Paul Chavard
7ffb98e616 Remove carrierwave uploaders 2019-09-10 10:49:12 +02:00
simon lehericey
b9f35a9763 ensure that the task is idempotent 2019-09-09 14:08:09 +02:00
simon lehericey
875313e01e add defaut groupe instructeur to hidden procedure 2019-09-09 13:41:08 +02:00
simon lehericey
3ead6bde9d AfterParty: link dossier and groupe_instructeur 2019-09-03 06:51:38 +02:00
simon lehericey
a0555bc820 Remove obsolete tasks 2019-09-03 06:47:02 +02:00
simon lehericey
eb75a563b8 Fix old after_party spec 2019-09-02 11:41:12 +02:00
Paul Chavard
079ffadfce Attestation files migration task 2019-08-27 17:43:06 +02:00
Paul Chavard
d02e0fc556 Fix and test migrate_procedure_logo task 2019-08-22 11:28:03 +02:00
simon lehericey
77c11d8b79 fix_procedure_presentation 2019-08-20 11:28:18 +02:00
Paul Chavard
e9ba7700d4 Remove commentaire file uploader 2019-08-20 10:24:13 +02:00
Pierre de La Morinerie
6459e9cf37 tasks: fix the commentaires migration task to work with hidden dossiers
By default `commentaire.dossier` doesn't return the dossier if it is
hidden.
2019-08-01 15:43:09 +02:00
Pierre de La Morinerie
e975fe4ade tasks: remove task to migrate old pieces justificatives 2019-07-30 16:11:17 +02:00
Paul Chavard
be3283a9a8 Add commentaire pj migration task 2019-07-10 15:35:29 +02:00
Mathieu Magnin
d13b7f953f Migrate mail body to ActionText 2019-07-03 13:15:49 +02:00
Pierre de La Morinerie
0b49e61ec0 tasks: repair updated_at of dossiers wrongly touched by PJ migration
When running the PJ migration task, migrated dossiers have their
updated_at attribute modified.

This means a yellow notification badge pops up on the Instructeurs
pages.

This PR repairs the affected dossiers, by restoring an approximative
updated_at from the latest workflow value (or the timestamp of the
migrated champ).
2019-06-06 11:11:29 +02:00
Pierre de La Morinerie
60121a1be6 task_helper: ensure that incrementing above 100% doesn’t raise an error 2019-05-29 12:06:32 +02:00
Pierre de La Morinerie
4cf54e0d28 tasks: add progress report to the pjs migration task
Progress is indicated per migrated champ.
2019-05-28 10:42:18 +02:00
Pierre de La Morinerie
21ac60ad04 tasks: add a task to migrate pjs of procedures in batches 2019-05-28 10:42:18 +02:00
Paul Chavard
23d8f0d803 Remove old tasks depending on single administrateur 2019-03-12 11:57:51 +01:00
Mathieu Magnin
b690b89b34 Clean old support task 2019-03-12 11:26:07 +01:00
Mathieu Magnin
f96d1b1823 Create default path for brouillons procedures 2019-03-12 11:26:07 +01:00
Mathieu Magnin
11078b7f71 Add rake task to activate publish draft 2019-02-19 17:50:11 +01:00
Pierre de La Morinerie
bb1cc1eef8 tasks: delete dossiers without procedures
Fix #3279
2019-01-23 17:19:36 +01:00
simon lehericey
45db2d8e5a [#3268] Rake task to correct bad follows and logs 2019-01-21 14:17:17 +01:00
Mathieu Magnin
904d8d208b [Fix #3192] Fix data 2018-12-20 15:45:48 +01:00
Paul Chavard
1897b2775c Remove old migration task 2018-11-27 16:11:25 +01:00
Pierre de La Morinerie
4e801b188c tasks: remove outdated footers in mail templates
Fix #1863
2018-11-27 15:32:02 +01:00
Paul Chavard
864d1df413 Test carto migration task 2018-11-20 10:58:22 +01:00
simon lehericey
26ae29ea52 Time.local => Time.zone.local 2018-10-26 10:10:20 +00:00
Pierre de La Morinerie
47af56cf8b spec: move /spec/lib/rake to /spec/lib/tasks
This reflects the structure of the `/lib/tasks` directory.
2018-10-15 11:51:49 +02:00