Browse Source

SensioLabs Insight.

1.0
Andrés Montañez 10 years ago
parent
commit
dc18a91cf7
  1. 10
      Mage/Task/BuiltIn/Filesystem/PermissionsTask.php
  2. 6
      Mage/Task/BuiltIn/Ioncube/EncryptTask.php
  3. 2
      Mage/Task/BuiltIn/Releases/RollbackTask.php
  4. 1
      docs/example-config/.mage/tasks/SampleTaskRollbackAware.php

10
Mage/Task/BuiltIn/Filesystem/PermissionsTask.php

@ -159,7 +159,7 @@ class PermissionsTask extends AbstractTask
); );
foreach($options as $option => $apply) { foreach($options as $option => $apply) {
if ($apply == true) { if ($apply === true) {
$optionsForCmd .= $option; $optionsForCmd .= $option;
} }
} }
@ -192,7 +192,7 @@ class PermissionsTask extends AbstractTask
*/ */
protected function setPaths(array $paths) protected function setPaths(array $paths)
{ {
if ($this->checkPathsExist == true) { if ($this->checkPathsExist === true) {
$commands = array(); $commands = array();
foreach ($paths as $path) { foreach ($paths as $path) {
$commands[] = '(([ -f ' . $path . ' ]) || ([ -d ' . $path . ' ]))'; $commands[] = '(([ -f ' . $path . ' ]) || ([ -d ' . $path . ' ]))';
@ -241,8 +241,6 @@ class PermissionsTask extends AbstractTask
/** /**
* Set owner. * Set owner.
* *
* @todo check existance of $owner on host, might be different ways depending on OS.
*
* @param string $owner * @param string $owner
* @return PermissionsTask * @return PermissionsTask
*/ */
@ -264,8 +262,6 @@ class PermissionsTask extends AbstractTask
/** /**
* Set group. * Set group.
* *
* @todo check existance of $group on host, might be different ways depending on OS.
*
* @param string $group * @param string $group
* @return PermissionsTask * @return PermissionsTask
*/ */
@ -287,8 +283,6 @@ class PermissionsTask extends AbstractTask
/** /**
* Set rights. * Set rights.
* *
* @todo check if $rights is in a correct format.
*
* @param string $rights * @param string $rights
* @return PermissionsTask * @return PermissionsTask
*/ */

6
Mage/Task/BuiltIn/Ioncube/EncryptTask.php

@ -33,7 +33,6 @@ use Mage\Task\ErrorWithMessageException;
* *
* Example enviroment.yaml file at end * Example enviroment.yaml file at end
* *
* @todo add support for creating license files.
* *
* (c) ActWeb 2013 * (c) ActWeb 2013
* (c) Matt Lowe (marl.scot.1@googlemail.com) * (c) Matt Lowe (marl.scot.1@googlemail.com)
@ -202,7 +201,7 @@ class EncryptTask extends AbstractTask
/* /*
* Get all our IonCube config options * Get all our IonCube config options
*/ */
$this->_getAllIonCubeConfigs(); $this->getAllIonCubeConfigs();
/* /*
* get the source code location * get the source code location
*/ */
@ -279,7 +278,7 @@ class EncryptTask extends AbstractTask
* *
* @return void * @return void
*/ */
private function _getAllIonCubeConfigs() private function getAllIonCubeConfigs()
{ {
/* /*
@ -553,7 +552,6 @@ class EncryptTask extends AbstractTask
* D - Default options as stored in script * D - Default options as stored in script
* *
* more options could be added to make this a bit more flexable * more options could be added to make this a bit more flexable
* @todo I'm sure this could be combined into a loop to make it easier and shorter
* *
*/ */
$s = array(); $s = array();

2
Mage/Task/BuiltIn/Releases/RollbackTask.php

@ -59,8 +59,6 @@ class RollbackTask extends AbstractTask implements IsReleaseAware
$result = $this->runCommandRemote('ls -1 ' . $releasesDirectory, $output); $result = $this->runCommandRemote('ls -1 ' . $releasesDirectory, $output);
$releases = ($output == '') ? array() : explode(PHP_EOL, $output); $releases = ($output == '') ? array() : explode(PHP_EOL, $output);
$inDeploy = $this->getParameter('inDeploy',false);
if (count($releases) == 0) { if (count($releases) == 0) {
Console::output('Release are not available for <bold>' . $this->getConfig()->getHost() . '</bold> ... <red>FAIL</red>'); Console::output('Release are not available for <bold>' . $this->getConfig()->getHost() . '</bold> ... <red>FAIL</red>');

1
docs/example-config/.mage/tasks/SampleTaskRollbackAware.php

@ -20,4 +20,3 @@ class SampleTaskRollbackAware extends AbstractTask implements RollbackAware
return true; return true;
} }
} }

Loading…
Cancel
Save