keepachangelog 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -1
- data/Gemfile.lock +1 -1
- data/changelog/0.5.0/10-yaml-add-period.yaml +4 -0
- data/changelog/0.5.0/11-default-date.yaml +4 -0
- data/changelog/0.5.0/9-allow-any-name-for-unreleased.yaml +4 -0
- data/features/parser.feature +4 -2
- data/lib/keepachangelog/parser/yaml.rb +1 -1
- data/lib/keepachangelog/printer/markdown.rb +10 -6
- data/package.json +1 -1
- data/spec/parser/yaml_spec.rb +2 -2
- data/spec/printer/markdown_spec.rb +3 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c215397c43999eed8396c30d3220d90e09a2bdc4
|
4
|
+
data.tar.gz: 7308f595692c3b88e9eb03f5aeb1d8ec944534e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 683825c4d04eb53302f1f24bbeb577d847a61f3a2ad6ccb2ebe60f8aab08367883d9bd36021ab654a509d679dcc7d5789875a047004e3a390ebc07d78c1ee5b3
|
7
|
+
data.tar.gz: fd712b96a127ff809408277551adaa95cc00738cca69482a5fda4ea1b4e5796d91311fe1070505dc5c3f61fa778476833445179ce88f66e6b878f368f4a2e32f
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,17 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6
6
|
|
7
|
-
## [0.
|
7
|
+
## [0.5.0] - 2017-04-04
|
8
|
+
### Fixed
|
9
|
+
- Lines that end with special characters will no longer result in a crash. (#10)
|
10
|
+
|
11
|
+
### Changed
|
12
|
+
- Date of a version in generated Markdown now defaults to current date instead of blank. (#11)
|
13
|
+
|
14
|
+
### New
|
15
|
+
- Allow any name for unreleased versions. (#9)
|
16
|
+
|
17
|
+
## [0.4.1] - 2017-03-30
|
8
18
|
### Fixed
|
9
19
|
- Deploy job in CI will no longer be skipped even though it should run. (#8)
|
10
20
|
|
@@ -43,6 +53,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
43
53
|
- Tool for reading Changelog in Markdown format.
|
44
54
|
- Ability to convert Changelog to YAML.
|
45
55
|
|
56
|
+
[0.5.0]: https://gitlab.com/ephracis/keepachangelog/compare/0.4.1...0.5.0
|
46
57
|
[0.4.1]: https://gitlab.com/ephracis/keepachangelog/compare/0.4.0...0.4.1
|
47
58
|
[0.4.0]: https://gitlab.com/ephracis/keepachangelog/compare/0.3.1...0.4.0
|
48
59
|
[0.3.1]: https://gitlab.com/ephracis/keepachangelog/compare/0.3.0...0.3.1
|
data/Gemfile.lock
CHANGED
data/features/parser.feature
CHANGED
@@ -33,8 +33,10 @@ Feature: Parse changelogs
|
|
33
33
|
|
34
34
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
35
35
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
36
|
-
|
37
|
-
|
36
|
+
"""
|
37
|
+
And the output should contain "## 1.0.0 - "
|
38
|
+
And the output should contain:
|
39
|
+
"""
|
38
40
|
### New
|
39
41
|
- Feature A.
|
40
42
|
"""
|
@@ -95,7 +95,7 @@ module Keepachangelog
|
|
95
95
|
|
96
96
|
def generate_line(yaml)
|
97
97
|
line = yaml['title']
|
98
|
-
line +=
|
98
|
+
line += '.' unless line =~ /[[:punct:]]$/
|
99
99
|
line += " (!#{yaml['merge_request']})" if yaml['merge_request']
|
100
100
|
line += " (##{yaml['issue']})" if yaml['issue']
|
101
101
|
line += " (#{yaml['author']})" if yaml['author']
|
@@ -26,11 +26,15 @@ module Keepachangelog
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def compare_versions(a, b)
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
if Gem::Version.correct?(a) && Gem::Version.correct?(b)
|
30
|
+
Gem::Version.new(a) <=> Gem::Version.new(b)
|
31
|
+
elsif Gem::Version.correct?(a)
|
32
|
+
-1
|
33
|
+
elsif Gem::Version.correct?(b)
|
34
|
+
1
|
35
|
+
else
|
36
|
+
a <=> b
|
37
|
+
end
|
34
38
|
end
|
35
39
|
|
36
40
|
def clean_intro(text)
|
@@ -89,7 +93,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/)."
|
|
89
93
|
date = `git log -1 --format=%aI #{version} 2>/dev/null`.strip
|
90
94
|
DateTime.parse(date).strftime('%Y-%m-%d')
|
91
95
|
rescue
|
92
|
-
nil
|
96
|
+
Gem::Version.correct?(version) ? DateTime.now.strftime('%Y-%m-%d') : nil
|
93
97
|
end
|
94
98
|
|
95
99
|
def version_header(version)
|
data/package.json
CHANGED
data/spec/parser/yaml_spec.rb
CHANGED
@@ -11,7 +11,7 @@ module Keepachangelog
|
|
11
11
|
it 'should parse single version' do
|
12
12
|
content = "
|
13
13
|
---
|
14
|
-
title:
|
14
|
+
title: 'Test: Here we are testing to parse `something`'
|
15
15
|
type: New
|
16
16
|
"
|
17
17
|
cl = YamlParser.parse(content, '1.2.3')
|
@@ -19,7 +19,7 @@ type: New
|
|
19
19
|
'versions' => {
|
20
20
|
'1.2.3' => {
|
21
21
|
'changes' => {
|
22
|
-
'New' => ['
|
22
|
+
'New' => ['Test: Here we are testing to parse `something`.']
|
23
23
|
}
|
24
24
|
}
|
25
25
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: keepachangelog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Basalt AB
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -156,6 +156,9 @@ files:
|
|
156
156
|
- changelog/0.4.0/7-numeric-order.yaml
|
157
157
|
- changelog/0.4.0/share-with-public.yaml
|
158
158
|
- changelog/0.4.1/8-fix-deploy.yaml
|
159
|
+
- changelog/0.5.0/10-yaml-add-period.yaml
|
160
|
+
- changelog/0.5.0/11-default-date.yaml
|
161
|
+
- changelog/0.5.0/9-allow-any-name-for-unreleased.yaml
|
159
162
|
- changelog/meta.yaml
|
160
163
|
- exe/keepachangelog
|
161
164
|
- features/help.feature
|