pimpmychangelog 0.1.1 → 0.1.2
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.
- data/CHANGELOG.md +12 -4
- data/README.md +3 -0
- data/Rakefile +1 -1
- data/lib/pimpmychangelog/pimper.rb +5 -1
- data/lib/pimpmychangelog/version.rb +1 -1
- data/spec/pimper_spec.rb +10 -2
- metadata +10 -10
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## Version 0.1.2
|
4
|
+
|
5
|
+
* Add support for changelogs without extra new line at the end of file.
|
6
|
+
PR [#6][] by [@arangamani][].
|
7
|
+
|
3
8
|
## Version 0.1.1
|
4
9
|
|
5
10
|
* Add support for usernames with hyphens. Closes issue [#4][] reported by
|
@@ -27,12 +32,15 @@
|
|
27
32
|
* Initial version by [@pcreux][]
|
28
33
|
* Usage: `pimpmychangelog gregbell activeadmin CHANGELOG.md`
|
29
34
|
This would output the pimped version of the changelog.
|
35
|
+
|
30
36
|
<!--- The following link definition list is generated by PimpMyChangelog --->
|
31
|
-
[#1]: https://github.com/
|
32
|
-
[#2]: https://github.com/
|
33
|
-
[#3]: https://github.com/
|
34
|
-
[#4]: https://github.com/
|
37
|
+
[#1]: https://github.com/pcreux/pimpmychangelog/issues/1
|
38
|
+
[#2]: https://github.com/pcreux/pimpmychangelog/issues/2
|
39
|
+
[#3]: https://github.com/pcreux/pimpmychangelog/issues/3
|
40
|
+
[#4]: https://github.com/pcreux/pimpmychangelog/issues/4
|
41
|
+
[#6]: https://github.com/pcreux/pimpmychangelog/issues/6
|
35
42
|
[@Maher4Ever]: https://github.com/Maher4Ever
|
43
|
+
[@arangamani]: https://github.com/arangamani
|
36
44
|
[@miketheman]: https://github.com/miketheman
|
37
45
|
[@pcreux]: https://github.com/pcreux
|
38
46
|
[@rymai]: https://github.com/rymai
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -18,7 +18,11 @@ module PimpMyChangelog
|
|
18
18
|
def better_changelog
|
19
19
|
parsed_changelog = Parser.new(changelog)
|
20
20
|
|
21
|
-
|
21
|
+
# If the file doesn't have an extra newline at the end the separator gets rendered
|
22
|
+
# as part of the changelog. So add an extra newline in that case.
|
23
|
+
extra_newline_if_required = parsed_changelog.content.match(/\n\n\Z/) ? "" : "\n"
|
24
|
+
|
25
|
+
linkify_changelog(parsed_changelog.content) + extra_newline_if_required +
|
22
26
|
links_definitions(parsed_changelog.issues, parsed_changelog.contributors)
|
23
27
|
end
|
24
28
|
|
data/spec/pimper_spec.rb
CHANGED
@@ -18,8 +18,16 @@ describe Pimper do
|
|
18
18
|
|
19
19
|
subject { better_changelog }
|
20
20
|
|
21
|
-
context "when the changelog does not contain any reference to issues or users" do
|
22
|
-
let(:changelog) {
|
21
|
+
context "when the changelog does not contain any reference to issues or users and no extra newline" do
|
22
|
+
let(:changelog) { "ChangeLog\n" }
|
23
|
+
|
24
|
+
it "should return the original changelog with an extra newline" do
|
25
|
+
better_changelog.should == changelog + "\n"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
context "when the changelog already includes an extra newline" do
|
30
|
+
let(:changelog) { "ChangeLog\n\n" }
|
23
31
|
|
24
32
|
it "should return the original changelog" do
|
25
33
|
better_changelog.should == changelog
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pimpmychangelog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-11-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70263692092700 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70263692092700
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: guard-rspec
|
27
|
-
requirement: &
|
27
|
+
requirement: &70263692091900 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70263692091900
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rake
|
38
|
-
requirement: &
|
38
|
+
requirement: &70263692090600 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70263692090600
|
47
47
|
description: Linkify issue numbers (#123) and github users (@gregbell) in markdown
|
48
48
|
changelogs.
|
49
49
|
email:
|
@@ -86,7 +86,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
86
86
|
version: '0'
|
87
87
|
segments:
|
88
88
|
- 0
|
89
|
-
hash:
|
89
|
+
hash: -4129073779404705412
|
90
90
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
91
|
none: false
|
92
92
|
requirements:
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
version: '0'
|
96
96
|
segments:
|
97
97
|
- 0
|
98
|
-
hash:
|
98
|
+
hash: -4129073779404705412
|
99
99
|
requirements: []
|
100
100
|
rubyforge_project:
|
101
101
|
rubygems_version: 1.8.11
|