Skip to content

Commit

Permalink
Implemented #116: Rename "commithook files:allow-default" to "commith…
Browse files Browse the repository at this point in the history
…ook files allow-default"

 - enamed "commithook files:allow-default" to "commithook files allow-default"
  • Loading branch information
andkirby committed Aug 30, 2016
1 parent e579392 commit b2b116a
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 124 deletions.
2 changes: 1 addition & 1 deletion bin/commithook.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
$app->add(new Config\File\Skip($root));
$app->add(new Config\File\Protect($root));
$app->add(new Config\File\Allow($root));
$app->add(new Config\File\AllowDefault($root));
$app->add(new Config\File\FilesConfig($root));
$app->add(new Test($root));
$app->add(new ClearCache($root));
$app->add(new Validator\Disable($root));
Expand Down
15 changes: 15 additions & 0 deletions src/config/validators/FileFilter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@
*/
-->
<config>
<console>
<files>
<description>FileFilter validator configuration.</description>
<args>
<allow-default>
<xpath type="bool">validators/FileFilter/allowed_by_default</xpath>
<description>This command can define configuration for allowing to commit files by default.</description>
<scope>
<default>project</default>
</scope>
</allow-default>
</args>
</files>
</console>

<validators>
<FileFilter>
<!--
Expand Down
123 changes: 0 additions & 123 deletions src/lib/PreCommit/Console/Command/Config/File/AllowDefault.php

This file was deleted.

25 changes: 25 additions & 0 deletions src/lib/PreCommit/Console/Command/Config/File/FilesConfig.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
/**
* @license https://raw.githubusercontent.com/andkirby/commithook/master/LICENSE.md
*/
namespace PreCommit\Console\Command\Config\File;

use PreCommit\Console\Command\Config\AbstractConfiguredCommand;

/**
* This command can define path for allowing to commit a file
*
* @package PreCommit\Console\Command\Config\File
*/
class FilesConfig extends AbstractConfiguredCommand
{
/**
* Get base command name
*
* @return string
*/
protected function getDefinedName()
{
return 'files';
}
}

0 comments on commit b2b116a

Please sign in to comment.