pimpmychangelog 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -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/com/pcreux/issues/1
32
- [#2]: https://github.com/com/pcreux/issues/2
33
- [#3]: https://github.com/com/pcreux/issues/3
34
- [#4]: https://github.com/com/pcreux/issues/4
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
@@ -2,6 +2,9 @@
2
2
 
3
3
  Add links to users and issues in your CHANGELOG.md.
4
4
 
5
+ [![Build
6
+ Status](https://travis-ci.org/pcreux/pimpmychangelog.png?branch=master)](https://travis-ci.org/pcreux/pimpmychangelog)
7
+
5
8
  ### Example:
6
9
 
7
10
  > Add Travis-CI support. (@pcreux, #181)
data/Rakefile CHANGED
@@ -3,5 +3,5 @@ require 'bundler/gem_tasks'
3
3
  task :default => :test
4
4
 
5
5
  task :test do
6
- system "bundle exec rspec spec"
6
+ system "bundle exec rspec spec --color --format documentation"
7
7
  end
@@ -18,7 +18,11 @@ module PimpMyChangelog
18
18
  def better_changelog
19
19
  parsed_changelog = Parser.new(changelog)
20
20
 
21
- linkify_changelog(parsed_changelog.content) +
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
 
@@ -1,3 +1,3 @@
1
1
  module PimpMyChangelog
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -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) { '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.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-07-10 00:00:00.000000000 Z
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: &70333408835520 !ruby/object:Gem::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: *70333408835520
24
+ version_requirements: *70263692092700
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: guard-rspec
27
- requirement: &70333408835020 !ruby/object:Gem::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: *70333408835020
35
+ version_requirements: *70263692091900
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &70333408849800 !ruby/object:Gem::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: *70333408849800
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: 59480807338519773
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: 59480807338519773
98
+ hash: -4129073779404705412
99
99
  requirements: []
100
100
  rubyforge_project:
101
101
  rubygems_version: 1.8.11