vclog 1.8.2 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. data/.ruby +4 -3
  2. data/.yardopts +7 -0
  3. data/HISTORY.rdoc +207 -0
  4. data/README.rdoc +44 -27
  5. data/bin/vclog +4 -2
  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-version +6 -0
  10. data/lib/vclog.rb +1 -1
  11. data/lib/vclog.yml +58 -0
  12. data/lib/vclog/adapters.rb +2 -1
  13. data/lib/vclog/adapters/abstract.rb +87 -232
  14. data/lib/vclog/adapters/darcs.rb +72 -67
  15. data/lib/vclog/adapters/git.rb +166 -140
  16. data/lib/vclog/adapters/hg.rb +98 -62
  17. data/lib/vclog/adapters/svn.rb +116 -113
  18. data/lib/vclog/change.rb +110 -81
  19. data/lib/vclog/change_point.rb +77 -0
  20. data/lib/vclog/changelog.rb +58 -296
  21. data/lib/vclog/cli.rb +6 -70
  22. data/lib/vclog/cli/abstract.rb +64 -81
  23. data/lib/vclog/cli/autotag.rb +1 -3
  24. data/lib/vclog/cli/bump.rb +3 -4
  25. data/lib/vclog/cli/formats.rb +4 -4
  26. data/lib/vclog/cli/log.rb +86 -0
  27. data/lib/vclog/cli/version.rb +3 -3
  28. data/lib/vclog/{facets.rb → core_ext.rb} +0 -0
  29. data/lib/vclog/heuristics.rb +112 -38
  30. data/lib/vclog/heuristics/rule.rb +52 -12
  31. data/lib/vclog/heuristics/{label.rb → type.rb} +2 -2
  32. data/lib/vclog/history_file.rb +2 -2
  33. data/lib/vclog/metadata.rb +13 -1
  34. data/lib/vclog/release.rb +26 -12
  35. data/lib/vclog/repo.rb +191 -27
  36. data/lib/vclog/report.rb +187 -0
  37. data/lib/vclog/tag.rb +66 -39
  38. data/lib/vclog/templates/changelog.ansi.rb +9 -26
  39. data/lib/vclog/templates/changelog.atom.erb +3 -3
  40. data/lib/vclog/templates/changelog.gnu.rb +4 -11
  41. data/lib/vclog/templates/changelog.html.erb +11 -2
  42. data/lib/vclog/templates/changelog.markdown.rb +4 -4
  43. data/lib/vclog/templates/changelog.rdoc.rb +4 -4
  44. data/lib/vclog/templates/changelog.rss.erb +2 -6
  45. data/lib/vclog/templates/changelog.xml.erb +14 -2
  46. data/lib/vclog/templates/history.ansi.rb +10 -17
  47. data/lib/vclog/templates/history.atom.erb +4 -4
  48. data/lib/vclog/templates/history.gnu.rb +5 -7
  49. data/lib/vclog/templates/history.html.erb +11 -4
  50. data/lib/vclog/templates/history.json.rb +1 -1
  51. data/lib/vclog/templates/history.markdown.rb +5 -7
  52. data/lib/vclog/templates/history.rdoc.rb +5 -9
  53. data/lib/vclog/templates/history.rss.erb +3 -5
  54. data/lib/vclog/templates/history.xml.erb +15 -3
  55. data/lib/vclog/templates/history.yaml.rb +1 -1
  56. data/man/man1/vclog-autotag.1 +1 -1
  57. data/man/man1/vclog-autotag.1.html +1 -1
  58. data/man/man1/vclog-bump.1 +1 -1
  59. data/man/man1/vclog-bump.1.html +1 -1
  60. data/man/man1/vclog-version.1 +1 -1
  61. data/man/man1/vclog-version.1.html +1 -1
  62. data/man/man1/vclog.1 +25 -13
  63. data/man/man1/vclog.1.html +29 -20
  64. data/man/man1/vclog.1.ronn +31 -18
  65. data/test/unit/case_metadata.rb +1 -1
  66. metadata +48 -34
  67. data/lib/vclog/cli/changelog.rb +0 -33
  68. data/lib/vclog/cli/help.rb +0 -42
  69. data/lib/vclog/cli/history.rb +0 -39
  70. data/lib/vclog/formatter.rb +0 -123
  71. data/lib/vclog/history.rb +0 -131
  72. data/lib/vclog/kernel.rb +0 -12
  73. data/man/man1/vclog-changelog.1 +0 -47
  74. data/man/man1/vclog-changelog.1.html +0 -123
  75. data/man/man1/vclog-changelog.1.ronn +0 -39
  76. data/man/man1/vclog-history.1 +0 -44
  77. data/man/man1/vclog-history.1.html +0 -122
  78. data/man/man1/vclog-history.1.ronn +0 -38
data/.ruby CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  source:
3
- - profile
3
+ - var
4
4
  authors:
5
5
  - name: Trans
6
6
  email: transfire@gmail.com
@@ -16,6 +16,7 @@ requirements:
16
16
  - name: ansi
17
17
  version: 1.2+
18
18
  - name: confection
19
+ - name: rdoc
19
20
  - name: xml-simple
20
21
  - name: detroit
21
22
  groups:
@@ -50,8 +51,8 @@ revision: 0
50
51
  created: '2006-05-09'
51
52
  summary: Cross-VCS/SCM ChangeLog Generator
52
53
  title: VCLog
53
- version: 1.8.2
54
+ version: 1.9.0
54
55
  name: vclog
55
56
  description: VCLog is a cross-VCS/SCM ChangeLog generator.
56
57
  organization: Rubyworks
57
- date: '2011-11-07'
58
+ date: '2011-12-12'
@@ -0,0 +1,7 @@
1
+ --title VCLog
2
+ --protected
3
+ --private
4
+ lib/
5
+ -
6
+ [A-Z]*.*
7
+
@@ -0,0 +1,207 @@
1
+ = RELEASE HISTORY
2
+
3
+ == 1.9.0 / 2011-12-12
4
+
5
+ This is a BIG release and much has changed, so be sure to read the following
6
+ carefully if you've used VClog before.
7
+
8
+ First of all, the command line interface no longer uses the subcommand pattern.
9
+ Instead independent commands have been created for each use, e.g. `vclog-version`
10
+ instead of `vclog version`. In addition the plain `vclog` command now handles
11
+ both changelog and release history reports. To get a release history insead of
12
+ a changelog, use the `-r` option.
13
+
14
+ Next up, this release also adds in full commit message support via the `-d`/`--detail`
15
+ option, where as previously some formats were limited to one-line message summaries.
16
+ Also, the `-p`/`--point` option has been added which will split a commit message
17
+ into separate points (points are recognized by astrisks flush to the left margin).
18
+
19
+ Custom hueristics configuration blocks no longer receive the commit message,
20
+ but the commit object instead, which can be manipulated directly, rather then
21
+ return a limited set of possible changes. This allows for rules to be much more
22
+ flexible.
23
+
24
+ Since the last release wasn't widely publisized, I also want to mention again that
25
+ configuration is now handled by the `confection` gem, meaning custom heuristics
26
+ must be place in a projects `.confile` or `Confile`. See the latest README for more
27
+ details.
28
+
29
+ Changes:
30
+
31
+ * Separate commands and new cli interface.
32
+ * Support for full commit messages.
33
+ * Point option splits commit messages into point messages.
34
+ * Heuristic rules receive commit object instead of message.
35
+
36
+
37
+ == 1.8.2 / 2011-12-08
38
+
39
+ This release changes the way in which vclog is configured to use the Confection
40
+ gem. This means VCLog custom configuration for a project must go in a `vclog do`
41
+ block in the `Confile` or `.confile` project file. In addtion this release
42
+ brings the build config up to date and switches the project over to the
43
+ BSD-2-Clause license.
44
+
45
+ Changes:
46
+
47
+ * Use Confection gem for cusomt configs.
48
+ * Modernize build config for latest tools.
49
+ * Switch to BSD-2-Clause license.
50
+
51
+
52
+ == 1.8.1 / 2010-11-22
53
+
54
+ 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.
55
+
56
+ Changes:
57
+
58
+ * Use tag date instead of commit date in history.
59
+ * Fix typo in hg adapter's autotag method.
60
+ * Add history file option to autotag command.
61
+
62
+
63
+ == 1.8.0 / 2010-11-21
64
+
65
+ 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.
66
+
67
+ Changes:
68
+
69
+ * Add Repo class which acts as central control.
70
+ * Add autotag feature to ensure release history tags exits.
71
+
72
+
73
+ == 1.7.0 / 2010-06-27
74
+
75
+ 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.
76
+
77
+ Changes:
78
+
79
+ * Pass message and matchadata to heuristics rule interface.
80
+ * Improve git log parser, which should handle all possible cases now.
81
+
82
+
83
+ == 1.6.1 / 2010-06-23
84
+
85
+ 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).
86
+
87
+ Changes:
88
+
89
+ * Repair and improve Atom feed format.
90
+ * Add RSS feed format.
91
+ * Fix Git email address value.
92
+ * Add title to HTML Change Log format.
93
+
94
+
95
+ == 1.6.0 / 2010-06-22
96
+
97
+ 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.
98
+
99
+ Changes:
100
+
101
+ * 2 Major Enhancements
102
+
103
+ * Heuristics system for categorizing commits
104
+ * Command-line interface uses subcommands
105
+
106
+
107
+ == 1.5.0 / 2010-05-29
108
+
109
+ 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.
110
+
111
+ Changes:
112
+
113
+ * 2 Major Enhancements
114
+
115
+ * Add Mercurial support
116
+ * Add Atom feed format
117
+
118
+ * 1 Minor Enhancement
119
+
120
+ * Select format using -f option.
121
+
122
+
123
+ == 1.4.0 / 2010-05-26
124
+
125
+ 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?).
126
+
127
+ Changes:
128
+
129
+ * 1 Minor Enhancement
130
+
131
+ * Use -e or --extra to see Changes list in release history.
132
+ * Use xmlsimple for parsing SVN log output.
133
+ * Improve git log parsing with --pretty option.
134
+
135
+ * 2 Bug Fixes
136
+
137
+ * Sort release tags in correct order.
138
+ * Change 'git-log' to 'git log'.
139
+
140
+
141
+ == 1.3.0 / 2010-02-08
142
+
143
+ 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.
144
+
145
+ Changes:
146
+
147
+ * 1 Major Enhancement
148
+
149
+ * Support 'label:' fromat commit types
150
+
151
+ * 2 Implementation Enhancements
152
+
153
+ * Adjust location of plugins for latest version of Plugin gem.
154
+ * Use Erb as template system for all formats.
155
+
156
+ * 1 Bug Fix
157
+
158
+ * Corrected error for --current and --bump commands.
159
+
160
+
161
+ == 1.2.0 / 2009-10-26
162
+
163
+ 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.
164
+
165
+ Changes:
166
+
167
+ * 2 Major Enhancements
168
+
169
+ * Rewrote History class.
170
+ * Changed command-line interface.
171
+
172
+
173
+ == 1.1.0 / 2009-10-23
174
+
175
+ This release adds yaml and json formats an improves
176
+ the command.
177
+
178
+ Changes:
179
+
180
+ * 2 Major Enhancements
181
+
182
+ * Added YAML format.
183
+ * Added JSON format.
184
+
185
+ * 1 Minor Enhancements
186
+
187
+ * Use OptionParser instead of GetoptLong.
188
+
189
+
190
+ == 1.0.0 / 2009-10-13
191
+
192
+ This is the first "production" release of VCLog.
193
+
194
+ * 2 Major Enhancements
195
+
196
+ * Improved command line interface.
197
+ * Added output option to save changelog.
198
+
199
+
200
+ == 0.1.0 / 2009-08-17
201
+
202
+ This is the initial version of vclog.
203
+
204
+ * 1 Major Enhancement
205
+
206
+ * Happy Birthday
207
+
@@ -1,7 +1,8 @@
1
1
  = VCLog
2
2
 
3
- {Homepage}[http://rubyworks.github.com/vclog] |
3
+ {Website}[http://rubyworks.github.com/vclog] |
4
4
  {Source Code}[http://github.com/rubyworks/vclog] |
5
+ {Report Issue}[http://github.com/rubyworks/vclog/issues] |
5
6
  {Mailing List}[http://googlegroups.com/group/rubyworks-mailinglist]
6
7
 
7
8
  {<img src="http://travis-ci.org/rubyworks/vclog.png" />}[http://travis-ci.org/rubyworks/vclog]
@@ -32,15 +33,16 @@ To generate an a different format use -f:
32
33
 
33
34
  === Creating Release Histories
34
35
 
35
- To get a release history specify 'history' or 'release' as the subcommand.
36
+ To get a release history specify `-r`, `--release` or `--history` option.
36
37
 
37
- $ vclog history
38
+ $ vclog -r
38
39
 
39
40
  Again the default format is an ANSI colored GNU-like text style.
40
41
 
41
- Unlike Changelogs, Histories group changes by tags. The tag message is
42
- used as the release note. If the underlying SCM doesn't support
43
- tag messages that the last commit message before the tag is used.
42
+ Unlike change logs, release histories group changes by tags. The tag
43
+ message is used as the release note. If the underlying SCM doesn't
44
+ support tag messages than the message of the first commit prior to
45
+ the tag is used.
44
46
 
45
47
  See 'vclog help' for more options.
46
48
 
@@ -49,12 +51,12 @@ See 'vclog help' for more options.
49
51
  VCLog can also be used to intelligently bump versions. To see the current
50
52
  tag version:
51
53
 
52
- $ vclog version
54
+ $ vclog-version
53
55
  1.1.0
54
56
 
55
57
  To see the next reasonable version based on current changes:
56
58
 
57
- $ vclog bump
59
+ $ vclog-bump
58
60
  1.2.0
59
61
 
60
62
  VCLog can determine the appropriate version based on commit level. Any
@@ -64,30 +66,47 @@ level only bump the patch level.
64
66
 
65
67
  === Writing Heuristics
66
68
 
67
- You can create custom heuristics for your project in a vclog configuration
68
- file. VCLog will look for a `.vclog` file or a `vclog` file in `.config/`,
69
- `config/`, `task/` or tasks/` directory (the file can optionally end in `.rb`).
69
+ You can configure custom log heuristics for your project. VCLog uses
70
+ the {confection gem}[http://rubyworks.github.com/confection] to
71
+ handle configuration, and will look for a `.confile` or `Confile` in
72
+ which to find a `vclog` section.
70
73
 
71
- In the file you define rules in Ruby script for labeling commits based
72
- on the commit message.
73
-
74
- on /updated? (README|VERSION|MANIFEST)/ do
75
- :admin
74
+ vclog do
75
+ ...
76
76
  end
77
77
 
78
- These rules can also "massage" the commit message for output.
78
+ Within this block we can define rules via the #on method.
79
79
 
80
- on /^admin:/ do |matchdata|
81
- [:admin, matchdate.post_match]
82
- end
80
+ on /updated? (README|VERSION|MANIFEST)/ do |commit|
81
+ commit.label = "Adminstrative Changes"
82
+ commit.level = -3
83
+ end
84
+
85
+ To make things easier we can setup commit types. Types make it easier
86
+ to categorize commits, assigning them labels and levels base on the
87
+ type name. Use #type in the rules to specify the level and label of
88
+ a commit type.
89
+
90
+ type :admin, -2, "Administrave Changes"
91
+
92
+ on /updated? (README|VERSION|MANIFEST)/ do |commit|
93
+ commit.type = :admin
94
+ end
83
95
 
84
- Labels are used to categorize and assign levels to commits. Use #set in
85
- the rules.rb to specify the level and description of a commit label.
96
+ These rules can also "massage" the commit message.
86
97
 
87
- set :admin, -2, "Administrative Adjustment"
98
+ on /\Aadmin:/ do |commit, matchdata|
99
+ commit.type = :admin
100
+ commit.message = matchdate.post_match
101
+ end
88
102
 
103
+ Lastly, we can customize the colorization of the certain formats via #colors
104
+ method.
89
105
 
90
- == NOTE ABOUT SUBVERSION
106
+ colors :blue, :cyan, :green, :yellow, :red
107
+
108
+
109
+ == SUBVERSION ISSUES
91
110
 
92
111
  Because Subversion is a centralized version control system, it contacts
93
112
  the server every time 'svn log' is run. For this reason, having vclog
@@ -106,8 +125,6 @@ Please see HISTORY file.
106
125
 
107
126
  Copyright (c) 2008 Rubyworks
108
127
 
109
- VCLog is distributable in accordance with the terms of the BSD-2-Clause license.
128
+ VCLog is distributable in accordance with the terms of the *FreeBSD* license.
110
129
 
111
130
  See COPYING.rdoc for details.
112
-
113
-
data/bin/vclog CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
- require 'vclog/cli'
3
- VCLog.cli(*ARGV)
2
+
3
+ require 'vclog/cli/log'
4
+
5
+ VCLog::CLI::Log.run(ARGV)
4
6
 
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'vclog/cli/autotag'
4
+
5
+ VCLog::CLI::Autotag.run(ARGV)
6
+
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'vclog/cli/bump'
4
+
5
+ VCLog::CLI::Bump.run(ARGV)
6
+
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'vclog/cli/formats'
4
+
5
+ VCLog::CLI::Formats.run(ARGV)
6
+
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'vclog/cli/version'
4
+
5
+ VCLog::CLI::Version.run(ARGV)
6
+
@@ -1,6 +1,6 @@
1
1
  module VCLog
2
2
  require 'vclog/metadata'
3
3
  require 'vclog/repo'
4
+ #require 'vclog/cli'
4
5
  end
5
6
 
6
- # VCLog Copyright (c) 2008 Thomas Sawyer
@@ -0,0 +1,58 @@
1
+ ---
2
+ source:
3
+ - var
4
+ authors:
5
+ - name: Trans
6
+ email: transfire@gmail.com
7
+ copyrights:
8
+ - holder: Rubyworks
9
+ year: '2009'
10
+ license: BSD-2-Clause
11
+ replacements: []
12
+ alternatives: []
13
+ requirements:
14
+ - name: facets
15
+ version: 2.4+
16
+ - name: ansi
17
+ version: 1.2+
18
+ - name: confection
19
+ - name: rdoc
20
+ - name: xml-simple
21
+ - name: detroit
22
+ groups:
23
+ - build
24
+ development: true
25
+ - name: citron
26
+ groups:
27
+ - test
28
+ development: true
29
+ - name: ae
30
+ groups:
31
+ - test
32
+ development: true
33
+ - name: cucumber
34
+ groups:
35
+ - test
36
+ development: true
37
+ - name: aruba
38
+ groups:
39
+ - test
40
+ development: true
41
+ dependencies: []
42
+ conflicts: []
43
+ repositories: []
44
+ resources:
45
+ home: http://rubyworks.github.com/vclog
46
+ code: http://github.com/rubyworks/vclog
47
+ extra: {}
48
+ load_path:
49
+ - lib
50
+ revision: 0
51
+ created: '2006-05-09'
52
+ summary: Cross-VCS/SCM ChangeLog Generator
53
+ title: VCLog
54
+ version: 1.9.0
55
+ name: vclog
56
+ description: VCLog is a cross-VCS/SCM ChangeLog generator.
57
+ organization: Rubyworks
58
+ date: '2011-12-12'