cookbook-release 1.3.2 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/cookbook-release.gemspec +1 -1
- data/lib/cookbook-release/commit.rb +8 -1
- data/spec/changelog_spec.rb +15 -5
- 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: ef411df78e2425fbcb6f48fab32e57bcbebacabc
|
|
4
|
+
data.tar.gz: 91665c7ad89ba2fa63a8f586298214edbe8efc91
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4fa616dc27a0e09e72c1ce1a4c85dc9462ccfedaa771e36267ef3013434da2b8b347ecce296af6c6d340e7ff5eefcb46da9f5e784ec9c469b57ea85aeb825b80
|
|
7
|
+
data.tar.gz: 95fdeae091d01fb3db067cf525cc7beb3cc1c55c2cf0517b360b2e719549dd0be950f703ba063f550e911db795693129ed4ac8f263cff0c8df0e228533a30dd7
|
data/.travis.yml
CHANGED
data/cookbook-release.gemspec
CHANGED
|
@@ -6,7 +6,7 @@ require 'English'
|
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |spec|
|
|
8
8
|
spec.name = 'cookbook-release'
|
|
9
|
-
spec.version = '1.3.
|
|
9
|
+
spec.version = '1.3.4'
|
|
10
10
|
spec.authors = ['Grégoire Seux']
|
|
11
11
|
spec.email = 'g.seux@criteo.com'
|
|
12
12
|
spec.summary = 'Provide primitives (and rake tasks) to release a cookbook'
|
|
@@ -68,7 +68,14 @@ module CookbookRelease
|
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
def to_s_markdown(full)
|
|
71
|
-
result = "*#{self[:hash]}*
|
|
71
|
+
result = "*#{self[:hash]}* "
|
|
72
|
+
if self[:subject] =~ /risky|breaking/i
|
|
73
|
+
slack_user = self[:email].split('@')[0]
|
|
74
|
+
result << "@#{slack_user}"
|
|
75
|
+
else
|
|
76
|
+
result << "_#{self[:author]} <#{self[:email]}>_"
|
|
77
|
+
end
|
|
78
|
+
result << " `#{self[:subject]}`"
|
|
72
79
|
result << "\n```\n#{self[:body]}\n```" if full && self[:body]
|
|
73
80
|
result
|
|
74
81
|
end
|
data/spec/changelog_spec.rb
CHANGED
|
@@ -31,8 +31,8 @@ describe CookbookRelease::Changelog do
|
|
|
31
31
|
changelog = CookbookRelease::Changelog.new(git)
|
|
32
32
|
expect(changelog.markdown).to eq('*123456* _John Doe <j.doe@nobody.com>_ `hello`')
|
|
33
33
|
end
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
context 'risky commit' do
|
|
35
|
+
let(:commit) do
|
|
36
36
|
[
|
|
37
37
|
CookbookRelease::Commit.new(
|
|
38
38
|
hash: '654321',
|
|
@@ -41,9 +41,19 @@ describe CookbookRelease::Changelog do
|
|
|
41
41
|
email: 'j.doe@nobody.com',
|
|
42
42
|
body: 'Some Men Just Want to Watch the World Burn')
|
|
43
43
|
]
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
it 'expands the body' do
|
|
47
|
+
expect(git).to receive(:compute_changelog).and_return(commit)
|
|
48
|
+
changelog = CookbookRelease::Changelog.new(git, expand_risky: true)
|
|
49
|
+
expect(changelog.markdown).to include("\n```\nSome Men Just Want")
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
it 'mentions the author' do
|
|
53
|
+
expect(git).to receive(:compute_changelog).and_return(commit)
|
|
54
|
+
changelog = CookbookRelease::Changelog.new(git, expand_risky: true)
|
|
55
|
+
expect(changelog.markdown).to start_with('*654321* @j.doe `[Risky] hello`')
|
|
56
|
+
end
|
|
47
57
|
end
|
|
48
58
|
end
|
|
49
59
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cookbook-release
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Grégoire Seux
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-06-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: semantic
|