git-story-workflow 1.6.2 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/git-story-workflow.gemspec +2 -2
- data/lib/git/story/prepare-commit-msg +5 -8
- data/lib/git/story/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 596a9130689707c63f88c05175e839d2fd6618452096191d9f943ab7b0cf5273
|
4
|
+
data.tar.gz: e2917683df0992dc786210a6d666aa287f615501ab2334916d6a49c828579ddf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58477df77c6ab0ffcfda37cd1089dca528bb19b412f5e5359271d5b9956537c001f283e798881deedcae90f6ffd4254f76e37c95d7872e04caf3af9f1122b034
|
7
|
+
data.tar.gz: ce696203a7f9955074fa7829d5c2afd31adb884154c9eca38820bd9f91a38b5f97c6ba01c99523c1155316652503289f7bd7030ff4b3f442ddecdddab0823278
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.7.0
|
data/git-story-workflow.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: git-story-workflow 1.
|
2
|
+
# stub: git-story-workflow 1.7.0 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "git-story-workflow".freeze
|
6
|
-
s.version = "1.
|
6
|
+
s.version = "1.7.0"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|
@@ -26,12 +26,8 @@ class CommitMesssageParser
|
|
26
26
|
def parse(template)
|
27
27
|
@message_data = template.readlines
|
28
28
|
@message_data.each do |line|
|
29
|
-
if /^\s*\[.*(?:#\d
|
29
|
+
if /^\s*\[.*(?:#\d{7,}).*\]/i =~ line
|
30
30
|
@story_number_found = true
|
31
|
-
if @story_number_done = !!done
|
32
|
-
@message_data.slice!(@line_index)
|
33
|
-
next
|
34
|
-
end
|
35
31
|
end
|
36
32
|
if line =~ /^\s*#/
|
37
33
|
break
|
@@ -58,7 +54,7 @@ class CommitMesssageParser
|
|
58
54
|
end
|
59
55
|
|
60
56
|
story_numbers =
|
61
|
-
`git branch --no-color`.sub!(/^\* .*?(?:_(\d
|
57
|
+
`git branch --no-color`.sub!(/^\* .*?(?:_(\d{7,}(?:_\d{7,})*))$/) {
|
62
58
|
break $1.split(/_/)
|
63
59
|
} || []
|
64
60
|
story_numbers.map!(&:chomp)
|
@@ -67,8 +63,9 @@ Tempfile.open('commit') do |output|
|
|
67
63
|
message_parsed = CommitMesssageParser.new.parse(template)
|
68
64
|
if message_parsed.story_number_found?
|
69
65
|
output.puts message_parsed.total
|
70
|
-
elsif
|
71
|
-
|
66
|
+
elsif story_numbers.empty?
|
67
|
+
template.rewind
|
68
|
+
output.puts template.read
|
72
69
|
else
|
73
70
|
full_message = [ message_parsed.data, "", ]
|
74
71
|
if prefix = complex_config.story.pivotal_reference_prefix?
|
data/lib/git/story/version.rb
CHANGED