fit-commit 3.6.1 → 3.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/lib/fit_commit/version.rb +1 -1
- data/templates/hooks/commit-msg +5 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0b95d59622579ff58ddc0443293c4be66ae71b9
|
4
|
+
data.tar.gz: 9a8d5cca328a035aa802c9e5514ed5c0c1e07c11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 271657b39d8a59e5f9c8e537a8cd6c972f5e73e68cf289bfdebd9860585b4ef344e9a8b517c80615ac6791d0fe843f72cd32ed5a56491d09e6cd079e95f80b6a
|
7
|
+
data.tar.gz: a38474d9139609b5672926e3c8e05069c1c655707fed2eaca6a2223cd01aa51067ceca1719247582498c2c37c6e8556fb50bb68623954e040c76db651106ac55
|
data/README.md
CHANGED
@@ -156,6 +156,16 @@ To copy your default hooks into existing repos:
|
|
156
156
|
$ git init
|
157
157
|
```
|
158
158
|
|
159
|
+
### How can I run this standalone, like part of a CI process?
|
160
|
+
|
161
|
+
Fit Commit can be run outside of a Git hook context with a simple shell script:
|
162
|
+
|
163
|
+
```sh
|
164
|
+
$ GIT_BRANCH_NAME=branch_name COMMIT_MESSAGE_PATH=path/to/message rbenv exec ruby -rrubygems -e 'require "fit_commit"; FitCommit.run'
|
165
|
+
```
|
166
|
+
|
167
|
+
It exits with an error code if any errors are present, which will fail a build if it's part of a CI run. The configuration should be modified for CI to be more lenient, otherwise false positives will break the build too often.
|
168
|
+
|
159
169
|
### Who decided these rules?
|
160
170
|
Fit Commit aims to enforce *community standards*. The two influential guides are:
|
161
171
|
|
data/lib/fit_commit/version.rb
CHANGED
data/templates/hooks/commit-msg
CHANGED
@@ -20,8 +20,11 @@ fi
|
|
20
20
|
|
21
21
|
export GIT_BRANCH_NAME=`git symbolic-ref --short HEAD 2> /dev/null`
|
22
22
|
|
23
|
-
#
|
24
|
-
|
23
|
+
# Use bundler if fit-commit was installed using it
|
24
|
+
# or find appropriate Ruby command
|
25
|
+
if bundle show fit-commit > /dev/null 2>&1; then
|
26
|
+
cmd="bundle exec ruby"
|
27
|
+
elif which rbenv > /dev/null 2>&1; then
|
25
28
|
cmd="rbenv exec ruby"
|
26
29
|
elif which ruby-rvm-env > /dev/null 2>&1; then
|
27
30
|
cmd="ruby-rvm-env"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fit-commit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Foley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: swearjar
|