vclog 1.6.0 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -7,7 +7,7 @@
7
7
  == DESCRIPTION
8
8
 
9
9
  VCLog is a versitle cross-VCS/SCM changelog generator.
10
- It currently supports Git and Subversion.
10
+ It currently supports Git, Hg and (limited) Subversion.
11
11
 
12
12
 
13
13
  == SYNOPSIS
data/REQUIRE CHANGED
@@ -1,6 +1,6 @@
1
1
  runtime:
2
- - facets >2.4
3
- - ansi
2
+ - facets 2.4+
3
+ - ansi 1.2+
4
4
 
5
5
  development:
6
6
  - syckle
data/VERSION CHANGED
@@ -1,5 +1,5 @@
1
1
  name : vclog
2
2
  major: 1
3
3
  minor: 6
4
- patch: 0
5
- date : 2010-06-22
4
+ patch: 1
5
+ date : 2010-06-23
@@ -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 (+log+ or +rel+). Default is +log+.
27
+ # Changelog layout type (+changelog+ or +history+). Default is +changelog+.
28
28
  attr_accessor :type
29
29
 
30
- # Output file to store changelog.
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
- # Minimu change level to include.
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
- file = output || (project.log + "vclog/history.#{format}").to_s
88
+ ext = format_extension(format)
89
+ file = File.join(output || project.log, "vclog/history#{ext}")
86
90
  else
87
- file = output || (project.log + "vclog/changelog.#{format}").to_s
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
@@ -63,7 +63,7 @@ module Adapters
63
63
 
64
64
  #
65
65
  def user
66
- @email ||= `git config user.name`.strip
66
+ @user ||= `git config user.name`.strip
67
67
  end
68
68
 
69
69
  #
data/lib/vclog/cli.rb CHANGED
@@ -20,11 +20,11 @@ module VCLog
20
20
  #
21
21
  # For XML format:
22
22
  #
23
- # $ vclog --xml
23
+ # $ vclog -f xml
24
24
  #
25
25
  # Or for a micorformat-ish HTML:
26
26
  #
27
- # $ vclog --html
27
+ # $ vclog -f html
28
28
  #
29
29
  # To use the library programmatically, please see the API documentation.
30
30
 
@@ -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.user
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" encoding="utf-8"?>
1
+ <?xml version="1.0"?>
2
2
 
3
3
  <feed xmlns="http://www.w3.org/2005/Atom">
4
4
 
5
- <title><%= title %> Feed</title>
6
- <% if url %><link href="<%= url %>" rel="self" /><% end %>
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
- <updated><%= Time.now %></updated>
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
- <% changelog.changes.sort{|a,b| b.date <=> a.date}.each do |entry| %>
23
+ <% changelog.changes.sort{|a,b| b.date <=> a.date}.each do |entry| %>
24
+
16
25
  <entry>
17
- <title><%= h entry.message.lines.first %></title>
18
- <id><%= entry.revision %></id>
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
- <updated><%= entry.date %></updated>
21
- <summary type="html"><%= h entry.message %></summary>
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
- <% end %>
48
+
49
+ <% end %>
24
50
 
25
51
  </feed>
26
52
 
@@ -18,6 +18,7 @@
18
18
  <% end %>
19
19
  </head>
20
20
  <body>
21
+ <h1><%= title %></h1>
21
22
  <div class="changelog">
22
23
  <% changelog.changes.sort{|a,b| b.date <=> a.date}.each do |entry| %>
23
24
  <div class="commit">
@@ -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" encoding="utf-8"?>
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
- <% if url %><link href="<%= url %>" rel="self" /><% end %>
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
- <updated><%= Time.now %></updated>
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
- <% history.releases.sort.each do |release| %>
17
- <% tag = release.tag %>
25
+ <% history.releases.sort.each do |release| %>
26
+
27
+ <% tag = release.tag %>
28
+
18
29
  <entry>
19
- <title><%= tag.name %></title>
20
- <id><%= tag.revision %></id>
21
- <author><%= tag.author %></author>
22
- <updated><%= tag.date.strftime('%Y-%m-%d') %></updated>
23
- <summary type="html">
24
- <p><%= tag.message %></p>
25
- <% if options.extra %>
26
- <% release.groups.each do |number, changes| %>
27
- <h2><%= changes.size %> <%= changes[0].label %></h2>
28
- <ul class="log">
29
- <% changes.sort{|a,b| b.date <=> a.date}.each do |entry| %>
30
- <li class="entry">
31
- <div class="message"><%= h entry.message %></div>
32
- <!-- <div class="type"><%= h entry.type %></div> -->
33
- <div class="revision">#<%= h entry.revision %></div>
34
- <div class="date"><%= entry.date %></div>
35
- <div class="author"><%= h entry.author %></div>
36
- </li>
37
- <% end %>
38
- </ul>
39
- <% end %>
40
- <% end %>
41
- </summary>
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
- <% end %>
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: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 6
9
- - 0
10
- version: 1.6.0
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-21 00:00:00 -04:00
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: 3
44
+ hash: 11
45
45
  segments:
46
- - 0
47
- version: "0"
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