Browse Source

Changes configuration files extensions.

From "yaml" to "yml"
1.0
Andrs Montaez 13 years ago
parent
commit
5359a7afbd
  1. 12
      Mage/Config.php
  2. 2
      Mage/Task/Add.php
  3. 4
      Mage/Task/Init.php
  4. 0
      docs/example-config/.mage/config/environment/production.yml
  5. 0
      docs/example-config/.mage/config/environment/staging.yml
  6. 0
      docs/example-config/.mage/config/general.yml
  7. 0
      docs/example-config/.mage/config/scm.yml

12
Mage/Config.php

@ -9,22 +9,22 @@ class Mage_Config
public function loadEnvironment($environment) public function loadEnvironment($environment)
{ {
if (($environment != '') && file_exists('.mage/config/environment/' . $environment . '.yaml')) { if (($environment != '') && file_exists('.mage/config/environment/' . $environment . '.yml')) {
$this->_environment = @yaml_parse_file('.mage/config/environment/' . $environment . '.yaml'); $this->_environment = @yaml_parse_file('.mage/config/environment/' . $environment . '.yml');
} }
} }
public function loadSCM() public function loadSCM()
{ {
if (file_exists('.mage/config/scm.yaml')) { if (file_exists('.mage/config/scm.yml')) {
$this->_scm = @yaml_parse_file('.mage/config/scm.yaml'); $this->_scm = @yaml_parse_file('.mage/config/scm.yml');
} }
} }
public function loadGeneral() public function loadGeneral()
{ {
if (file_exists('.mage/config/general.yaml')) { if (file_exists('.mage/config/general.yml')) {
$this->_general = @yaml_parse_file('.mage/config/general.yaml'); $this->_general = @yaml_parse_file('.mage/config/general.yml');
} }
} }

2
Mage/Task/Add.php

@ -4,7 +4,7 @@ class Mage_Task_Add
public function environment($environmentName, $withRelases = false) public function environment($environmentName, $withRelases = false)
{ {
$environmentName = strtolower($environmentName); $environmentName = strtolower($environmentName);
$environmentConfigFile = '.mage/config/environment/' . $environmentName . '.yaml'; $environmentConfigFile = '.mage/config/environment/' . $environmentName . '.yml';
Mage_Console::output('Adding new environment: <dark_gray>' . $environmentName . '</dark_gray>'); Mage_Console::output('Adding new environment: <dark_gray>' . $environmentName . '</dark_gray>');

4
Mage/Task/Init.php

@ -17,8 +17,8 @@ class Mage_Task_Init
$results[] = mkdir($configDir . '/tasks'); $results[] = mkdir($configDir . '/tasks');
$results[] = mkdir($configDir . '/config'); $results[] = mkdir($configDir . '/config');
$results[] = mkdir($configDir . '/config/environment'); $results[] = mkdir($configDir . '/config/environment');
$results[] = file_put_contents($configDir . '/config/global.yaml', '#global settings' . PHP_EOL . PHP_EOL); $results[] = file_put_contents($configDir . '/config/global.yml', '#global settings' . PHP_EOL . PHP_EOL);
$results[] = file_put_contents($configDir . '/config/scm.yaml', '#scm settings' . PHP_EOL . PHP_EOL); $results[] = file_put_contents($configDir . '/config/scm.yml', '#scm settings' . PHP_EOL . PHP_EOL);
if (!in_array(false, $results)) { if (!in_array(false, $results)) {
Mage_Console::output('<light_green>Success!!</light_green> The configuration for <dark_gray>Magallanes</dark_gray> has been generated at <blue>.mage</blue> directory.'); Mage_Console::output('<light_green>Success!!</light_green> The configuration for <dark_gray>Magallanes</dark_gray> has been generated at <blue>.mage</blue> directory.');

0
docs/example-config/.mage/config/environment/production.yaml → docs/example-config/.mage/config/environment/production.yml

0
docs/example-config/.mage/config/environment/staging.yaml → docs/example-config/.mage/config/environment/staging.yml

0
docs/example-config/.mage/config/general.yaml → docs/example-config/.mage/config/general.yml

0
docs/example-config/.mage/config/scm.yaml → docs/example-config/.mage/config/scm.yml

Loading…
Cancel
Save