nty_change_log 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +4 -3
- data/lib/nty_change_log/parser.rb +3 -0
- data/nty_change_log.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cada98bbaf9d860d0b594daf6d54d2aedb229c1
|
4
|
+
data.tar.gz: 03bd6883781199a85af7ee5a610bd9e1887c4cf1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ba7ea45a301870da2c33a5907355661d17e597e2ce58e9585fe28ef956ce089ae2646d01b6fa31d953572137750ff10fb6fe21086d502a3552e58348186f409
|
7
|
+
data.tar.gz: bbfcd6165fa0d29620d0063b9203d04786300ebad8736cab26c24cf4ea4f3c9470bd598d55bbfbce8aad70edf254caea9241f8c8961c4723db290b7aa40c6458
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,20 +1,21 @@
|
|
1
1
|
# NTYChangeLog
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/nty_change_log.svg)](https://badge.fury.io/rb/nty_change_log)
|
2
3
|
|
3
4
|
```markdown
|
4
5
|
# Change Log
|
5
6
|
|
6
7
|
## 1.0.1
|
7
8
|
|
8
|
-
###
|
9
|
+
### Changed
|
9
10
|
* Change the name of this rubygem. [#3](https://github.com/naoty/nty_change_log/pull/3)
|
10
11
|
* Divide a large methods into some small methods. [#3](https://github.com/naoty/nty_change_log/pull/3)
|
11
12
|
|
12
|
-
###
|
13
|
+
### Fixed
|
13
14
|
* Fix some bugs. [#3](https://github.com/naoty/nty_change_log/pull/3)
|
14
15
|
|
15
16
|
## 1.0.0
|
16
17
|
|
17
|
-
###
|
18
|
+
### Added
|
18
19
|
* Parse change groups. [#2](https://github.com/naoty/nty_change_log/pull/2)
|
19
20
|
* Parse change logs in my style. [#1](https://github.com/naoty/nty_change_log/pull/1)
|
20
21
|
```
|
@@ -6,6 +6,7 @@ module NTYChangeLog
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def parse_versions(text)
|
9
|
+
return [] if text.empty?
|
9
10
|
result = text.split(/^## (.+)$/)[1..-1].map(&:strip)
|
10
11
|
Hash[*result].map do |name, change_group_texts|
|
11
12
|
change_groups = parse_change_groups(change_group_texts)
|
@@ -14,6 +15,7 @@ module NTYChangeLog
|
|
14
15
|
end
|
15
16
|
|
16
17
|
def parse_change_groups(text)
|
18
|
+
return [] if text.empty?
|
17
19
|
result = text.split(/^### (.+)$/)[1..-1].map(&:strip)
|
18
20
|
Hash[*result].map do |name, change_texts|
|
19
21
|
changes = parse_changes(change_texts)
|
@@ -22,6 +24,7 @@ module NTYChangeLog
|
|
22
24
|
end
|
23
25
|
|
24
26
|
def parse_changes(text)
|
27
|
+
return [] if text.empty?
|
25
28
|
rows = text.split("\n").map(&:strip)
|
26
29
|
rows.map do |row|
|
27
30
|
if match = row.match(/\[#(?<number>\d+)\]\((?<url>\S+)\)/)
|
data/nty_change_log.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nty_change_log
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naoto Kaneko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
112
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.5.
|
113
|
+
rubygems_version: 2.5.1
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: A rubygem to parse CHANGELOGs in my style
|