parse_a_changelog 0.2.0 → 0.2.1
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/CHANGELOG.md +44 -0
- data/LICENSE.md +163 -0
- data/README.md +45 -0
- data/VERSION +1 -0
- data/lib/grammar.tt +74 -0
- metadata +40 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 88f22b714176096b7b74215c45ae366fc975bb3b
|
|
4
|
+
data.tar.gz: 9941e8d79d75ef6978fb7bedc325ff64705f6428
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 32622036ddf563e60128b569152d5bd727c98eca9123814ed717792761df2a3961f3f67e5fc54a27abb3a95934f569c6ef80b750aeb135ebbd5c22c3c474d8ef
|
|
7
|
+
data.tar.gz: 33a56a2fe9d808ba445a9e26c97bb22b1988af9061d9fdf365995ea95d4b25aa50300843a0ea3f6bfdbf6068f19025de50e4cdd8383842999e681f1f9be399c0
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
All notable changes to this project will be documented in this file.
|
|
3
|
+
|
|
4
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
5
|
+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.2.1] - 2019-01-30
|
|
10
|
+
### Added
|
|
11
|
+
- Missing gemspec files
|
|
12
|
+
- Gemspec executable metadata
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- Move dependencies to gemspec
|
|
16
|
+
|
|
17
|
+
### Removed
|
|
18
|
+
- Gemfile.lock from source control
|
|
19
|
+
|
|
20
|
+
## [0.2.0] - 2019-01-25
|
|
21
|
+
### Added
|
|
22
|
+
- Gitlab pipeline configuration
|
|
23
|
+
- Dockerfile (currently for manual usage)
|
|
24
|
+
- CI pipeline validates changelog
|
|
25
|
+
- Binary file to gemspec
|
|
26
|
+
|
|
27
|
+
## [0.1.2] - 2019-01-23
|
|
28
|
+
### Changed
|
|
29
|
+
- Version bump to replace yanked previous version
|
|
30
|
+
|
|
31
|
+
## [0.1.1] - 2019-01-23
|
|
32
|
+
### Removed
|
|
33
|
+
- Fixed incorrect Ruby file name in binary
|
|
34
|
+
|
|
35
|
+
## 0.1.0 - 2019-01-23
|
|
36
|
+
### Added
|
|
37
|
+
- First draft of the Keep A Changelog parser
|
|
38
|
+
- Open source license and contributing information
|
|
39
|
+
- Change log and versioning information
|
|
40
|
+
|
|
41
|
+
[Unreleased]: https://github.com/cyberark/parse-a-changelog/compare/v0.2.0...HEAD
|
|
42
|
+
[0.2.0]: https://github.com/cyberark/parse-a-changelog/compare/v0.1.2...v0.2.0
|
|
43
|
+
[0.1.2]: https://github.com/cyberark/parse-a-changelog/compare/v0.1.1...v0.1.2
|
|
44
|
+
[0.1.1]: https://github.com/cyberark/parse-a-changelog/compare/v0.1.0...v0.1.1
|
data/LICENSE.md
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
GNU Lesser General Public License
|
|
2
|
+
=================================
|
|
3
|
+
|
|
4
|
+
_Version 3, 29 June 2007_
|
|
5
|
+
_Copyright © 2007 Free Software Foundation, Inc. <<http://fsf.org/>>_
|
|
6
|
+
|
|
7
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
8
|
+
of this license document, but changing it is not allowed.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
This version of the GNU Lesser General Public License incorporates
|
|
12
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
13
|
+
License, supplemented by the additional permissions listed below.
|
|
14
|
+
|
|
15
|
+
### 0. Additional Definitions
|
|
16
|
+
|
|
17
|
+
As used herein, “this License” refers to version 3 of the GNU Lesser
|
|
18
|
+
General Public License, and the “GNU GPL” refers to version 3 of the GNU
|
|
19
|
+
General Public License.
|
|
20
|
+
|
|
21
|
+
“The Library” refers to a covered work governed by this License,
|
|
22
|
+
other than an Application or a Combined Work as defined below.
|
|
23
|
+
|
|
24
|
+
An “Application” is any work that makes use of an interface provided
|
|
25
|
+
by the Library, but which is not otherwise based on the Library.
|
|
26
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
27
|
+
of using an interface provided by the Library.
|
|
28
|
+
|
|
29
|
+
A “Combined Work” is a work produced by combining or linking an
|
|
30
|
+
Application with the Library. The particular version of the Library
|
|
31
|
+
with which the Combined Work was made is also called the “Linked
|
|
32
|
+
Version”.
|
|
33
|
+
|
|
34
|
+
The “Minimal Corresponding Source” for a Combined Work means the
|
|
35
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
36
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
37
|
+
based on the Application, and not on the Linked Version.
|
|
38
|
+
|
|
39
|
+
The “Corresponding Application Code” for a Combined Work means the
|
|
40
|
+
object code and/or source code for the Application, including any data
|
|
41
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
42
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
43
|
+
|
|
44
|
+
### 1. Exception to Section 3 of the GNU GPL
|
|
45
|
+
|
|
46
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
47
|
+
without being bound by section 3 of the GNU GPL.
|
|
48
|
+
|
|
49
|
+
### 2. Conveying Modified Versions
|
|
50
|
+
|
|
51
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
52
|
+
facility refers to a function or data to be supplied by an Application
|
|
53
|
+
that uses the facility (other than as an argument passed when the
|
|
54
|
+
facility is invoked), then you may convey a copy of the modified
|
|
55
|
+
version:
|
|
56
|
+
|
|
57
|
+
* **a)** under this License, provided that you make a good faith effort to
|
|
58
|
+
ensure that, in the event an Application does not supply the
|
|
59
|
+
function or data, the facility still operates, and performs
|
|
60
|
+
whatever part of its purpose remains meaningful, or
|
|
61
|
+
|
|
62
|
+
* **b)** under the GNU GPL, with none of the additional permissions of
|
|
63
|
+
this License applicable to that copy.
|
|
64
|
+
|
|
65
|
+
### 3. Object Code Incorporating Material from Library Header Files
|
|
66
|
+
|
|
67
|
+
The object code form of an Application may incorporate material from
|
|
68
|
+
a header file that is part of the Library. You may convey such object
|
|
69
|
+
code under terms of your choice, provided that, if the incorporated
|
|
70
|
+
material is not limited to numerical parameters, data structure
|
|
71
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
72
|
+
(ten or fewer lines in length), you do both of the following:
|
|
73
|
+
|
|
74
|
+
* **a)** Give prominent notice with each copy of the object code that the
|
|
75
|
+
Library is used in it and that the Library and its use are
|
|
76
|
+
covered by this License.
|
|
77
|
+
* **b)** Accompany the object code with a copy of the GNU GPL and this license
|
|
78
|
+
document.
|
|
79
|
+
|
|
80
|
+
### 4. Combined Works
|
|
81
|
+
|
|
82
|
+
You may convey a Combined Work under terms of your choice that,
|
|
83
|
+
taken together, effectively do not restrict modification of the
|
|
84
|
+
portions of the Library contained in the Combined Work and reverse
|
|
85
|
+
engineering for debugging such modifications, if you also do each of
|
|
86
|
+
the following:
|
|
87
|
+
|
|
88
|
+
* **a)** Give prominent notice with each copy of the Combined Work that
|
|
89
|
+
the Library is used in it and that the Library and its use are
|
|
90
|
+
covered by this License.
|
|
91
|
+
|
|
92
|
+
* **b)** Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
93
|
+
document.
|
|
94
|
+
|
|
95
|
+
* **c)** For a Combined Work that displays copyright notices during
|
|
96
|
+
execution, include the copyright notice for the Library among
|
|
97
|
+
these notices, as well as a reference directing the user to the
|
|
98
|
+
copies of the GNU GPL and this license document.
|
|
99
|
+
|
|
100
|
+
* **d)** Do one of the following:
|
|
101
|
+
- **0)** Convey the Minimal Corresponding Source under the terms of this
|
|
102
|
+
License, and the Corresponding Application Code in a form
|
|
103
|
+
suitable for, and under terms that permit, the user to
|
|
104
|
+
recombine or relink the Application with a modified version of
|
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
107
|
+
Corresponding Source.
|
|
108
|
+
- **1)** Use a suitable shared library mechanism for linking with the
|
|
109
|
+
Library. A suitable mechanism is one that **(a)** uses at run time
|
|
110
|
+
a copy of the Library already present on the user's computer
|
|
111
|
+
system, and **(b)** will operate properly with a modified version
|
|
112
|
+
of the Library that is interface-compatible with the Linked
|
|
113
|
+
Version.
|
|
114
|
+
|
|
115
|
+
* **e)** Provide Installation Information, but only if you would otherwise
|
|
116
|
+
be required to provide such information under section 6 of the
|
|
117
|
+
GNU GPL, and only to the extent that such information is
|
|
118
|
+
necessary to install and execute a modified version of the
|
|
119
|
+
Combined Work produced by recombining or relinking the
|
|
120
|
+
Application with a modified version of the Linked Version. (If
|
|
121
|
+
you use option **4d0**, the Installation Information must accompany
|
|
122
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
123
|
+
Code. If you use option **4d1**, you must provide the Installation
|
|
124
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
125
|
+
for conveying Corresponding Source.)
|
|
126
|
+
|
|
127
|
+
### 5. Combined Libraries
|
|
128
|
+
|
|
129
|
+
You may place library facilities that are a work based on the
|
|
130
|
+
Library side by side in a single library together with other library
|
|
131
|
+
facilities that are not Applications and are not covered by this
|
|
132
|
+
License, and convey such a combined library under terms of your
|
|
133
|
+
choice, if you do both of the following:
|
|
134
|
+
|
|
135
|
+
* **a)** Accompany the combined library with a copy of the same work based
|
|
136
|
+
on the Library, uncombined with any other library facilities,
|
|
137
|
+
conveyed under the terms of this License.
|
|
138
|
+
* **b)** Give prominent notice with the combined library that part of it
|
|
139
|
+
is a work based on the Library, and explaining where to find the
|
|
140
|
+
accompanying uncombined form of the same work.
|
|
141
|
+
|
|
142
|
+
### 6. Revised Versions of the GNU Lesser General Public License
|
|
143
|
+
|
|
144
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
145
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
146
|
+
versions will be similar in spirit to the present version, but may
|
|
147
|
+
differ in detail to address new problems or concerns.
|
|
148
|
+
|
|
149
|
+
Each version is given a distinguishing version number. If the
|
|
150
|
+
Library as you received it specifies that a certain numbered version
|
|
151
|
+
of the GNU Lesser General Public License “or any later version”
|
|
152
|
+
applies to it, you have the option of following the terms and
|
|
153
|
+
conditions either of that published version or of any later version
|
|
154
|
+
published by the Free Software Foundation. If the Library as you
|
|
155
|
+
received it does not specify a version number of the GNU Lesser
|
|
156
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
157
|
+
General Public License ever published by the Free Software Foundation.
|
|
158
|
+
|
|
159
|
+
If the Library as you received it specifies that a proxy can decide
|
|
160
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
161
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
162
|
+
permanent authorization for you to choose that version for the
|
|
163
|
+
Library.
|
data/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# parse-a-changelog
|
|
2
|
+
|
|
3
|
+
This gem validates that a file conforms to the [Keep a Changelog](https://keepachangelog.com) standard.
|
|
4
|
+
|
|
5
|
+
It does so by defining the Keep a Changelog grammar and using the [treetop parsing DSL](https://github.com/cjheath/treetop) to parse your changelog file according to that grammar.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
Add `parse-a-changelog` to your Gemfile and `bundle install` or install directly with:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
gem install parse-a-changelog
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The gem can then be used via CLI:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
parse path/to/changelog
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Or it can be used directly in your Ruby code:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
result = ParseAChangelog::parse("path/to/changelog")
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
# Development
|
|
28
|
+
|
|
29
|
+
We welcome contributions of all kinds to `parse-a-changelog`. See our [contributing guide](CONTRIBUTING.md).
|
|
30
|
+
|
|
31
|
+
# Testing
|
|
32
|
+
|
|
33
|
+
Make sure you have the `rspec` gem installed in your current gem set then run the tests like so:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
$ rspec
|
|
37
|
+
..................
|
|
38
|
+
|
|
39
|
+
Finished in 0.02494 seconds (files took 0.21634 seconds to load)
|
|
40
|
+
18 examples, 0 failures
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
# License
|
|
44
|
+
|
|
45
|
+
The parse-a-changelog gem is licensed under Apache License 2.0 - see [`LICENSE.md`](LICENSE.md) for more details.
|
data/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.2.1
|
data/lib/grammar.tt
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
grammar KeepAChangelog
|
|
2
|
+
rule changelog
|
|
3
|
+
changelog_header unreleased_section releases_section diff_section?
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
rule changelog_header
|
|
7
|
+
'# Changelog' "\n"
|
|
8
|
+
'All notable changes to this project will be documented in this file.' "\n"
|
|
9
|
+
"\n"
|
|
10
|
+
'The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)' "\n"
|
|
11
|
+
'and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).' "\n"
|
|
12
|
+
"\n"
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
rule unreleased_section
|
|
16
|
+
unreleased_header change_section? ("\n" change_section)*
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
rule unreleased_header
|
|
20
|
+
'## ' '['? 'Unreleased' ']'? "\n"
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
rule change_section
|
|
24
|
+
change_header change+
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
rule change_header
|
|
28
|
+
'### ' ('Added' / 'Changed' / 'Deprecated' / 'Removed' / 'Fixed' / 'Security') "\n"
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
rule change
|
|
32
|
+
('- ' / ' ') (!"\n" .)+ "\n"?
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
rule releases_section
|
|
36
|
+
release*
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
rule release
|
|
40
|
+
"\n" release_header change_section? ("\n" change_section)*
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
rule release_header
|
|
44
|
+
'## ' '['? release_version ']'? ' - ' release_date "\n"
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
rule release_version
|
|
48
|
+
[0-9]+ '.' [0-9]+ '.' [0-9]+
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
rule release_date
|
|
52
|
+
[0-9] [0-9] [0-9] [0-9] '-' [0-9] [0-9] '-' [0-9] [0-9]
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
rule diff_section
|
|
56
|
+
"\n" unreleased_diff release_diff*
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
rule unreleased_diff
|
|
60
|
+
'[Unreleased]: ' release_url "\n"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
rule release_diff
|
|
64
|
+
'[' release_version ']: ' release_url "\n"
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
rule release_url
|
|
68
|
+
'https://github.com/' (!'/' .)+ '/' (!'/' .)+ '/compare/' diff_version '...' diff_version
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
rule diff_version
|
|
72
|
+
('HEAD' / 'v' release_version)
|
|
73
|
+
end
|
|
74
|
+
end
|
metadata
CHANGED
|
@@ -1,22 +1,57 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: parse_a_changelog
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John Tuttle
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-01-
|
|
12
|
-
dependencies:
|
|
13
|
-
|
|
11
|
+
date: 2019-01-30 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: treetop
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '1.6'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '1.6'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: rspec
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '3.8'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '3.8'
|
|
41
|
+
description: Uses a grammar describing the keep-a-changelog format to attempt to parse
|
|
42
|
+
a given file.
|
|
14
43
|
email: jtuttle.develops@gmail.com
|
|
15
|
-
executables:
|
|
44
|
+
executables:
|
|
45
|
+
- parse
|
|
16
46
|
extensions: []
|
|
17
47
|
extra_rdoc_files: []
|
|
18
48
|
files:
|
|
49
|
+
- CHANGELOG.md
|
|
50
|
+
- LICENSE.md
|
|
51
|
+
- README.md
|
|
52
|
+
- VERSION
|
|
19
53
|
- bin/parse
|
|
54
|
+
- lib/grammar.tt
|
|
20
55
|
- lib/parse_a_changelog.rb
|
|
21
56
|
homepage: http://github.com/cyberark/parse-a-changelog
|
|
22
57
|
licenses:
|