Changeset 8288
- Timestamp:
- 04/04/08 15:55:10 (1 year ago)
- Files:
-
- branches/1.0/data/tasks/sfPakeGenerator.php (modified) (5 diffs)
- branches/1.0/data/tasks/sfPakeMisc.php (modified) (2 diffs)
- branches/1.0/data/tasks/sfPakePlugins.php (modified) (4 diffs)
- branches/1.0/data/tasks/sfPakePropel.php (modified) (12 diffs)
- branches/1.0/data/tasks/sfPakePropelAdminGenerator.php (modified) (3 diffs)
- branches/1.0/data/tasks/sfPakePropelCrudGenerator.php (modified) (5 diffs)
- branches/1.0/data/tasks/sfPakeSymfony.php (modified) (2 diffs)
- branches/1.0/data/tasks/sfPakeUpgrade.php (modified) (16 diffs)
- branches/1.0/lib/addon/propel/generator/sfPropelCrudGenerator.class.php (modified) (1 diff)
- branches/1.0/lib/addon/propel/sfPropelData.class.php (modified) (2 diffs)
- branches/1.0/lib/addon/propel/sfPropelManyToMany.class.php (modified) (1 diff)
- branches/1.0/lib/addon/sfData.class.php (modified) (1 diff)
- branches/1.0/lib/generator/sfCrudGenerator.class.php (modified) (2 diffs)
- branches/1.0/lib/view/sfMailView.class.php (modified) (1 diff)
- branches/1.0/test/bin/coverage.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.0/data/tasks/sfPakeGenerator.php
r2906 r8288 4 4 * This file is part of the symfony package. 5 5 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 6 * 6 * 7 7 * For the full copyright and license information, please view the LICENSE 8 8 * file that was distributed with this source code. … … 49 49 pake_mirror($finder, sfConfig::get('sf_symfony_data_dir').'/skeleton/project', $sf_root_dir); 50 50 51 $finder = pakeFinder::type('file')-> name('properties.ini', 'apache.conf', 'propel.ini');51 $finder = pakeFinder::type('file')->ignore_version_control()->name('properties.ini', 'apache.conf', 'propel.ini'); 52 52 pake_replace_tokens($finder, $sf_root_dir, '##', '##', array('PROJECT_NAME' => $project_name)); 53 53 54 $finder = pakeFinder::type('file')-> name('propel.ini');54 $finder = pakeFinder::type('file')->ignore_version_control()->name('propel.ini'); 55 55 pake_replace_tokens($finder, $sf_root_dir, '##', '##', array('PROJECT_DIR' => $sf_root_dir)); 56 56 … … 94 94 95 95 // set no_script_name value in settings.yml for production environment 96 $finder = pakeFinder::type('file')-> name('settings.yml');96 $finder = pakeFinder::type('file')->ignore_version_control()->name('settings.yml'); 97 97 pake_replace_tokens($finder, $app_dir.'/'.sfConfig::get('sf_app_config_dir_name'), '##', '##', array('NO_SCRIPT_NAME' => ($first_app ? 'on' : 'off'))); 98 98 … … 100 100 pake_copy(sfConfig::get('sf_symfony_data_dir').'/skeleton/app/web/index_dev.php', sfConfig::get('sf_web_dir').'/'.$app.'_dev.php'); 101 101 102 $finder = pakeFinder::type('file')-> name($index_name.'.php', $app.'_dev.php');102 $finder = pakeFinder::type('file')->ignore_version_control()->name($index_name.'.php', $app.'_dev.php'); 103 103 pake_replace_tokens($finder, sfConfig::get('sf_web_dir'), '##', '##', array('APP_NAME' => $app)); 104 104 … … 162 162 163 163 // customize php and yml files 164 $finder = pakeFinder::type('file')-> name('*.php', '*.yml');164 $finder = pakeFinder::type('file')->ignore_version_control()->name('*.php', '*.yml'); 165 165 pake_replace_tokens($finder, $module_dir, '##', '##', $constants); 166 166 } branches/1.0/data/tasks/sfPakeMisc.php
r3387 r8288 4 4 * This file is part of the symfony package. 5 5 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 6 * 6 * 7 7 * For the full copyright and license information, please view the LICENSE 8 8 * file that was distributed with this source code. … … 297 297 298 298 $lockFile = $app.'_'.$env.'.clilock'; 299 $locks = pakeFinder::type('file')-> prune('.svn')->discard('.svn')->maxdepth(0)->name($lockFile)->relative()->in('./');299 $locks = pakeFinder::type('file')->ignore_version_control()->prune('.svn')->discard('.svn')->maxdepth(0)->name($lockFile)->relative()->in('./'); 300 300 301 301 if (file_exists(sfConfig::get('sf_root_dir').'/'.$lockFile)) 302 302 { 303 303 pake_remove($lockFile, ''); 304 run_clear_cache($task, array()); 304 run_clear_cache($task, array()); 305 305 pake_echo_action('enable', "$app [$env] has been ENABLED"); 306 306 branches/1.0/data/tasks/sfPakePlugins.php
r8006 r8288 4 4 * This file is part of the symfony package. 5 5 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 6 * 6 * 7 7 * For the full copyright and license information, please view the LICENSE 8 8 * file that was distributed with this source code. … … 218 218 ), 219 219 '_lastmodified' => array( 220 'ETag' => "113845-297-dc93f000", 220 'ETag' => "113845-297-dc93f000", 221 221 'Last-Modified' => date('r'), 222 222 ), … … 277 277 else 278 278 { 279 pake_remove(pakeFinder::type('any') , $target_dir);279 pake_remove(pakeFinder::type('any')->ignore_version_control(), $target_dir); 280 280 pake_remove($target_dir, ''); 281 281 } … … 295 295 296 296 if ($source == $target) 297 { 297 { 298 298 return '.'; 299 299 } branches/1.0/data/tasks/sfPakePropel.php
r7759 r8288 4 4 * This file is part of the symfony package. 5 5 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 6 * 6 * 7 7 * For the full copyright and license information, please view the LICENSE 8 8 * file that was distributed with this source code. … … 54 54 function _propel_convert_yml_schema($check_schema = true, $prefix = '') 55 55 { 56 $finder = pakeFinder::type('file')-> name('*schema.yml');56 $finder = pakeFinder::type('file')->ignore_version_control()->name('*schema.yml'); 57 57 $dirs = array('config'); 58 58 if ($pluginDirs = glob(sfConfig::get('sf_root_dir').'/plugins/*/config')) … … 85 85 86 86 $file = str_replace(basename($schema), $localprefix.$xml_file_name, $schema); 87 pake_echo_action('schema', 'putting '.$file); 87 pake_echo_action('schema', 'putting '.$file); 88 88 file_put_contents($file, $db_schema->asXML()); 89 89 } … … 92 92 function _propel_convert_xml_schema($check_schema = true, $prefix = '') 93 93 { 94 $finder = pakeFinder::type('file')-> name('*schema.xml');94 $finder = pakeFinder::type('file')->ignore_version_control()->name('*schema.xml'); 95 95 96 96 $schemas = array_merge($finder->in('config'), $finder->in(glob(sfConfig::get('sf_root_dir').'/plugins/*/config'))); … … 115 115 // save converted xml files in original directories 116 116 $yml_file_name = str_replace('.xml', '.yml', basename($schema)); 117 117 118 118 $file = str_replace(basename($schema), $prefix.$yml_file_name, $schema); 119 pake_echo_action('schema', 'putting '.$file); 119 pake_echo_action('schema', 'putting '.$file); 120 120 file_put_contents($file, $db_schema->asYAML()); 121 121 } … … 124 124 function _propel_copy_xml_schema_from_plugins($prefix = '') 125 125 { 126 $schemas = pakeFinder::type('file')-> name('*schema.xml')->in(glob(sfConfig::get('sf_root_dir').'/plugins/*/config'));126 $schemas = pakeFinder::type('file')->ignore_version_control()->name('*schema.xml')->in(glob(sfConfig::get('sf_root_dir').'/plugins/*/config')); 127 127 128 128 foreach ($schemas as $schema) … … 168 168 _propel_copy_xml_schema_from_plugins('generated-'); 169 169 _call_phing($task, 'om'); 170 $finder = pakeFinder::type('file')-> name('generated-*schema.xml');170 $finder = pakeFinder::type('file')->ignore_version_control()->name('generated-*schema.xml'); 171 171 pake_remove($finder, array('config', 'plugins')); 172 172 } … … 177 177 _propel_copy_xml_schema_from_plugins('generated-'); 178 178 _call_phing($task, 'sql'); 179 $finder = pakeFinder::type('file')-> name('generated-*schema.xml');179 $finder = pakeFinder::type('file')->ignore_version_control()->name('generated-*schema.xml'); 180 180 pake_remove($finder, 'config'); 181 181 } … … 191 191 _propel_copy_xml_schema_from_plugins('generated-'); 192 192 _call_phing($task, 'insert-sql'); 193 $finder = pakeFinder::type('file')-> name('generated-*schema.xml');193 $finder = pakeFinder::type('file')->ignore_version_control()->name('generated-*schema.xml'); 194 194 pake_remove($finder, 'config'); 195 195 } … … 210 210 { 211 211 _propel_convert_xml_schema(false, ''); 212 $finder = pakeFinder::type('file')-> name('schema.xml');212 $finder = pakeFinder::type('file')->ignore_version_control()->name('schema.xml'); 213 213 pake_remove($finder, 'config'); 214 214 } … … 324 324 $pluginDirs = array(); 325 325 } 326 $fixtures_dirs = pakeFinder::type('dir')-> name('fixtures')->in(array_merge($pluginDirs, array(sfConfig::get('sf_data_dir'))));326 $fixtures_dirs = pakeFinder::type('dir')->ignore_version_control()->name('fixtures')->in(array_merge($pluginDirs, array(sfConfig::get('sf_data_dir')))); 327 327 } 328 328 else … … 351 351 function _call_phing($task, $task_name, $check_schema = true) 352 352 { 353 $schemas = pakeFinder::type('file')-> name('*schema.xml')->relative()->follow_link()->in('config');353 $schemas = pakeFinder::type('file')->ignore_version_control()->name('*schema.xml')->relative()->follow_link()->in('config'); 354 354 if ($check_schema && !$schemas) 355 355 { branches/1.0/data/tasks/sfPakePropelAdminGenerator.php
r3148 r8288 4 4 * This file is part of the symfony package. 5 5 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 6 * 6 * 7 7 * For the full copyright and license information, please view the LICENSE 8 8 * file that was distributed with this source code. … … 44 44 'MODEL_CLASS' => $model_class, 45 45 'AUTHOR_NAME' => $author_name, 46 'THEME' => $theme, 46 'THEME' => $theme, 47 47 ); 48 48 … … 62 62 63 63 // customize php and yml files 64 $finder = pakeFinder::type('file')-> name('*.php', '*.yml');64 $finder = pakeFinder::type('file')->ignore_version_control()->name('*.php', '*.yml'); 65 65 pake_replace_tokens($finder, $moduleDir, '##', '##', $constants); 66 66 } branches/1.0/data/tasks/sfPakePropelCrudGenerator.php
r3086 r8288 4 4 * This file is part of the symfony package. 5 5 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 6 * 6 * 7 7 * For the full copyright and license information, please view the LICENSE 8 8 * file that was distributed with this source code. … … 62 62 63 63 // customize php and yml files 64 $finder = pakeFinder::type('file')-> name('*.php', '*.yml');64 $finder = pakeFinder::type('file')->ignore_version_control()->name('*.php', '*.yml'); 65 65 pake_replace_tokens($finder, $moduleDir, '##', '##', $constants); 66 66 } … … 96 96 97 97 // copy our generated module 98 $finder = pakeFinder::type('any') ;98 $finder = pakeFinder::type('any')->ignore_version_control(); 99 99 pake_mirror($finder, $tmp_dir.'/auto'.ucfirst($module), $moduleDir); 100 100 … … 120 120 121 121 // customize php and yml files 122 $finder = pakeFinder::type('file')-> name('*.php', '*.yml');122 $finder = pakeFinder::type('file')->ignore_version_control()->name('*.php', '*.yml'); 123 123 pake_replace_tokens($finder, $moduleDir, '##', '##', $constants); 124 124 … … 126 126 pake_copy(sfConfig::get('sf_symfony_data_dir').'/skeleton/module/test/actionsTest.php', $sf_root_dir.'/test/functional/'.$app.'/'.$module.'ActionsTest.php'); 127 127 128 // customize test file 128 // customize test files 129 129 pake_replace_tokens($module.'ActionsTest.php', $sf_root_dir.'/test/functional/'.$app, '##', '##', $constants); 130 130 131 131 // delete temp files 132 $finder = pakeFinder::type('any') ;132 $finder = pakeFinder::type('any')->ignore_version_control(); 133 133 pake_remove($finder, $tmp_dir); 134 134 } branches/1.0/data/tasks/sfPakeSymfony.php
r6622 r8288 4 4 * This file is part of the symfony package. 5 5 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 6 * 6 * 7 7 * For the full copyright and license information, please view the LICENSE 8 8 * file that was distributed with this source code. … … 72 72 _change_symfony_dirs('\''.$dirs[0].'\'', '\''.$dirs[1].'\''); 73 73 74 $finder = pakeFinder::type('any') ;74 $finder = pakeFinder::type('any')->ignore_version_control(); 75 75 pake_remove($finder, sfConfig::get('sf_lib_dir').'/symfony'); 76 76 pake_remove(sfConfig::get('sf_lib_dir').'/symfony', ''); branches/1.0/data/tasks/sfPakeUpgrade.php
r3304 r8288 4 4 * This file is part of the symfony package. 5 5 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 6 * 6 * 7 7 * For the full copyright and license information, please view the LICENSE 8 8 * file that was distributed with this source code. … … 60 60 61 61 // find all applications for this project 62 $apps = pakeFinder::type('directory')-> name(sfConfig::get('sf_app_module_dir_name'))->mindepth(1)->maxdepth(1)->relative()->in(sfConfig::get('sf_apps_dir_name'));62 $apps = pakeFinder::type('directory')->ignore_version_control()->name(sfConfig::get('sf_app_module_dir_name'))->mindepth(1)->maxdepth(1)->relative()->in(sfConfig::get('sf_apps_dir_name')); 63 63 64 64 // install symfony CLI … … 98 98 { 99 99 // template dirs 100 $template_dirs = pakeFinder::type('directory')-> name('templates')->mindepth(1)->maxdepth(1)->in($dir);100 $template_dirs = pakeFinder::type('directory')->ignore_version_control()->name('templates')->mindepth(1)->maxdepth(1)->in($dir); 101 101 $template_dirs[] = $app_dir.'/'.sfConfig::get('sf_app_template_dir_name'); 102 102 … … 110 110 111 111 // actions dirs 112 $action_dirs = pakeFinder::type('directory')-> name('actions')->mindepth(1)->maxdepth(1)->in($dir);112 $action_dirs = pakeFinder::type('directory')->ignore_version_control()->name('actions')->mindepth(1)->maxdepth(1)->in($dir); 113 113 114 114 _upgrade_1_0_deprecated_for_actions($action_dirs); … … 137 137 { 138 138 $dirs = array(sfConfig::get('sf_lib_dir_name'), sfConfig::get('sf_apps_dir_name')); 139 $finder = pakeFinder::type('file')-> name('*.php');139 $finder = pakeFinder::type('file')->ignore_version_control()->name('*.php'); 140 140 141 141 $seen = false; … … 165 165 pake_echo_action('upgrade 1.0', 'upgrading sf/ path configuration'); 166 166 167 $php_files = pakeFinder::type('file')-> name('*.php')->in($app_dir);167 $php_files = pakeFinder::type('file')->ignore_version_control()->name('*.php')->in($app_dir); 168 168 foreach ($php_files as $php_file) 169 169 { … … 227 227 { 228 228 list($dir, $config_file) = array(dirname($config_file), basename($config_file)); 229 $files = pakeFinder::type('file')-> name($config_file)->in(sfConfig::get('sf_root_dir').DIRECTORY_SEPARATOR.$dir);229 $files = pakeFinder::type('file')->ignore_version_control()->name($config_file)->in(sfConfig::get('sf_root_dir').DIRECTORY_SEPARATOR.$dir); 230 230 foreach ($files as $file) 231 231 { … … 261 261 pake_echo_action('upgrade 1.0', 'upgrading view configuration'); 262 262 263 $yml_files = pakeFinder::type('file')-> name('*.yml')->in($app_dir);263 $yml_files = pakeFinder::type('file')->ignore_version_control()->name('*.yml')->in($app_dir); 264 264 foreach ($yml_files as $yml_file) 265 265 { … … 302 302 pake_echo_action('upgrade 1.0', 'upgrading cache configuration'); 303 303 304 $yml_files = pakeFinder::type('files')-> name('cache.yml')->in($app_dir);304 $yml_files = pakeFinder::type('files')->ignore_version_control()->name('cache.yml')->in($app_dir); 305 305 306 306 $seen = false; … … 339 339 pake_echo_action('upgrade 1.0', 'upgrading deprecated helpers in generator.yml'); 340 340 341 $yml_files = pakeFinder::type('files')-> name('generator.yml')->in($app_dir);341 $yml_files = pakeFinder::type('files')->ignore_version_control()->name('generator.yml')->in($app_dir); 342 342 343 343 $seen = array(); … … 377 377 pake_echo_action('upgrade 1.0', 'upgrading deprecated methods in actions'); 378 378 379 $php_files = pakeFinder::type('file')-> name('*.php')->in($action_dirs);379 $php_files = pakeFinder::type('file')->ignore_version_control()->name('*.php')->in($action_dirs); 380 380 foreach ($php_files as $php_file) 381 381 { … … 424 424 $regex = '/('.implode('|', $helpers).')/'; 425 425 426 $php_files = pakeFinder::type('file')-> name('*.php')->in($template_dirs);426 $php_files = pakeFinder::type('file')->ignore_version_control()->name('*.php')->in($template_dirs); 427 427 $seen = false; 428 428 foreach ($php_files as $php_file) … … 457 457 pake_echo_action('upgrade 1.0', 'upgrading deprecated helpers'); 458 458 459 $php_files = pakeFinder::type('file')-> name('*.php')->in($template_dirs);459 $php_files = pakeFinder::type('file')->ignore_version_control()->name('*.php')->in($template_dirs); 460 460 $seen = array(); 461 461 $deprecated_str = array( … … 518 518 // upgrade module filters.yml 519 519 $seen = false; 520 $yml_files = pakeFinder::type('file')-> name('filters.yml')->in($app_dir.DIRECTORY_SEPARATOR.'modules');520 $yml_files = pakeFinder::type('file')->ignore_version_control()->name('filters.yml')->in($app_dir.DIRECTORY_SEPARATOR.'modules'); 521 521 foreach ($yml_files as $yml_file) 522 522 { … … 618 618 619 619 $seen = false; 620 $php_files = pakeFinder::type('file')-> name('*.php')->in(sfConfig::get('sf_lib_dir').'/model');620 $php_files = pakeFinder::type('file')->ignore_version_control()->name('*.php')->in(sfConfig::get('sf_lib_dir').'/model'); 621 621 foreach ($php_files as $php_file) 622 622 { … … 651 651 652 652 $seen = false; 653 $xml_files = pakeFinder::type('file')-> name('*schema.xml')->in(sfConfig::get('sf_config_dir'));653 $xml_files = pakeFinder::type('file')->ignore_version_control()->name('*schema.xml')->in(sfConfig::get('sf_config_dir')); 654 654 foreach ($xml_files as $xml_file) 655 655 { branches/1.0/lib/addon/propel/generator/sfPropelCrudGenerator.class.php
r3302 r8288 67 67 { 68 68 // we must load all map builder classes to be able to deal with foreign keys (cf. editSuccess.php template) 69 $classes = sfFinder::type('file')-> name('*MapBuilder.php')->in(sfLoader::getModelDirs());69 $classes = sfFinder::type('file')->ignore_version_control()->name('*MapBuilder.php')->in(sfLoader::getModelDirs()); 70 70 foreach ($classes as $class) 71 71 { branches/1.0/lib/addon/propel/sfPropelData.class.php
r6019 r8288 267 267 { 268 268 // load all map builder classes 269 $files = sfFinder::type('file')-> name('*MapBuilder.php')->in(sfLoader::getModelDirs());269 $files = sfFinder::type('file')->ignore_version_control()->name('*MapBuilder.php')->in(sfLoader::getModelDirs()); 270 270 foreach ($files as $file) 271 271 { … … 456 456 return $classes; 457 457 } 458 458 459 459 protected function fixOrderingOfForeignKeyDataInSameTable($resultsSets, $tableName, $column, $in = null) 460 460 { branches/1.0/lib/addon/propel/sfPropelManyToMany.class.php
r1931 r8288 52 52 53 53 // we must load all map builder classes 54 $classes = sfFinder::type('file')-> name('*MapBuilder.php')->in(sfLoader::getModelDirs());54 $classes = sfFinder::type('file')->ignore_version_control()->name('*MapBuilder.php')->in(sfLoader::getModelDirs()); 55 55 foreach ($classes as $class) 56 56 { branches/1.0/lib/addon/sfData.class.php
r3382 r8288 109 109 else if (is_dir($directory_or_file)) 110 110 { 111 $fixture_files = sfFinder::type('file')-> name('*.yml')->in($directory_or_file);111 $fixture_files = sfFinder::type('file')->ignore_version_control()->name('*.yml')->in($directory_or_file); 112 112 } 113 113 else branches/1.0/lib/generator/sfCrudGenerator.class.php
r5099 r8288 87 87 88 88 $this->setTheme($theme); 89 $templateFiles = sfFinder::type('file')-> name('*.php')->relative()->in($themeDir.'/templates');90 $configFiles = sfFinder::type('file')-> name('*.yml')->relative()->in($themeDir.'/config');89 $templateFiles = sfFinder::type('file')->ignore_version_control()->name('*.php')->relative()->in($themeDir.'/templates'); 90 $configFiles = sfFinder::type('file')->ignore_version_control()->name('*.yml')->relative()->in($themeDir.'/config'); 91 91 92 92 $this->generatePhpFiles($this->generatedModuleName, $templateFiles, $configFiles); … … 314 314 { 315 315 $type = $column->getCreoleType(); 316 316 317 317 $columnGetter = $this->getColumnGetter($column, true); 318 318 branches/1.0/lib/view/sfMailView.class.php
r3232 r8288 82 82 $all_template_dir = dirname($template); 83 83 $all_template_regex = preg_replace('/\\.php$/', '\..+\.php', basename($template)); 84 $all_templates = sfFinder::type('file')-> name('/^'.$all_template_regex.'$/')->in($all_template_dir);84 $all_templates = sfFinder::type('file')->ignore_version_control()->name('/^'.$all_template_regex.'$/')->in($all_template_dir); 85 85 $all_retvals = array(); 86 86 foreach ($all_templates as $templateFile) branches/1.0/test/bin/coverage.php
r3223 r8288 4 4 * This file is part of the symfony package. 5 5 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 6 * 6 * 7 7 * For the full copyright and license information, please view the LICENSE 8 8 * file that was distributed with this source code. … … 27 27 $c->base_dir = realpath(dirname(__FILE__).'/../../lib'); 28 28 29 $finder = pakeFinder::type('file')-> name('*.php')->prune('vendor');29 $finder = pakeFinder::type('file')->ignore_version_control()->name('*.php')->prune('vendor'); 30 30 $c->register($finder->in($c->base_dir)); 31 31 $c->run();

