From a744a6484e982e6597103f605ac2ba7756cd8fb5 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Mon, 16 Jun 2014 13:07:54 -0700 Subject: [PATCH] git mv pre_commit/resources/pre-commit.sh pre_commit/resources/pre-commit-hook --- pre_commit/commands/install.py | 2 +- pre_commit/resources/{pre-commit.sh => pre-commit-hook} | 0 setup.py | 2 +- tests/commands/install_test.py | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename pre_commit/resources/{pre-commit.sh => pre-commit-hook} (100%) diff --git a/pre_commit/commands/install.py b/pre_commit/commands/install.py index 9630f577..d208ff7f 100644 --- a/pre_commit/commands/install.py +++ b/pre_commit/commands/install.py @@ -9,7 +9,7 @@ import stat def install(runner): """Install the pre-commit hooks.""" pre_commit_file = pkg_resources.resource_filename( - 'pre_commit', 'resources/pre-commit.sh', + 'pre_commit', 'resources/pre-commit-hook', ) with open(runner.pre_commit_path, 'w') as pre_commit_file_obj: pre_commit_file_obj.write(open(pre_commit_file).read()) diff --git a/pre_commit/resources/pre-commit.sh b/pre_commit/resources/pre-commit-hook similarity index 100% rename from pre_commit/resources/pre-commit.sh rename to pre_commit/resources/pre-commit-hook diff --git a/setup.py b/setup.py index fb2d7099..83ff2005 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ setup( packages=find_packages('.', exclude=('tests*', 'testing*')), package_data={ 'pre_commit': [ - 'resources/pre-commit.sh' + 'resources/pre-commit-hook' ] }, install_requires=[ diff --git a/tests/commands/install_test.py b/tests/commands/install_test.py index 965d5803..1aacb1c1 100644 --- a/tests/commands/install_test.py +++ b/tests/commands/install_test.py @@ -46,7 +46,7 @@ def test_install_pre_commit(tmpdir_factory): assert os.path.exists(runner.pre_commit_path) pre_commit_contents = io.open(runner.pre_commit_path).read() pre_commit_sh = pkg_resources.resource_filename( - 'pre_commit', 'resources/pre-commit.sh', + 'pre_commit', 'resources/pre-commit-hook', ) expected_contents = io.open(pre_commit_sh).read() assert pre_commit_contents == expected_contents