From e9e91037fcec5004775f1fa13041de7d2b574bf8 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Mon, 18 Jan 2021 10:32:30 +0100 Subject: [PATCH 1/3] add task to skip content type validation for old pj --- ...type_validation_to_piece_justificative.rake | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/tasks/deployment/20210118084107_add_default_skip_content_type_validation_to_piece_justificative.rake diff --git a/lib/tasks/deployment/20210118084107_add_default_skip_content_type_validation_to_piece_justificative.rake b/lib/tasks/deployment/20210118084107_add_default_skip_content_type_validation_to_piece_justificative.rake new file mode 100644 index 000000000..3cf0df028 --- /dev/null +++ b/lib/tasks/deployment/20210118084107_add_default_skip_content_type_validation_to_piece_justificative.rake @@ -0,0 +1,18 @@ +namespace :after_party do + desc 'Deployment task: add_default_skip_content_type_validation_to_piece_justificative' + task add_default_skip_content_type_validation_to_piece_justificative: :environment do + puts "Running deploy task 'add_default_skip_content_type_validation_to_piece_justificative'" + tdcs = TypeDeChamp.where(type_champ: TypeDeChamp.type_champs.fetch(:piece_justificative)) + progress = ProgressReport.new(tdcs.count) + tdcs.find_each do |tdc| + tdc.update(skip_content_type_pj_validation: true) + progress.inc + end + progress.finish + + # Update task as completed. If you remove the line below, the task will + # run with every deploy (or every time you call after_party:run). + AfterParty::TaskRecord + .create version: AfterParty::TaskRecorder.new(__FILE__).timestamp + end +end From f57d45f554bae07785276fa1e3244c564e86ee72 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Jan 2021 17:11:22 +0000 Subject: [PATCH 2/3] Bump nokogiri from 1.10.10 to 1.11.1 Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.10 to 1.11.1. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.10...v1.11.1) Signed-off-by: dependabot[bot] --- Gemfile.lock | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ac1c5d752..9a3451400 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -428,7 +428,7 @@ GEM mimemagic (0.3.5) mini_magick (4.11.0) mini_mime (1.0.2) - mini_portile2 (2.4.0) + mini_portile2 (2.5.0) minitest (5.14.2) momentjs-rails (2.20.1) railties (>= 3.1) @@ -439,8 +439,9 @@ GEM nenv (0.3.0) netrc (0.11.0) nio4r (2.5.4) - nokogiri (1.10.10) - mini_portile2 (~> 2.4.0) + nokogiri (1.11.1) + mini_portile2 (~> 2.5.0) + racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) shellany (~> 0.0) @@ -494,6 +495,7 @@ GEM pundit (2.1.0) activesupport (>= 3.0.0) raabro (1.1.6) + racc (1.5.2) rack (2.2.3) rack-attack (6.3.1) rack (>= 1.0, < 3) From da7103180125f5598cbc37408d13fafd692db010 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Mon, 18 Jan 2021 15:12:17 +0100 Subject: [PATCH 3/3] add skip_content_type_pj_validation attr to pj --- app/models/type_de_champ.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/type_de_champ.rb b/app/models/type_de_champ.rb index 68453285a..aeed93e2d 100644 --- a/app/models/type_de_champ.rb +++ b/app/models/type_de_champ.rb @@ -57,7 +57,7 @@ class TypeDeChamp < ApplicationRecord belongs_to :parent, class_name: 'TypeDeChamp', optional: true has_many :types_de_champ, -> { ordered }, foreign_key: :parent_id, class_name: 'TypeDeChamp', inverse_of: :parent, dependent: :destroy - store_accessor :options, :cadastres, :old_pj, :drop_down_options, :skip_pj_validation + store_accessor :options, :cadastres, :old_pj, :drop_down_options, :skip_pj_validation, :skip_content_type_pj_validation has_many :revision_types_de_champ, class_name: 'ProcedureRevisionTypeDeChamp', dependent: :destroy, inverse_of: :type_de_champ has_many :revisions, through: :revision_types_de_champ