poper 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -4
- data/lib/poper/rule/capitalization.rb +1 -1
- data/lib/poper/rule/fifty_char_summary.rb +1 -1
- data/lib/poper/rule/generic.rb +8 -2
- data/lib/poper/rule/seventy_two_char_limit.rb +1 -1
- data/lib/poper/rule/single_word.rb +1 -1
- data/lib/poper/version.rb +1 -1
- 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: 8f86545c610029866d99bad4fcbf3745ab6736bb
|
4
|
+
data.tar.gz: 78c5ac4bb93b7c86afd212c0ec2ccf0d617e7db7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5437729ed76b22d257201c43431ddcfd4436fc13ea649ac1373ac86ae60f5247557fd607fce7580af22062cf75b68f0105bc2b9d1c10f20a33f712bbb91a1d55
|
7
|
+
data.tar.gz: 4db630bcb63d3d1e797c049a6fa72c8a0c4db2363048f657a22050409d1718c85f9485322d0689820e532f812ae541c88ac0ae16b384fa1d15a935a577b5bfaa
|
data/README.md
CHANGED
@@ -1,15 +1,19 @@
|
|
1
1
|
# Poper
|
2
2
|
|
3
|
-
Poper makes sure that your git commit messages are well-formed
|
4
3
|
|
5
4
|
[![Code Climate](https://codeclimate.com/github/mmozuras/poper.png)](https://codeclimate.com/github/mmozuras/poper)
|
6
5
|
[![Build Status](https://travis-ci.org/mmozuras/poper.png)](https://travis-ci.org/mmozuras/poper)
|
7
6
|
[![Gem Version](https://badge.fury.io/rb/poper.png)](http://badge.fury.io/rb/poper)
|
8
7
|
[![Dependency Status](https://gemnasium.com/mmozuras/poper.png)](https://gemnasium.com/mmozuras/poper)
|
9
8
|
|
10
|
-
|
9
|
+
Poper makes sure that your git commit messages are well-formed. It's partly
|
10
|
+
inspired by [this article][] written by [tpope][]. Rules specified there form
|
11
|
+
the basis of [Poper rules][]. But Poper doesn't stop there. It also doesn't
|
12
|
+
like generic commit messages like 'oops, fix tests'. Poper was created to be
|
13
|
+
used by [Pronto][], but will work perfectly well in whatever scenario you'll
|
14
|
+
come up for it!
|
11
15
|
|
12
|
-
|
16
|
+
## Usage
|
13
17
|
|
14
18
|
![Poper demo](poper.gif "")
|
15
19
|
|
@@ -19,7 +23,12 @@ a commit:
|
|
19
23
|
```bash
|
20
24
|
gem install poper
|
21
25
|
cd /repo/which/commits/you/want/to/check
|
22
|
-
poper run
|
26
|
+
poper run HEAD~3
|
23
27
|
```
|
24
28
|
|
25
29
|
Every commit between current HEAD and specified commit will be checked.
|
30
|
+
|
31
|
+
[this article]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|
32
|
+
[tpope]: https://twitter.com/tpope
|
33
|
+
[Poper rules]: https://github.com/mmozuras/poper/tree/master/lib/poper/rule
|
34
|
+
[Pronto]: https://github.com/mmozuras/pronto
|
data/lib/poper/rule/generic.rb
CHANGED
@@ -1,13 +1,19 @@
|
|
1
1
|
module Poper
|
2
2
|
module Rule
|
3
3
|
class Generic < Rule
|
4
|
-
MSG =
|
4
|
+
MSG = "Consider writing a more detailed, not as generic, commit message"
|
5
5
|
GENERIC = %w(fix fixed fixes oops todo fixme commit changes hm hmm hmmm
|
6
6
|
test tests quickfix)
|
7
7
|
|
8
8
|
def check(message)
|
9
9
|
words = message.scan(/[\w-]+/).compact
|
10
|
-
MSG if words.all? { |word|
|
10
|
+
MSG if words.all? { |word| generic?(word) }
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def generic?(word)
|
16
|
+
GENERIC.include?(word.downcase)
|
11
17
|
end
|
12
18
|
end
|
13
19
|
end
|
data/lib/poper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mindaugas Mozūras
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rugged
|