Sha256: 34907fe3c611c13dcb60bc1980b9f37921ebaaab45d1ca295c3dd9165702cf3d
Contents?: true
Size: 1.14 KB
Versions: 1
Compression:
Stored size: 1.14 KB
Contents
module Bebox class EnvironmentWizard include Bebox::Logger include Bebox::WizardsHelper # Create a new environment def create_new_environment(project_root, environment_name) # Check if the environment exist return error("The '#{environment_name}' environment already exist!.") if Bebox::Environment.environment_exists?(project_root, environment_name) # Environment creation environment = Bebox::Environment.new(environment_name, project_root) environment.create ok 'Environment created!.' end # Removes an existing environment def remove_environment(project_root, environment_name) # Check if the environment exist return error("The '#{environment_name}' environment do not exist!.") unless Bebox::Environment.environment_exists?(project_root, environment_name) # Confirm deletion return warn('No changes were made.') unless confirm_action?('Are you sure that you want to delete the environment?') # Environment deletion environment = Bebox::Environment.new(environment_name, project_root) environment.remove ok 'Environment removed!.' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bebox-0.1.0 | lib/bebox/wizards/environment_wizard.rb |