lib/bebox/wizards/environment_wizard.rb in bebox-0.1.0 vs lib/bebox/wizards/environment_wizard.rb in bebox-0.1.1

- old
+ new

@@ -8,22 +8,24 @@ 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 + output = environment.create ok 'Environment created!.' + return output 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 + output = environment.remove ok 'Environment removed!.' + return output end end end \ No newline at end of file