katip 1.4.1 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +3 -0
- data/.rspec +2 -0
- data/CHANGELOG.md +21 -0
- data/Gemfile.lock +15 -1
- data/MIT-LICENSE.txt +1 -1
- data/README.md +13 -2
- data/bin/katip +21 -3
- data/katip.gemspec +1 -0
- data/lib/katip/change_logger.rb +43 -7
- data/lib/katip/version.rb +1 -1
- data/spec/basics_spec.rb +49 -0
- data/spec/results/BeginChangeLog.md +19 -0
- data/spec/results/CHANGELOG.md +24 -0
- data/spec/results/MyChangelog.md +24 -0
- data/spec/results/TagRangeLog.md +17 -0
- data/spec/spec_helper.rb +8 -0
- data/spec/tag_spec.rb +43 -0
- metadata +26 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16ad82df25aa8c27b2eca4b0c2b7baa5c2981c99
|
4
|
+
data.tar.gz: fc18bf916dd3b1dd4d254d39e1bca5d3dc36b38e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bea5652bdcfa2ece803943adb3d4ff144dd5564c5a7785f9a093a3b5e56612d2d47736fb5f3bcaa84509d3656863e5e40c23910eba937c1e91e0bae7fc3bd2fb
|
7
|
+
data.tar.gz: 190d15fd89909e9f44c479b5e171b60def3630d3e528c13798be47c5f86f344232064eaef49ba54a3bd94d38bb09722b4618eed34185d7daa450d0e86328bd6a
|
data/.gitmodules
ADDED
data/.rspec
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
|
2
2
|
#### [Current]
|
3
|
+
* [2191cbf](../../commit/2191cbf) - __(Ahmet Sezgin Duran)__ TB-46 #time 5m Fix condition errors
|
4
|
+
* [544b0ea](../../commit/544b0ea) - __(Ahmet Sezgin Duran)__ TB-46 #time 10m Fix the tag not found error
|
5
|
+
|
6
|
+
#### 1.5.0
|
7
|
+
* [b3e600f](../../commit/b3e600f) - __(Ahmet Sezgin Duran)__ TB-46 #time 5m Bump version 1.5.0 and update README
|
8
|
+
* [310024d](../../commit/310024d) - __(Ahmet Sezgin Duran)__ TB-46 #time 15m Add option parse for Katip
|
9
|
+
* [e1d8eae](../../commit/e1d8eae) - __(Ahmet Sezgin Duran)__ TB-46 #time 5m Fix test result files
|
10
|
+
* [72db774](../../commit/72db774) - __(Ahmet Sezgin Duran)__ Add new sample repo submodule
|
11
|
+
* [b397a22](../../commit/b397a22) - __(Ahmet Sezgin Duran)__ Remove sample repo submodule
|
12
|
+
* [d4788d6](../../commit/d4788d6) - __(Ahmet Sezgin Duran)__ TB-46 #time 15m Implement change logging with ending tag
|
13
|
+
* [b2e8163](../../commit/b2e8163) - __(Ahmet Sezgin Duran)__ TB-46 #time 5m Implement the basic tag range logging
|
14
|
+
* [94e3c7d](../../commit/94e3c7d) - __(Ahmet Sezgin Duran)__ TB-46 #time 5m Add tag range test
|
15
|
+
* [fe8caf7](../../commit/fe8caf7) - __(Ahmet Sezgin Duran)__ TB-46 #time 15m Add basic tests
|
16
|
+
* [75e9d4c](../../commit/75e9d4c) - __(Ahmet Sezgin Duran)__ TB-46 #time 5m Add RSpec for testing
|
17
|
+
* [33ecf6b](../../commit/33ecf6b) - __(Ahmet Sezgin Duran)__ TB-46 #time 5m Add sample repo as submodule
|
18
|
+
* [8d3a0b1](../../commit/8d3a0b1) - __(Ahmet Sezgin Duran)__ LAB-31 #time 1 Add named logo
|
19
|
+
* [9c7e65c](../../commit/9c7e65c) - __(Ahmet Sezgin Duran)__ LAB-31 #time 1m Fix year information in README.md and license
|
20
|
+
* [195e061](../../commit/195e061) - __(Ahmet Sezgin Duran)__ LAB-31 #time 2m Update README.md
|
21
|
+
|
22
|
+
#### 1.4.1
|
23
|
+
* [1629eb6](../../commit/1629eb6) - __(Murat Kemal BAYGÜN)__ Release 1.4.1
|
3
24
|
* [f8b07a7](../../commit/f8b07a7) - __(Onur Özgür ÖZKAN)__ Merge pull request [#27](../../issues/27) from marjinal1st/feature/WithoutRails
|
4
25
|
|
5
26
|
TB-11 #time 15m Use Katip without Rails
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,25 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
katip (1.
|
4
|
+
katip (1.5.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
+
diff-lcs (1.2.5)
|
9
10
|
rake (10.1.0)
|
11
|
+
rspec (3.0.0)
|
12
|
+
rspec-core (~> 3.0.0)
|
13
|
+
rspec-expectations (~> 3.0.0)
|
14
|
+
rspec-mocks (~> 3.0.0)
|
15
|
+
rspec-core (3.0.4)
|
16
|
+
rspec-support (~> 3.0.0)
|
17
|
+
rspec-expectations (3.0.4)
|
18
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
19
|
+
rspec-support (~> 3.0.0)
|
20
|
+
rspec-mocks (3.0.4)
|
21
|
+
rspec-support (~> 3.0.0)
|
22
|
+
rspec-support (3.0.4)
|
10
23
|
|
11
24
|
PLATFORMS
|
12
25
|
ruby
|
@@ -15,3 +28,4 @@ DEPENDENCIES
|
|
15
28
|
bundler (~> 1.3)
|
16
29
|
katip!
|
17
30
|
rake
|
31
|
+
rspec (~> 3.0.0)
|
data/MIT-LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -44,6 +44,15 @@ If you want to name your log file other than CHANGELOG.md
|
|
44
44
|
Create MyCustomFile.md
|
45
45
|
```
|
46
46
|
|
47
|
+
Also you can easily specify tag ranges:
|
48
|
+
|
49
|
+
```sh
|
50
|
+
% katip --from=0.2.0 --to=0.9.1
|
51
|
+
# Or
|
52
|
+
% katip --from=0.2.0
|
53
|
+
# Or
|
54
|
+
% katip --to=0.9.1
|
55
|
+
```
|
47
56
|
|
48
57
|
### Using as a rake
|
49
58
|
Add gem in your Gemfile:
|
@@ -115,10 +124,12 @@ Once you've made your great commits:
|
|
115
124
|
|
116
125
|
## Credits
|
117
126
|
|
118
|
-
|
127
|
+
![lab2023](http://lab2023.com/assets/images/named-logo.png)
|
128
|
+
|
129
|
+
- Katip is maintained and funded by [lab2023 - information technologies](http://lab2023.com/)
|
119
130
|
- Thank you to all the [contributors!](https://github.com/kebab-project/katip/graphs/contributors)
|
120
131
|
- The names and logos for lab2023 are trademarks of lab2023, inc.
|
121
132
|
|
122
133
|
## License
|
123
134
|
|
124
|
-
Copyright
|
135
|
+
Copyright 2014 lab2023 - information technologies
|
data/bin/katip
CHANGED
@@ -1,14 +1,32 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) +
|
3
|
+
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/../lib'))
|
4
4
|
|
5
5
|
require 'katip'
|
6
6
|
require 'katip/change_logger'
|
7
|
+
require 'optparse'
|
8
|
+
|
9
|
+
options = { :from => nil, :to => nil }
|
10
|
+
|
11
|
+
parser = OptionParser.new do |opts|
|
12
|
+
opts.on '-f', '--from from', 'From' do |from|
|
13
|
+
options[:from] = from
|
14
|
+
end
|
15
|
+
|
16
|
+
opts.on '-t', '--to to', 'To' do |to|
|
17
|
+
options[:to] = to
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
parser.parse! ARGV
|
22
|
+
|
23
|
+
options[:from] = options[:from].nil? ? nil : options[:from].to_s
|
24
|
+
options[:to] = options[:to].nil? ? nil : options[:to].to_s
|
7
25
|
|
8
26
|
if ARGV.size > 0
|
9
|
-
change_logger = Katip::ChangeLogger.new(ARGV.first)
|
27
|
+
change_logger = Katip::ChangeLogger.new(ARGV.first, options[:from], options[:to])
|
10
28
|
else
|
11
|
-
change_logger = Katip::ChangeLogger.new()
|
29
|
+
change_logger = Katip::ChangeLogger.new('CHANGELOG.md', options[:from], options[:to])
|
12
30
|
end
|
13
31
|
|
14
32
|
change_logger.log_changes
|
data/katip.gemspec
CHANGED
data/lib/katip/change_logger.rb
CHANGED
@@ -9,17 +9,21 @@ module Katip
|
|
9
9
|
# initialize
|
10
10
|
#
|
11
11
|
# @param [String] file_name with path
|
12
|
-
def initialize(file_name='CHANGELOG.md')
|
12
|
+
def initialize(file_name='CHANGELOG.md', from=nil, to=nil)
|
13
13
|
@file_name = file_name
|
14
|
+
@tag_from = from
|
15
|
+
@tag_to = to
|
14
16
|
end
|
15
17
|
|
16
18
|
def log_changes
|
17
19
|
if git_repository?
|
18
|
-
|
20
|
+
output = parse_change_log
|
21
|
+
write_file output unless output.empty?
|
19
22
|
end
|
20
23
|
end
|
21
24
|
|
22
25
|
private
|
26
|
+
|
23
27
|
def git_repository?
|
24
28
|
initialized = `git rev-parse --is-inside-work-tree`.chomp
|
25
29
|
|
@@ -45,16 +49,34 @@ module Katip
|
|
45
49
|
end
|
46
50
|
|
47
51
|
def parse_change_log
|
48
|
-
|
49
52
|
output = []
|
50
53
|
|
51
|
-
tags
|
54
|
+
tags = `git for-each-ref --sort='*authordate' --format='%(tag)' refs/tags | grep -v '^$'#`
|
52
55
|
|
53
56
|
tags = tags.split
|
57
|
+
prev_begin = nil
|
58
|
+
|
59
|
+
if (!@tag_from.nil? && !tags.include?(@tag_from)) || (!@tag_to.nil? && !tags.include?(@tag_to))
|
60
|
+
show_not_found_message(tags)
|
61
|
+
return output
|
62
|
+
end
|
63
|
+
|
64
|
+
if !@tag_from.nil? && !@tag_to.nil?
|
65
|
+
from = tags.index(@tag_from)
|
66
|
+
to = tags.index(@tag_to)
|
67
|
+
tags = tags[from..to]
|
68
|
+
elsif !@tag_from.nil?
|
69
|
+
from = tags.index @tag_from
|
70
|
+
prev_begin = tags[from - 1]
|
71
|
+
tags = tags[from..-1]
|
72
|
+
elsif !@tag_to.nil?
|
73
|
+
to = tags.index @tag_to
|
74
|
+
tags = tags[0..to]
|
75
|
+
end
|
54
76
|
|
55
77
|
tags.reverse!
|
56
78
|
|
57
|
-
output << "\n#### [Current]"
|
79
|
+
output << "\n#### [Current]" if @tag_to.nil?
|
58
80
|
|
59
81
|
previous_tag=''
|
60
82
|
tags.each do |tag|
|
@@ -64,14 +86,22 @@ module Katip
|
|
64
86
|
output << "\n#### #{previous_tag}"
|
65
87
|
end
|
66
88
|
|
67
|
-
|
89
|
+
if !previous_tag.empty? || @tag_to.nil?
|
90
|
+
output << `git log --pretty=format:" * [%h](#{COMMIT_URL}%h) - __(%an)__ %s%n%n%-b" "#{current_tag}".."#{previous_tag}" | grep -v "Merge branch "`
|
91
|
+
end
|
68
92
|
|
69
93
|
previous_tag = current_tag
|
70
94
|
end
|
71
95
|
|
72
96
|
output << "\n#### #{previous_tag}"
|
73
97
|
|
74
|
-
|
98
|
+
if prev_begin.nil?
|
99
|
+
output << `git log --pretty=format:" * [%h](#{COMMIT_URL}%h) - __(%an)__ %s%n%n%-b" #{previous_tag} | grep -v "Merge branch "`
|
100
|
+
else
|
101
|
+
output << `git log --pretty=format:" * [%h](#{COMMIT_URL}%h) - __(%an)__ %s%n%n%-b" "#{prev_begin}".."#{previous_tag}" | grep -v "Merge branch "`
|
102
|
+
end
|
103
|
+
|
104
|
+
|
75
105
|
|
76
106
|
output.each do |line|
|
77
107
|
line.encode!('utf-8', 'utf-8', invalid: :replace, undef: :replace, replace: '')
|
@@ -83,5 +113,11 @@ module Katip
|
|
83
113
|
|
84
114
|
output
|
85
115
|
end
|
116
|
+
|
117
|
+
def show_not_found_message(tags)
|
118
|
+
puts 'Could not find the given tags. Make sure that given tags exist.'
|
119
|
+
puts 'Listing found tags:'
|
120
|
+
puts tags
|
121
|
+
end
|
86
122
|
end
|
87
123
|
end
|
data/lib/katip/version.rb
CHANGED
data/spec/basics_spec.rb
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'digest'
|
3
|
+
|
4
|
+
repo = File.join(File.dirname(__FILE__), 'katip-sample-repo')
|
5
|
+
|
6
|
+
describe 'Katip application' do
|
7
|
+
before do
|
8
|
+
Dir.chdir repo
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'creates the change log with default name' do
|
12
|
+
change_logger = Katip::ChangeLogger.new
|
13
|
+
change_logger.log_changes
|
14
|
+
expect(File.exists?('CHANGELOG.md')).to be true
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'creates the change log with given name' do
|
18
|
+
change_logger = Katip::ChangeLogger.new 'SampleChangeLog.md'
|
19
|
+
change_logger.log_changes
|
20
|
+
expect(File.exists?('SampleChangeLog.md')).to be true
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'creates the change log files properly' do
|
24
|
+
change_logger = Katip::ChangeLogger.new
|
25
|
+
change_logger.log_changes
|
26
|
+
|
27
|
+
original_file = Digest::MD5.file('../results/CHANGELOG.md').to_s
|
28
|
+
result_file = Digest::MD5.file('CHANGELOG.md').to_s
|
29
|
+
|
30
|
+
expect(result_file).to eq original_file
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'creates the change log files properly with different name' do
|
34
|
+
change_logger = Katip::ChangeLogger.new 'MyChangelog.md'
|
35
|
+
change_logger.log_changes
|
36
|
+
|
37
|
+
original_file = Digest::MD5.file('../results/MyChangelog.md').to_s
|
38
|
+
result_file = Digest::MD5.file('MyChangelog.md').to_s
|
39
|
+
|
40
|
+
expect(result_file).to eq original_file
|
41
|
+
end
|
42
|
+
|
43
|
+
|
44
|
+
after do
|
45
|
+
FileUtils.rm 'CHANGELOG.md' if File.exists? File.join(repo, 'CHANGELOG.md')
|
46
|
+
FileUtils.rm 'SampleChangeLog.md' if File.exists? File.join(repo, 'SampleChangeLog.md')
|
47
|
+
FileUtils.rm 'MyChangelog.md' if File.exists? File.join(repo, 'MyChangelog.md')
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
#### [Current]
|
3
|
+
|
4
|
+
|
5
|
+
#### 0.5.0
|
6
|
+
* [a931c96](../../commit/a931c96) - __(Ahmet Sezgin Duran)__ Bump version 0.5.0
|
7
|
+
* [221be7f](../../commit/221be7f) - __(Ahmet Sezgin Duran)__ Update README
|
8
|
+
|
9
|
+
#### 0.4.0
|
10
|
+
* [8bb14e8](../../commit/8bb14e8) - __(Ahmet Sezgin Duran)__ Bump version 0.4.0
|
11
|
+
* [c7671b1](../../commit/c7671b1) - __(Ahmet Sezgin Duran)__ Update README
|
12
|
+
|
13
|
+
#### 0.3.0
|
14
|
+
* [62a3898](../../commit/62a3898) - __(Ahmet Sezgin Duran)__ Bump version 0.3.0
|
15
|
+
* [6bc7639](../../commit/6bc7639) - __(Ahmet Sezgin Duran)__ Update README
|
16
|
+
|
17
|
+
#### 0.2.0
|
18
|
+
* [c6936a1](../../commit/c6936a1) - __(Ahmet Sezgin Duran)__ Bump version 0.2.0
|
19
|
+
* [7f3e312](../../commit/7f3e312) - __(Ahmet Sezgin Duran)__ Update README.md
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
#### [Current]
|
3
|
+
|
4
|
+
|
5
|
+
#### 0.5.0
|
6
|
+
* [a931c96](../../commit/a931c96) - __(Ahmet Sezgin Duran)__ Bump version 0.5.0
|
7
|
+
* [221be7f](../../commit/221be7f) - __(Ahmet Sezgin Duran)__ Update README
|
8
|
+
|
9
|
+
#### 0.4.0
|
10
|
+
* [8bb14e8](../../commit/8bb14e8) - __(Ahmet Sezgin Duran)__ Bump version 0.4.0
|
11
|
+
* [c7671b1](../../commit/c7671b1) - __(Ahmet Sezgin Duran)__ Update README
|
12
|
+
|
13
|
+
#### 0.3.0
|
14
|
+
* [62a3898](../../commit/62a3898) - __(Ahmet Sezgin Duran)__ Bump version 0.3.0
|
15
|
+
* [6bc7639](../../commit/6bc7639) - __(Ahmet Sezgin Duran)__ Update README
|
16
|
+
|
17
|
+
#### 0.2.0
|
18
|
+
* [c6936a1](../../commit/c6936a1) - __(Ahmet Sezgin Duran)__ Bump version 0.2.0
|
19
|
+
* [7f3e312](../../commit/7f3e312) - __(Ahmet Sezgin Duran)__ Update README.md
|
20
|
+
|
21
|
+
#### 0.1.0
|
22
|
+
* [0597893](../../commit/0597893) - __(Ahmet Sezgin Duran)__ Bump version 0.1.0
|
23
|
+
* [b57e295](../../commit/b57e295) - __(Ahmet Sezgin Duran)__ Update README.md
|
24
|
+
* [cfc3aa4](../../commit/cfc3aa4) - __(Onur Özgür ÖZKAN)__ Initial commit
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
#### [Current]
|
3
|
+
|
4
|
+
|
5
|
+
#### 0.5.0
|
6
|
+
* [a931c96](../../commit/a931c96) - __(Ahmet Sezgin Duran)__ Bump version 0.5.0
|
7
|
+
* [221be7f](../../commit/221be7f) - __(Ahmet Sezgin Duran)__ Update README
|
8
|
+
|
9
|
+
#### 0.4.0
|
10
|
+
* [8bb14e8](../../commit/8bb14e8) - __(Ahmet Sezgin Duran)__ Bump version 0.4.0
|
11
|
+
* [c7671b1](../../commit/c7671b1) - __(Ahmet Sezgin Duran)__ Update README
|
12
|
+
|
13
|
+
#### 0.3.0
|
14
|
+
* [62a3898](../../commit/62a3898) - __(Ahmet Sezgin Duran)__ Bump version 0.3.0
|
15
|
+
* [6bc7639](../../commit/6bc7639) - __(Ahmet Sezgin Duran)__ Update README
|
16
|
+
|
17
|
+
#### 0.2.0
|
18
|
+
* [c6936a1](../../commit/c6936a1) - __(Ahmet Sezgin Duran)__ Bump version 0.2.0
|
19
|
+
* [7f3e312](../../commit/7f3e312) - __(Ahmet Sezgin Duran)__ Update README.md
|
20
|
+
|
21
|
+
#### 0.1.0
|
22
|
+
* [0597893](../../commit/0597893) - __(Ahmet Sezgin Duran)__ Bump version 0.1.0
|
23
|
+
* [b57e295](../../commit/b57e295) - __(Ahmet Sezgin Duran)__ Update README.md
|
24
|
+
* [cfc3aa4](../../commit/cfc3aa4) - __(Onur Özgür ÖZKAN)__ Initial commit
|
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
#### 0.4.0
|
3
|
+
* [8bb14e8](../../commit/8bb14e8) - __(Ahmet Sezgin Duran)__ Bump version 0.4.0
|
4
|
+
* [c7671b1](../../commit/c7671b1) - __(Ahmet Sezgin Duran)__ Update README
|
5
|
+
|
6
|
+
#### 0.3.0
|
7
|
+
* [62a3898](../../commit/62a3898) - __(Ahmet Sezgin Duran)__ Bump version 0.3.0
|
8
|
+
* [6bc7639](../../commit/6bc7639) - __(Ahmet Sezgin Duran)__ Update README
|
9
|
+
|
10
|
+
#### 0.2.0
|
11
|
+
* [c6936a1](../../commit/c6936a1) - __(Ahmet Sezgin Duran)__ Bump version 0.2.0
|
12
|
+
* [7f3e312](../../commit/7f3e312) - __(Ahmet Sezgin Duran)__ Update README.md
|
13
|
+
|
14
|
+
#### 0.1.0
|
15
|
+
* [0597893](../../commit/0597893) - __(Ahmet Sezgin Duran)__ Bump version 0.1.0
|
16
|
+
* [b57e295](../../commit/b57e295) - __(Ahmet Sezgin Duran)__ Update README.md
|
17
|
+
* [cfc3aa4](../../commit/cfc3aa4) - __(Onur Özgür ÖZKAN)__ Initial commit
|
data/spec/spec_helper.rb
ADDED
data/spec/tag_spec.rb
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
repo = File.join(File.dirname(__FILE__), 'katip-sample-repo')
|
4
|
+
|
5
|
+
describe 'Tag system' do
|
6
|
+
before do
|
7
|
+
Dir.chdir repo
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'creates the change log with the given tag range' do
|
11
|
+
change_logger = Katip::ChangeLogger.new 'CHANGELOG.md', '0.1.0', '0.4.0'
|
12
|
+
change_logger.log_changes
|
13
|
+
|
14
|
+
original_file = Digest::MD5.file('../results/TagRangeLog.md').to_s
|
15
|
+
result_file = Digest::MD5.file('CHANGELOG.md').to_s
|
16
|
+
|
17
|
+
expect(result_file).to eq original_file
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'creates the change log with the given beginning tag' do
|
21
|
+
change_logger = Katip::ChangeLogger.new 'CHANGELOG.md', '0.2.0'
|
22
|
+
change_logger.log_changes
|
23
|
+
|
24
|
+
original_file = Digest::MD5.file('../results/BeginChangeLog.md').to_s
|
25
|
+
result_file = Digest::MD5.file('CHANGELOG.md').to_s
|
26
|
+
|
27
|
+
expect(result_file).to eq original_file
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'creates the change log with the given ending tag' do
|
31
|
+
change_logger = Katip::ChangeLogger.new 'CHANGELOG.md', nil, '0.4.0'
|
32
|
+
change_logger.log_changes
|
33
|
+
|
34
|
+
original_file = Digest::MD5.file('../results/TagRangeLog.md').to_s
|
35
|
+
result_file = Digest::MD5.file('CHANGELOG.md').to_s
|
36
|
+
|
37
|
+
expect(result_file).to eq original_file
|
38
|
+
end
|
39
|
+
|
40
|
+
after do
|
41
|
+
FileUtils.rm 'CHANGELOG.md' if File.exists? File.join(repo, 'CHANGELOG.md')
|
42
|
+
end
|
43
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: katip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lab2023
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 3.0.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 3.0.0
|
41
55
|
description: This is a Change Logging gem for a git initialized project.
|
42
56
|
email:
|
43
57
|
- info@lab2023.com
|
@@ -49,6 +63,8 @@ extra_rdoc_files:
|
|
49
63
|
- CHANGELOG.md
|
50
64
|
files:
|
51
65
|
- ".gitignore"
|
66
|
+
- ".gitmodules"
|
67
|
+
- ".rspec"
|
52
68
|
- CHANGELOG.md
|
53
69
|
- Gemfile
|
54
70
|
- Gemfile.lock
|
@@ -63,6 +79,13 @@ files:
|
|
63
79
|
- lib/katip/railtie.rb
|
64
80
|
- lib/katip/version.rb
|
65
81
|
- lib/tasks/katip.rake
|
82
|
+
- spec/basics_spec.rb
|
83
|
+
- spec/results/BeginChangeLog.md
|
84
|
+
- spec/results/CHANGELOG.md
|
85
|
+
- spec/results/MyChangelog.md
|
86
|
+
- spec/results/TagRangeLog.md
|
87
|
+
- spec/spec_helper.rb
|
88
|
+
- spec/tag_spec.rb
|
66
89
|
homepage: https://github.com/kebab-project/katip
|
67
90
|
licenses:
|
68
91
|
- MIT
|
@@ -90,3 +113,4 @@ summary: Katip is a gem which dumps the change log as a list grouped by version
|
|
90
113
|
It also has an executable ruby file katip, which can be used in any git project.
|
91
114
|
Log rows will contain links to commits, commit note and contributor name.
|
92
115
|
test_files: []
|
116
|
+
has_rdoc:
|