Browse Source

Tweaks.

1.0
Andrés Montañez 11 years ago
parent
commit
1b2188f0b1
  1. 3
      Mage/Command/Factory.php
  2. 1
      Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php
  3. 1
      Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php

3
Mage/Command/Factory.php

@ -33,13 +33,14 @@ class Factory
public static function get($commandName, Config $config) public static function get($commandName, Config $config)
{ {
$instance = null; $instance = null;
$commandName = ucwords(str_replace('-', ' ', $commandName)); $commandName = ucwords(str_replace('-', ' ', $commandName));
$commandName = str_replace(' ', '', $commandName); $commandName = str_replace(' ', '', $commandName);
$commandName = str_replace(' ', '_', ucwords(str_replace('/', ' ', $commandName))); $commandName = str_replace(' ', '_', ucwords(str_replace('/', ' ', $commandName)));
$className = 'Mage\\Command\\BuiltIn\\' . $commandName . 'Command'; $className = 'Mage\\Command\\BuiltIn\\' . $commandName . 'Command';
if (Autoload::isLoadable($className)) { if (Autoload::isLoadable($className)) {
$instance = new $className; $instance = new $className;
assert($instance instanceOf AbstractCommand);
$instance->setConfig($config); $instance->setConfig($config);
} else { } else {
throw new Exception('Command not found.'); throw new Exception('Command not found.');

1
Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php

@ -10,7 +10,6 @@
namespace Mage\Task\BuiltIn\Deployment\Strategy; namespace Mage\Task\BuiltIn\Deployment\Strategy;
use Mage\Task\BuiltIn\Deployment\Strategy\BaseStrategyTaskAbstract;
use Mage\Task\Releases\IsReleaseAware; use Mage\Task\Releases\IsReleaseAware;
/** /**

1
Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php

@ -10,7 +10,6 @@
namespace Mage\Task\BuiltIn\Deployment\Strategy; namespace Mage\Task\BuiltIn\Deployment\Strategy;
use Mage\Task\BuiltIn\Deployment\Strategy\BaseStrategyTaskAbstract;
use Mage\Task\Releases\IsReleaseAware; use Mage\Task\Releases\IsReleaseAware;
/** /**

Loading…
Cancel
Save