vclog 1.6.0 → 1.6.1
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.
- data/HISTORY.rdoc +12 -0
- data/README.rdoc +1 -1
- data/REQUIRE +2 -2
- data/VERSION +2 -2
- data/lib/plugins/syckle/vclog.rb +26 -8
- data/lib/vclog/adapters/git.rb +1 -1
- data/lib/vclog/cli.rb +2 -2
- data/lib/vclog/formatter.rb +3 -2
- data/lib/vclog/templates/changelog.atom.erb +36 -10
- data/lib/vclog/templates/changelog.html.erb +1 -0
- data/lib/vclog/templates/changelog.rss.erb +58 -0
- data/lib/vclog/templates/history.atom.erb +67 -29
- data/lib/vclog/templates/history.rss.erb +86 -0
- metadata +11 -8
data/HISTORY.rdoc
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
= RELEASE HISTORY
|
2
2
|
|
3
|
+
== 1.6.1 / 2010-06-23
|
4
|
+
|
5
|
+
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).
|
6
|
+
|
7
|
+
Changes:
|
8
|
+
|
9
|
+
* Repair and improve Atom feed format.
|
10
|
+
* Add RSS feed format.
|
11
|
+
* Fix Git email address value.
|
12
|
+
* Add title to HTML Change Log format.
|
13
|
+
|
14
|
+
|
3
15
|
== 1.6.0 / 2010-06-22
|
4
16
|
|
5
17
|
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.
|
data/README.rdoc
CHANGED
data/REQUIRE
CHANGED
data/VERSION
CHANGED
data/lib/plugins/syckle/vclog.rb
CHANGED
@@ -24,11 +24,10 @@ module Syckle::Plugins
|
|
24
24
|
# Supports +html+, +xml+, +json+, +yaml+, +rdoc+, +markdown+, and +gnu+.
|
25
25
|
attr_accessor :formats
|
26
26
|
|
27
|
-
# Changelog layout type (+
|
27
|
+
# Changelog layout type (+changelog+ or +history+). Default is +changelog+.
|
28
28
|
attr_accessor :type
|
29
29
|
|
30
|
-
# Output
|
31
|
-
# The defualt is 'log/vclog/changelog.{format}'.
|
30
|
+
# Output directory store results.
|
32
31
|
attr_accessor :output
|
33
32
|
|
34
33
|
# Show revision numbers (true/false)?
|
@@ -40,9 +39,12 @@ module Syckle::Plugins
|
|
40
39
|
# Some formats can reference an optional stylesheet (namely +xml+ and +html+).
|
41
40
|
attr_accessor :style
|
42
41
|
|
43
|
-
#
|
42
|
+
# Minimum change level to include.
|
44
43
|
attr_accessor :level
|
45
44
|
|
45
|
+
# Reduced detail
|
46
|
+
attr_accessor :summary
|
47
|
+
|
46
48
|
#
|
47
49
|
def initialize_defaults
|
48
50
|
require 'vclog'
|
@@ -52,11 +54,12 @@ module Syckle::Plugins
|
|
52
54
|
@formats = ['atom']
|
53
55
|
@type = 'log'
|
54
56
|
@level = 0
|
57
|
+
@summary = false
|
55
58
|
end
|
56
59
|
|
57
60
|
#
|
58
61
|
def valid?
|
59
|
-
return false unless format =~ /^(html|yaml|json|xml|rdoc|markdown|gnu|txt|atom|ansi)$/
|
62
|
+
return false unless format =~ /^(html|yaml|json|xml|rdoc|markdown|gnu|txt|atom|rss|ansi)$/
|
60
63
|
return false unless type =~ /^(log|rel|history|changelog)$/
|
61
64
|
return true
|
62
65
|
end
|
@@ -82,9 +85,11 @@ module Syckle::Plugins
|
|
82
85
|
formats.each do |format|
|
83
86
|
case type
|
84
87
|
when 'rel', 'history'
|
85
|
-
|
88
|
+
ext = format_extension(format)
|
89
|
+
file = File.join(output || project.log, "vclog/history#{ext}")
|
86
90
|
else
|
87
|
-
|
91
|
+
ext = format_extension(format)
|
92
|
+
file = File.join(output || project.log, "vclog/changelog#{ext}")
|
88
93
|
end
|
89
94
|
#apply_naming_policy('changelog', log_format.downcase)
|
90
95
|
if dryrun?
|
@@ -155,13 +160,26 @@ module Syckle::Plugins
|
|
155
160
|
:stylesheet => style,
|
156
161
|
:revision => rev,
|
157
162
|
:version => version,
|
158
|
-
:title => title
|
163
|
+
:title => title,
|
164
|
+
:extra => !summary
|
159
165
|
}
|
160
166
|
|
161
167
|
vcs.display(doctype, format, options)
|
162
168
|
end
|
163
169
|
|
164
170
|
|
171
|
+
#
|
172
|
+
def format_extension(format)
|
173
|
+
#case format.to_s
|
174
|
+
#when 'rss'
|
175
|
+
# '-rss.xml'
|
176
|
+
#when 'atom'
|
177
|
+
# '-atom.xml'
|
178
|
+
#else
|
179
|
+
".#{format}"
|
180
|
+
#end
|
181
|
+
end
|
182
|
+
|
165
183
|
=begin
|
166
184
|
#
|
167
185
|
def document_public_changelog
|
data/lib/vclog/adapters/git.rb
CHANGED
data/lib/vclog/cli.rb
CHANGED
@@ -20,11 +20,11 @@ module VCLog
|
|
20
20
|
#
|
21
21
|
# For XML format:
|
22
22
|
#
|
23
|
-
# $ vclog
|
23
|
+
# $ vclog -f xml
|
24
24
|
#
|
25
25
|
# Or for a micorformat-ish HTML:
|
26
26
|
#
|
27
|
-
# $ vclog
|
27
|
+
# $ vclog -f html
|
28
28
|
#
|
29
29
|
# To use the library programmatically, please see the API documentation.
|
30
30
|
|
data/lib/vclog/formatter.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'ostruct'
|
2
|
+
#require 'ansi'
|
2
3
|
|
3
4
|
module VCLog
|
4
5
|
|
@@ -35,7 +36,7 @@ module VCLog
|
|
35
36
|
|
36
37
|
#
|
37
38
|
def email
|
38
|
-
@options.email || @vcs.
|
39
|
+
@options.email || @vcs.email
|
39
40
|
end
|
40
41
|
|
41
42
|
#
|
@@ -45,7 +46,7 @@ module VCLog
|
|
45
46
|
|
46
47
|
# TODO
|
47
48
|
def url
|
48
|
-
@options.url ||
|
49
|
+
@options.url || @vcs.repository
|
49
50
|
end
|
50
51
|
|
51
52
|
# TODO
|
@@ -1,26 +1,52 @@
|
|
1
|
-
<?xml version="1.0"
|
1
|
+
<?xml version="1.0"?>
|
2
2
|
|
3
3
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
4
4
|
|
5
|
-
<title><%= title
|
6
|
-
|
5
|
+
<title><%= title %></title>
|
6
|
+
|
7
|
+
<% if url %><link href="<%= url %>" /><% end %>
|
8
|
+
|
7
9
|
<% if homepage %><link href="<%= homepage %>" /><% end %>
|
10
|
+
|
8
11
|
<id><% if vcs.uuid %>urn:uuid:<%= vcs.uuid %><% else %><%= vcs.repository %><% end %></id>
|
9
|
-
|
12
|
+
|
13
|
+
<updated><%= Time.now.xmlschema %></updated>
|
14
|
+
|
10
15
|
<author>
|
16
|
+
|
11
17
|
<name><%= user %></name>
|
18
|
+
|
12
19
|
<email><%= email %></email>
|
20
|
+
|
13
21
|
</author>
|
14
22
|
|
15
|
-
|
23
|
+
<% changelog.changes.sort{|a,b| b.date <=> a.date}.each do |entry| %>
|
24
|
+
|
16
25
|
<entry>
|
17
|
-
|
18
|
-
<
|
26
|
+
|
27
|
+
<title><%= h entry.message.lines.first.rstrip %></title>
|
28
|
+
|
29
|
+
<id><%= url %>#<%= entry.revision %></id>
|
30
|
+
|
19
31
|
<author><%= entry.author %></author>
|
20
|
-
|
21
|
-
<
|
32
|
+
|
33
|
+
<updated><%= entry.date.xmlschema %></updated>
|
34
|
+
|
35
|
+
<content type="xhtml">
|
36
|
+
|
37
|
+
<div xmlns="http://www.w3.org/1999/xhtml">
|
38
|
+
|
39
|
+
<%= entry.message %><br/>
|
40
|
+
|
41
|
+
<%= entry.author %> <%= entry.date.strftime('%Y-%m-%d %H:%M:%S') %>
|
42
|
+
|
43
|
+
</div>
|
44
|
+
|
45
|
+
</content>
|
46
|
+
|
22
47
|
</entry>
|
23
|
-
|
48
|
+
|
49
|
+
<% end %>
|
24
50
|
|
25
51
|
</feed>
|
26
52
|
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
|
3
|
+
<rss version="2.0">
|
4
|
+
|
5
|
+
<channel>
|
6
|
+
|
7
|
+
<title><%= h title %></title>
|
8
|
+
|
9
|
+
<% if url %><link><%= url %></link><% end %>
|
10
|
+
|
11
|
+
<% if homepage %><link><%= homepage %></link><% end %>
|
12
|
+
|
13
|
+
<description>Release History</description>
|
14
|
+
|
15
|
+
<language>en-us</language>
|
16
|
+
|
17
|
+
<pubDate><%= Time.now.rfc822 %></pubDate>
|
18
|
+
|
19
|
+
<lastBuildDate><%= Time.now.rfc822 %></lastBuildDate>
|
20
|
+
|
21
|
+
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
|
22
|
+
|
23
|
+
<generator>VCLog</generator>
|
24
|
+
|
25
|
+
<managingEditor><%= email %> (<%= user %>)</managingEditor>
|
26
|
+
|
27
|
+
<webMaster><%= email %> (<%= user %></webMaster>
|
28
|
+
|
29
|
+
<% changelog.changes.sort{|a,b| b.date <=> a.date}.each do |entry| %>
|
30
|
+
|
31
|
+
<item>
|
32
|
+
|
33
|
+
<title><%= h entry.message.lines.first.rstrip %></title>
|
34
|
+
|
35
|
+
<author><%= entry.author %></author>
|
36
|
+
|
37
|
+
<link></link>
|
38
|
+
|
39
|
+
<pubDate><%= entry.date.rfc822 %></pubDate>
|
40
|
+
|
41
|
+
<guid><%= url %>#<%= entry.revision %></guid>
|
42
|
+
|
43
|
+
<description><![CDATA[
|
44
|
+
|
45
|
+
<%= entry.message %><br/>
|
46
|
+
|
47
|
+
<%= entry.author %> <%= entry.date.strftime('%Y-%m-%d %H:%M:%S') %>
|
48
|
+
|
49
|
+
]]></description>
|
50
|
+
|
51
|
+
</item>
|
52
|
+
|
53
|
+
<% end %>
|
54
|
+
|
55
|
+
</channel>
|
56
|
+
|
57
|
+
</rss>
|
58
|
+
|
@@ -1,46 +1,84 @@
|
|
1
|
-
<?xml version="1.0"
|
1
|
+
<?xml version="1.0"?>
|
2
2
|
|
3
3
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
4
4
|
|
5
5
|
<title><%= title %> Feed</title>
|
6
|
+
|
6
7
|
<subtitle>Release History</subtitle>
|
7
|
-
|
8
|
+
|
9
|
+
<% if url %><link href="<%= url %>" /><% end %>
|
10
|
+
|
8
11
|
<% if homepage %><link href="<%= homepage %>" /><% end %>
|
12
|
+
|
9
13
|
<id><% if vcs.uuid %>urn:uuid:<%= vcs.uuid %><% else %><%= vcs.repository %><% end %></id>
|
10
|
-
|
14
|
+
|
15
|
+
<updated><%= Time.now.xmlschema %></updated>
|
16
|
+
|
11
17
|
<author>
|
18
|
+
|
12
19
|
<name><%= user %></name>
|
20
|
+
|
13
21
|
<email><%= email %></email>
|
22
|
+
|
14
23
|
</author>
|
15
24
|
|
16
|
-
|
17
|
-
|
25
|
+
<% history.releases.sort.each do |release| %>
|
26
|
+
|
27
|
+
<% tag = release.tag %>
|
28
|
+
|
18
29
|
<entry>
|
19
|
-
|
20
|
-
<
|
21
|
-
|
22
|
-
<
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
30
|
+
|
31
|
+
<title><%= h tag.name %></title>
|
32
|
+
|
33
|
+
<id><%= url %>#<%= tag.revision %></id>
|
34
|
+
|
35
|
+
<author><name><%= h tag.author %><name></author>
|
36
|
+
|
37
|
+
<updated><%= tag.date.xmlschema %></updated>
|
38
|
+
|
39
|
+
<summary><%= h tag.message %></summary>
|
40
|
+
|
41
|
+
<content type="xhtml">
|
42
|
+
|
43
|
+
<div xmlns="http://www.w3.org/1999/xhtml">
|
44
|
+
|
45
|
+
<p><%= tag.message %></p>
|
46
|
+
|
47
|
+
<% if options.extra %>
|
48
|
+
|
49
|
+
<% release.groups.each do |number, changes| %>
|
50
|
+
|
51
|
+
<h2><%= changes.size %> <%= changes[0].label %></h2>
|
52
|
+
|
53
|
+
<ul class="log">
|
54
|
+
|
55
|
+
<% changes.sort{|a,b| b.date <=> a.date}.each do |entry| %>
|
56
|
+
|
57
|
+
<li class="entry">
|
58
|
+
|
59
|
+
<%= entry.message.rstrip %><br/>
|
60
|
+
|
61
|
+
<%= entry.author %> <%= entry.date.strftime('%Y-%m-%d %H:%M:%S') %>
|
62
|
+
|
63
|
+
<% if options.revision %>(#<%= entry.revision %>)<% end %>
|
64
|
+
|
65
|
+
</li>
|
66
|
+
|
67
|
+
<% end %>
|
68
|
+
|
69
|
+
</ul>
|
70
|
+
|
71
|
+
<% end %>
|
72
|
+
|
73
|
+
<% end %>
|
74
|
+
|
75
|
+
</div>
|
76
|
+
|
77
|
+
</content>
|
78
|
+
|
42
79
|
</entry>
|
43
|
-
|
80
|
+
|
81
|
+
<% end %>
|
44
82
|
|
45
83
|
</feed>
|
46
84
|
|
@@ -0,0 +1,86 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
|
3
|
+
<rss version="2.0">
|
4
|
+
|
5
|
+
<channel>
|
6
|
+
|
7
|
+
<title><%= title %></title>
|
8
|
+
|
9
|
+
<% if url %><link><%= url %></link><% end %>
|
10
|
+
|
11
|
+
<% if homepage %><link><%= homepage %></link><% end %>
|
12
|
+
|
13
|
+
<description>Release History</description>
|
14
|
+
|
15
|
+
<language>en-us</language>
|
16
|
+
|
17
|
+
<pubDate><%= Time.now.rfc822 %></pubDate>
|
18
|
+
|
19
|
+
<lastBuildDate><%= Time.now.rfc822 %></lastBuildDate>
|
20
|
+
|
21
|
+
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
|
22
|
+
|
23
|
+
<generator>VCLog</generator>
|
24
|
+
|
25
|
+
<managingEditor><%= email %> (<%= user %>)</managingEditor>
|
26
|
+
|
27
|
+
<webMaster><%= email %> (<%= user %>)</webMaster>
|
28
|
+
|
29
|
+
<% history.releases.sort.each do |release| %>
|
30
|
+
|
31
|
+
<% tag = release.tag %>
|
32
|
+
|
33
|
+
<item>
|
34
|
+
|
35
|
+
<title><%= tag.name %></title>
|
36
|
+
|
37
|
+
<author><%= tag.author %></author>
|
38
|
+
|
39
|
+
<link><%= url %>#<%= tag.revision %></link>
|
40
|
+
|
41
|
+
<pubDate><%= tag.date.rfc822 %></pubDate>
|
42
|
+
|
43
|
+
<guid isPermaLink="false"><%= url %>#<%= tag.revision %></guid>
|
44
|
+
|
45
|
+
<description><![CDATA[
|
46
|
+
|
47
|
+
<p><%= tag.message %></p>
|
48
|
+
|
49
|
+
<% if options.extra %>
|
50
|
+
|
51
|
+
<% release.groups.each do |number, changes| %>
|
52
|
+
|
53
|
+
<h2><%= changes.size %> <%= changes[0].label %></h2>
|
54
|
+
|
55
|
+
<ul class="log">
|
56
|
+
|
57
|
+
<% changes.sort{|a,b| b.date <=> a.date}.each do |entry| %>
|
58
|
+
|
59
|
+
<li class="entry">
|
60
|
+
|
61
|
+
<%= entry.message.rstrip %><br/>
|
62
|
+
|
63
|
+
<%= entry.author %> <%= entry.date.strftime('%Y-%m-%d %H:%M:%S') %>
|
64
|
+
|
65
|
+
<% if options.revision %>(#<%= h entry.revision %>)<% end %>
|
66
|
+
|
67
|
+
</li>
|
68
|
+
|
69
|
+
<% end %>
|
70
|
+
|
71
|
+
</ul>
|
72
|
+
|
73
|
+
<% end %>
|
74
|
+
|
75
|
+
<% end %>
|
76
|
+
|
77
|
+
]]></description>
|
78
|
+
|
79
|
+
</item>
|
80
|
+
|
81
|
+
<% end %>
|
82
|
+
|
83
|
+
</channel>
|
84
|
+
|
85
|
+
</rss>
|
86
|
+
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vclog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 1.6.
|
9
|
+
- 1
|
10
|
+
version: 1.6.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Thomas Sawyer
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-06-
|
18
|
+
date: 2010-06-23 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- - "
|
27
|
+
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
hash: 11
|
30
30
|
segments:
|
@@ -41,10 +41,11 @@ dependencies:
|
|
41
41
|
requirements:
|
42
42
|
- - ">="
|
43
43
|
- !ruby/object:Gem::Version
|
44
|
-
hash:
|
44
|
+
hash: 11
|
45
45
|
segments:
|
46
|
-
-
|
47
|
-
|
46
|
+
- 1
|
47
|
+
- 2
|
48
|
+
version: "1.2"
|
48
49
|
type: :runtime
|
49
50
|
version_requirements: *id002
|
50
51
|
- !ruby/object:Gem::Dependency
|
@@ -133,6 +134,7 @@ files:
|
|
133
134
|
- lib/vclog/templates/changelog.json.rb
|
134
135
|
- lib/vclog/templates/changelog.markdown.rb
|
135
136
|
- lib/vclog/templates/changelog.rdoc.rb
|
137
|
+
- lib/vclog/templates/changelog.rss.erb
|
136
138
|
- lib/vclog/templates/changelog.xml.erb
|
137
139
|
- lib/vclog/templates/changelog.xsl
|
138
140
|
- lib/vclog/templates/changelog.yaml.rb
|
@@ -143,6 +145,7 @@ files:
|
|
143
145
|
- lib/vclog/templates/history.json.rb
|
144
146
|
- lib/vclog/templates/history.markdown.rb
|
145
147
|
- lib/vclog/templates/history.rdoc.rb
|
148
|
+
- lib/vclog/templates/history.rss.erb
|
146
149
|
- lib/vclog/templates/history.xml.erb
|
147
150
|
- lib/vclog/templates/history.yaml.rb
|
148
151
|
- lib/vclog.rb
|