diff options
author | Christopher Baines <mail@cbaines.net> | 2018-06-21 22:59:42 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-06-21 22:59:42 +0100 |
commit | 28a98595043eba29249578494bb21961f328bd05 (patch) | |
tree | c6c31f3eea04221e34b6075fb23bd4024c171348 | |
parent | bf58270f0270298dae20616df6677eed2a568429 (diff) | |
download | govuk-mini-environment-admin-28a98595043eba29249578494bb21961f328bd05.tar govuk-mini-environment-admin-28a98595043eba29249578494bb21961f328bd05.tar.gz |
Extract out the mini_environment_state_id to a method
So that it can be used in other methods.
-rw-r--r-- | app/models/backends/terraform_libvirt/mini_environment_methods.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/backends/terraform_libvirt/mini_environment_methods.rb b/app/models/backends/terraform_libvirt/mini_environment_methods.rb index 38e8809..5a915cf 100644 --- a/app/models/backends/terraform_libvirt/mini_environment_methods.rb +++ b/app/models/backends/terraform_libvirt/mini_environment_methods.rb @@ -65,11 +65,15 @@ module Backends::TerraformLibvirt::MiniEnvironmentMethods def within_terraform_working_directory(mini_environment, &block) TerraformWorkingDirectory.new( - "mini_environment/#{mini_environment.id}", + mini_environment_state_id(mini_environment), 'terraform/libvirt/mini_environment' ).within_working_directory(&block) end + def mini_environment_state_id(mini_environment) + "mini_environment/#{mini_environment.id}" + end + def signon_url(mini_environment) "https://signon.#{mini_environment.name.parameterize}.#{domain}" end |