keepachangelog 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitlab-ci.yml +1 -1
- data/CHANGELOG.md +33 -26
- data/Gemfile.lock +54 -46
- data/changelog/0.1.0/json.yaml +1 -1
- data/changelog/0.1.0/tool.yaml +1 -1
- data/changelog/0.1.0/yaml.yaml +1 -1
- data/changelog/0.2.0/markdown-output.yaml +1 -1
- data/changelog/0.2.0/yaml-input.yaml +1 -1
- data/changelog/0.3.0/4-document-meta.yaml +1 -1
- data/changelog/0.4.0/5-yaml-files.yaml +1 -1
- data/changelog/0.4.0/share-with-public.yaml +1 -1
- data/changelog/0.5.0/9-allow-any-name-for-unreleased.yaml +1 -1
- data/changelog/0.5.1/14-json-dates.yaml +1 -1
- data/changelog/0.6.0/order-changes.1.yaml +4 -0
- data/changelog/0.6.0/order-changes.yaml +4 -0
- data/changelog/0.6.0/ruby-2.5.yaml +4 -0
- data/changelog/meta.yaml +13 -1
- data/features/help.feature +2 -2
- data/features/parser.feature +3 -3
- data/features/version.feature +1 -1
- data/keepachangelog.gemspec +7 -9
- data/lib/keepachangelog.rb +1 -0
- data/lib/keepachangelog/cli.rb +1 -0
- data/lib/keepachangelog/parser.rb +1 -0
- data/lib/keepachangelog/parser/yaml.rb +5 -4
- data/lib/keepachangelog/printer/markdown.rb +11 -2
- data/lib/keepachangelog/version.rb +0 -1
- data/package.json +1 -1
- data/spec/parser/markdown_spec.rb +1 -1
- data/spec/parser/yaml_spec.rb +5 -5
- data/spec/printer/markdown_spec.rb +34 -0
- metadata +30 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d00e95c824e9ecc45e95a1ea1b21118c7dc9c90fab330e3b6460870f2a742d36
|
4
|
+
data.tar.gz: d085bdb5f057b67a613c32be787fc6d9fbdb5ec56c18536a56531bf2faaf567a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7246c950df3b0f27706f18dce07275b1c789879ef1023b765059680e4403c52b5b3ec615223e52435621d919b1ec64d7ba878efddf80fa96a8ae3d651b2e9744
|
7
|
+
data.tar.gz: 92a4c976350d879e2228ab1d4faf71b5702b1c8f3b6770f36b558832d82206e1802f88e2b2a3009a402e366973e5fbcec02aa35df738707586ee8bd369beb9aa
|
data/.gitlab-ci.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -4,71 +4,78 @@ 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.6.0] - 2018-01-31
|
8
|
+
### Added
|
9
|
+
- Ability to sort sections.
|
10
|
+
- Changes are now sorted alphabetically.
|
11
|
+
- Support for Ruby 2.5.
|
12
|
+
|
13
|
+
## [0.5.3] - 2018-01-31
|
8
14
|
### Fixed
|
9
15
|
- Move project into the Basalt group on GitLab.com.
|
10
16
|
- Print the output folder when generating YAML to default location.
|
11
17
|
|
12
|
-
## [0.5.2] -
|
18
|
+
## [0.5.2] - 2018-01-31
|
13
19
|
### Fixed
|
14
20
|
- Fix incorrect previous version in URL in Markdown output. (#15)
|
15
21
|
|
16
|
-
## [0.5.1] -
|
17
|
-
###
|
18
|
-
- Handle arbitrary name for unreleased version when creating URL in Markdown.
|
19
|
-
|
20
|
-
### New
|
22
|
+
## [0.5.1] - 2018-01-31
|
23
|
+
### Added
|
21
24
|
- The YAML parser now fetches the date when a version was created.
|
22
25
|
|
23
|
-
## [0.5.0] - 2017-04-04
|
24
26
|
### Fixed
|
25
|
-
-
|
27
|
+
- Handle arbitrary name for unreleased version when creating URL in Markdown.
|
28
|
+
|
29
|
+
## [0.5.0] - 2018-01-31
|
30
|
+
### Added
|
31
|
+
- Allow any name for unreleased versions. (#9)
|
26
32
|
|
27
33
|
### Changed
|
28
34
|
- Date of a version in generated Markdown now defaults to current date instead of blank. (#11)
|
29
35
|
|
30
|
-
###
|
31
|
-
-
|
36
|
+
### Fixed
|
37
|
+
- Lines that end with special characters will no longer result in a crash. (#10)
|
32
38
|
|
33
|
-
## [0.4.1] -
|
39
|
+
## [0.4.1] - 2018-01-31
|
34
40
|
### Fixed
|
35
41
|
- Deploy job in CI will no longer be skipped even though it should run. (#8)
|
36
42
|
|
37
|
-
## [0.4.0] -
|
38
|
-
###
|
43
|
+
## [0.4.0] - 2018-01-31
|
44
|
+
### Added
|
39
45
|
- Ability to output changelog to yaml file structure. (!9)
|
40
46
|
- The code is pushed into a public repo at gitlab.com.
|
41
47
|
|
42
48
|
### Fixed
|
43
49
|
- Sort versions in reverse numerical order in Markdown output. (#7)
|
44
50
|
|
45
|
-
## [0.3.1] -
|
51
|
+
## [0.3.1] - 2018-01-31
|
46
52
|
### Fixed
|
47
53
|
- Remove duplicates in Changelog for this project. (#6)
|
48
54
|
|
49
|
-
## [0.3.0] -
|
55
|
+
## [0.3.0] - 2018-01-31
|
56
|
+
### Added
|
57
|
+
- Documentation on how to add metadata. (#4)
|
58
|
+
|
50
59
|
### Fixed
|
51
|
-
- YAML parser can now read multiple changes in a version. (#2)
|
52
60
|
- Do not display anchors when URL is missing. (#3)
|
61
|
+
- YAML parser can now read multiple changes in a version. (#2)
|
53
62
|
|
54
|
-
|
55
|
-
- Documentation on how to add metadata. (#4)
|
56
|
-
|
57
|
-
## [0.2.1] - 2017-03-27
|
63
|
+
## [0.2.1] - 2018-01-31
|
58
64
|
### Fixed
|
59
65
|
- Fix documentation formatting for YAML parser.
|
60
66
|
|
61
|
-
## [0.2.0] -
|
62
|
-
###
|
67
|
+
## [0.2.0] - 2018-01-31
|
68
|
+
### Added
|
63
69
|
- Ability to print in Markdown.
|
64
70
|
- Ability to read YAML files.
|
65
71
|
|
66
|
-
## [0.1.0] -
|
67
|
-
###
|
72
|
+
## [0.1.0] - 2018-01-31
|
73
|
+
### Added
|
68
74
|
- Ability to convert Changelog to JSON.
|
69
|
-
- Tool for reading Changelog in Markdown format.
|
70
75
|
- Ability to convert Changelog to YAML.
|
76
|
+
- Tool for reading Changelog in Markdown format.
|
71
77
|
|
78
|
+
[0.6.0]: https://gitlab.com/basalt/keepachangelog/compare/0.5.3...0.6.0
|
72
79
|
[0.5.3]: https://gitlab.com/basalt/keepachangelog/compare/0.5.2...0.5.3
|
73
80
|
[0.5.2]: https://gitlab.com/basalt/keepachangelog/compare/0.5.1...0.5.2
|
74
81
|
[0.5.1]: https://gitlab.com/basalt/keepachangelog/compare/0.5.0...0.5.1
|
data/Gemfile.lock
CHANGED
@@ -1,87 +1,95 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
keepachangelog (0.
|
5
|
-
json (~> 2.
|
6
|
-
thor (~> 0.
|
4
|
+
keepachangelog (0.6.0)
|
5
|
+
json (~> 2.1)
|
6
|
+
thor (~> 0.20)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
aruba (0.14.
|
12
|
-
childprocess (~> 0.
|
11
|
+
aruba (0.14.3)
|
12
|
+
childprocess (~> 0.8.0)
|
13
13
|
contracts (~> 0.9)
|
14
14
|
cucumber (>= 1.3.19)
|
15
15
|
ffi (~> 1.9.10)
|
16
16
|
rspec-expectations (>= 2.99)
|
17
17
|
thor (~> 0.19)
|
18
|
-
ast (2.
|
18
|
+
ast (2.4.0)
|
19
|
+
backports (3.11.1)
|
19
20
|
builder (3.2.3)
|
20
|
-
childprocess (0.
|
21
|
+
childprocess (0.8.0)
|
21
22
|
ffi (~> 1.0, >= 1.0.11)
|
22
|
-
contracts (0.
|
23
|
-
cucumber (
|
23
|
+
contracts (0.16.0)
|
24
|
+
cucumber (3.1.0)
|
24
25
|
builder (>= 2.1.2)
|
25
|
-
cucumber-core (~> 1.
|
26
|
+
cucumber-core (~> 3.1.0)
|
27
|
+
cucumber-expressions (~> 5.0.4)
|
26
28
|
cucumber-wire (~> 0.0.1)
|
27
|
-
diff-lcs (
|
28
|
-
gherkin (~>
|
29
|
+
diff-lcs (~> 1.3)
|
30
|
+
gherkin (~> 5.0)
|
29
31
|
multi_json (>= 1.7.5, < 2.0)
|
30
32
|
multi_test (>= 0.1.2)
|
31
|
-
cucumber-core (1.
|
32
|
-
|
33
|
+
cucumber-core (3.1.0)
|
34
|
+
backports (>= 3.8.0)
|
35
|
+
cucumber-tag_expressions (~> 1.1.0)
|
36
|
+
gherkin (>= 5.0.0)
|
37
|
+
cucumber-expressions (5.0.13)
|
38
|
+
cucumber-tag_expressions (1.1.1)
|
33
39
|
cucumber-wire (0.0.1)
|
34
40
|
diff-lcs (1.3)
|
35
41
|
docile (1.1.5)
|
36
42
|
ffi (1.9.18)
|
37
|
-
gherkin (
|
38
|
-
json (2.0
|
39
|
-
multi_json (1.
|
43
|
+
gherkin (5.0.0)
|
44
|
+
json (2.1.0)
|
45
|
+
multi_json (1.13.1)
|
40
46
|
multi_test (0.1.2)
|
41
|
-
|
42
|
-
|
47
|
+
parallel (1.12.1)
|
48
|
+
parser (2.4.0.2)
|
49
|
+
ast (~> 2.3)
|
43
50
|
powerpack (0.1.1)
|
44
|
-
rainbow (
|
45
|
-
rake (12.
|
46
|
-
rspec (3.
|
47
|
-
rspec-core (~> 3.
|
48
|
-
rspec-expectations (~> 3.
|
49
|
-
rspec-mocks (~> 3.
|
50
|
-
rspec-core (3.
|
51
|
-
rspec-support (~> 3.
|
52
|
-
rspec-expectations (3.
|
51
|
+
rainbow (3.0.0)
|
52
|
+
rake (12.3.0)
|
53
|
+
rspec (3.7.0)
|
54
|
+
rspec-core (~> 3.7.0)
|
55
|
+
rspec-expectations (~> 3.7.0)
|
56
|
+
rspec-mocks (~> 3.7.0)
|
57
|
+
rspec-core (3.7.1)
|
58
|
+
rspec-support (~> 3.7.0)
|
59
|
+
rspec-expectations (3.7.0)
|
53
60
|
diff-lcs (>= 1.2.0, < 2.0)
|
54
|
-
rspec-support (~> 3.
|
55
|
-
rspec-mocks (3.
|
61
|
+
rspec-support (~> 3.7.0)
|
62
|
+
rspec-mocks (3.7.0)
|
56
63
|
diff-lcs (>= 1.2.0, < 2.0)
|
57
|
-
rspec-support (~> 3.
|
58
|
-
rspec-support (3.
|
59
|
-
rubocop (0.
|
60
|
-
|
64
|
+
rspec-support (~> 3.7.0)
|
65
|
+
rspec-support (3.7.1)
|
66
|
+
rubocop (0.52.1)
|
67
|
+
parallel (~> 1.10)
|
68
|
+
parser (>= 2.4.0.2, < 3.0)
|
61
69
|
powerpack (~> 0.1)
|
62
|
-
rainbow (>=
|
70
|
+
rainbow (>= 2.2.2, < 4.0)
|
63
71
|
ruby-progressbar (~> 1.7)
|
64
72
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
65
|
-
ruby-progressbar (1.
|
66
|
-
simplecov (0.
|
73
|
+
ruby-progressbar (1.9.0)
|
74
|
+
simplecov (0.15.1)
|
67
75
|
docile (~> 1.1.0)
|
68
76
|
json (>= 1.8, < 3)
|
69
77
|
simplecov-html (~> 0.10.0)
|
70
|
-
simplecov-html (0.10.
|
71
|
-
thor (0.
|
72
|
-
unicode-display_width (1.
|
78
|
+
simplecov-html (0.10.2)
|
79
|
+
thor (0.20.0)
|
80
|
+
unicode-display_width (1.3.0)
|
73
81
|
|
74
82
|
PLATFORMS
|
75
83
|
ruby
|
76
84
|
|
77
85
|
DEPENDENCIES
|
78
86
|
aruba (~> 0.14)
|
79
|
-
bundler (~> 1.
|
87
|
+
bundler (~> 1.16)
|
80
88
|
keepachangelog!
|
81
|
-
rake (~> 12.
|
82
|
-
rspec (~> 3.
|
83
|
-
rubocop (~> 0.
|
84
|
-
simplecov (~> 0.
|
89
|
+
rake (~> 12.3)
|
90
|
+
rspec (~> 3.7)
|
91
|
+
rubocop (~> 0.52)
|
92
|
+
simplecov (~> 0.15)
|
85
93
|
|
86
94
|
BUNDLED WITH
|
87
|
-
1.
|
95
|
+
1.16.1
|
data/changelog/0.1.0/json.yaml
CHANGED
data/changelog/0.1.0/tool.yaml
CHANGED
data/changelog/0.1.0/yaml.yaml
CHANGED
data/changelog/meta.yaml
CHANGED
data/features/help.feature
CHANGED
@@ -4,9 +4,9 @@ Feature: Show help
|
|
4
4
|
information about a specific command run `keepachangelog help [COMMAND]`.
|
5
5
|
|
6
6
|
Scenario: Getting general help
|
7
|
-
When I
|
7
|
+
When I run `keepachangelog help`
|
8
8
|
Then the output should contain "Keepachangelog commands"
|
9
9
|
|
10
10
|
Scenario: Getting help about a command
|
11
|
-
When I
|
11
|
+
When I run `keepachangelog help parse`
|
12
12
|
Then the output should contain "Usage"
|
data/features/parser.feature
CHANGED
@@ -12,7 +12,7 @@ Feature: Parse changelogs
|
|
12
12
|
### New
|
13
13
|
- Feature A
|
14
14
|
"""
|
15
|
-
When I
|
15
|
+
When I run `keepachangelog --from md --to json --in CHANGELOG.md`
|
16
16
|
Then the output should contain:
|
17
17
|
"""
|
18
18
|
{"versions":{"Unreleased":{"url":null,"date":null,"changes":{"New":["Feature A"]}}},"intro":"Some intro goes here.","title":"My Changes"}
|
@@ -25,7 +25,7 @@ Feature: Parse changelogs
|
|
25
25
|
title: Feature A
|
26
26
|
type: New
|
27
27
|
"""
|
28
|
-
When I
|
28
|
+
When I run `keepachangelog --from yaml --to md`
|
29
29
|
Then the output should contain:
|
30
30
|
"""
|
31
31
|
# Change log
|
@@ -50,7 +50,7 @@ Feature: Parse changelogs
|
|
50
50
|
### New
|
51
51
|
- Feature A
|
52
52
|
"""
|
53
|
-
When I
|
53
|
+
When I run `keepachangelog --from md --to yaml --in CHANGELOG.md`
|
54
54
|
Then the file "changelog/Unreleased/feature-a.yaml" should contain:
|
55
55
|
"""
|
56
56
|
---
|
data/features/version.feature
CHANGED
data/keepachangelog.gemspec
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
1
|
lib = File.expand_path('../lib', __FILE__)
|
4
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
3
|
require 'keepachangelog/version'
|
@@ -25,12 +23,12 @@ Gem::Specification.new do |spec|
|
|
25
23
|
spec.bindir = 'exe'
|
26
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
25
|
spec.require_paths = ['lib']
|
28
|
-
spec.add_development_dependency 'bundler', '~> 1.14'
|
29
|
-
spec.add_development_dependency 'rake', '~> 12.0'
|
30
|
-
spec.add_development_dependency 'rspec', '~> 3.5'
|
31
|
-
spec.add_development_dependency 'rubocop', '~> 0.47'
|
32
|
-
spec.add_development_dependency 'simplecov', '~> 0.14'
|
33
26
|
spec.add_development_dependency 'aruba', '~> 0.14'
|
34
|
-
spec.
|
35
|
-
spec.
|
27
|
+
spec.add_development_dependency 'bundler', '~> 1.16'
|
28
|
+
spec.add_development_dependency 'rake', '~> 12.3'
|
29
|
+
spec.add_development_dependency 'rspec', '~> 3.7'
|
30
|
+
spec.add_development_dependency 'rubocop', '~> 0.52'
|
31
|
+
spec.add_development_dependency 'simplecov', '~> 0.15'
|
32
|
+
spec.add_runtime_dependency 'json', '~> 2.1'
|
33
|
+
spec.add_runtime_dependency 'thor', '~> 0.20'
|
36
34
|
end
|
data/lib/keepachangelog.rb
CHANGED
data/lib/keepachangelog/cli.rb
CHANGED
@@ -71,6 +71,7 @@ module Keepachangelog
|
|
71
71
|
parsed_content['title'] = yaml['title']
|
72
72
|
parsed_content['url'] = yaml['url']
|
73
73
|
parsed_content['intro'] = yaml['intro']
|
74
|
+
parsed_content['section_order'] = yaml['section_order']
|
74
75
|
end
|
75
76
|
|
76
77
|
def add_change(yaml, version)
|
@@ -95,7 +96,7 @@ module Keepachangelog
|
|
95
96
|
|
96
97
|
def generate_line(yaml)
|
97
98
|
line = yaml['title']
|
98
|
-
line += '.' unless line =~
|
99
|
+
line += '.' unless line =~ /\p{Punct}$/
|
99
100
|
line += " (!#{yaml['merge_request']})" if yaml['merge_request']
|
100
101
|
line += " (##{yaml['issue']})" if yaml['issue']
|
101
102
|
line += " (#{yaml['author']})" if yaml['author']
|
@@ -112,9 +113,9 @@ module Keepachangelog
|
|
112
113
|
|
113
114
|
def version_date(version)
|
114
115
|
date = `git log -1 --format=%aI #{version} 2>/dev/null`.strip
|
115
|
-
|
116
|
-
rescue
|
117
|
-
Gem::Version.correct?(version) ?
|
116
|
+
Time.parse(date).strftime('%Y-%m-%d')
|
117
|
+
rescue StandardError
|
118
|
+
Gem::Version.correct?(version) ? Time.now.strftime('%Y-%m-%d') : nil
|
118
119
|
end
|
119
120
|
end
|
120
121
|
end
|
@@ -42,17 +42,26 @@ module Keepachangelog
|
|
42
42
|
text.to_s.strip
|
43
43
|
end
|
44
44
|
|
45
|
+
def compare_sections(a, b)
|
46
|
+
if options[:section_order]
|
47
|
+
options[:section_order].index(a) <=> options[:section_order].index(b)
|
48
|
+
else
|
49
|
+
a <=> b
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
45
53
|
def version(header, content)
|
46
54
|
[
|
47
55
|
version_header(header, content['date']),
|
48
|
-
content['changes'].
|
56
|
+
content['changes'].sort { |a, b| compare_sections(a[0], b[0]) }
|
57
|
+
.map { |k, v| section(k, v) }
|
49
58
|
]
|
50
59
|
end
|
51
60
|
|
52
61
|
def section(header, content)
|
53
62
|
[
|
54
63
|
"### #{header}",
|
55
|
-
content.map { |c| change(c) },
|
64
|
+
content.sort.map { |c| change(c) },
|
56
65
|
''
|
57
66
|
]
|
58
67
|
end
|
data/package.json
CHANGED
@@ -109,7 +109,7 @@ module Keepachangelog
|
|
109
109
|
content = 'test changelog'
|
110
110
|
allow(File).to receive(:open).and_call_original
|
111
111
|
expect(File).to receive(:open).with('test.md')
|
112
|
-
|
112
|
+
.and_yield(StringIO.new(content))
|
113
113
|
expect_any_instance_of(MarkdownParser).to receive(:parse).with(content)
|
114
114
|
MarkdownParser.load('test.md')
|
115
115
|
end
|
data/spec/parser/yaml_spec.rb
CHANGED
@@ -21,7 +21,7 @@ type: New
|
|
21
21
|
'changes' => {
|
22
22
|
'New' => ['Test: Here we are testing to parse `something`.']
|
23
23
|
},
|
24
|
-
'date' =>
|
24
|
+
'date' => Time.now.strftime('%Y-%m-%d')
|
25
25
|
}
|
26
26
|
}
|
27
27
|
)
|
@@ -33,13 +33,13 @@ type: New
|
|
33
33
|
content = 'test changelog'
|
34
34
|
allow(File).to receive(:open).and_call_original
|
35
35
|
allow(File).to receive(:open).with('changelog/1.0.0/1.yml')
|
36
|
-
|
36
|
+
.and_yield(StringIO.new(content))
|
37
37
|
expect(Dir).to receive(:glob).with('changelog/*')
|
38
|
-
|
38
|
+
.and_return(['changelog/1.0.0'])
|
39
39
|
expect(Dir).to receive(:glob).with('changelog/1.0.0/**/*.yml')
|
40
|
-
|
40
|
+
.and_return(['changelog/1.0.0/1.yml'])
|
41
41
|
expect(Dir).to receive(:glob).with('changelog/1.0.0/**/*.yaml')
|
42
|
-
|
42
|
+
.and_return([])
|
43
43
|
|
44
44
|
expect_any_instance_of(YamlParser).to \
|
45
45
|
receive(:parse).with('test changelog', '1.0.0')
|
@@ -37,6 +37,40 @@ module Keepachangelog
|
|
37
37
|
expect(md).to match('test.io/compare/0.2.0...0.10.0')
|
38
38
|
expect(md).to match('test.io/compare/0.10.0...HEAD')
|
39
39
|
end
|
40
|
+
|
41
|
+
it 'should order sections explicitly' do
|
42
|
+
versions = {
|
43
|
+
'0.1.0' => {
|
44
|
+
'changes' => {
|
45
|
+
'Fixed' => ['Feature A'],
|
46
|
+
'Changed' => ['Feature B'],
|
47
|
+
'Added' => ['Feature C'],
|
48
|
+
'Removed' => ['Feature D']
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
order = %w[Added Changed Removed Fixed]
|
53
|
+
p = MarkdownPrinter.new(versions, url: 'test.io', section_order: order)
|
54
|
+
md = p.to_s.delete("\n")
|
55
|
+
expect(md).to match(/Added.*Changed.*Removed.*Fixed/)
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'should order changes alphabetically' do
|
59
|
+
versions = {
|
60
|
+
'0.1.0' => {
|
61
|
+
'changes' => {
|
62
|
+
'Added' => %w[
|
63
|
+
FeatureB
|
64
|
+
FeatureA
|
65
|
+
FeatureC
|
66
|
+
]
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
p = MarkdownPrinter.new(versions, url: 'test.io')
|
71
|
+
md = p.to_s.delete("\n")
|
72
|
+
expect(md).to match(/FeatureA.*FeatureB.*FeatureC/)
|
73
|
+
end
|
40
74
|
end
|
41
75
|
end
|
42
76
|
end
|
metadata
CHANGED
@@ -1,127 +1,127 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: keepachangelog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.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:
|
11
|
+
date: 2018-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: aruba
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0.14'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0.14'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '1.16'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '1.16'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '3
|
47
|
+
version: '12.3'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '3
|
54
|
+
version: '12.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '3.7'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '3.7'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rubocop
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0.
|
75
|
+
version: '0.52'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0.
|
82
|
+
version: '0.52'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: simplecov
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0.
|
89
|
+
version: '0.15'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0.
|
96
|
+
version: '0.15'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: json
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '2.1'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '2.1'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: thor
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '0.20'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '0.20'
|
125
125
|
description: Tool for parsing changelogs that are based on the keepachangelog.com
|
126
126
|
standard. Changelogs can be dumped to JSON or YAML.
|
127
127
|
email:
|
@@ -164,6 +164,9 @@ files:
|
|
164
164
|
- changelog/0.5.2/15-incorrect-previous-version.yaml
|
165
165
|
- changelog/0.5.3/change-urls.yaml
|
166
166
|
- changelog/0.5.3/yaml-print-folder.yaml
|
167
|
+
- changelog/0.6.0/order-changes.1.yaml
|
168
|
+
- changelog/0.6.0/order-changes.yaml
|
169
|
+
- changelog/0.6.0/ruby-2.5.yaml
|
167
170
|
- changelog/meta.yaml
|
168
171
|
- exe/keepachangelog
|
169
172
|
- features/help.feature
|
@@ -208,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
208
211
|
version: '0'
|
209
212
|
requirements: []
|
210
213
|
rubyforge_project:
|
211
|
-
rubygems_version: 2.
|
214
|
+
rubygems_version: 2.7.4
|
212
215
|
signing_key:
|
213
216
|
specification_version: 4
|
214
217
|
summary: Parser for changelogs based on keepachangelog.com
|