Merge branch 'develop'

This commit is contained in:
Andrés Montañez 2014-09-13 17:30:17 -03:00
commit 97e9fde28a
8 changed files with 30 additions and 13 deletions

1
.gitignore vendored
View file

@ -3,6 +3,7 @@
.project
.buildpath
.idea
vendor
# OS generated files # // GitHub Recommendation
######################

View file

@ -35,6 +35,7 @@ class DeployCommand extends AbstractCommand implements RequiresEnvironment
const DEPLOY_STRATEGY_RSYNC = 'rsync';
const DEPLOY_STRATEGY_TARGZ = 'targz';
const DEPLOY_STRATEGY_GIT_REBASE = 'git-rebase';
const DEPLOY_STRATEGY_GIT_REMOTE_CACHE = 'git-remote-cache';
const DEPLOY_STRATEGY_GUESS = 'guess';
const DEFAULT_DEPLOY_STRATEGY = self::DEPLOY_STRATEGY_GUESS;
@ -557,6 +558,10 @@ class DeployCommand extends AbstractCommand implements RequiresEnvironment
$deployStrategy = 'deployment/strategy/git-rebase';
break;
case self::DEPLOY_STRATEGY_GIT_REMOTE_CACHE:
$deployStrategy = 'deployment/strategy/git-remote-cache';
break;
case self::DEPLOY_STRATEGY_GUESS:
default:
if ($this->getConfig()->release('enabled', false) == true) {

View file

@ -19,8 +19,9 @@ use Mage\Task\AbstractTask;
*/
abstract class ComposerAbstractTask extends AbstractTask
{
protected function getComposerPath()
protected function getComposerCmd()
{
return $this->getConfig()->general('composer_path', 'php composer.phar');
$composerCmd = $this->getParameter('composer_cmd', $this->getConfig()->general('composer_cmd', 'php composer.phar'));
return $this->getConfig()->general('composer_cmd', $composerCmd);
}
}
}

View file

@ -23,6 +23,6 @@ class GenerateAutoloadTask extends ComposerAbstractTask
*/
public function run()
{
return $this->runCommand($this->getComposerPath() . ' dumpautoload --optimize');
return $this->runCommand($this->getComposerCmd() . ' dumpautoload --optimize');
}
}

View file

@ -23,6 +23,7 @@ class InstallTask extends ComposerAbstractTask
*/
public function run()
{
return $this->runCommand($this->getComposerPath() . ' install');
$dev = $this->getParameter('dev', true);
return $this->runCommand($this->getComposerCmd() . ' install' . ($dev ? ' --dev' : ' --no-dev'));
}
}

View file

@ -111,7 +111,7 @@ class RsyncTask extends BaseStrategyTaskAbstract implements IsReleaseAware
{
$excludesRsync = '';
foreach ($excludes as $exclude) {
$excludesRsync .= ' --exclude ' . $exclude . ' ';
$excludesRsync .= ' --exclude=' . escapeshellarg($exclude) . ' ';
}
$excludesRsync = trim($excludesRsync);

View file

@ -9,19 +9,21 @@
* file that was distributed with this source code.
*/
use Mage\Autoload;
date_default_timezone_set('UTC');
$baseDir = dirname(dirname(__FILE__));
define('MAGALLANES_VERSION', '1.0.1');
define('MAGALLANES_VERSION', '1.0.2');
define('MAGALLANES_DIRECTORY', $baseDir);
// Preload
require_once $baseDir . '/Mage/Autoload.php';
$loader = new Autoload();
spl_autoload_register(array($loader, 'autoLoad'));
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
require_once __DIR__ . '/../vendor/autoload.php';
} else {
require_once $baseDir . '/Mage/Autoload.php';
$loader = new \Mage\Autoload();
spl_autoload_register(array($loader, 'autoLoad'));
}
// Clean arguments
array_shift($argv);

View file

@ -8,6 +8,13 @@
"require": {
"php": ">=5.3"
},
"autoload": {
"psr-4": {
"Mage\\": "./Mage",
"Task\\": ".mage/tasks",
"Command\\": ".mage/commands"
}
},
"bin": [
"bin/mage"
]