Skip to content

Commit

Permalink
merge dev
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuNls committed Feb 15, 2016
2 parents fa7cc04 + 5c9c9c8 commit d861c8e
Show file tree
Hide file tree
Showing 954 changed files with 260,034 additions and 37,027 deletions.
4 changes: 3 additions & 1 deletion .gitignore
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ application/cache/*
application/logs/*
application/tests/build/*
vendor/
.env
.env
.phpintel/*
application/config/google-api.p12
Empty file modified .htaccess
100755 → 100644
Empty file.
Binary file removed .phpintel/09cda445dcf7ce29ceac76ce28f98977
Binary file not shown.
Binary file removed .phpintel/2568d480e2af8d938be80067125a8d84
Binary file not shown.
Binary file removed .phpintel/3e3946489e7b71f6565648a01ab9f8ff
Binary file not shown.
Binary file removed .phpintel/4c4e631ca10fc0abfbbe4047c6fb7cf8
Binary file not shown.
Binary file removed .phpintel/54a8684f081360f4b1b3f4eebff4b97d
Binary file not shown.
Binary file removed .phpintel/5fe7de88dc41ba75760dc39d0c16b1bd
Binary file not shown.
Binary file removed .phpintel/b2e6fb1e33f3ed591892c57c66c6eec9
Binary file not shown.
Binary file removed .phpintel/ec49bd74e3fad57150c52427a225edb6
Binary file not shown.
Binary file removed .phpintel/f15456fd2cb36e2bbe81b09863cb0a55
Binary file not shown.
Binary file removed .phpintel/ff16b6d6f0174eca744fd5da4c97158e
Binary file not shown.
Binary file removed .phpintel/index
Binary file not shown.
6 changes: 4 additions & 2 deletions .travis.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
language: php
php:
- 5.6
- '5.6'

notifications:
slack: toolwatchapp:AfvHCPE9Em1MY3j04gdlqbYe
email: false

script: cd application/tests/ && phpunit --coverage-text
script:
- cd application/tests/ && phpunit --coverage-text
- php coverage-checker.php build/logs/clover.xml 100
Empty file modified Procfile
100755 → 100644
Empty file.
Empty file modified README.md
100755 → 100644
Empty file.
26 changes: 23 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "app.json",
"name": "tw-review",
"description": "",
"scripts": {
},
"env": {
Expand All @@ -12,11 +13,30 @@
"TW_EVENT_URL": {
"required": true
},
"TW_WP_DB_URL": {
"NEW_RELIC_APP_NAME": {
"required": true
},
"NEW_RELIC_CONFIG_FILE": {
"required": true
},
"MANDRILL_APIKEY":{
"required":true
},
"MC_APIKEY": {
"required":true
},
"GOOGLE_API_ACCOUNT":{
"required":true
},
"GOOGLE_API_KEY":{
"required":true
},
"GOOGLE_API_LINK":{
"required":true
}
},
"addons": [
"cleardb"
"cleardb",
"newrelic"
]
}
Empty file modified application/.htaccess
100755 → 100644
Empty file.
Empty file modified application/cache/.htaccess
100755 → 100644
Empty file.
Empty file modified application/cache/index.html
100755 → 100644
Empty file.
6 changes: 3 additions & 3 deletions application/config/autoload.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
| $autoload['libraries'] = array('user_agent' => 'ua');
*/

$autoload['libraries'] = array('session', 'database', 'user_agent');
$autoload['libraries'] = array('session', 'database', 'user_agent', 'event', 'auto_email');

/*
| -------------------------------------------------------------------
Expand All @@ -85,7 +85,7 @@
| $autoload['helper'] = array('url', 'file');
*/

$autoload['helper'] = array('url', 'assets', 'language');
$autoload['helper'] = array('url', 'assets', 'language', 'array', 'string');

/*
| -------------------------------------------------------------------
Expand Down Expand Up @@ -131,4 +131,4 @@
| $autoload['model'] = array('first_model' => 'first');
*/

$autoload['model'] = array('user', 'event');
$autoload['model'] = array('user');
44 changes: 36 additions & 8 deletions application/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
| environments.
|
*/

if (isset($_SERVER['HTTP_HOST']) == false) {
$_SERVER['HTTP_HOST'] = "";
}

$root = ((isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'))?"https://":"http://").$_SERVER['HTTP_HOST'];
$config['base_url'] = $root;

Expand Down Expand Up @@ -211,7 +216,7 @@
| your log files will fill up very fast.
|
*/
$config['log_threshold'] = 0;
$config['log_threshold'] = 4;

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -355,13 +360,13 @@
| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
|
*/
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 1440;
$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 1440;
$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -497,3 +502,26 @@
| Array: array('10.0.1.200', '192.168.5.0/24')
*/
$config['proxy_ips'] = '';

/*
|--------------------------------------------------------------------------
| Google API Config
|--------------------------------------------------------------------------
|
| Google API requires a P12 enrypted key. The key is downloaded
| from a secure location if not already present on the disk
*/
if(!file_exists(APPPATH.'config/google-api.p12')){
$out = fopen(APPPATH.'config/google-api.p12', "wb");
$ch = curl_init();
curl_setopt($ch, CURLOPT_FILE, $out);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_URL, getenv("GOOGLE_API_LINK"));
curl_setopt($ch, CURLOPT_USERPWD, getenv("GOOGLE_API_KEY"));
curl_exec($ch);

curl_close($ch);
fclose($out);
}
$config['google_api_key'] = APPPATH.'config/google-api.p12';
$config['google_api_account'] = getenv("GOOGLE_API_ACCOUNT");
72 changes: 56 additions & 16 deletions application/config/constants.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
| always be used to set the mode correctly.
|
*/
*/
define('FILE_READ_MODE', 0644);
define('FILE_WRITE_MODE', 0666);
define('DIR_READ_MODE', 0755);
Expand All @@ -26,12 +26,12 @@
|
| These modes are used when working with fopen()/popen()
|
*/
*/

define('FOPEN_READ', 'rb');
define('FOPEN_READ_WRITE', 'r+b');
define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb');// truncates existing file data, use with care
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b');// truncates existing file data, use with care
define('FOPEN_WRITE_CREATE', 'ab');
define('FOPEN_READ_WRITE_CREATE', 'a+b');
define('FOPEN_WRITE_CREATE_STRICT', 'xb');
Expand All @@ -46,7 +46,7 @@
| error_reporting is disabled, the backtrace will not display, regardless
| of this setting
|
*/
*/
define('SHOW_DEBUG_BACKTRACE', TRUE);

/*
Expand All @@ -73,14 +73,54 @@
| Bash scripting:
| http://tldp.org/LDP/abs/html/exitcodes.html
|
*/
define('EXIT_SUCCESS', 0); // no errors
define('EXIT_ERROR', 1); // generic error
define('EXIT_CONFIG', 3); // configuration error
define('EXIT_UNKNOWN_FILE', 4); // file not found
define('EXIT_UNKNOWN_CLASS', 5); // unknown class
define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
define('EXIT_USER_INPUT', 7); // invalid user input
define('EXIT_DATABASE', 8); // database error
define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
*/
define('EXIT_SUCCESS', 0);// no errors
define('EXIT_ERROR', 1);// generic error
define('EXIT_CONFIG', 3);// configuration error
define('EXIT_UNKNOWN_FILE', 4);// file not found
define('EXIT_UNKNOWN_CLASS', 5);// unknown class
define('EXIT_UNKNOWN_METHOD', 6);// unknown class member
define('EXIT_USER_INPUT', 7);// invalid user input
define('EXIT_DATABASE', 8);// database error
define('EXIT__AUTO_MIN', 9);// lowest automatically-assigned error code
define('EXIT__AUTO_MAX', 125);// highest automatically-assigned error code

/*
|--------------------------------------------------------------------------
| Events Status Codes
|--------------------------------------------------------------------------
|
*/
define('CTA_MEASURES', 'CTA_MEASURES');
define('CTA_MEASURE_NOW', 'CTA_MEASURE_NOW');
define('CTA_GET_STARTED', 'CTA_GET_STARTED');
define('CTA_FEATURES', 'CTA_FEATURES');
define('LOGIN_EMAIL', 'LOGIN_EMAIL');
define('LOGIN_FAIL', 'LOGIN_FAIL');
define('LOGIN_FB', 'LOGIN_FB');
define('LOGIN_FB_FAIL', 'LOGIN_FB_FAIL');
define('RESET_PASSWORD', 'RESET_PASSWORD');
define('RESET_PASSWORD_USE', 'RESET_PASSWORD_USE');
define('LOGOUT', 'LOGOUT');
define('SIGN_UP', 'SIGN_UP');
define('SIGN_UP_FAIL', 'SIGN_UP_FAIL');
define('SIGN_UP_FB', 'SIGN_UP_FB');
define('ADD_WATCH', 'ADD_WATCH');
define('ADD_WATCH_LOAD', 'ADD_WATCH_LOAD');
define('DELETE_WATCH', 'DELETE_WATCH');
define('UPDATE_WATCH', 'UPDATE_WATCH');
define('NEW_MEASURE', 'NEW_MEASURE');
define('DELETE_MEASURE', 'DELETE_MEASURE');
define('DELETE_ALL_MEASURES', 'DELETE_ALL_MEASURES');
define('BOARD_LOAD', 'BOARD_LOAD');
define('NEW_ACCURACY', 'NEW_ACCURACY');
define('MEASURE_LOAD', 'MEASURE_LOAD');
define('ACCURACY_LOAD', 'ACCURACY_LOAD');
define('ACCURACY_WARNING_POPUP', 'ACCURACY_WARNING_POPUP');
define('ACCURACY_SOMETHING_WRONG', 'ACCURACY_SOMETHING_WRONG');
define('LOGIN_POPUP', 'LOGIN_POPUP');
define('SIGN_UP_POPUP', 'SIGN_UP_POPUP');
define('HOME_PAGE_0', 'HOME_PAGE_0');
define('HOME_PAGE_1', 'HOME_PAGE_1');
define('HOME_PAGE_2', 'HOME_PAGE_2');
define('HOME_PAGE_3', 'HOME_PAGE_3');
19 changes: 7 additions & 12 deletions application/config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,10 @@
'save_queries' => TRUE
);

if (ENVIRONMENT == 'development') {
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = '';
$db['default']['database'] = 'toolwatch';
} else {
$url = parse_url(getenv("TW_DB_URL"));
$db['default']['hostname'] = $url["host"];
$db['default']['username'] = $url["user"];
$db['default']['password'] = $url["pass"];
$db['default']['database'] = substr($url["path"], 1);
}

$url = parse_url(getenv("TW_DB_URL"));
$db['default']['hostname'] = $url["host"];
$db['default']['username'] = $url["user"];
$db['default']['password'] = $url["pass"];
$db['default']['database'] = substr($url["path"], 1);

Empty file modified application/config/doctypes.php
100755 → 100644
Empty file.
Empty file modified application/config/foreign_chars.php
100755 → 100644
Empty file.
6 changes: 6 additions & 0 deletions application/config/hooks.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@
| http://codeigniter.com/user_guide/general/hooks.html
|
*/
$hook['pre_controller'][] = array(
'class' => 'ExceptionHook',
'function' => 'SetExceptionHandler',
'filename' => 'ExceptionHook.php',
'filepath' => 'hooks'
);
Empty file modified application/config/index.html
100755 → 100644
Empty file.
Empty file modified application/config/memcached.php
100755 → 100644
Empty file.
Empty file modified application/config/migration.php
100755 → 100644
Empty file.
Empty file modified application/config/mimes.php
100755 → 100644
Empty file.
Empty file modified application/config/profiler.php
100755 → 100644
Empty file.
Empty file modified application/config/routes.php
100755 → 100644
Empty file.
Empty file modified application/config/smileys.php
100755 → 100644
Empty file.
Empty file modified application/config/user_agents.php
100755 → 100644
Empty file.
Loading

0 comments on commit d861c8e

Please sign in to comment.