cookbook-release 1.1.3 → 1.1.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 +8 -8
- data/cookbook-release.gemspec +1 -1
- data/lib/cookbook-release/changelog.rb +9 -1
- data/lib/cookbook-release/commit.rb +5 -0
- data/lib/cookbook-release.rb +6 -0
- data/spec/changelog_spec.rb +27 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTI3MDYzODBjYjM4MzY0YWZkODczMmI5OTEyZDZjMTRkYTgyYjZhYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODZkZjMzMzE5MzM0ZTliYzAyODM4YjUyNDlkZTUzMGMxM2Y2MWY0ZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTE4YTk0YTY0MjQ3M2IwNTU5NzkxYjM3NGZmZjBjMjg5NmU1ZTgyNGNiYjA3
|
10
|
+
YzIyYzZjNWU0NjAzOWYzZGIwYjBmNTNhMDg0ZjY0MGQyODhlNGI5M2E2NjE4
|
11
|
+
MmU3MGRiNjNlYmVmYzJkMGQ2NzA1NTAxMzI5Yzk2NjVjNTc5OTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Mjk4YzFiNzI5ZjkwYmNiNDJhY2ZhZWU2Y2FkNGRhOWViOGNhYmMwMjk2NzA1
|
14
|
+
ZDcxNWU3ZjYzZTY1NDZiYzhjYWEwYjczNzQ2YjZiYTI1ZWQwZDRmYjcxY2Yw
|
15
|
+
NjhkZGQ2NzZmYzU0MzlhZDMxYzE2NGY3ZDJhNmRlNjhhNjVhZTQ=
|
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.1.
|
9
|
+
spec.version = '1.1.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'
|
@@ -34,12 +34,20 @@ module CookbookRelease
|
|
34
34
|
result.join("\n")
|
35
35
|
end
|
36
36
|
|
37
|
+
def markdown
|
38
|
+
changelog.map do |c|
|
39
|
+
full_body ||= @opts[:expand_major] && c.major?
|
40
|
+
full_body ||= @opts[:expand_risky] && c.risky?
|
41
|
+
full_body ||= @opts[:expand_commit] && (c[:subject] =~ @opts[:expand_commit] || c[:body] =~ @opts[:expand_commit])
|
42
|
+
c.to_s_markdown(full_body)
|
43
|
+
end.join("\n")
|
44
|
+
end
|
45
|
+
|
37
46
|
private
|
38
47
|
|
39
48
|
def changelog
|
40
49
|
ref = ENV['RELEASE_BRANCH'] || 'origin/master'
|
41
50
|
@git.compute_changelog(ref)
|
42
51
|
end
|
43
|
-
|
44
52
|
end
|
45
53
|
end
|
data/lib/cookbook-release.rb
CHANGED
data/spec/changelog_spec.rb
CHANGED
@@ -17,4 +17,31 @@ describe CookbookRelease::Changelog do
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
+
describe '.md' do
|
21
|
+
it 'add formatting' do
|
22
|
+
expect(git).to receive(:compute_changelog).and_return(
|
23
|
+
[
|
24
|
+
CookbookRelease::Commit.new(
|
25
|
+
hash: '123456',
|
26
|
+
subject: 'hello',
|
27
|
+
author: 'John Doe')
|
28
|
+
]
|
29
|
+
)
|
30
|
+
changelog = CookbookRelease::Changelog.new(git)
|
31
|
+
expect(changelog.markdown).to eq('*123456* _John Doe_ `hello`')
|
32
|
+
end
|
33
|
+
it 'expand body' do
|
34
|
+
expect(git).to receive(:compute_changelog).and_return(
|
35
|
+
[
|
36
|
+
CookbookRelease::Commit.new(
|
37
|
+
hash: '654321',
|
38
|
+
subject: '[Risky] hello',
|
39
|
+
author: 'John Doe',
|
40
|
+
body: 'Some Men Just Want to Watch the World Burn')
|
41
|
+
]
|
42
|
+
)
|
43
|
+
changelog = CookbookRelease::Changelog.new(git, expand_risky: true)
|
44
|
+
expect(changelog.markdown).to include("\n```\nSome Men Just Want")
|
45
|
+
end
|
46
|
+
end
|
20
47
|
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.1.
|
4
|
+
version: 1.1.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: 2016-
|
11
|
+
date: 2016-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semantic
|