nice_commits 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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72598bb82be450e09c4dbe726488e68c11c37666
|
4
|
+
data.tar.gz: 245604aef3dff61da85312fb741f412093d8273f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 303c419221605bcb67faa6204d66beae50f5031cfa26e1359f410749556e443ac9641c464936409ece390c7a84f3ab9322c342cf7d2ee394490147e101cdbf44
|
7
|
+
data.tar.gz: 84c0e09f830c3b7f35d10a2976d56fead758f2524a16dce9cf0fe21b09c3eb05df0eee0c02d73fad517c31670b4a5973406a8a6365cf341a26d05b622f6f5415
|
data/lib/nice_commits/commits.rb
CHANGED
@@ -3,6 +3,7 @@ module NiceCommits
|
|
3
3
|
def initialize(git, options)
|
4
4
|
@git = git
|
5
5
|
@since = options.since
|
6
|
+
@count = options.count
|
6
7
|
end
|
7
8
|
|
8
9
|
def each(&block)
|
@@ -12,7 +13,7 @@ module NiceCommits
|
|
12
13
|
private
|
13
14
|
|
14
15
|
def log
|
15
|
-
@git.log.since(@since)
|
16
|
+
@git.log(@count).since(@since)
|
16
17
|
end
|
17
18
|
end
|
18
19
|
end
|
data/lib/nice_commits/options.rb
CHANGED
data/lib/nice_commits/version.rb
CHANGED
@@ -43,6 +43,11 @@ Long commit description with list of changed files:
|
|
43
43
|
it { expect(subject.valid?).to be true }
|
44
44
|
end
|
45
45
|
|
46
|
+
context 'for message with body without ending carriage return' do
|
47
|
+
let(:message) { %Q{refactor(subscriptions): fix feature envy in sender\n\nCommit description\n\nissue} }
|
48
|
+
it { expect(subject.valid?).to be true }
|
49
|
+
end
|
50
|
+
|
46
51
|
context 'for emty message' do
|
47
52
|
let(:message) { '' }
|
48
53
|
it { expect(subject.valid?).to be false }
|
@@ -56,11 +61,6 @@ Commit description
|
|
56
61
|
it { expect(subject.valid?).to be false }
|
57
62
|
end
|
58
63
|
|
59
|
-
context 'for message with body without ending carriage return' do
|
60
|
-
let(:message) { %Q{refactor(subscriptions): fix feature envy in sender\n\nCommit description} }
|
61
|
-
it { expect(subject.valid?).to be false }
|
62
|
-
end
|
63
|
-
|
64
64
|
context 'for message without type' do
|
65
65
|
let(:message) { '(all): fix a lot of issues' }
|
66
66
|
it { expect(subject.valid?).to be false }
|