From fdb2e46700f5fac1b717804e71b3d93a46f82df9 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Thu, 13 Aug 2020 12:51:33 +0200 Subject: [PATCH 1/2] Add consequence for repository snapshotting --- .../repository_snapshot.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 app/models/my_module_status_consequences/repository_snapshot.rb diff --git a/app/models/my_module_status_consequences/repository_snapshot.rb b/app/models/my_module_status_consequences/repository_snapshot.rb new file mode 100644 index 000000000..c32da1d50 --- /dev/null +++ b/app/models/my_module_status_consequences/repository_snapshot.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module MyModuleStatusConsequences + class RepositorySnapshot < MyModuleStatusConsequence + def call(my_module) + my_module.assigned_repositories.each do |repo| + repo.provision_snapshot(my_module) + end + end + end +end From 4a837951dbbefc0b5fa0be8d19eee5fe7b541a29 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Tue, 25 Aug 2020 15:02:25 +0200 Subject: [PATCH 2/2] Update variable name --- .../my_module_status_consequences/repository_snapshot.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/my_module_status_consequences/repository_snapshot.rb b/app/models/my_module_status_consequences/repository_snapshot.rb index c32da1d50..6ad7c3aec 100644 --- a/app/models/my_module_status_consequences/repository_snapshot.rb +++ b/app/models/my_module_status_consequences/repository_snapshot.rb @@ -3,8 +3,8 @@ module MyModuleStatusConsequences class RepositorySnapshot < MyModuleStatusConsequence def call(my_module) - my_module.assigned_repositories.each do |repo| - repo.provision_snapshot(my_module) + my_module.assigned_repositories.each do |repository| + repository.provision_snapshot(my_module) end end end