fit-commit 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fit-commit/cli.rb +2 -0
- data/lib/fit-commit/version.rb +1 -1
- data/templates/hooks/commit-msg +9 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 69ce3bcb41b32e1b53c4cdff6d0ef9ddb3d6dfc8
|
|
4
|
+
data.tar.gz: 2c1a03e456dbfb94118f38abb653a2845374bfb6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 41a1ac820528660998b1ba671e5ee8dfc14c798667ef9b6e1f1aa69b57bc19f0b23161b9eababd676c5608f99b0e5c814493d60235121d18a15056de8efae0b9
|
|
7
|
+
data.tar.gz: 0ad55a79b0b34e4b05ff5e166a82d272719d8cd5530d18f058496845fa889391c9c83096c9288b89491025a24a656e1366cb8c1c4b02845d34ee21f34fd5bc88
|
data/lib/fit-commit/cli.rb
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require "fit-commit/installer"
|
|
2
|
+
require "fit-commit/version"
|
|
2
3
|
|
|
3
4
|
module FitCommit
|
|
4
5
|
class Cli
|
|
@@ -12,6 +13,7 @@ module FitCommit
|
|
|
12
13
|
if action_name == "install"
|
|
13
14
|
FitCommit::Installer.new.install
|
|
14
15
|
else
|
|
16
|
+
warn "fit-commit v#{FitCommit::VERSION}"
|
|
15
17
|
warn "Usage: fit-commit install"
|
|
16
18
|
false
|
|
17
19
|
end
|
data/lib/fit-commit/version.rb
CHANGED
data/templates/hooks/commit-msg
CHANGED
|
@@ -2,15 +2,22 @@
|
|
|
2
2
|
#
|
|
3
3
|
# This hook will attempt to setup your environment before running checks.
|
|
4
4
|
|
|
5
|
-
if which rvm
|
|
5
|
+
if which rvm >&/dev/null
|
|
6
6
|
then cmd="rvm default do ruby"
|
|
7
|
-
elif which rbenv
|
|
7
|
+
elif which rbenv >&/dev/null
|
|
8
8
|
then cmd="rbenv exec ruby"
|
|
9
9
|
else cmd="ruby"
|
|
10
10
|
fi
|
|
11
11
|
|
|
12
12
|
export COMMIT_MESSAGE_PATH=$1
|
|
13
13
|
|
|
14
|
+
if (! [[ "$COMMIT_MESSAGE_PATH" ]] ); then
|
|
15
|
+
>&2 echo 'fit-commit: WARNING: Skipping checks because the Git hook was not passed the'
|
|
16
|
+
>&2 echo 'fit-commit: commit message file path. This is usually `.git/COMMIT_EDITMSG`.'
|
|
17
|
+
>&2 echo 'fit-commit: Please submit a bug report with the project.'
|
|
18
|
+
exit 0
|
|
19
|
+
fi
|
|
20
|
+
|
|
14
21
|
${cmd} -rrubygems -e '
|
|
15
22
|
begin
|
|
16
23
|
require "fit-commit"
|