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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ccc74f4079555125fb1033643076ea209685441
4
- data.tar.gz: 9380e10d806fba8ec20f3099e46d305566521179
3
+ metadata.gz: 69ce3bcb41b32e1b53c4cdff6d0ef9ddb3d6dfc8
4
+ data.tar.gz: 2c1a03e456dbfb94118f38abb653a2845374bfb6
5
5
  SHA512:
6
- metadata.gz: f1eb3da26984367e4f6103d413530fee798c30accb2f091f991e3f47a8bcc81d26f0da5671df9cfcf8fc27deed8ece54ed2e47321c1bbb3a58eae8cc9bcbad77
7
- data.tar.gz: 6ad581c5dff557d74f76f1e75b5e17308315af94ae28c1df89d1c727b29a0d52aa16b904f01e238758434218578fc95e7812c4cbd2ef97d82367239971a2b5b9
6
+ metadata.gz: 41a1ac820528660998b1ba671e5ee8dfc14c798667ef9b6e1f1aa69b57bc19f0b23161b9eababd676c5608f99b0e5c814493d60235121d18a15056de8efae0b9
7
+ data.tar.gz: 0ad55a79b0b34e4b05ff5e166a82d272719d8cd5530d18f058496845fa889391c9c83096c9288b89491025a24a656e1366cb8c1c4b02845d34ee21f34fd5bc88
@@ -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
@@ -1,3 +1,3 @@
1
1
  module FitCommit
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -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 >/dev/null 2>/dev/null
5
+ if which rvm >&/dev/null
6
6
  then cmd="rvm default do ruby"
7
- elif which rbenv >/dev/null 2>/dev/null
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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fit-commit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Foley