rubycut-vclog 1.9.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. data/.yardopts +7 -0
  2. data/History.md +249 -0
  3. data/License.txt +23 -0
  4. data/README.md +133 -0
  5. data/bin/vclog +6 -0
  6. data/bin/vclog-autotag +6 -0
  7. data/bin/vclog-bump +6 -0
  8. data/bin/vclog-formats +6 -0
  9. data/bin/vclog-news +6 -0
  10. data/bin/vclog-version +6 -0
  11. data/lib/vclog.rb +6 -0
  12. data/lib/vclog.yml +68 -0
  13. data/lib/vclog/adapters.rb +12 -0
  14. data/lib/vclog/adapters/abstract.rb +131 -0
  15. data/lib/vclog/adapters/darcs.rb +93 -0
  16. data/lib/vclog/adapters/git.rb +190 -0
  17. data/lib/vclog/adapters/hg.rb +129 -0
  18. data/lib/vclog/adapters/svn.rb +155 -0
  19. data/lib/vclog/change.rb +207 -0
  20. data/lib/vclog/change_point.rb +77 -0
  21. data/lib/vclog/changelog.rb +233 -0
  22. data/lib/vclog/cli.rb +8 -0
  23. data/lib/vclog/cli/abstract.rb +92 -0
  24. data/lib/vclog/cli/autotag.rb +36 -0
  25. data/lib/vclog/cli/bump.rb +29 -0
  26. data/lib/vclog/cli/formats.rb +28 -0
  27. data/lib/vclog/cli/log.rb +86 -0
  28. data/lib/vclog/cli/news.rb +29 -0
  29. data/lib/vclog/cli/version.rb +30 -0
  30. data/lib/vclog/config.rb +143 -0
  31. data/lib/vclog/core_ext.rb +11 -0
  32. data/lib/vclog/heuristics.rb +192 -0
  33. data/lib/vclog/heuristics/rule.rb +73 -0
  34. data/lib/vclog/heuristics/type.rb +29 -0
  35. data/lib/vclog/history_file.rb +69 -0
  36. data/lib/vclog/metadata.rb +16 -0
  37. data/lib/vclog/rc.rb +9 -0
  38. data/lib/vclog/release.rb +67 -0
  39. data/lib/vclog/repo.rb +298 -0
  40. data/lib/vclog/report.rb +200 -0
  41. data/lib/vclog/tag.rb +151 -0
  42. data/lib/vclog/templates/changelog.ansi.rb +35 -0
  43. data/lib/vclog/templates/changelog.atom.erb +52 -0
  44. data/lib/vclog/templates/changelog.gnu.rb +24 -0
  45. data/lib/vclog/templates/changelog.html.erb +49 -0
  46. data/lib/vclog/templates/changelog.json.rb +1 -0
  47. data/lib/vclog/templates/changelog.markdown.rb +30 -0
  48. data/lib/vclog/templates/changelog.rdoc.rb +30 -0
  49. data/lib/vclog/templates/changelog.rss.erb +54 -0
  50. data/lib/vclog/templates/changelog.xml.erb +28 -0
  51. data/lib/vclog/templates/changelog.xsl +34 -0
  52. data/lib/vclog/templates/changelog.yaml.rb +1 -0
  53. data/lib/vclog/templates/history.ansi.rb +57 -0
  54. data/lib/vclog/templates/history.atom.erb +84 -0
  55. data/lib/vclog/templates/history.gnu.rb +39 -0
  56. data/lib/vclog/templates/history.html.erb +60 -0
  57. data/lib/vclog/templates/history.json.rb +1 -0
  58. data/lib/vclog/templates/history.markdown.rb +38 -0
  59. data/lib/vclog/templates/history.rdoc.rb +36 -0
  60. data/lib/vclog/templates/history.rss.erb +84 -0
  61. data/lib/vclog/templates/history.xml.erb +43 -0
  62. data/lib/vclog/templates/history.yaml.rb +1 -0
  63. data/man/man1/index.txt +9 -0
  64. data/man/man1/vclog-autotag.1.ronn +29 -0
  65. data/man/man1/vclog-bump.1.ronn +21 -0
  66. data/man/man1/vclog-news.1.ronn +25 -0
  67. data/man/man1/vclog-version.1.ronn +14 -0
  68. data/man/man1/vclog.1.ronn +49 -0
  69. data/spec/feature_git_changes.rb +58 -0
  70. data/spec/feature_git_history.rb +58 -0
  71. data/spec/feature_hg_changes.rb +58 -0
  72. data/spec/feature_hg_history.rb +58 -0
  73. data/spec/featurettes/repo_creation.rb +64 -0
  74. data/spec/featurettes/shellout.rb +16 -0
  75. data/test/case_metadata.rb +10 -0
  76. metadata +265 -0
data/.yardopts ADDED
@@ -0,0 +1,7 @@
1
+ --title VCLog
2
+ --protected
3
+ --private
4
+ lib/
5
+ -
6
+ [A-Z]*.*
7
+
data/History.md ADDED
@@ -0,0 +1,249 @@
1
+ # RELEASE HISTORY
2
+
3
+ ## 1.9.3 / 2012-04-09
4
+
5
+ This release should finally fix issue #14. If also adds support
6
+ for RC based configuration.
7
+
8
+ Changes:
9
+
10
+ * Fix issue #14.
11
+ * Add support for RC.
12
+
13
+
14
+ ## 1.9.2 / 2012-03-03
15
+
16
+ Adds `vclog-news` command to output the lastest release entry in a project History file.
17
+ Also attempts to fix issue #14 in which template is not being found --will at least
18
+ report more useful error message if it happens in the future. Also, improved handling
19
+ of configuration. You can now use `.vclog`, `config/vclog` or `.config/vclog`
20
+ by defatult, or add `vclog: path/to/config/file` entry to `.map` file is you wish
21
+ to use unconventional location.
22
+
23
+ Changes:
24
+
25
+ * Add news command to get latest release history.
26
+ * Improve configuration file handling.
27
+ * Improve Report code to avoid missing templates.
28
+ * Switch to Lime for spec testing, instead of Cucumber.
29
+
30
+
31
+ ## 1.9.1 / 2011-12-13
32
+
33
+ Fixes a couple of issues found with the last release.
34
+
35
+ Changes:
36
+
37
+ * Fix revision id in rss and atom formats.
38
+ * Fix tag id in git tag parser.
39
+
40
+
41
+ ## 1.9.0 / 2011-12-12
42
+
43
+ This is a BIG release and much has changed, so be sure to read the following
44
+ carefully if you've used VClog before.
45
+
46
+ First of all, the command line interface no longer uses the subcommand pattern.
47
+ Instead independent commands have been created for each use, e.g. `vclog-version`
48
+ instead of `vclog version`. In addition the plain `vclog` command now handles
49
+ both changelog and release history reports. To get a release history insead of
50
+ a changelog, use the `-r` option.
51
+
52
+ Next up, this release also adds in full commit message support via the `-d`/`--detail`
53
+ option, where as previously some formats were limited to one-line message summaries.
54
+ Also, the `-p`/`--point` option has been added which will split a commit message
55
+ into separate points (points are recognized by astrisks flush to the left margin).
56
+
57
+ Custom hueristics configuration blocks no longer receive the commit message,
58
+ but the commit object instead, which can be manipulated directly, rather then
59
+ return a limited set of possible changes. This allows for rules to be much more
60
+ flexible.
61
+
62
+ Since the last release wasn't widely publisized, I also want to mention again that
63
+ configuration is now handled by the `confection` gem, meaning custom heuristics
64
+ must be place in a projects `.confile` or `Confile`. See the latest README for more
65
+ details.
66
+
67
+ Changes:
68
+
69
+ * Separate commands and new cli interface.
70
+ * Support for full commit messages.
71
+ * Point option splits commit messages into point messages.
72
+ * Heuristic rules receive commit object instead of message.
73
+
74
+
75
+ == 1.8.2 / 2011-12-08
76
+
77
+ This release changes the way in which vclog is configured to use the Confection
78
+ gem. This means VCLog custom configuration for a project must go in a `vclog do`
79
+ block in the `Confile` or `.confile` project file. In addtion this release
80
+ brings the build config up to date and switches the project over to the
81
+ BSD-2-Clause license.
82
+
83
+ Changes:
84
+
85
+ * Use Confection gem for cusomt configs.
86
+ * Modernize build config for latest tools.
87
+ * Switch to BSD-2-Clause license.
88
+
89
+
90
+ == 1.8.1 / 2010-11-22
91
+
92
+ This release corrects the tag dates on Histories. Where possible the tag date is used rather than the commit date (of the most recent commit made relative to the tag). Primarily this effects git repositories --a separate tag date is not supported by all SCMs. This release also fixes a bug in the hg adapter that prevented auto-tagging.
93
+
94
+ Changes:
95
+
96
+ * Use tag date instead of commit date in history.
97
+ * Fix typo in hg adapter's autotag method.
98
+ * Add history file option to autotag command.
99
+
100
+
101
+ == 1.8.0 / 2010-11-21
102
+
103
+ Under the hood, VCLog now has a Repo class that acts as a central controller. This has improved the code base substantially and should could to do so as this new design is further embraced. This release also introdces a new `autotag` feature, which makes it possible to "reverse engineer" a Release History file. It will parse the entries from a HISTORY.* file and ensure that corresponding tags exists in the version control system.
104
+
105
+ Changes:
106
+
107
+ * Add Repo class which acts as central control.
108
+ * Add autotag feature to ensure release history tags exits.
109
+
110
+
111
+ ## 1.7.0 / 2010-06-27
112
+
113
+ In this release the heuristics interface has changed such that the block is passed the commit message and the matchdata, instead of the previous matchdata splat. The rule can alos return either the sybolic label or a two element array of label and new message, which allows the rule to "massage" the message as needed. This release also improves the git log parser to be much more robust.
114
+
115
+ Changes:
116
+
117
+ * Pass message and matchadata to heuristics rule interface.
118
+ * Improve git log parser, which should handle all possible cases now.
119
+
120
+
121
+ ## 1.6.1 / 2010-06-23
122
+
123
+ This release repairs the Atom feed format and adds an RSS feed format. Both formats are nearly conformant with strict validations --only a couple minor issues remain to iron out (such as embedded feed url). Ragardless, they should work fine with feed readers (which are not as strict).
124
+
125
+ Changes:
126
+
127
+ * Repair and improve Atom feed format.
128
+ * Add RSS feed format.
129
+ * Fix Git email address value.
130
+ * Add title to HTML Change Log format.
131
+
132
+
133
+ ## 1.6.0 / 2010-06-22
134
+
135
+ Previous versions utilized a system of "commit tagging" to identify types of commits. This proved less than optimal --it was unconventional, but worse it was easy to forget to put the proper label in the message. The new version of VClog uses a customizable heuristics systems instead. Rather than be limited to a strict syntax structure, you can write matching rules in .config/vclog/rules.rb that determine the commit type, and set descriptive labels for each type. This makes it very easy to get excellent History output. Also in this release the command-line interface has changed to use subcommands. And the default output format is now an ANSI-color GNU-like format. Use `-f gnu` to get the old default format.
136
+
137
+ Changes:
138
+
139
+ * 2 Major Enhancements
140
+
141
+ * Heuristics system for categorizing commits
142
+ * Command-line interface uses subcommands
143
+
144
+
145
+ ## 1.5.0 / 2010-05-29
146
+
147
+ This release adds support for Mercurial repositories and Atom newsfeed output format. The commandline inteface has change such that <code>--foramt</code>/<code>-f</code> is used to select the format instead of using the previous per-format options, e.g. use <code>-f xml</code> instead of <code>--xml</code>. This release also includes some subtantial changes under-the-hood --the first of a two part code refactoring process.
148
+
149
+ Changes:
150
+
151
+ * 2 Major Enhancements
152
+
153
+ * Add Mercurial support
154
+ * Add Atom feed format
155
+
156
+ * 1 Minor Enhancement
157
+
158
+ * Select format using -f option.
159
+
160
+
161
+ ## 1.4.0 / 2010-05-26
162
+
163
+ This release includes some basic improvments and a few bug fixes. The primary change you might encounter is the need to use -e or --extra in order to see the detailed Changes list in the Release History. Also changed 'git-log' to 'git log', as it seems the latest versions of git does not support the many executables any longer. SVN support requires xmlsimple library. Note also that SVN support is lack luster at this time becuase it hits the server every time an 'svn log' command is issued which is done once for each tag when a history is generated (any one know a better way?).
164
+
165
+ Changes:
166
+
167
+ * 1 Minor Enhancement
168
+
169
+ * Use -e or --extra to see Changes list in release history.
170
+ * Use xmlsimple for parsing SVN log output.
171
+ * Improve git log parsing with --pretty option.
172
+
173
+ * 2 Bug Fixes
174
+
175
+ * Sort release tags in correct order.
176
+ * Change 'git-log' to 'git log'.
177
+
178
+
179
+ ## 1.3.0 / 2010-02-08
180
+
181
+ For the an end-user the only significant change is the support of 'label:' notation for commit labels. I have found that I am much more apt to use them if they come first in the commit message and that some developers already use the 'label:' notation to specify 'system module' effected --a useful system of labeling.
182
+
183
+ Changes:
184
+
185
+ * 1 Major Enhancement
186
+
187
+ * Support 'label:' fromat commit types
188
+
189
+ * 2 Implementation Enhancements
190
+
191
+ * Adjust location of plugins for latest version of Plugin gem.
192
+ * Use Erb as template system for all formats.
193
+
194
+ * 1 Bug Fix
195
+
196
+ * Corrected error for --current and --bump commands.
197
+
198
+
199
+ ## 1.2.0 / 2009-10-26
200
+
201
+ Version 1.2 overhuals the internals so that History output is based on scm tags, not on a pre-existing history file. This is really the proper way to go about it and those who use it will, I think, be happily surprised at how it promotes good practices for the maintenance of History files. This overhaul led to substantial changes in the command-line interface.
202
+
203
+ Changes:
204
+
205
+ * 2 Major Enhancements
206
+
207
+ * Rewrote History class.
208
+ * Changed command-line interface.
209
+
210
+
211
+ ## 1.1.0 / 2009-10-23
212
+
213
+ This release adds yaml and json formats an improves
214
+ the command.
215
+
216
+ Changes:
217
+
218
+ * 2 Major Enhancements
219
+
220
+ * Added YAML format.
221
+ * Added JSON format.
222
+
223
+ * 1 Minor Enhancements
224
+
225
+ * Use OptionParser instead of GetoptLong.
226
+
227
+
228
+ ## 1.0.0 / 2009-10-13
229
+
230
+ This is the first "production" release of VCLog.
231
+
232
+ Changes:
233
+
234
+ * 2 Major Enhancements
235
+
236
+ * Improved command line interface.
237
+ * Added output option to save changelog.
238
+
239
+
240
+ ## 0.1.0 / 2009-08-17
241
+
242
+ This is the initial version of vclog.
243
+
244
+ Changes:
245
+
246
+ * 1 Major Enhancement
247
+
248
+ * Happy Birthday
249
+
data/License.txt ADDED
@@ -0,0 +1,23 @@
1
+ BSD-2-Clause License
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions are met:
5
+
6
+ 1. Redistributions of source code must retain the above copyright notice,
7
+ this list of conditions and the following disclaimer.
8
+
9
+ 2. Redistributions in binary form must reproduce the above copyright
10
+ notice, this list of conditions and the following disclaimer in the
11
+ documentation and/or other materials provided with the distribution.
12
+
13
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
14
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
15
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
16
+ COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
17
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
20
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
21
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
22
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
+
data/README.md ADDED
@@ -0,0 +1,133 @@
1
+ # VCLog
2
+
3
+ [Website](http://rubyworks.github.com/vclog) /
4
+ [Report Issue](http://github.com/rubyworks/vclog/issues) /
5
+ [Source Code](http://github.com/rubyworks/vclog) &nbsp; &nbsp;
6
+ [![Build Status](https://secure.travis-ci.org/rubyworks/vclog.png)](http://travis-ci.org/rubyworks/vclog)
7
+
8
+ **VCLog is a versatile and customizable cross-VCS/SCM changelog and release history generator.**
9
+
10
+ ## Supported Systems
11
+
12
+ VCLog is a multi-platform VCS logging tool.
13
+ It currently supports the following Version Control Systems:
14
+
15
+ * <a href="http://git-scm.com/">Git</a>
16
+ * <a href="http://mercurial.selenic.com/">Mercurial</a>
17
+ * <a href="http://subversion.apache.org/">Subversion</a>
18
+
19
+ Subversion support is limited however. See Limitations noted below.
20
+
21
+
22
+ ## Instructions
23
+
24
+ ### Creating Changelogs
25
+
26
+ The default output is an ANSI colored GNU-like changelog.
27
+ From a repository's root directory try:
28
+
29
+ $ vclog
30
+
31
+ The is the same as specifying 'changelog' or 'log'.
32
+
33
+ $ vclog log
34
+
35
+ To generate an a different format use -f:
36
+
37
+ $ vclog -f xml
38
+
39
+ ### Creating Release Histories
40
+
41
+ To get a release history specify `-r`, `--release` or `--history` option.
42
+
43
+ $ vclog -r
44
+
45
+ Again the default format is an ANSI colored GNU-like text style.
46
+
47
+ Unlike change logs, release histories group changes by tags. The tag
48
+ message is used as the release note. If the underlying SCM doesn't
49
+ support tag messages than the message of the first commit prior to
50
+ the tag is used.
51
+
52
+ See 'vclog help' for more options.
53
+
54
+ ### Bumping Versions
55
+
56
+ VCLog can also be used to intelligently bump versions. To see the current
57
+ tag version:
58
+
59
+ $ vclog-version
60
+ 1.1.0
61
+
62
+ To see the next reasonable version based on current changes:
63
+
64
+ $ vclog-bump
65
+ 1.2.0
66
+
67
+ VCLog can determine the appropriate version based on commit level. Any
68
+ commit with a level greater than 1 will bump the major number, while any
69
+ commit with a level of 0 or 1 will bump the minor number. All lower
70
+ level only bump the patch level.
71
+
72
+ ### Writing Heuristics
73
+
74
+ VCLog can be configured to support custom log heuristics to suite the work flow
75
+ of any project. It is recommended that configurations be placed in a project's
76
+ `etc/vclog.rb` file. But `config/vclog.rb` and simply `.vclog` or `vclog.rb`
77
+ also work.
78
+
79
+ Within this file rules are defined via the #on method. For example,
80
+
81
+ on /updated? (README|VERSION|MANIFEST)/ do |commit|
82
+ commit.label = "Adminstrative Changes"
83
+ commit.level = -3
84
+ end
85
+
86
+ To make things easier we can setup commit types. Types make it easier
87
+ to categorize commits, assigning them labels and levels base on the
88
+ type name. Use #type in the rules to specify the level and label of
89
+ a commit type.
90
+
91
+ type :admin, -2, "Administrave Changes"
92
+
93
+ on /updated? (README|VERSION|MANIFEST)/ do |commit|
94
+ commit.type = :admin
95
+ end
96
+
97
+ These rules can also "massage" the commit message.
98
+
99
+ on /\Aadmin:/ do |commit, matchdata|
100
+ commit.type = :admin
101
+ commit.message = matchdata.post_match
102
+ end
103
+
104
+ Lastly, we can customize the colorization of the certain formats via #colors
105
+ method.
106
+
107
+ colors :blue, :cyan, :green, :yellow, :red
108
+
109
+ The colors are taken in order from least importance to greatest importance.
110
+
111
+
112
+ ## Limitations
113
+
114
+ ### Subversion
115
+
116
+ Because Subversion is a centralized version control system, it contacts
117
+ the server every time 'svn log' is run. For this reason, having vclog
118
+ generate a release history is likely to fail since it must run 'svn log'
119
+ for each tag. Any repository with more than a few tags may be denied
120
+ access by the server for making too many rapid requests. I have no
121
+ idea how to remedy this issue. If you have any ideas please let me know.
122
+
123
+
124
+ ## Copyrights
125
+
126
+ VCLog (http://rubyworks.github.com/vclog)
127
+
128
+ Copyright &copy; 2008 Rubyworks. All rights reserved.
129
+
130
+ VCLog is modifiable and redistributable in accordance with the terms of
131
+ the *BSD-2-Clause* license.
132
+
133
+ See License.txt for details.
data/bin/vclog ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'vclog/cli/log'
4
+
5
+ VCLog::CLI::Log.run(ARGV)
6
+
data/bin/vclog-autotag ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'vclog/cli/autotag'
4
+
5
+ VCLog::CLI::Autotag.run(ARGV)
6
+
data/bin/vclog-bump ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'vclog/cli/bump'
4
+
5
+ VCLog::CLI::Bump.run(ARGV)
6
+
data/bin/vclog-formats ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'vclog/cli/formats'
4
+
5
+ VCLog::CLI::Formats.run(ARGV)
6
+