Change SCM configs.

This commit is contained in:
Andrés Montañez
2013-07-06 20:46:19 -03:00
parent 6015b6d7c1
commit 39b1bf7cd5
6 changed files with 38 additions and 99 deletions
+10 -32
View File
@@ -8,7 +8,6 @@ class Mage_Config
private $_releaseId = null;
private $_config = array(
'general' => array(),
'scm' => array(),
'environment' => array(),
);
@@ -78,6 +77,16 @@ class Mage_Config
return $this->_parameters;
}
/**
* Adds (or replaces) a parameter
* @param string $name
* @param mixed $value
*/
public function addParameter($name, $value = true)
{
$this->_parameters[$name] = $value;
}
/**
* Returns the Current environment
*
@@ -218,27 +227,6 @@ class Mage_Config
}
}
/**
* Gets SCM Configuration
*
* @param string $option
* @param string $default
* @return mixed
*/
public function scm($option, $default = false)
{
$config = $this->_config['scm'];
if (isset($config[$option])) {
if (is_array($default) && ($config[$option] == '')) {
return $default;
} else {
return $config[$option];
}
} else {
return $default;
}
}
/**
* Get deployment configuration
*
@@ -354,16 +342,6 @@ class Mage_Config
}
}
/**
* Loads the SCM Configuration
*/
private function _loadSCM()
{
if (file_exists('.mage/config/scm.yml')) {
$this->_config['scm'] = spyc_load_file('.mage/config/scm.yml');
}
}
/**
* Loads the Environment configuration
*