github_changelog_generator 1.3.11 → 1.4.0
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.
- checksums.yaml +4 -4
- data/.coveralls.yml +1 -0
- data/.hound.yml +2 -0
- data/.rspec +2 -0
- data/.rubocop.yml +8 -0
- data/.rubocop_todo.yml +81 -0
- data/.travis.yml +12 -10
- data/CHANGELOG.md +145 -113
- data/Gemfile +14 -4
- data/Gemfile.lock +75 -11
- data/README.md +17 -1
- data/Rakefile +5 -7
- data/bin/github_changelog_generator +2 -2
- data/bump_gemfile.rb +42 -48
- data/github_changelog_generator.gemspec +9 -10
- data/lib/CHANGELOG.md +2 -0
- data/lib/github_changelog_generator.rb +194 -346
- data/lib/github_changelog_generator/fetcher.rb +209 -0
- data/lib/github_changelog_generator/generator.rb +11 -8
- data/lib/github_changelog_generator/parser.rb +99 -86
- data/lib/github_changelog_generator/reader.rb +87 -0
- data/lib/github_changelog_generator/version.rb +1 -1
- data/spec/files/angular.js.md +9395 -0
- data/spec/files/bundler.md +1911 -0
- data/spec/files/github-changelog-generator.md +305 -0
- data/spec/spec_helper.rb +117 -0
- data/spec/unit/reader_spec.rb +113 -0
- metadata +22 -4
@@ -0,0 +1,305 @@
|
|
1
|
+
# Change Log
|
2
|
+
|
3
|
+
## [1.3.10](https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.10) (2015-03-18)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.3.9...1.3.10)
|
6
|
+
|
7
|
+
**Fixed bugs:**
|
8
|
+
|
9
|
+
- Exclude closed PR's from changelog. [\#69](https://github.com/skywinder/Github-Changelog-Generator/issues/69)
|
10
|
+
|
11
|
+
**Merged pull requests:**
|
12
|
+
|
13
|
+
- Fix termination in case of empty unreleased section with `--unreleased-only` option. [\#70](https://github.com/skywinder/Github-Changelog-Generator/pull/70) ([skywinder](https://github.com/skywinder))
|
14
|
+
|
15
|
+
## [1.3.9](https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.9) (2015-03-06)
|
16
|
+
|
17
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.3.8...1.3.9)
|
18
|
+
|
19
|
+
**Implemented enhancements:**
|
20
|
+
|
21
|
+
- Improve method of detecting owner and repository [\#63](https://github.com/skywinder/Github-Changelog-Generator/issues/63)
|
22
|
+
|
23
|
+
**Merged pull requests:**
|
24
|
+
|
25
|
+
- Resolved concurrency problem in case of issues \> 2048 [\#65](https://github.com/skywinder/Github-Changelog-Generator/pull/65) ([skywinder](https://github.com/skywinder))
|
26
|
+
|
27
|
+
## [1.3.8](https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.8) (2015-03-05)
|
28
|
+
|
29
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.3.6...1.3.8)
|
30
|
+
|
31
|
+
**Merged pull requests:**
|
32
|
+
|
33
|
+
- Fix `git remote` parsing in case, when script running without parameters inside destination directory [\#61](https://github.com/skywinder/Github-Changelog-Generator/pull/61) ([skywinder](https://github.com/skywinder))
|
34
|
+
|
35
|
+
## [1.3.6](https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.6) (2015-03-05)
|
36
|
+
|
37
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.3.5...1.3.6)
|
38
|
+
|
39
|
+
## [1.3.5](https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.5) (2015-03-04)
|
40
|
+
|
41
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.3.4...1.3.5)
|
42
|
+
|
43
|
+
**Fixed bugs:**
|
44
|
+
|
45
|
+
- Pull Requests in Wrong Tag [\#60](https://github.com/skywinder/Github-Changelog-Generator/issues/60)
|
46
|
+
|
47
|
+
## [1.3.4](https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.4) (2015-03-03)
|
48
|
+
|
49
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.3.3...1.3.4)
|
50
|
+
|
51
|
+
**Fixed bugs:**
|
52
|
+
|
53
|
+
- --no-issues appears to break PRs [\#59](https://github.com/skywinder/Github-Changelog-Generator/issues/59)
|
54
|
+
|
55
|
+
## [1.3.3](https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.3) (2015-03-03)
|
56
|
+
|
57
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.3.2...1.3.3)
|
58
|
+
|
59
|
+
**Closed issues:**
|
60
|
+
|
61
|
+
- Add \# character to encapsulate list. [\#58](https://github.com/skywinder/Github-Changelog-Generator/issues/58)
|
62
|
+
|
63
|
+
## [1.3.2](https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.2) (2015-03-03)
|
64
|
+
|
65
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.3.1...1.3.2)
|
66
|
+
|
67
|
+
**Fixed bugs:**
|
68
|
+
|
69
|
+
- generation failed if github commit api return `404 Not Found` [\#57](https://github.com/skywinder/Github-Changelog-Generator/issues/57)
|
70
|
+
|
71
|
+
## [1.3.1](https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.1) (2015-02-27)
|
72
|
+
|
73
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.3.0...1.3.1)
|
74
|
+
|
75
|
+
## [1.3.0](https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.0) (2015-02-26)
|
76
|
+
|
77
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.8...1.3.0)
|
78
|
+
|
79
|
+
**Implemented enhancements:**
|
80
|
+
|
81
|
+
- Do not show `Unreleased` section, when it's empty. [\#55](https://github.com/skywinder/Github-Changelog-Generator/issues/55)
|
82
|
+
|
83
|
+
- Separate list exclude and include labels [\#52](https://github.com/skywinder/Github-Changelog-Generator/issues/52)
|
84
|
+
|
85
|
+
- Unreleased issues in separate section [\#47](https://github.com/skywinder/Github-Changelog-Generator/issues/47)
|
86
|
+
|
87
|
+
- Separate by lists: Enhancements, Bugs, Pull requests. [\#31](https://github.com/skywinder/Github-Changelog-Generator/issues/31)
|
88
|
+
|
89
|
+
**Fixed bugs:**
|
90
|
+
|
91
|
+
- Test pull request with invalid label \(\#26\) in changelog appeared. [\#44](https://github.com/skywinder/Github-Changelog-Generator/issues/44)
|
92
|
+
|
93
|
+
**Merged pull requests:**
|
94
|
+
|
95
|
+
- Implement filtering of Pull Requests by milestones [\#50](https://github.com/skywinder/Github-Changelog-Generator/pull/50) ([skywinder](https://github.com/skywinder))
|
96
|
+
|
97
|
+
## [1.2.8](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.8) (2015-02-17)
|
98
|
+
|
99
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.7...1.2.8)
|
100
|
+
|
101
|
+
**Closed issues:**
|
102
|
+
|
103
|
+
- Bugs, that closed simultaneously with push not appeared in correct version. [\#37](https://github.com/skywinder/Github-Changelog-Generator/issues/37)
|
104
|
+
|
105
|
+
**Merged pull requests:**
|
106
|
+
|
107
|
+
- Feature/fix 37 [\#49](https://github.com/skywinder/Github-Changelog-Generator/pull/49) ([skywinder](https://github.com/skywinder))
|
108
|
+
|
109
|
+
- Prettify output [\#48](https://github.com/skywinder/Github-Changelog-Generator/pull/48) ([skywinder](https://github.com/skywinder))
|
110
|
+
|
111
|
+
## [1.2.7](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.7) (2015-01-26)
|
112
|
+
|
113
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.6...1.2.7)
|
114
|
+
|
115
|
+
**Merged pull requests:**
|
116
|
+
|
117
|
+
- Add compare link between older version and newer version [\#46](https://github.com/skywinder/Github-Changelog-Generator/pull/46) ([sue445](https://github.com/sue445))
|
118
|
+
|
119
|
+
## [1.2.6](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.6) (2015-01-21)
|
120
|
+
|
121
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.5...1.2.6)
|
122
|
+
|
123
|
+
**Merged pull requests:**
|
124
|
+
|
125
|
+
- fix link tag format [\#45](https://github.com/skywinder/Github-Changelog-Generator/pull/45) ([sugamasao](https://github.com/sugamasao))
|
126
|
+
|
127
|
+
## [1.2.5](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.5) (2015-01-15)
|
128
|
+
|
129
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.4...1.2.5)
|
130
|
+
|
131
|
+
**Implemented enhancements:**
|
132
|
+
|
133
|
+
- Use milestone to specify in which version bug was fixed [\#22](https://github.com/skywinder/Github-Changelog-Generator/issues/22)
|
134
|
+
|
135
|
+
**Fixed bugs:**
|
136
|
+
|
137
|
+
- Error when trying to generate log for repo without tags [\#32](https://github.com/skywinder/Github-Changelog-Generator/issues/32)
|
138
|
+
|
139
|
+
**Merged pull requests:**
|
140
|
+
|
141
|
+
- PrettyPrint class is included using lowercase 'pp' [\#43](https://github.com/skywinder/Github-Changelog-Generator/pull/43) ([schwing](https://github.com/schwing))
|
142
|
+
|
143
|
+
- support enterprise github via command line options [\#42](https://github.com/skywinder/Github-Changelog-Generator/pull/42) ([glenlovett](https://github.com/glenlovett))
|
144
|
+
|
145
|
+
## [1.2.4](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.4) (2014-12-16)
|
146
|
+
|
147
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.3...1.2.4)
|
148
|
+
|
149
|
+
**Fixed bugs:**
|
150
|
+
|
151
|
+
- Sometimes user is NULL during merges [\#41](https://github.com/skywinder/Github-Changelog-Generator/issues/41)
|
152
|
+
|
153
|
+
- Crash when try generate log for rails [\#35](https://github.com/skywinder/Github-Changelog-Generator/issues/35)
|
154
|
+
|
155
|
+
## [1.2.3](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.3) (2014-12-16)
|
156
|
+
|
157
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.2...1.2.3)
|
158
|
+
|
159
|
+
**Implemented enhancements:**
|
160
|
+
|
161
|
+
- Add ability to run with one parameter instead -u -p [\#38](https://github.com/skywinder/Github-Changelog-Generator/issues/38)
|
162
|
+
|
163
|
+
- Detailed output [\#33](https://github.com/skywinder/Github-Changelog-Generator/issues/33)
|
164
|
+
|
165
|
+
**Fixed bugs:**
|
166
|
+
|
167
|
+
- Docs lacking or basic behavior not as advertised [\#30](https://github.com/skywinder/Github-Changelog-Generator/issues/30)
|
168
|
+
|
169
|
+
**Merged pull requests:**
|
170
|
+
|
171
|
+
- Implement async fetching [\#39](https://github.com/skywinder/Github-Changelog-Generator/pull/39) ([skywinder](https://github.com/skywinder))
|
172
|
+
|
173
|
+
- Fix crash when user is NULL [\#40](https://github.com/skywinder/Github-Changelog-Generator/pull/40) ([skywinder](https://github.com/skywinder))
|
174
|
+
|
175
|
+
## [1.2.2](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.2) (2014-12-10)
|
176
|
+
|
177
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.1...1.2.2)
|
178
|
+
|
179
|
+
**Fixed bugs:**
|
180
|
+
|
181
|
+
- Encapsulate \[ \> \* \_ \ \] signs in issues names [\#34](https://github.com/skywinder/Github-Changelog-Generator/issues/34)
|
182
|
+
|
183
|
+
**Merged pull requests:**
|
184
|
+
|
185
|
+
- Add a Bitdeli Badge to README [\#36](https://github.com/skywinder/Github-Changelog-Generator/pull/36) ([bitdeli-chef](https://github.com/bitdeli-chef))
|
186
|
+
|
187
|
+
## [1.2.1](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.1) (2014-11-22)
|
188
|
+
|
189
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.0...1.2.1)
|
190
|
+
|
191
|
+
**Fixed bugs:**
|
192
|
+
|
193
|
+
- Script fills changelog only for first 30 tags. [\#20](https://github.com/skywinder/Github-Changelog-Generator/issues/20)
|
194
|
+
|
195
|
+
**Merged pull requests:**
|
196
|
+
|
197
|
+
- Issues for last tag not in list [\#29](https://github.com/skywinder/Github-Changelog-Generator/pull/29) ([skywinder](https://github.com/skywinder))
|
198
|
+
|
199
|
+
- Disable default --filter-pull-requests option. [\#28](https://github.com/skywinder/Github-Changelog-Generator/pull/28) ([skywinder](https://github.com/skywinder))
|
200
|
+
|
201
|
+
## [1.2.0](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.0) (2014-11-19)
|
202
|
+
|
203
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.1.4...1.2.0)
|
204
|
+
|
205
|
+
**Merged pull requests:**
|
206
|
+
|
207
|
+
- Add filter for pull-requests labels. \(option --filter-pull-requests\) [\#27](https://github.com/skywinder/Github-Changelog-Generator/pull/27) ([skywinder](https://github.com/skywinder))
|
208
|
+
|
209
|
+
- Add ability to insert authors of pull-requests \(--\[no-\]author option\) [\#25](https://github.com/skywinder/Github-Changelog-Generator/pull/25) ([skywinder](https://github.com/skywinder))
|
210
|
+
|
211
|
+
- Don't receive issues in case of --no-isses flag specied [\#24](https://github.com/skywinder/Github-Changelog-Generator/pull/24) ([skywinder](https://github.com/skywinder))
|
212
|
+
|
213
|
+
## [1.1.4](https://github.com/skywinder/Github-Changelog-Generator/tree/1.1.4) (2014-11-18)
|
214
|
+
|
215
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.1.2...1.1.4)
|
216
|
+
|
217
|
+
**Implemented enhancements:**
|
218
|
+
|
219
|
+
- Implement ability to retrieve GitHub token from ENV variable \(to not put it to script directly\) [\#19](https://github.com/skywinder/Github-Changelog-Generator/issues/19)
|
220
|
+
|
221
|
+
**Merged pull requests:**
|
222
|
+
|
223
|
+
- Sort tags by date [\#23](https://github.com/skywinder/Github-Changelog-Generator/pull/23) ([skywinder](https://github.com/skywinder))
|
224
|
+
|
225
|
+
## [1.1.2](https://github.com/skywinder/Github-Changelog-Generator/tree/1.1.2) (2014-11-12)
|
226
|
+
|
227
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.1.1...1.1.2)
|
228
|
+
|
229
|
+
**Merged pull requests:**
|
230
|
+
|
231
|
+
- Fix bug with dot signs in project name [\#18](https://github.com/skywinder/Github-Changelog-Generator/pull/18) ([skywinder](https://github.com/skywinder))
|
232
|
+
|
233
|
+
- Fix bug with dot signs in user name [\#17](https://github.com/skywinder/Github-Changelog-Generator/pull/17) ([skywinder](https://github.com/skywinder))
|
234
|
+
|
235
|
+
## [1.1.1](https://github.com/skywinder/Github-Changelog-Generator/tree/1.1.1) (2014-11-10)
|
236
|
+
|
237
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.1.0...1.1.1)
|
238
|
+
|
239
|
+
**Merged pull requests:**
|
240
|
+
|
241
|
+
- Remove duplicates of issues and pull-requests with same number [\#15](https://github.com/skywinder/Github-Changelog-Generator/pull/15) ([skywinder](https://github.com/skywinder))
|
242
|
+
|
243
|
+
- Sort issues by tags [\#14](https://github.com/skywinder/Github-Changelog-Generator/pull/14) ([skywinder](https://github.com/skywinder))
|
244
|
+
|
245
|
+
- Add ability to add or exclude issues without any labels [\#13](https://github.com/skywinder/Github-Changelog-Generator/pull/13) ([skywinder](https://github.com/skywinder))
|
246
|
+
|
247
|
+
## [1.1.0](https://github.com/skywinder/Github-Changelog-Generator/tree/1.1.0) (2014-11-10)
|
248
|
+
|
249
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.0.1...1.1.0)
|
250
|
+
|
251
|
+
**Implemented enhancements:**
|
252
|
+
|
253
|
+
- Detect username and project form origin [\#11](https://github.com/skywinder/Github-Changelog-Generator/issues/11)
|
254
|
+
|
255
|
+
**Fixed bugs:**
|
256
|
+
|
257
|
+
- Bug with wrong credentials in 1.0.1 [\#12](https://github.com/skywinder/Github-Changelog-Generator/issues/12)
|
258
|
+
|
259
|
+
- Markdown formating in the last line wrong [\#9](https://github.com/skywinder/Github-Changelog-Generator/issues/9)
|
260
|
+
|
261
|
+
## [1.0.1](https://github.com/skywinder/Github-Changelog-Generator/tree/1.0.1) (2014-11-10)
|
262
|
+
|
263
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.0.0...1.0.1)
|
264
|
+
|
265
|
+
## [1.0.0](https://github.com/skywinder/Github-Changelog-Generator/tree/1.0.0) (2014-11-07)
|
266
|
+
|
267
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/0.1.0...1.0.0)
|
268
|
+
|
269
|
+
**Implemented enhancements:**
|
270
|
+
|
271
|
+
- Add support for fixed issues and implemented enchanments. [\#6](https://github.com/skywinder/Github-Changelog-Generator/issues/6)
|
272
|
+
|
273
|
+
- Implement option to specify output filename [\#4](https://github.com/skywinder/Github-Changelog-Generator/issues/4)
|
274
|
+
|
275
|
+
**Fixed bugs:**
|
276
|
+
|
277
|
+
- Last tag not appeared in changelog [\#5](https://github.com/skywinder/Github-Changelog-Generator/issues/5)
|
278
|
+
|
279
|
+
**Merged pull requests:**
|
280
|
+
|
281
|
+
- Implement support of different tags. [\#8](https://github.com/skywinder/Github-Changelog-Generator/pull/8) ([skywinder](https://github.com/skywinder))
|
282
|
+
|
283
|
+
- Add support for issues in CHANGELOG [\#7](https://github.com/skywinder/Github-Changelog-Generator/pull/7) ([skywinder](https://github.com/skywinder))
|
284
|
+
|
285
|
+
## [0.1.0](https://github.com/skywinder/Github-Changelog-Generator/tree/0.1.0) (2014-11-07)
|
286
|
+
|
287
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/0.0.2...0.1.0)
|
288
|
+
|
289
|
+
**Merged pull requests:**
|
290
|
+
|
291
|
+
- Fix parsing date of pull request [\#3](https://github.com/skywinder/Github-Changelog-Generator/pull/3) ([skywinder](https://github.com/skywinder))
|
292
|
+
|
293
|
+
- Add changelog generation for last tag [\#2](https://github.com/skywinder/Github-Changelog-Generator/pull/2) ([skywinder](https://github.com/skywinder))
|
294
|
+
|
295
|
+
- Add option \(-o --output\) to specify name of the output file. [\#1](https://github.com/skywinder/Github-Changelog-Generator/pull/1) ([skywinder](https://github.com/skywinder))
|
296
|
+
|
297
|
+
## [0.0.2](https://github.com/skywinder/Github-Changelog-Generator/tree/0.0.2) (2014-11-06)
|
298
|
+
|
299
|
+
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/0.0.1...0.0.2)
|
300
|
+
|
301
|
+
## [0.0.1](https://github.com/skywinder/Github-Changelog-Generator/tree/0.0.1) (2014-11-06)
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Enrico Stahn <mail@enricostahn.com>
|
3
|
+
#
|
4
|
+
# Copyright 2014, Zanui, <engineering@zanui.com.au>
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
require "codeclimate-test-reporter"
|
19
|
+
require "simplecov"
|
20
|
+
require "coveralls"
|
21
|
+
|
22
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
23
|
+
Coveralls::SimpleCov::Formatter,
|
24
|
+
SimpleCov::Formatter::HTMLFormatter,
|
25
|
+
CodeClimate::TestReporter::Formatter
|
26
|
+
]
|
27
|
+
SimpleCov.start
|
28
|
+
|
29
|
+
require "github_changelog_generator"
|
30
|
+
|
31
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
32
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
33
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
34
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
35
|
+
# files.
|
36
|
+
#
|
37
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
38
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
39
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
40
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
41
|
+
# a separate helper file that requires the additional dependencies and performs
|
42
|
+
# the additional setup, and require it from the spec files that actually need
|
43
|
+
# it.
|
44
|
+
#
|
45
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
46
|
+
# users commonly want.
|
47
|
+
#
|
48
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
49
|
+
RSpec.configure do |config|
|
50
|
+
# rspec-expectations config goes here. You can use an alternate
|
51
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
52
|
+
# assertions if you prefer.
|
53
|
+
config.expect_with :rspec do |expectations|
|
54
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
55
|
+
# and `failure_message` of custom matchers include text for helper methods
|
56
|
+
# defined using `chain`, e.g.:
|
57
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
58
|
+
# # => "be bigger than 2 and smaller than 4"
|
59
|
+
# ...rather than:
|
60
|
+
# # => "be bigger than 2"
|
61
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
62
|
+
end
|
63
|
+
|
64
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
65
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
66
|
+
config.mock_with :rspec do |mocks|
|
67
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
68
|
+
# a real object. This is generally recommended, and will default to
|
69
|
+
# `true` in RSpec 4.
|
70
|
+
mocks.verify_partial_doubles = true
|
71
|
+
end
|
72
|
+
|
73
|
+
# These two settings work together to allow you to limit a spec run
|
74
|
+
# to individual examples or groups you care about by tagging them with
|
75
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
76
|
+
# get run.
|
77
|
+
config.filter_run :focus
|
78
|
+
config.run_all_when_everything_filtered = true
|
79
|
+
|
80
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
81
|
+
# recommended. For more details, see:
|
82
|
+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
83
|
+
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
84
|
+
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
85
|
+
# config.disable_monkey_patching!
|
86
|
+
|
87
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
88
|
+
# be too noisy due to issues in dependencies.
|
89
|
+
config.warnings = true
|
90
|
+
|
91
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
92
|
+
# file, and it's useful to allow more verbose output when running an
|
93
|
+
# individual spec file.
|
94
|
+
if config.files_to_run.one?
|
95
|
+
# Use the documentation formatter for detailed output,
|
96
|
+
# unless a formatter has already been configured
|
97
|
+
# (e.g. via a command-line flag).
|
98
|
+
config.default_formatter = "doc"
|
99
|
+
end
|
100
|
+
|
101
|
+
# Print the 10 slowest examples and example groups at the
|
102
|
+
# end of the spec run, to help surface which specs are running
|
103
|
+
# particularly slow.
|
104
|
+
# config.profile_examples = 10
|
105
|
+
|
106
|
+
# Run specs in random order to surface order dependencies. If you find an
|
107
|
+
# order dependency and want to debug it, you can fix the order by providing
|
108
|
+
# the seed, which is printed after each run.
|
109
|
+
# --seed 1234
|
110
|
+
config.order = :random
|
111
|
+
|
112
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
113
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
114
|
+
# test failures related to randomization by passing the same `--seed` value
|
115
|
+
# as the one that triggered the failure.
|
116
|
+
Kernel.srand config.seed
|
117
|
+
end
|
@@ -0,0 +1,113 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Enrico Stahn <mail@enricostahn.com>
|
3
|
+
#
|
4
|
+
# Copyright 2014, Zanui, <engineering@zanui.com.au>
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
describe GitHubChangelogGenerator::Reader do
|
20
|
+
before(:all) do
|
21
|
+
@reader = GitHubChangelogGenerator::Reader.new
|
22
|
+
end
|
23
|
+
|
24
|
+
describe "#parse_heading" do
|
25
|
+
context "when heading is empty" do
|
26
|
+
subject { @reader.parse_heading("## ") }
|
27
|
+
it { is_expected.to be_a(Hash) }
|
28
|
+
it { is_expected.to include("version", "url", "date") }
|
29
|
+
it { is_expected.to include("version" => nil, "url" => nil, "date" => nil) }
|
30
|
+
# TODO: Doesn't work?
|
31
|
+
# it { is_expected.to have_all_string_keys }
|
32
|
+
end
|
33
|
+
context "when given version, url and date" do
|
34
|
+
subject { @reader.parse_heading("## [1.3.10](https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.10) (2015-03-18)") }
|
35
|
+
it { is_expected.to include("version" => "1.3.10") }
|
36
|
+
it { is_expected.to include("url" => "https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.10") }
|
37
|
+
it { is_expected.to include("date" => "2015-03-18") }
|
38
|
+
end
|
39
|
+
context "when no url and date is provided" do
|
40
|
+
subject { @reader.parse_heading("## foobar") }
|
41
|
+
it { is_expected.to include("version" => "foobar", "url" => nil, "date" => nil) }
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe "#parse" do
|
46
|
+
context "when file is empty" do
|
47
|
+
subject { @reader.parse("") }
|
48
|
+
it { is_expected.to be_an(Array) }
|
49
|
+
it { is_expected.to be_empty }
|
50
|
+
end
|
51
|
+
context "when file has only the header" do
|
52
|
+
subject { @reader.parse("# Change Log") }
|
53
|
+
it { is_expected.to be_an(Array) }
|
54
|
+
it { is_expected.to be_empty }
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
describe "example CHANGELOG files" do
|
59
|
+
subject { @reader.read(File.expand_path(File.join(File.dirname(__FILE__), "..", "files", self.class.description))) }
|
60
|
+
context "github-changelog-generator.md" do
|
61
|
+
it { is_expected.to be_an(Array) }
|
62
|
+
it { is_expected.not_to be_empty }
|
63
|
+
it { expect(subject.count).to eq(28) }
|
64
|
+
it { expect(subject.first).to include("version" => "1.3.10") }
|
65
|
+
it { expect(subject.first).to include("url" => "https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.10") }
|
66
|
+
it { expect(subject.first).to include("date" => "2015-03-18") }
|
67
|
+
it { expect(subject.first).to include("content") }
|
68
|
+
it "content should not be empty" do
|
69
|
+
expect(subject.first["content"]).not_to be_empty
|
70
|
+
end
|
71
|
+
end
|
72
|
+
context "bundler.md" do
|
73
|
+
it { is_expected.to be_an(Array) }
|
74
|
+
it { is_expected.not_to be_empty }
|
75
|
+
it { expect(subject.count).to eq(151) }
|
76
|
+
it { expect(subject.first).to include("version" => "1.9.1") }
|
77
|
+
it { expect(subject.first).to include("url" => nil) }
|
78
|
+
it { expect(subject.first).to include("date" => "2015-03-21") }
|
79
|
+
it { expect(subject.first).to include("content") }
|
80
|
+
it "content should not be empty" do
|
81
|
+
expect(subject.first["content"]).not_to be_empty
|
82
|
+
end
|
83
|
+
end
|
84
|
+
context "angular.js.md" do
|
85
|
+
it { is_expected.to be_an(Array) }
|
86
|
+
it { is_expected.not_to be_empty }
|
87
|
+
it do
|
88
|
+
pending("Implement heading_level for parser.")
|
89
|
+
expect(subject.count).to eq(134)
|
90
|
+
end
|
91
|
+
# it do
|
92
|
+
# pending('Implement heading_level for parser.')
|
93
|
+
# expect(subject.first).to include('version' => '1.4.0-beta.6 cookie-liberation')
|
94
|
+
# end
|
95
|
+
# it do
|
96
|
+
# pending('Implement heading_level for parser.')
|
97
|
+
# expect(subject.first).to include('url' => nil)
|
98
|
+
# end
|
99
|
+
# it do
|
100
|
+
# pending('Implement heading_level for parser.')
|
101
|
+
# expect(subject.first).to include('date' => '2015-03-17')
|
102
|
+
# end
|
103
|
+
# it do
|
104
|
+
# pending('Implement heading_level for parser.')
|
105
|
+
# expect(subject.first).to include('content')
|
106
|
+
# end
|
107
|
+
# it 'content should not be empty' do
|
108
|
+
# pending('Implement heading_level for parser.')
|
109
|
+
# expect(subject.first['content']).not_to be_empty
|
110
|
+
# end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|