vandamme 0.0.7 → 0.0.8
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 +10 -7
- data/lib/vandamme/parser.rb +2 -2
- data/lib/vandamme/version.rb +1 -1
- data/spec/vandamme/parser_spec.rb +10 -0
- data/vandamme.gemspec +4 -4
- metadata +23 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a5c6b1bc5b4cbb35fefd4812e9581d34280f3f2
|
4
|
+
data.tar.gz: 9b5cc2bc3ae90e6b7db89317da4efd1322626940
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ea6e6fb0cc81e06427182dd9d9143108bd6696c9ee51c7f3b0a463587a98e021423a84e0ebf3142a66d8a4bb898ba6c713cc61fe6dc61f04d89fba475738e42
|
7
|
+
data.tar.gz: 3fdf7eec47013dad184a80138e49baaae3f754aae7fe9c934386db047497a691e5ea38f84bfb3682c1491fb139edada53a8095726f05cb10f40e1f28e981363b
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -46,11 +46,11 @@ The Parser initializer will use 3 options:
|
|
46
46
|
**version_header_exp** will be converted to a new Regex object if it wasn't one.
|
47
47
|
Therefore,
|
48
48
|
|
49
|
-
Vandamme::Parser.new(changelog: changelog, version_header_exp: '\d{4}-\d{2}-\d{2}
|
49
|
+
Vandamme::Parser.new(changelog: changelog, version_header_exp: '(\d\.\d+\.\d+) \((\d{4}-\d{2}-\d{2})\)?')
|
50
50
|
|
51
51
|
is equivalent to:
|
52
52
|
|
53
|
-
Vandamme::Parser.new(changelog: changelog, version_header_exp:
|
53
|
+
Vandamme::Parser.new(changelog: changelog, version_header_exp: /(\d\.\d+\.\d+) \(\d{4}-\d{2}-\d{2}\)?/)
|
54
54
|
|
55
55
|
Be careful with how ruby is handling escaped caracters in a string: ```"\d"``` if different from ```'\d'```!
|
56
56
|
|
@@ -83,7 +83,7 @@ require 'rubygems'
|
|
83
83
|
require 'vandamme'
|
84
84
|
require 'open-uri'
|
85
85
|
changelog = open('https://raw.github.com/flori/json/master/CHANGES').read
|
86
|
-
parser = Vandamme::Parser.new(changelog: changelog, version_header_exp: '\d{4}-\d{2}-\d{2}
|
86
|
+
parser = Vandamme::Parser.new(changelog: changelog, version_header_exp: '(\d\.\d+\.\d+) \(\d{4}-\d{2}-\d{2}\)', format: 'markdown')
|
87
87
|
parser.parse
|
88
88
|
```
|
89
89
|
will return a hash with each version as keys, and version content as value.
|
@@ -136,8 +136,11 @@ Example in Markdown:
|
|
136
136
|
```
|
137
137
|
|
138
138
|
+ LEVEL 1 (or 2) HEADER WITH VERSION **MUST** at least contain the version number (```{{version_number}}```)
|
139
|
-
+ If the release date is present, it **MUST**
|
140
|
-
+ {{release_date}} **MUST** follow
|
139
|
+
+ If the release date is present, it **MUST** follow the form ```{{version_number}} / {{release_date}}```
|
140
|
+
+ {{release_date}} is optional but if present it **MUST** follow one of these formats:
|
141
|
+
++ the full english style format: "December 14th, 2014" (ordinal suffix is optional)
|
142
|
+
++ the ISO 8601 format: "YYYY-MM-DD"
|
143
|
+
++ the text "Unreleased"
|
141
144
|
+ VERSION CHANGES **MAY** contain more levels, but MUST follow the markup syntax.
|
142
145
|
+ {{version_number}} **SHOULD** follow the [semver](http://semver.org/) convention.
|
143
146
|
+ {{version_number}} **MUST** contain at least a dot (ex: "1.2").
|
@@ -165,11 +168,11 @@ Changelogs following these rules will be automatically included in Gemnasium.
|
|
165
168
|
The regexp used is
|
166
169
|
|
167
170
|
```
|
168
|
-
^#{0,3} ?([\w\d\.-]+\.[\w\d\.-]+[a-zA-Z0-9])( \/ (\d{4}-\d{2}-\d{2}|\w+))?\n?[=-]*
|
171
|
+
^#{0,3} ?([\w\d\.-]+\.[\w\d\.-]+[a-zA-Z0-9])(?: \/ (\w+ \d{1,2}(?:st|nd|rd|th)?,\s\d{4}|\d{4}-\d{2}-\d{2}|\w+))?\n?[=-]*
|
169
172
|
```
|
170
173
|
|
171
174
|
Check your changelog using Rubular if you want to be sure:
|
172
|
-
http://rubular.com/r/
|
175
|
+
http://rubular.com/r/Gw6rIS5HkJ
|
173
176
|
|
174
177
|
## Contributing
|
175
178
|
|
data/lib/vandamme/parser.rb
CHANGED
@@ -5,14 +5,14 @@ require 'vandamme/monkey_patch_markup'
|
|
5
5
|
module Vandamme
|
6
6
|
class Parser
|
7
7
|
|
8
|
-
DEFAULT_REGEXP = Regexp.new('^#{0,3} ?([\w\d\.-]+\.[\w\d\.-]+[a-zA-Z0-9])( \/ (\d{4}-\d{2}-\d{2}|\w+))?\n?[=-]*')
|
8
|
+
DEFAULT_REGEXP = Regexp.new('^#{0,3} ?([\w\d\.-]+\.[\w\d\.-]+[a-zA-Z0-9])(?: \/ (\w+ \d{1,2}(?:st|nd|rd|th)?,\s\d{4}|\d{4}-\d{2}-\d{2}|\w+))?\n?[=-]*')
|
9
9
|
|
10
10
|
# Create a new changelog parser
|
11
11
|
#
|
12
12
|
# Options:
|
13
13
|
# * +changelog+:: Changelog content as a +String+.
|
14
14
|
# * +version_header_exp+ (optional):: regexp to match the starting line of version.
|
15
|
-
# Defaults to /^#{
|
15
|
+
# Defaults to /^#{0,3} ?([\w\d\.-]+\.[\w\d\.-]+[a-zA-Z0-9])(?: \/ (\w+ \d{1,2}(?:st|nd|rd|th)?,\s\d{4}|\d{4}-\d{2}-\d{2}|\w+))?\n?[=-]*/
|
16
16
|
# See http://tech-angels.github.com/vandamme/#changelogs-convention
|
17
17
|
# * +format+ (optional):: One of "raw", "markdown", "rdoc"
|
18
18
|
#
|
data/lib/vandamme/version.rb
CHANGED
@@ -123,6 +123,14 @@ describe Vandamme::Parser do
|
|
123
123
|
|
124
124
|
* Update API
|
125
125
|
|
126
|
+
## 1.2.2 / December 3, 2014
|
127
|
+
|
128
|
+
* Add something else
|
129
|
+
|
130
|
+
## 1.2.1 / December 1st, 2014
|
131
|
+
|
132
|
+
* Add something
|
133
|
+
|
126
134
|
# 1.0.0-x.7.z.92
|
127
135
|
eos
|
128
136
|
}
|
@@ -131,6 +139,8 @@ describe Vandamme::Parser do
|
|
131
139
|
{
|
132
140
|
"X.Y.Z" => "* Update API \n* Fix bug #1",
|
133
141
|
"1.2.3-pre.1" => "* Update API ",
|
142
|
+
"1.2.2" => "* Add something else",
|
143
|
+
"1.2.1" => "* Add something",
|
134
144
|
"1.0.0-x.7.z.92" => ""
|
135
145
|
}
|
136
146
|
}
|
data/vandamme.gemspec
CHANGED
@@ -17,9 +17,9 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ["lib"]
|
19
19
|
|
20
|
-
gem.add_development_dependency 'rspec','~>
|
21
|
-
gem.add_development_dependency 'rake','~> 10.0
|
20
|
+
gem.add_development_dependency 'rspec','~> 3.1'
|
21
|
+
gem.add_development_dependency 'rake','~> 10.0'
|
22
22
|
|
23
|
-
gem.add_dependency 'github-markup', '~>
|
24
|
-
gem.add_dependency 'redcarpet', '3.0
|
23
|
+
gem.add_dependency 'github-markup', '~> 1.3'
|
24
|
+
gem.add_dependency 'redcarpet', '~> 3.0'
|
25
25
|
end
|
metadata
CHANGED
@@ -1,71 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vandamme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philippe Lafoucrière
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '3.1'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '3.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 10.0
|
33
|
+
version: '10.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 10.0
|
40
|
+
version: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: github-markup
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '1.3'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '1.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: redcarpet
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 3.0
|
61
|
+
version: '3.0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 3.0
|
68
|
+
version: '3.0'
|
69
69
|
description: Vandamme is aware of files content, and will be mostly used to parse
|
70
70
|
changelog files and extract relevant content.
|
71
71
|
email:
|
@@ -74,8 +74,8 @@ executables: []
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
-
- .gitignore
|
78
|
-
- .travis.yml
|
77
|
+
- ".gitignore"
|
78
|
+
- ".travis.yml"
|
79
79
|
- CHANGELOG.md
|
80
80
|
- Gemfile
|
81
81
|
- LICENSE.txt
|
@@ -99,17 +99,17 @@ require_paths:
|
|
99
99
|
- lib
|
100
100
|
required_ruby_version: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- -
|
102
|
+
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- -
|
107
|
+
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.
|
112
|
+
rubygems_version: 2.2.2
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: Be aware of changelogs content
|