Indefero

Indefero Commit Details


Date:2011-03-23 18:41:22 (13 years 8 months ago)
Author:Thomas Keller
Branch:develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, release-1.2, release-1.3
Commit:53ab5b6affa9557eef5b6921611cdf0e5df95ac1
Parents: 78a040235148d52eb39dfa8ac55872895c29f38a
Message:Expand the bootstrap script to setup an empty IDF environment.

Changes:

File differences

.gitignore
99
1010
1111
12
13
14
src/IDF/conf/path.php
.tx/config
src/IDF/locale/idf.pot.bak
test/test.db
test/tmp
test/config.php
test/bootstrap.php
11
22
3
4
5
6
7
8
39
410
511
6
712
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
$config_file = dirname(__FILE__) . '/config.php';
if (!file_exists($config_file)) {
die("'test/config.php' does not exist\n");
}
echo ">>> setting paths...\n";
define('SRCDIR', realpath(dirname(__FILE__) . '/../src'));
define('TESTDIR', dirname(__FILE__));
define('DATADIR', TESTDIR . '/data');
set_include_path(get_include_path() . PATH_SEPARATOR . SRCDIR);
$testconfig = require_once $config_file;
if (file_exists($testconfig['db_database'])) {
echo ">>> removing any existing database\n";
unlink($testconfig['db_database']);
}
echo ">>> creating empty test database...\n";
passthru('php ' . PLUF_PATH . '/migrate.php --conf=' . TESTDIR . '/config.php -a -i');
echo ">>> setting up web application...\n";
require 'Pluf.php';
// for some reason this is nowhere done in Pluf.php
spl_autoload_register('__autoload');
Pluf::start(TESTDIR . '/config.php');
test/config.php-dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
/**
* This is a basic test configuration file for unit tests. It mimics most of
* the defaults from IDF/conf/idf.php-dist, but sets up a local sqlite database
* which is purged before each test run and uses a different temporary file
* directory.
*
* You can keep most of these settings as is, but ensure that you set up
* 'pear_path' at least, otherwise you'll get strange errors.
*/
require_once dirname(__FILE__).'/../src/IDF/conf/path.php';
$cfg = array();
$cfg['debug'] = true;
$cfg['debug_scm'] = true;
$cfg['git_repositories'] = '/home/git/repositories/%s.git';
$cfg['git_remote_url'] = 'git://localhost/%s.git';
$cfg['git_write_remote_url'] = 'git@localhost:%s.git';
$cfg['svn_repositories'] = 'file:///home/svn/repositories/%s';
$cfg['svn_remote_url'] = 'http://localhost/svn/%s';
$cfg['mtn_path'] = 'mtn';
$cfg['mtn_opts'] = array('--no-workspace', '--no-standard-rcfiles');
$cfg['mtn_repositories'] = '/home/mtn/repositories/%s.mtn';
$cfg['mtn_remote_url'] = 'mtn://my-host.biz/%s';
$cfg['mtn_db_access'] = 'local';
#$cfg['mtn_confdir'] = '/path/to/dir/tree/';
#$cfg['mtn_confdir_extra'] = array('hooks.d/something.lua')
#$cfg['mtn_usher_conf'] = '/path/to/usher.conf';
$cfg['mercurial_repositories'] = '/home/mercurial/repositories/%s';
#$cfg['mercurial_remote_url'] = 'http://projects.ceondo.com/hg/%s';
$cfg['admins'] = array(array('Admin', 'you@example.com'),);
$cfg['send_emails'] = true;
$cfg['mail_backend'] = 'smtp';
$cfg['mail_host'] = 'localhost';
$cfg['mail_port'] = 25;
$cfg['idf_base'] = '/index.php';
$cfg['url_base'] = 'http://localhost';
$cfg['url_media'] = 'http://localhost/media';
$cfg['url_upload'] = 'http://localhost/media/upload';
$cfg['upload_path'] = '/home/www/indefero/www/media/upload';
$cfg['upload_issue_path'] = '/home/www/indefero/attachments';
$cfg['secret_key'] = '';
$cfg['from_email'] = 'sender@example.com';
$cfg['bounce_email'] = 'no-reply@example.com';
$cfg['tmp_folder'] = dirname(__FILE__) . '/tmp';
$cfg['db_login'] = 'www';
$cfg['db_password'] = '';
$cfg['db_server'] = '';
$cfg['db_version'] = '5.1';
$cfg['db_table_prefix'] = 'indefero_';
$cfg['db_engine'] = 'SQLite';
$cfg['db_database'] = dirname(__FILE__).'/test.db';
# $cfg['idf_extra_upload_ext'] = 'ext1 ext2';
# $cfg['max_upload_size'] = 2097152;
# $cfg['time_zone'] = 'Europe/Berlin';
$cfg['pear_path'] = '/usr/share/php';
$cfg['login_success_url'] = $cfg['url_base'].$cfg['idf_base'];
$cfg['after_logout_page'] = $cfg['url_base'].$cfg['idf_base'];
$cfg['cache_engine'] = 'Pluf_Cache_File';
$cfg['cache_timeout'] = 300;
$cfg['cache_file_folder'] = $cfg['tmp_folder'].'/cache';
$cfg['template_folders'] = array(dirname(__FILE__).'/../src/IDF/templates');
$cfg['installed_apps'] = array('Pluf', 'IDF');
$cfg['pluf_use_rowpermission'] = true;
$cfg['middleware_classes'] = array(
'Pluf_Middleware_Csrf',
'Pluf_Middleware_Session',
'IDF_Middleware',
'Pluf_Middleware_Translation',
);
$cfg['template_context_processors'] = array('IDF_Middleware_ContextPreProcessor');
$cfg['idf_views'] = dirname(__FILE__).'/../src/IDF/conf/urls.php';
$cfg['languages'] = array('en', 'fr', 'de', 'es_ES');
$cfg['allowed_scm'] = array(
'git' => 'IDF_Scm_Git',
'svn' => 'IDF_Scm_Svn',
'mercurial' => 'IDF_Scm_Mercurial',
'mtn' => 'IDF_Scm_Monotone',
);
# $cfg['git_core_quotepath'] = false;
# $cfg['idf_strong_key_check'] = false;
# $cfg['idf_mimetypes_db'] = '/etc/mime.types';
# $cfg['idf_extra_text_ext'] = 'ext1 ext2 ext3';
# $cfg['idf_exec_cmd_prefix'] = '/usr/bin/env -i ';
# $cfg['svn_path'] = 'svn';
# $cfg['svnlook_path'] = 'svnlook';
# $cfg['svnadmin_path'] = 'svnadmin';
# $cfg['hg_path'] = 'hg';
# $cfg['git_path'] = 'git';
# $cfg['idf_no_size_check'] = false;
return $cfg;

Archive Download the corresponding diff file

Page rendered in 0.08704s using 13 queries.