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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d7b6b6417a4cc091b9681f2639a969f8998e7ba7
4
- data.tar.gz: cf9dca92994bcf0dda079569a9374a718fcb6e26
3
+ metadata.gz: a0b95d59622579ff58ddc0443293c4be66ae71b9
4
+ data.tar.gz: 9a8d5cca328a035aa802c9e5514ed5c0c1e07c11
5
5
  SHA512:
6
- metadata.gz: 54101457555ac15af13acfeb1f855f26436423b740ce1c59a6531d31d93c8dfef72d33cbebe2bc31f2ee9d66e57f3baba4e43796334ada91b6ef8f94f2699ff1
7
- data.tar.gz: d2459fbb6d8b0b4a23d3a9faa68ffa0b81835cc997e79b45769d7b0abc69d88f2682a4af91dc3ad58a5a40c1c25efc5f8e710b49a3616254625ed5f9a9a41299
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
 
@@ -1,3 +1,3 @@
1
1
  module FitCommit
2
- VERSION = "3.6.1"
2
+ VERSION = "3.7.0"
3
3
  end
@@ -20,8 +20,11 @@ fi
20
20
 
21
21
  export GIT_BRANCH_NAME=`git symbolic-ref --short HEAD 2> /dev/null`
22
22
 
23
- # find appropriate Ruby command
24
- if which rbenv > /dev/null 2>&1; then
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.6.1
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: 2016-11-19 00:00:00.000000000 Z
11
+ date: 2017-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: swearjar