Revisión 9758c20b
Añadido por Ismael Campos Suárez hace casi 8 años
.gitignore | ||
---|---|---|
/lib/Cake/Console/Templates/skel/tmp/
|
||
/plugins
|
||
/vendors
|
||
/build
|
||
/dist
|
||
.DS_Store
|
||
/tags
|
||
|
||
settings/
|
||
.settings/
|
||
|
||
/nbproject/private/
|
||
/nbproject/
|
||
|
||
#/app/tmp
|
||
/project/Config/proyectoConfig.php
|
.htaccess | ||
---|---|---|
<IfModule mod_rewrite.c>
|
||
RewriteEngine on
|
||
RewriteRule ^$ app/webroot/ [L]
|
||
RewriteRule (.*) app/webroot/$1 [L]
|
||
</IfModule>
|
.project | ||
---|---|---|
<?xml version="1.0" encoding="UTF-8"?>
|
||
<projectDescription>
|
||
<name>sidera</name>
|
||
<comment></comment>
|
||
<projects>
|
||
</projects>
|
||
<buildSpec>
|
||
<buildCommand>
|
||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||
<arguments>
|
||
</arguments>
|
||
</buildCommand>
|
||
<buildCommand>
|
||
<name>org.eclipse.dltk.core.scriptbuilder</name>
|
||
<arguments>
|
||
</arguments>
|
||
</buildCommand>
|
||
<buildCommand>
|
||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||
<arguments>
|
||
</arguments>
|
||
</buildCommand>
|
||
</buildSpec>
|
||
<natures>
|
||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||
<nature>org.eclipse.php.core.PHPNature</nature>
|
||
</natures>
|
||
</projectDescription>
|
.travis.yml | ||
---|---|---|
language: php
|
||
|
||
php:
|
||
- 5.2
|
||
- 5.3
|
||
- 5.4
|
||
- 5.5
|
||
|
||
env:
|
||
- DB=mysql
|
||
- DB=pgsql
|
||
- DB=sqlite
|
||
|
||
matrix:
|
||
include:
|
||
- php: 5.4
|
||
env:
|
||
- PHPCS=1
|
||
|
||
before_script:
|
||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
|
||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test2;'; fi"
|
||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test3;'; fi"
|
||
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi"
|
||
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE SCHEMA test2;' -U postgres -d cakephp_test; fi"
|
||
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE SCHEMA test3;' -U postgres -d cakephp_test; fi"
|
||
- chmod -R 777 ./app/tmp
|
||
- sudo apt-get install lighttpd
|
||
- sh -c "if [ '$PHPCS' = '1' ]; then pear channel-discover pear.cakephp.org; fi"
|
||
- sh -c "if [ '$PHPCS' = '1' ]; then pear install --alldeps cakephp/CakePHP_CodeSniffer; fi"
|
||
- phpenv rehash
|
||
- set +H
|
||
- echo "<?php
|
||
class DATABASE_CONFIG {
|
||
private \$identities = array(
|
||
'mysql' => array(
|
||
'datasource' => 'Database/Mysql',
|
||
'host' => '0.0.0.0',
|
||
'login' => 'travis'
|
||
),
|
||
'pgsql' => array(
|
||
'datasource' => 'Database/Postgres',
|
||
'host' => '127.0.0.1',
|
||
'login' => 'postgres',
|
||
'database' => 'cakephp_test',
|
||
'schema' => array(
|
||
'default' => 'public',
|
||
'test' => 'public',
|
||
'test2' => 'test2',
|
||
'test_database_three' => 'test3'
|
||
)
|
||
),
|
||
'sqlite' => array(
|
||
'datasource' => 'Database/Sqlite',
|
||
'database' => array(
|
||
'default' => ':memory:',
|
||
'test' => ':memory:',
|
||
'test2' => '/tmp/cakephp_test2.db',
|
||
'test_database_three' => '/tmp/cakephp_test3.db'
|
||
),
|
||
)
|
||
);
|
||
public \$default = array(
|
||
'persistent' => false,
|
||
'host' => '',
|
||
'login' => '',
|
||
'password' => '',
|
||
'database' => 'cakephp_test',
|
||
'prefix' => ''
|
||
);
|
||
public \$test = array(
|
||
'persistent' => false,
|
||
'host' => '',
|
||
'login' => '',
|
||
'password' => '',
|
||
'database' => 'cakephp_test',
|
||
'prefix' => ''
|
||
);
|
||
public \$test2 = array(
|
||
'persistent' => false,
|
||
'host' => '',
|
||
'login' => '',
|
||
'password' => '',
|
||
'database' => 'cakephp_test2',
|
||
'prefix' => ''
|
||
);
|
||
public \$test_database_three = array(
|
||
'persistent' => false,
|
||
'host' => '',
|
||
'login' => '',
|
||
'password' => '',
|
||
'database' => 'cakephp_test3',
|
||
'prefix' => ''
|
||
);
|
||
public function __construct() {
|
||
\$db = 'mysql';
|
||
if (!empty(\$_SERVER['DB'])) {
|
||
\$db = \$_SERVER['DB'];
|
||
}
|
||
foreach (array('default', 'test', 'test2', 'test_database_three') as \$source) {
|
||
\$config = array_merge(\$this->{\$source}, \$this->identities[\$db]);
|
||
if (is_array(\$config['database'])) {
|
||
\$config['database'] = \$config['database'][\$source];
|
||
}
|
||
if (!empty(\$config['schema']) && is_array(\$config['schema'])) {
|
||
\$config['schema'] = \$config['schema'][\$source];
|
||
}
|
||
\$this->{\$source} = \$config;
|
||
}
|
||
}
|
||
}" > app/Config/database.php
|
||
|
||
script:
|
||
- sh -c "if [ '$PHPCS' = '1' ]; then phpcs -p --extensions=php --standard=CakePHP ./lib/Cake; elif [ '$DB' = 'mysql' ]; then ./lib/Cake/Console/cake test core AllTests --stderr; else ./lib/Cake/Console/cake test core AllDbRelated --stderr; fi"
|
||
|
||
notifications:
|
||
email: false
|
app/tmp/backup/backup | ||
---|---|---|
Directorio backup
|
app/tmp/cache/models/models | ||
---|---|---|
Dircetorio models
|
app/tmp/cache/persistent/persistent | ||
---|---|---|
Dircetorio persistent
|
app/tmp/logs/logs | ||
---|---|---|
Directorio logs
|
Exportar a: Unified diff
Estructura tmp