| 
                                
                                    @@ 177-188 (lines=12) @@
                                 | 
                            
                                                            
                                    | 174 | 
                                     | 
                                    	/**  | 
                                
                                                            
                                    | 175 | 
                                     | 
                                    	 * Enable a maintenance page for the given environment using the maintenance:enable Capistrano task.  | 
                                
                                                            
                                    | 176 | 
                                     | 
                                    	 */  | 
                                
                                                            
                                    | 177 | 
                                     | 
                                    	public function enableMaintenance(\DNEnvironment $environment, \DeploynautLogFile $log, \DNProject $project) { | 
                                
                                                            
                                    | 178 | 
                                     | 
                                    		$name = $environment->getFullName();  | 
                                
                                                            
                                    | 179 | 
                                     | 
                                    		$command = $this->getCommand('maintenance:enable', 'web', $environment, null, $log); | 
                                
                                                            
                                    | 180 | 
                                     | 
                                    		$command->run(function($type, $buffer) use($log) { | 
                                
                                                            
                                    | 181 | 
                                     | 
                                    			$log->write($buffer);  | 
                                
                                                            
                                    | 182 | 
                                     | 
                                    		});  | 
                                
                                                            
                                    | 183 | 
                                     | 
                                    		if(!$command->isSuccessful()) { | 
                                
                                                            
                                    | 184 | 
                                     | 
                                    			$this->extend('maintenanceEnableFailure', $environment, $log); | 
                                
                                                            
                                    | 185 | 
                                     | 
                                    			throw new RuntimeException($command->getErrorOutput());  | 
                                
                                                            
                                    | 186 | 
                                     | 
                                    		}  | 
                                
                                                            
                                    | 187 | 
                                     | 
                                    		$log->write(sprintf('Maintenance page enabled on "%s"', $name)); | 
                                
                                                            
                                    | 188 | 
                                     | 
                                    	}  | 
                                
                                                            
                                    | 189 | 
                                     | 
                                     | 
                                
                                                            
                                    | 190 | 
                                     | 
                                    	/**  | 
                                
                                                            
                                    | 191 | 
                                     | 
                                    	 * Disable the maintenance page for the given environment using the maintenance:disable Capistrano task.  | 
                                
                                                                                
                                 | 
                                
                                    @@ 193-204 (lines=12) @@
                                 | 
                            
                                                            
                                    | 190 | 
                                     | 
                                    	/**  | 
                                
                                                            
                                    | 191 | 
                                     | 
                                    	 * Disable the maintenance page for the given environment using the maintenance:disable Capistrano task.  | 
                                
                                                            
                                    | 192 | 
                                     | 
                                    	 */  | 
                                
                                                            
                                    | 193 | 
                                     | 
                                    	public function disableMaintenance(\DNEnvironment $environment, \DeploynautLogFile $log, \DNProject $project) { | 
                                
                                                            
                                    | 194 | 
                                     | 
                                    		$name = $environment->getFullName();  | 
                                
                                                            
                                    | 195 | 
                                     | 
                                    		$command = $this->getCommand('maintenance:disable', 'web', $environment, null, $log); | 
                                
                                                            
                                    | 196 | 
                                     | 
                                    		$command->run(function($type, $buffer) use($log) { | 
                                
                                                            
                                    | 197 | 
                                     | 
                                    			$log->write($buffer);  | 
                                
                                                            
                                    | 198 | 
                                     | 
                                    		});  | 
                                
                                                            
                                    | 199 | 
                                     | 
                                    		if(!$command->isSuccessful()) { | 
                                
                                                            
                                    | 200 | 
                                     | 
                                    			$this->extend('maintenanceDisableFailure', $environment, $log); | 
                                
                                                            
                                    | 201 | 
                                     | 
                                    			throw new RuntimeException($command->getErrorOutput());  | 
                                
                                                            
                                    | 202 | 
                                     | 
                                    		}  | 
                                
                                                            
                                    | 203 | 
                                     | 
                                    		$log->write(sprintf('Maintenance page disabled on "%s"', $name)); | 
                                
                                                            
                                    | 204 | 
                                     | 
                                    	}  | 
                                
                                                            
                                    | 205 | 
                                     | 
                                     | 
                                
                                                            
                                    | 206 | 
                                     | 
                                    	/**  | 
                                
                                                            
                                    | 207 | 
                                     | 
                                    	 * Check the status using the deploy:check capistrano method  | 
                                
                                                                                
                                 | 
                                
                                    @@ 404-415 (lines=12) @@
                                 | 
                            
                                                            
                                    | 401 | 
                                     | 
                                    	 * Also cleans up and generates new error pages.  | 
                                
                                                            
                                    | 402 | 
                                     | 
                                    	 * @param DeploynautLogFile $log  | 
                                
                                                            
                                    | 403 | 
                                     | 
                                    	 */  | 
                                
                                                            
                                    | 404 | 
                                     | 
                                    	public function rebuild(\DNEnvironment $environment, $log) { | 
                                
                                                            
                                    | 405 | 
                                     | 
                                    		$name = $environment->getFullName();  | 
                                
                                                            
                                    | 406 | 
                                     | 
                                    		$command = $this->getCommand('deploy:migrate', 'web', $environment, null, $log); | 
                                
                                                            
                                    | 407 | 
                                     | 
                                    		$command->run(function($type, $buffer) use($log) { | 
                                
                                                            
                                    | 408 | 
                                     | 
                                    			$log->write($buffer);  | 
                                
                                                            
                                    | 409 | 
                                     | 
                                    		});  | 
                                
                                                            
                                    | 410 | 
                                     | 
                                    		if(!$command->isSuccessful()) { | 
                                
                                                            
                                    | 411 | 
                                     | 
                                    			$log->write(sprintf('Rebuild of "%s" failed: %s', $name, $command->getErrorOutput())); | 
                                
                                                            
                                    | 412 | 
                                     | 
                                    			throw new RuntimeException($command->getErrorOutput());  | 
                                
                                                            
                                    | 413 | 
                                     | 
                                    		}  | 
                                
                                                            
                                    | 414 | 
                                     | 
                                    		$log->write(sprintf('Rebuild of "%s" done', $name)); | 
                                
                                                            
                                    | 415 | 
                                     | 
                                    	}  | 
                                
                                                            
                                    | 416 | 
                                     | 
                                     | 
                                
                                                            
                                    | 417 | 
                                     | 
                                    	/**  | 
                                
                                                            
                                    | 418 | 
                                     | 
                                    	 * Extracts a *.sspak file referenced through the passed in $dataTransfer  |