<commit_before><?php defined('SYSPATH') or die('No direct script access.');

/**
* Set environment status based on subdomain name or IP address
**/
$server_name = $_SERVER['SERVER_NAME'];

if (strpos($server_name, 'dev.') !== FALSE OR $_SERVER['SERVER_ADDR'] == '127.0.0.1')
{
	Kohana::$environment = Kohana::DEVELOPMENT;
}
else if (strpos($server_name, 'test.') !== FALSE)
{
	Kohana::$environment = Kohana::TESTING;
}
else if (strpos($server_name, 'stage.') !== FALSE)
{
	Kohana::$environment = Kohana::STAGING;
}
else
{
	Kohana::$environment = Kohana::PRODUCTION;
}

/**
 * Attach a file reader to config. Multiple readers are supported.
 **/
switch (Kohana::$environment) {
	case Kohana::DEVELOPMENT:
		Kohana::$config->attach(new Config_File('config/development'));
		error_reporting(E_ALL);
		break;
	case Kohana::TESTING:
		Kohana::$config->attach(new Config_File('config/testing'));
		error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT);
		break;
	case Kohana::STAGING:
		Kohana::$config->attach(new Config_File('config/staging'));
		error_reporting(E_ERROR);
		break;
	default:
		Kohana::$config->attach(new Config_File());
		error_reporting();
		break;
}

/**
* Autoload page
**/
Route::set('page', '<slug>', array(
		/** You can use that for restrict page **/
		// 'slug'	=> 'my_page',
		'slug'	=> '.*',
	))
	->defaults(array(
		'controller'	=> 'App',
		'action'		=> 'page',
	));
	
/**
* Default Flatfile route
**/
Route::set('home', '(<controller>(/<action>(/<id>)))')
	->defaults(array(
		'controller' => 'App',
		'action'     => 'home',
	));

// Load Smartypants Typographer
include Kohana::find_file('vendor', 'smartypants-typographer/smartypants', 'php');
// Load Markdown
include Kohana::find_file('vendor', 'markdown/markdown', 'php');<commit_msg>Remove default route<commit_after><?php defined('SYSPATH') or die('No direct script access.');

/**
* Set environment status based on subdomain name or IP address
**/
$server_name = $_SERVER['SERVER_NAME'];

if (strpos($server_name, 'dev.') !== FALSE OR $_SERVER['SERVER_ADDR'] == '127.0.0.1')
{
	Kohana::$environment = Kohana::DEVELOPMENT;
}
else if (strpos($server_name, 'test.') !== FALSE)
{
	Kohana::$environment = Kohana::TESTING;
}
else if (strpos($server_name, 'stage.') !== FALSE)
{
	Kohana::$environment = Kohana::STAGING;
}
else
{
	Kohana::$environment = Kohana::PRODUCTION;
}

/**
 * Attach a file reader to config. Multiple readers are supported.
 **/
switch (Kohana::$environment) {
	case Kohana::DEVELOPMENT:
		Kohana::$config->attach(new Config_File('config/development'));
		error_reporting(E_ALL);
		break;
	case Kohana::TESTING:
		Kohana::$config->attach(new Config_File('config/testing'));
		error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT);
		break;
	case Kohana::STAGING:
		Kohana::$config->attach(new Config_File('config/staging'));
		error_reporting(E_ERROR);
		break;
	default:
		Kohana::$config->attach(new Config_File());
		error_reporting();
		break;
}

/**
* Autoload page
**/
Route::set('page', '<slug>', array(
		/** You can use that for restrict page **/
		// 'slug'	=> 'my_page',
		// 'slug'	=> '.*',
	))
	->defaults(array(
		'controller'	=> 'App',
		'action'		=> 'page',
	));
	
/**
* Default Flatfile route
**/
// Route::set('home', '(<controller>(/<action>(/<id>)))')
// 	->defaults(array(
// 		'controller' => 'App',
// 		'action'     => 'home',
// 	));

// Load Smartypants Typographer
include Kohana::find_file('vendor', 'smartypants-typographer/smartypants', 'php');
// Load Markdown
include Kohana::find_file('vendor', 'markdown/markdown', 'php');
{'fraction_non_alphanumeric': 0.20514269567674484, 'fraction_numerical': 0.003390788358293303, 'mean_word_length': 5.156521739130435, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1928123', 'n_tokens_mistral': 1333, 'n_tokens_neox': 1280, 'n_words': 251}