-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make rspec green again * Enable rspec in travis
- Loading branch information
Showing
4 changed files
with
65 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,33 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
|
||
# If can't find lefthook in global scope | ||
# we suppose it in local npm package | ||
if ! type lefthook >/dev/null | ||
if [ "$LEFTHOOK" = "0" ]; then | ||
exit 0 | ||
fi | ||
|
||
if [ -t 1 ] ; then | ||
exec < /dev/tty ; # <- enables interactive shell | ||
fi | ||
|
||
dir="$(cd "$(dirname "$(dirname "$(dirname "$0")")")" >/dev/null 2>&1 || exit ; pwd -P)" | ||
|
||
|
||
cmd="lefthook run pre-commit $@" | ||
|
||
if lefthook -h >/dev/null 2>&1 | ||
then | ||
eval $cmd | ||
elif test -f "$dir/node_modules/@arkweid/lefthook/bin/lefthook" | ||
then | ||
eval $dir/node_modules/@arkweid/lefthook/bin/$cmd | ||
elif bundle exec lefthook -h >/dev/null 2>&1 | ||
then | ||
bundle exec $cmd | ||
elif npx lefthook -h >/dev/null 2>&1 | ||
then | ||
npx $cmd | ||
elif yarn lefthook -h >/dev/null 2>&1 | ||
then | ||
exec npx lefthook run pre-commit $@ | ||
yarn $cmd | ||
else | ||
exec lefthook run pre-commit $@ | ||
echo "Can't find lefthook in PATH" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,33 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
|
||
# If can't find lefthook in global scope | ||
# we suppose it in local npm package | ||
if ! type lefthook >/dev/null | ||
if [ "$LEFTHOOK" = "0" ]; then | ||
exit 0 | ||
fi | ||
|
||
if [ -t 1 ] ; then | ||
exec < /dev/tty ; # <- enables interactive shell | ||
fi | ||
|
||
dir="$(cd "$(dirname "$(dirname "$(dirname "$0")")")" >/dev/null 2>&1 || exit ; pwd -P)" | ||
|
||
|
||
cmd="lefthook run pre-push $@" | ||
|
||
if lefthook -h >/dev/null 2>&1 | ||
then | ||
eval $cmd | ||
elif test -f "$dir/node_modules/@arkweid/lefthook/bin/lefthook" | ||
then | ||
eval $dir/node_modules/@arkweid/lefthook/bin/$cmd | ||
elif bundle exec lefthook -h >/dev/null 2>&1 | ||
then | ||
bundle exec $cmd | ||
elif npx lefthook -h >/dev/null 2>&1 | ||
then | ||
npx $cmd | ||
elif yarn lefthook -h >/dev/null 2>&1 | ||
then | ||
exec npx lefthook run pre-push $@ | ||
yarn $cmd | ||
else | ||
exec lefthook run pre-push $@ | ||
echo "Can't find lefthook in PATH" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters