git mv pre_commit/resources/pre-commit.sh pre_commit/resources/pre-commit-hook

This commit is contained in:
Anthony Sottile
2014-06-16 13:07:54 -07:00
parent 39470c98ca
commit a744a6484e
4 changed files with 3 additions and 3 deletions

View File

@@ -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())

View File

@@ -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=[

View File

@@ -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