rubycut-vclog 1.9.4
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/.yardopts +7 -0
- data/History.md +249 -0
- data/License.txt +23 -0
- data/README.md +133 -0
- data/bin/vclog +6 -0
- data/bin/vclog-autotag +6 -0
- data/bin/vclog-bump +6 -0
- data/bin/vclog-formats +6 -0
- data/bin/vclog-news +6 -0
- data/bin/vclog-version +6 -0
- data/lib/vclog.rb +6 -0
- data/lib/vclog.yml +68 -0
- data/lib/vclog/adapters.rb +12 -0
- data/lib/vclog/adapters/abstract.rb +131 -0
- data/lib/vclog/adapters/darcs.rb +93 -0
- data/lib/vclog/adapters/git.rb +190 -0
- data/lib/vclog/adapters/hg.rb +129 -0
- data/lib/vclog/adapters/svn.rb +155 -0
- data/lib/vclog/change.rb +207 -0
- data/lib/vclog/change_point.rb +77 -0
- data/lib/vclog/changelog.rb +233 -0
- data/lib/vclog/cli.rb +8 -0
- data/lib/vclog/cli/abstract.rb +92 -0
- data/lib/vclog/cli/autotag.rb +36 -0
- data/lib/vclog/cli/bump.rb +29 -0
- data/lib/vclog/cli/formats.rb +28 -0
- data/lib/vclog/cli/log.rb +86 -0
- data/lib/vclog/cli/news.rb +29 -0
- data/lib/vclog/cli/version.rb +30 -0
- data/lib/vclog/config.rb +143 -0
- data/lib/vclog/core_ext.rb +11 -0
- data/lib/vclog/heuristics.rb +192 -0
- data/lib/vclog/heuristics/rule.rb +73 -0
- data/lib/vclog/heuristics/type.rb +29 -0
- data/lib/vclog/history_file.rb +69 -0
- data/lib/vclog/metadata.rb +16 -0
- data/lib/vclog/rc.rb +9 -0
- data/lib/vclog/release.rb +67 -0
- data/lib/vclog/repo.rb +298 -0
- data/lib/vclog/report.rb +200 -0
- data/lib/vclog/tag.rb +151 -0
- data/lib/vclog/templates/changelog.ansi.rb +35 -0
- data/lib/vclog/templates/changelog.atom.erb +52 -0
- data/lib/vclog/templates/changelog.gnu.rb +24 -0
- data/lib/vclog/templates/changelog.html.erb +49 -0
- data/lib/vclog/templates/changelog.json.rb +1 -0
- data/lib/vclog/templates/changelog.markdown.rb +30 -0
- data/lib/vclog/templates/changelog.rdoc.rb +30 -0
- data/lib/vclog/templates/changelog.rss.erb +54 -0
- data/lib/vclog/templates/changelog.xml.erb +28 -0
- data/lib/vclog/templates/changelog.xsl +34 -0
- data/lib/vclog/templates/changelog.yaml.rb +1 -0
- data/lib/vclog/templates/history.ansi.rb +57 -0
- data/lib/vclog/templates/history.atom.erb +84 -0
- data/lib/vclog/templates/history.gnu.rb +39 -0
- data/lib/vclog/templates/history.html.erb +60 -0
- data/lib/vclog/templates/history.json.rb +1 -0
- data/lib/vclog/templates/history.markdown.rb +38 -0
- data/lib/vclog/templates/history.rdoc.rb +36 -0
- data/lib/vclog/templates/history.rss.erb +84 -0
- data/lib/vclog/templates/history.xml.erb +43 -0
- data/lib/vclog/templates/history.yaml.rb +1 -0
- data/man/man1/index.txt +9 -0
- data/man/man1/vclog-autotag.1.ronn +29 -0
- data/man/man1/vclog-bump.1.ronn +21 -0
- data/man/man1/vclog-news.1.ronn +25 -0
- data/man/man1/vclog-version.1.ronn +14 -0
- data/man/man1/vclog.1.ronn +49 -0
- data/spec/feature_git_changes.rb +58 -0
- data/spec/feature_git_history.rb +58 -0
- data/spec/feature_hg_changes.rb +58 -0
- data/spec/feature_hg_history.rb +58 -0
- data/spec/featurettes/repo_creation.rb +64 -0
- data/spec/featurettes/shellout.rb +16 -0
- data/test/case_metadata.rb +10 -0
- metadata +265 -0
@@ -0,0 +1 @@
|
|
1
|
+
releases.map{ |r| r.to_h }.to_json
|
@@ -0,0 +1,38 @@
|
|
1
|
+
out = []
|
2
|
+
|
3
|
+
out << "# #{title || 'RELEASE HISTORY'}"
|
4
|
+
|
5
|
+
releases.sort.each do |release|
|
6
|
+
|
7
|
+
tag = release.tag
|
8
|
+
|
9
|
+
out << "\n## #{tag.name} / #{tag.date.strftime('%Y-%m-%d')}"
|
10
|
+
|
11
|
+
out << "\n#{tag.message.strip} (#{tag.author})"
|
12
|
+
|
13
|
+
if !(options.summary or release.changes.empty?)
|
14
|
+
|
15
|
+
out << "\nChanges:"
|
16
|
+
|
17
|
+
release.groups.each do |number, changes|
|
18
|
+
|
19
|
+
out << "\n* #{changes.size} #{changes[0].label }\n"
|
20
|
+
|
21
|
+
changes.sort{|a,b| b.date <=> a.date}.each do |entry|
|
22
|
+
msg = entry.to_s(:summary=>!options.detail)
|
23
|
+
|
24
|
+
msg << "\n(##{entry.id})" if options.reference
|
25
|
+
|
26
|
+
out << msg.tabto(6).sub(' ',' * ')
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
out << ""
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
out.join("\n") + "\n"
|
38
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
out = []
|
2
|
+
|
3
|
+
out << "= #{title || 'Release History'}"
|
4
|
+
|
5
|
+
releases.sort.each do |release|
|
6
|
+
tag = release.tag
|
7
|
+
|
8
|
+
out << "\n== #{tag.name} / #{tag.date.strftime('%Y-%m-%d')}"
|
9
|
+
|
10
|
+
out << "\n#{tag.message.strip} (#{tag.author})"
|
11
|
+
|
12
|
+
if !(options.summary or release.changes.empty?)
|
13
|
+
|
14
|
+
out << "\nChanges:"
|
15
|
+
|
16
|
+
release.groups.each do |type, changes|
|
17
|
+
|
18
|
+
out << "\n* #{changes.size} #{changes[0].label }\n"
|
19
|
+
|
20
|
+
changes.sort{|a,b| b.date <=> a.date}.each do |entry|
|
21
|
+
msg = entry.to_s(:summary=>!options.detail)
|
22
|
+
|
23
|
+
msg << "\n(##{entry.id})" if options.reference
|
24
|
+
|
25
|
+
out << msg.tabto(6).sub(' ',' * ')
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
out << ""
|
33
|
+
end
|
34
|
+
|
35
|
+
out.join("\n") + "\n"
|
36
|
+
|
@@ -0,0 +1,84 @@
|
|
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
|
+
<% 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.id %></link>
|
40
|
+
|
41
|
+
<pubDate><%= tag.date.rfc822 %></pubDate>
|
42
|
+
|
43
|
+
<guid isPermaLink="false"><%= url %>#<%= tag.id %></guid>
|
44
|
+
|
45
|
+
<description><![CDATA[
|
46
|
+
|
47
|
+
<p><%= tag.message %></p>
|
48
|
+
|
49
|
+
<% if !options.summary %>
|
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
|
+
<%= entry.message.rstrip %><br/>
|
61
|
+
|
62
|
+
<%= entry.author %> <%= entry.date.strftime('%Y-%m-%d %H:%M:%S') %>
|
63
|
+
|
64
|
+
<% if options.reference %>(#<%= h entry.id %>)<% end %>
|
65
|
+
</li>
|
66
|
+
|
67
|
+
<% end %>
|
68
|
+
|
69
|
+
</ul>
|
70
|
+
|
71
|
+
<% end %>
|
72
|
+
|
73
|
+
<% end %>
|
74
|
+
|
75
|
+
]]></description>
|
76
|
+
|
77
|
+
</item>
|
78
|
+
|
79
|
+
<% end %>
|
80
|
+
|
81
|
+
</channel>
|
82
|
+
|
83
|
+
</rss>
|
84
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<% if options.stylesheet %>
|
3
|
+
<?xml-stylesheet href="#{options.stylesheet}" type="text/xsl" ?>
|
4
|
+
<% end %>
|
5
|
+
<history>
|
6
|
+
<title><%= title %></title>
|
7
|
+
<% releases.sort.each do |release| %>
|
8
|
+
<tag>
|
9
|
+
<% tag = release.tag %>
|
10
|
+
<name><%= h tag.name %></name>
|
11
|
+
<date><%= tag.date.strftime('%Y-%m-%d') %></date>
|
12
|
+
<author><%= h tag.author %></author>
|
13
|
+
<message><%= h tag.message %></message>
|
14
|
+
|
15
|
+
<% release.groups.each do |number, changes| %>
|
16
|
+
<commit-group type="<%= changes[0].type %>" label="<%= changes[0].label %>">
|
17
|
+
<% changes.sort{|a,b| b.date <=> a.date}.each do |entry| %>
|
18
|
+
<commit>
|
19
|
+
<id><%= h entry.id %></id>
|
20
|
+
<date><%= entry.date %></date>
|
21
|
+
<author><%= h entry.author %></author>
|
22
|
+
<type><%= h entry.type %></type>
|
23
|
+
<message>
|
24
|
+
<summary><%= h entry.summary %></summary>
|
25
|
+
<% if entry.details.empty? %>
|
26
|
+
<details></details>
|
27
|
+
<% else %>
|
28
|
+
<details>
|
29
|
+
<![CDATA[
|
30
|
+
<%= h entry.details %>
|
31
|
+
|
32
|
+
]]>
|
33
|
+
</details>
|
34
|
+
<% end %>
|
35
|
+
</message>
|
36
|
+
</commit>
|
37
|
+
<% end %>
|
38
|
+
</commit-group>
|
39
|
+
<% end %>
|
40
|
+
</tag>
|
41
|
+
<% end %>
|
42
|
+
</history>
|
43
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
releases.map{ |r| r.to_h }.to_yaml
|
data/man/man1/index.txt
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
# manuals
|
2
|
+
vclog(1) vclog.1.ronn
|
3
|
+
vclog-changelog(1) vclog-changelog.1.ronn
|
4
|
+
vclog-history(1) vclog-history.1.ronn
|
5
|
+
vclog-version(1) vclog-version.1.ronn
|
6
|
+
vclog-news(1) vclog-news.1.ronn
|
7
|
+
vclog-bump(1) vclog-bump.1.ronn
|
8
|
+
vclog-autotag(1) vclog-autotag.1.ronn
|
9
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
vclog-autotag(1) - tag history entries
|
2
|
+
======================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`vclog-autotag`
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
Ensure all HISTORY file entries have corresponding commit tags in
|
11
|
+
the version control system.
|
12
|
+
|
13
|
+
## OPTIONS
|
14
|
+
|
15
|
+
* `--force`, `-y`
|
16
|
+
Create tags without asking for confirmation.
|
17
|
+
|
18
|
+
* `--prefix`, `-p PREFIX`
|
19
|
+
Specify a prefix to add to version tags. Typically
|
20
|
+
this will be the letter 'v'.
|
21
|
+
|
22
|
+
* `--file`, `-f FILE`
|
23
|
+
Specify a specific history file to use. This is useful
|
24
|
+
is the history file does not conform to the usual naming
|
25
|
+
convention of `HISTORY.*`.
|
26
|
+
|
27
|
+
## SEE ALSO
|
28
|
+
|
29
|
+
vclog(1)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
vclog-bump(1) - suggest next version
|
2
|
+
====================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`vclog-bump`
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
Display the next most suitable version number, based on the current
|
11
|
+
version number. The bump command considers the commit levels in
|
12
|
+
determining if the next version should be a major or minor bump.
|
13
|
+
|
14
|
+
## OPTIONS
|
15
|
+
|
16
|
+
* `--version`, `-v NUM`
|
17
|
+
Assume this version number is current.
|
18
|
+
|
19
|
+
## SEE ALSO
|
20
|
+
|
21
|
+
vclog(1)
|
@@ -0,0 +1,25 @@
|
|
1
|
+
vclog-news(1) - output latest release notice
|
2
|
+
============================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`vclog-news`
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
Display the most recent entry in a project's history file. This command
|
11
|
+
does NOT show the latest tag message, rather it is useful for making
|
12
|
+
a new tag. For instnace:
|
13
|
+
|
14
|
+
`vclog-news | git tag -a -F - v1.0.0`
|
15
|
+
|
16
|
+
This command will create a new git tag using the most recent message in
|
17
|
+
the history file.
|
18
|
+
|
19
|
+
## OPTIONS
|
20
|
+
|
21
|
+
No options yet.
|
22
|
+
|
23
|
+
## SEE ALSO
|
24
|
+
|
25
|
+
vclog(1)
|
@@ -0,0 +1,49 @@
|
|
1
|
+
vclog(1) - version control logs
|
2
|
+
===============================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`vclog [options]`
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
VCLog is a versitle cross-VCS/SCM changelog and release history generator.
|
11
|
+
It currently supports Git, Hg and (limited) Subversion.
|
12
|
+
|
13
|
+
## OPTIONS
|
14
|
+
|
15
|
+
Note that not all formats support all options, and some formats use them
|
16
|
+
in variant manners.
|
17
|
+
|
18
|
+
* `-f`, `--format <FORMAT>`
|
19
|
+
Output format (ansi, rdoc, html, etc.)
|
20
|
+
|
21
|
+
* `--style <URI>`
|
22
|
+
Provide a stylesheet URI, either css or xsl, for HTML or XML formats.
|
23
|
+
|
24
|
+
* `-d`, `--detail`
|
25
|
+
Include commit message details.
|
26
|
+
|
27
|
+
* `-p`, `--point`
|
28
|
+
Divide commit messages into commit points.
|
29
|
+
|
30
|
+
* `-v`, `--version <VERSION>`
|
31
|
+
Use as current version number.
|
32
|
+
|
33
|
+
* `-t`, `--title TITLE`
|
34
|
+
Document title (for format that supports it).
|
35
|
+
|
36
|
+
* `-s`, `--summary
|
37
|
+
Omit change points. (Applies only to release history report.)
|
38
|
+
|
39
|
+
* `i`, `--id`
|
40
|
+
Include revision/reference ids. (Does not apply to xml/html formats.)
|
41
|
+
|
42
|
+
* `-l`, `--level <NUMBER>`
|
43
|
+
Lowest level of commit to display, default is `0`.
|
44
|
+
|
45
|
+
Both changelog and release history can be produced in a variety of formats.
|
46
|
+
|
47
|
+
## SEE ALSO
|
48
|
+
|
49
|
+
vclog-version(1), vclog-bump(1), vclog-autotag(1)
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#require_relative 'featurettes/repo_creation'
|
2
|
+
#require_relative 'featurettes/shellout'
|
3
|
+
|
4
|
+
Feature "Git Change Log Support" do
|
5
|
+
As "Git users"
|
6
|
+
We "want to generate nicely formatted change logs"
|
7
|
+
|
8
|
+
Scenario "Git Changelog" do
|
9
|
+
Given "a suitable Git repository"
|
10
|
+
When "I run `vclog`"
|
11
|
+
Then "the exit status should be 0"
|
12
|
+
end
|
13
|
+
|
14
|
+
Scenario "Git Changelog in RDoc" do
|
15
|
+
Given "a suitable Git repository"
|
16
|
+
When "I run `vclog -f rdoc`"
|
17
|
+
Then "the exit status should be 0"
|
18
|
+
end
|
19
|
+
|
20
|
+
Scenario "Git Changelog in Markdown" do
|
21
|
+
Given "a suitable Git repository"
|
22
|
+
When "I run `vclog -f markdown`"
|
23
|
+
Then "the exit status should be 0"
|
24
|
+
end
|
25
|
+
|
26
|
+
Scenario "Git Changelog in HTML" do
|
27
|
+
Given "a suitable Git repository"
|
28
|
+
When "I run `vclog -f html`"
|
29
|
+
Then "the exit status should be 0"
|
30
|
+
end
|
31
|
+
|
32
|
+
Scenario "Git Changelog in XML" do
|
33
|
+
Given "a suitable Git repository"
|
34
|
+
When "I run `vclog -f xml`"
|
35
|
+
Then "the exit status should be 0"
|
36
|
+
end
|
37
|
+
|
38
|
+
Scenario "Git Changelog in Atom" do
|
39
|
+
Given "a suitable Git repository"
|
40
|
+
When "I run `vclog -f atom`"
|
41
|
+
Then "the exit status should be 0"
|
42
|
+
end
|
43
|
+
|
44
|
+
Scenario "Git Changelog in YAML" do
|
45
|
+
Given "a suitable Git repository"
|
46
|
+
When "I run `vclog -f yaml`"
|
47
|
+
Then "the exit status should be 0"
|
48
|
+
end
|
49
|
+
|
50
|
+
Scenario "Git Changelog in JSON" do
|
51
|
+
Given "a suitable Git repository"
|
52
|
+
When "I run `vclog -f json`"
|
53
|
+
Then "the exit status should be 0"
|
54
|
+
end
|
55
|
+
|
56
|
+
include RepoCreation
|
57
|
+
include Shellout
|
58
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#require_relative 'featurettes/repo_creation'
|
2
|
+
#require_relative 'featurettes/shellout'
|
3
|
+
|
4
|
+
Feature "Git Release History Support" do
|
5
|
+
As "Git users"
|
6
|
+
We "want to generate nicely formatted release histories"
|
7
|
+
|
8
|
+
Scenario "Git Release History" do
|
9
|
+
Given "a suitable Git repository"
|
10
|
+
When "I run `vclog r`"
|
11
|
+
Then "the exit status should be 0"
|
12
|
+
end
|
13
|
+
|
14
|
+
Scenario "Git Release History in RDoc" do
|
15
|
+
Given "a suitable Git repository"
|
16
|
+
When "I run `vclog r -f rdoc`"
|
17
|
+
Then "the exit status should be 0"
|
18
|
+
end
|
19
|
+
|
20
|
+
Scenario "Git Release History in Markdown" do
|
21
|
+
Given "a suitable Git repository"
|
22
|
+
When "I run `vclog rel -f markdown`"
|
23
|
+
Then "the exit status should be 0"
|
24
|
+
end
|
25
|
+
|
26
|
+
Scenario "Git Release History in HTML" do
|
27
|
+
Given "a suitable Git repository"
|
28
|
+
When "I run `vclog rel -f html`"
|
29
|
+
Then "the exit status should be 0"
|
30
|
+
end
|
31
|
+
|
32
|
+
Scenario "Git Release History in XML" do
|
33
|
+
Given "a suitable Git repository"
|
34
|
+
When "I run `vclog rel -f xml`"
|
35
|
+
Then "the exit status should be 0"
|
36
|
+
end
|
37
|
+
|
38
|
+
Scenario "Git Release History in Atom" do
|
39
|
+
Given "a suitable Git repository"
|
40
|
+
When "I run `vclog rel -f atom`"
|
41
|
+
Then "the exit status should be 0"
|
42
|
+
end
|
43
|
+
|
44
|
+
Scenario "Git Release History in YAML" do
|
45
|
+
Given "a suitable Git repository"
|
46
|
+
When "I run `vclog rel -f yaml`"
|
47
|
+
Then "the exit status should be 0"
|
48
|
+
end
|
49
|
+
|
50
|
+
Scenario "Git Release History in JSON" do
|
51
|
+
Given "a suitable Git repository"
|
52
|
+
When "I run `vclog rel -f json`"
|
53
|
+
Then "the exit status should be 0"
|
54
|
+
end
|
55
|
+
|
56
|
+
include RepoCreation
|
57
|
+
include Shellout
|
58
|
+
end
|