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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 847022d1d7203b07b863dfc0582e4ae92755ecb2
4
- data.tar.gz: fd822de61295804b992282a368ee3a20dc3949b0
2
+ SHA256:
3
+ metadata.gz: d00e95c824e9ecc45e95a1ea1b21118c7dc9c90fab330e3b6460870f2a742d36
4
+ data.tar.gz: d085bdb5f057b67a613c32be787fc6d9fbdb5ec56c18536a56531bf2faaf567a
5
5
  SHA512:
6
- metadata.gz: 176bea2f07b80eeb38f1c0e0a2e7c029c4c06a3290a573d52ec9d5b9fa6aad41452b705f05a8df671c8ab6ae4f8d33ef648e34643ce1e350054260b9890a69e1
7
- data.tar.gz: d10797dd91470f663f90e2204431177cf7b7ab376dce471c703288f776217a87c6a3ebc00073fb4a55162ddb2b2432d0fcb6b9c982a56f6db4667f80ea31d96c
6
+ metadata.gz: 7246c950df3b0f27706f18dce07275b1c789879ef1023b765059680e4403c52b5b3ec615223e52435621d919b1ec64d7ba878efddf80fa96a8ae3d651b2e9744
7
+ data.tar.gz: 92a4c976350d879e2228ab1d4faf71b5702b1c8f3b6770f36b558832d82206e1802f88e2b2a3009a402e366973e5fbcec02aa35df738707586ee8bd369beb9aa
@@ -1,7 +1,7 @@
1
1
  variables:
2
2
  GIT_SSL_NO_VERIFY: "true"
3
3
 
4
- image: mwallasch/docker-ruby-node
4
+ image: starefossen/ruby-node:2-6
5
5
 
6
6
  before_script:
7
7
  - ruby -v
@@ -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.5.3] - 2017-04-10
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] - 2017-04-05
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] - 2017-04-04
17
- ### Fixed
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
- - Lines that end with special characters will no longer result in a crash. (#10)
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
- ### New
31
- - Allow any name for unreleased versions. (#9)
36
+ ### Fixed
37
+ - Lines that end with special characters will no longer result in a crash. (#10)
32
38
 
33
- ## [0.4.1] - 2017-03-30
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] - 2017-03-30
38
- ### New
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] - 2017-03-27
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] - 2017-03-27
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
- ### New
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] - 2017-03-27
62
- ### New
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] - 2017-03-27
67
- ### New
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
@@ -1,87 +1,95 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- keepachangelog (0.5.3)
5
- json (~> 2.0)
6
- thor (~> 0.19)
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.2)
12
- childprocess (~> 0.5.6)
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.3.0)
18
+ ast (2.4.0)
19
+ backports (3.11.1)
19
20
  builder (3.2.3)
20
- childprocess (0.5.9)
21
+ childprocess (0.8.0)
21
22
  ffi (~> 1.0, >= 1.0.11)
22
- contracts (0.15.0)
23
- cucumber (2.4.0)
23
+ contracts (0.16.0)
24
+ cucumber (3.1.0)
24
25
  builder (>= 2.1.2)
25
- cucumber-core (~> 1.5.0)
26
+ cucumber-core (~> 3.1.0)
27
+ cucumber-expressions (~> 5.0.4)
26
28
  cucumber-wire (~> 0.0.1)
27
- diff-lcs (>= 1.1.3)
28
- gherkin (~> 4.0)
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.5.0)
32
- gherkin (~> 4.0)
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 (4.1.1)
38
- json (2.0.3)
39
- multi_json (1.12.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
- parser (2.4.0.0)
42
- ast (~> 2.2)
47
+ parallel (1.12.1)
48
+ parser (2.4.0.2)
49
+ ast (~> 2.3)
43
50
  powerpack (0.1.1)
44
- rainbow (2.2.1)
45
- rake (12.0.0)
46
- rspec (3.5.0)
47
- rspec-core (~> 3.5.0)
48
- rspec-expectations (~> 3.5.0)
49
- rspec-mocks (~> 3.5.0)
50
- rspec-core (3.5.4)
51
- rspec-support (~> 3.5.0)
52
- rspec-expectations (3.5.0)
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.5.0)
55
- rspec-mocks (3.5.0)
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.5.0)
58
- rspec-support (3.5.0)
59
- rubocop (0.48.1)
60
- parser (>= 2.3.3.1, < 3.0)
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 (>= 1.99.1, < 3.0)
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.8.1)
66
- simplecov (0.14.1)
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.0)
71
- thor (0.19.4)
72
- unicode-display_width (1.1.3)
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.14)
87
+ bundler (~> 1.16)
80
88
  keepachangelog!
81
- rake (~> 12.0)
82
- rspec (~> 3.5)
83
- rubocop (~> 0.47)
84
- simplecov (~> 0.14)
89
+ rake (~> 12.3)
90
+ rspec (~> 3.7)
91
+ rubocop (~> 0.52)
92
+ simplecov (~> 0.15)
85
93
 
86
94
  BUNDLED WITH
87
- 1.14.6
95
+ 1.16.1
@@ -1,3 +1,3 @@
1
1
  ---
2
2
  title: Ability to convert Changelog to JSON
3
- type: New
3
+ type: Added
@@ -1,3 +1,3 @@
1
1
  ---
2
2
  title: Tool for reading Changelog in Markdown format
3
- type: New
3
+ type: Added
@@ -1,3 +1,3 @@
1
1
  ---
2
2
  title: Ability to convert Changelog to YAML
3
- type: New
3
+ type: Added
@@ -1,3 +1,3 @@
1
1
  ---
2
2
  title: Ability to print in Markdown
3
- type: New
3
+ type: Added
@@ -1,3 +1,3 @@
1
1
  ---
2
2
  title: Ability to read YAML files
3
- type: New
3
+ type: Added
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  title: Documentation on how to add metadata
3
3
  issue: 4
4
- type: New
4
+ type: Added
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  title: Ability to output changelog to yaml file structure
3
3
  merge_request: 9
4
- type: New
4
+ type: Added
@@ -1,3 +1,3 @@
1
1
  ---
2
2
  title: The code is pushed into a public repo at gitlab.com
3
- type: New
3
+ type: Added
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  title: Allow any name for unreleased versions
3
3
  issue: 9
4
- type: New
4
+ type: Added
@@ -1,3 +1,3 @@
1
1
  ---
2
2
  title: The YAML parser now fetches the date when a version was created
3
- type: New
3
+ type: Added
@@ -0,0 +1,4 @@
1
+ ---
2
+ title: 'Changes are now sorted alphabetically'
3
+ type: Added
4
+
@@ -0,0 +1,4 @@
1
+ ---
2
+ title: 'Ability to sort sections'
3
+ type: Added
4
+
@@ -0,0 +1,4 @@
1
+ ---
2
+ title: 'Support for Ruby 2.5'
3
+ type: Added
4
+
@@ -1,2 +1,14 @@
1
1
  ---
2
- url: https://gitlab.com/basalt/keepachangelog
2
+ url: https://gitlab.com/basalt/keepachangelog
3
+ section_order:
4
+ - Added
5
+ - New
6
+ - Nytt
7
+ - Changed
8
+ - Ändrat
9
+ - Removed
10
+ - Borttaget
11
+ - Fixed
12
+ - Fixat
13
+ - Security
14
+ - Säkerhet
@@ -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 successfully run `keepachangelog help`
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 successfully run `keepachangelog help parse`
11
+ When I run `keepachangelog help parse`
12
12
  Then the output should contain "Usage"
@@ -12,7 +12,7 @@ Feature: Parse changelogs
12
12
  ### New
13
13
  - Feature A
14
14
  """
15
- When I successfully run `keepachangelog --from md --to json --in CHANGELOG.md`
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 successfully run `keepachangelog --from yaml --to md`
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 successfully run `keepachangelog --from md --to yaml --in CHANGELOG.md`
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
  ---
@@ -3,5 +3,5 @@ Feature: Show version
3
3
  To show the version of the gem run `keepachangelog version`.
4
4
 
5
5
  Scenario: Running `keepachangelog version`
6
- When I successfully run `keepachangelog version`
6
+ When I run `keepachangelog version`
7
7
  Then the output should match /\d+\.\d+\.\d+/
@@ -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.add_runtime_dependency 'thor', '~> 0.19'
35
- spec.add_runtime_dependency 'json', '~> 2.0'
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
@@ -1,3 +1,4 @@
1
+ require 'date'
1
2
  require 'keepachangelog/version'
2
3
  require 'keepachangelog/parser'
3
4
  require 'keepachangelog/parser/markdown'
@@ -76,5 +76,6 @@ module Keepachangelog
76
76
  exit 2
77
77
  end
78
78
  end
79
+ # rubocop:enable Metrics/AbcSize
79
80
  end
80
81
  end
@@ -49,6 +49,7 @@ module Keepachangelog
49
49
  p = MarkdownPrinter.new(parsed_content['versions'],
50
50
  title: parsed_content['title'],
51
51
  intro: parsed_content['intro'],
52
+ section_order: parsed_content['section_order'],
52
53
  url: parsed_content['url'])
53
54
  p.to_s
54
55
  end
@@ -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 =~ /[[:punct:]]$/
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
- DateTime.parse(date).strftime('%Y-%m-%d')
116
- rescue
117
- Gem::Version.correct?(version) ? DateTime.now.strftime('%Y-%m-%d') : nil
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'].map { |k, v| section(k, v) }
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
@@ -2,7 +2,6 @@ require 'json'
2
2
 
3
3
  module Keepachangelog
4
4
  def self.version
5
- # return '0.1.0'
6
5
  path = File.expand_path('../../package.json', File.dirname(__FILE__))
7
6
  file = File.read path
8
7
  json = JSON.parse file
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keepachangelog",
3
- "version": "0.5.3",
3
+ "version": "0.6.0",
4
4
  "description": "Parser for changelogs based on keepachangelog.com",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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
- .and_yield(StringIO.new(content))
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
@@ -21,7 +21,7 @@ type: New
21
21
  'changes' => {
22
22
  'New' => ['Test: Here we are testing to parse `something`.']
23
23
  },
24
- 'date' => DateTime.now.strftime('%Y-%m-%d')
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
- .and_yield(StringIO.new(content))
36
+ .and_yield(StringIO.new(content))
37
37
  expect(Dir).to receive(:glob).with('changelog/*')
38
- .and_return(['changelog/1.0.0'])
38
+ .and_return(['changelog/1.0.0'])
39
39
  expect(Dir).to receive(:glob).with('changelog/1.0.0/**/*.yml')
40
- .and_return(['changelog/1.0.0/1.yml'])
40
+ .and_return(['changelog/1.0.0/1.yml'])
41
41
  expect(Dir).to receive(:glob).with('changelog/1.0.0/**/*.yaml')
42
- .and_return([])
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.5.3
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: 2017-04-10 00:00:00.000000000 Z
11
+ date: 2018-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
14
+ name: aruba
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.14'
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: '1.14'
26
+ version: '0.14'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '12.0'
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: '12.0'
40
+ version: '1.16'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rspec
42
+ name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.5'
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.5'
54
+ version: '12.3'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rubocop
56
+ name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.47'
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: '0.47'
68
+ version: '3.7'
69
69
  - !ruby/object:Gem::Dependency
70
- name: simplecov
70
+ name: rubocop
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.14'
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.14'
82
+ version: '0.52'
83
83
  - !ruby/object:Gem::Dependency
84
- name: aruba
84
+ name: simplecov
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0.14'
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.14'
96
+ version: '0.15'
97
97
  - !ruby/object:Gem::Dependency
98
- name: thor
98
+ name: json
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0.19'
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: '0.19'
110
+ version: '2.1'
111
111
  - !ruby/object:Gem::Dependency
112
- name: json
112
+ name: thor
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '2.0'
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: '2.0'
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.6.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