From c62c1a3b513ab9e057e85a5e950bd7c438371076 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Sun, 30 Mar 2014 13:12:40 -0700 Subject: [PATCH] manifest -> hooks --- example_manifest.yaml => example_hooks.yaml | 0 manifest.yaml => hooks.yaml | 0 pre_commit/constants.py | 2 +- .../resources/node_hooks_repo/{manifest.yaml => hooks.yaml} | 0 .../python_hooks_repo/{manifest.yaml => hooks.yaml} | 0 tests/clientlib/validate_base_test.py | 6 +++--- tests/clientlib/validate_manifest_test.py | 2 +- tests/git_test.py | 6 +++--- 8 files changed, 8 insertions(+), 8 deletions(-) rename example_manifest.yaml => example_hooks.yaml (100%) rename manifest.yaml => hooks.yaml (100%) rename testing/resources/node_hooks_repo/{manifest.yaml => hooks.yaml} (100%) rename testing/resources/python_hooks_repo/{manifest.yaml => hooks.yaml} (100%) diff --git a/example_manifest.yaml b/example_hooks.yaml similarity index 100% rename from example_manifest.yaml rename to example_hooks.yaml diff --git a/manifest.yaml b/hooks.yaml similarity index 100% rename from manifest.yaml rename to hooks.yaml diff --git a/pre_commit/constants.py b/pre_commit/constants.py index c5a81eb5..666664f0 100644 --- a/pre_commit/constants.py +++ b/pre_commit/constants.py @@ -3,7 +3,7 @@ CONFIG_FILE = '.pre-commit-config.yaml' HOOKS_WORKSPACE = '.pre-commit-files' -MANIFEST_FILE = 'manifest.yaml' +MANIFEST_FILE = 'hooks.yaml' SUPPORTED_LANGUAGES = set([ 'python', diff --git a/testing/resources/node_hooks_repo/manifest.yaml b/testing/resources/node_hooks_repo/hooks.yaml similarity index 100% rename from testing/resources/node_hooks_repo/manifest.yaml rename to testing/resources/node_hooks_repo/hooks.yaml diff --git a/testing/resources/python_hooks_repo/manifest.yaml b/testing/resources/python_hooks_repo/hooks.yaml similarity index 100% rename from testing/resources/python_hooks_repo/manifest.yaml rename to testing/resources/python_hooks_repo/hooks.yaml diff --git a/tests/clientlib/validate_base_test.py b/tests/clientlib/validate_base_test.py index 4d8851a9..2a74ba88 100644 --- a/tests/clientlib/validate_base_test.py +++ b/tests/clientlib/validate_base_test.py @@ -17,7 +17,7 @@ class AdditionalValidatorError(ValueError): pass @pytest.fixture def noop_validator(): - return get_validator('example_manifest.yaml', {}, ValueError) + return get_validator('example_hooks.yaml', {}, ValueError) @pytest.fixture @@ -31,7 +31,7 @@ def additional_validator(): raise AdditionalValidatorError return get_validator( - 'example_manifest.yaml', + 'example_hooks.yaml', {}, ValueError, additional_validation_strategy=raises_always, @@ -52,7 +52,7 @@ def test_defaults_to_backup_filename(noop_validator): with mock.patch.object(__builtin__, 'open', side_effect=open) as mock_open: noop_validator() mock_open.assert_called_once_with( - os.path.join(git.get_root(), 'example_manifest.yaml'), 'r', + os.path.join(git.get_root(), 'example_hooks.yaml'), 'r', ) diff --git a/tests/clientlib/validate_manifest_test.py b/tests/clientlib/validate_manifest_test.py index 0246dfba..f6aed26a 100644 --- a/tests/clientlib/validate_manifest_test.py +++ b/tests/clientlib/validate_manifest_test.py @@ -10,7 +10,7 @@ from pre_commit.clientlib.validate_manifest import run def test_returns_0_for_valid_manifest(): - assert run(['example_manifest.yaml']) == 0 + assert run(['example_hooks.yaml']) == 0 def test_returns_0_for_our_manifest(): diff --git a/tests/git_test.py b/tests/git_test.py index 5ce2a7f0..17d60311 100644 --- a/tests/git_test.py +++ b/tests/git_test.py @@ -22,7 +22,7 @@ def get_files_matching_func(): 'pre_commit/run.py', 'pre_commit/git.py', 'im_a_file_that_doesnt_exist.py', - 'manifest.yaml', + 'hooks.yaml', ) return git.get_files_matching(get_filenames) @@ -33,7 +33,7 @@ def test_get_files_matching_base(get_files_matching_func): assert ret == set([ 'pre_commit/run.py', 'pre_commit/git.py', - 'manifest.yaml', + 'hooks.yaml', ]) @@ -47,7 +47,7 @@ def test_get_files_matching_total_match(get_files_matching_func): def test_does_search_instead_of_match(get_files_matching_func): ret = get_files_matching_func('\.yaml$') - assert ret == set(['manifest.yaml']) + assert ret == set(['hooks.yaml']) def test_does_not_include_deleted_fileS(get_files_matching_func):