capillary 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,22 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ capillary (0.1.1)
5
+ json (~> 1.5.1)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ json (1.5.1)
11
+ mini_shoulda (0.3.0)
12
+ minitest (~> 2.1.0)
13
+ minitest (2.1.0)
14
+
15
+ PLATFORMS
16
+ ruby
17
+
18
+ DEPENDENCIES
19
+ capillary!
20
+ json (~> 1.5.1)
21
+ mini_shoulda (~> 0.3.0)
22
+ minitest (~> 2.0)
data/README ADDED
@@ -0,0 +1,44 @@
1
+ Capillary.rb
2
+ ============
3
+
4
+ Capillary parses the output of Git log and produces a beautiful
5
+ graphical representation of your repository's history - similar to
6
+ gitk and `git log --graph`, except beautiful.
7
+
8
+ Capillary consists of two parts:
9
+
10
+ * capillary.rb: which parses the output from Git log data and
11
+ generates a JSON representation of it, usable from
12
+ * capillary.js: the javascript library doing the presentation
13
+
14
+ The emitted JSON
15
+ ----------------
16
+
17
+ Capillary.rb emits a JSON array consisting of JSON objects in the
18
+ following form (starting with id=0):
19
+
20
+ [[{
21
+ sha: "251367a",
22
+ refnames: ["HEAD", "origin/master", "origin/HEAD", "master"],
23
+ message: "Whitespace fix",
24
+ id: 1
25
+ }, {
26
+ sha: "854e061",
27
+ refnames: ["origin/unified-messaging-api", "unified-messaging-api"],
28
+ message: "Resolve merge conflict from master",
29
+ id: 2
30
+ }]];
31
+
32
+ Input to capillary.rb
33
+ ---------------------
34
+
35
+ Capillary parses output from Git, in the format as specified in
36
+ test/fixtures/single_commit.txt. This output was generated from Git using the
37
+ following command:
38
+
39
+ git log --all --pretty=format:"%H§%P§%ad§%ae§%d§%s§"
40
+
41
+ The name
42
+ --------
43
+
44
+ Look it up: http://www.google.com/search?aq=f&ie=UTF-8&q=capillary
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ require "rake/testtask"
2
+
3
+ Rake::TestTask.new("test") do |test|
4
+ test.libs << "lib"
5
+ test.libs << "test"
6
+ test.pattern = "test/**/*_test.rb"
7
+ test.verbose = true
8
+ end
data/bin/capillary ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ require "capillary/log_parser"
3
+
4
+ parser = Capillary::LogParser.new
5
+ $stdin.each { |line| parser << line }
6
+ puts parser.to_json
data/lib/capillary.rb ADDED
@@ -0,0 +1,19 @@
1
+ # encoding: utf-8
2
+ #--
3
+ # Copyright (C) 2011 Gitorious AS
4
+ #
5
+ # This program is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU Affero General Public License as published by
7
+ # the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+ #
10
+ # This program is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU Affero General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Affero General Public License
16
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ #++
18
+
19
+ require "capillary/version"
@@ -0,0 +1,60 @@
1
+ # encoding: utf-8
2
+ #--
3
+ # Copyright (C) 2011 Gitorious AS
4
+ #
5
+ # This program is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU Affero General Public License as published by
7
+ # the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+ #
10
+ # This program is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU Affero General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Affero General Public License
16
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ #++
18
+ require "time"
19
+
20
+ module Capillary
21
+ class Commit
22
+ attr_accessor :id, :parent_ids, :committed_at, :message, :committer_email
23
+ attr_reader :ref_names
24
+ LOG_SEPARATOR = "§"
25
+
26
+ # Creates an instance from Git output
27
+ def self.parse(git_line)
28
+ parts = git_line.split(LOG_SEPARATOR)
29
+ result = new
30
+ result.id = parts[0]
31
+ result.parent_ids = parts[1].split(" ")
32
+ result.committed_at = Time.parse(parts[2])
33
+ result.committer_email = parts[3]
34
+ result.ref_names = parts[4]
35
+ result.message = parts[5]
36
+ result
37
+ end
38
+
39
+ def ref_names=(spec)
40
+ if spec == ""
41
+ @ref_names = nil
42
+ else
43
+ @ref_names = spec.gsub(/[\(\)]/,"").split(/,\s?/)
44
+ end
45
+ end
46
+
47
+ def to_hash
48
+ { "id" => id,
49
+ "parent_ids" => parent_ids,
50
+ "commited_at" => committed_at,
51
+ "committer_email" => committer_email,
52
+ "ref_names" => ref_names,
53
+ "message" => message }
54
+ end
55
+
56
+ def to_json
57
+ JSON.unparse(to_hash)
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,70 @@
1
+ # encoding: utf-8
2
+ #--
3
+ # Copyright (C) 2011 Gitorious AS
4
+ #
5
+ # This program is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU Affero General Public License as published by
7
+ # the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+ #
10
+ # This program is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU Affero General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Affero General Public License
16
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ #++
18
+ require "json"
19
+ require "capillary/commit"
20
+
21
+ module Capillary
22
+ class LogParser
23
+ attr_reader :branches
24
+
25
+ def initialize
26
+ @commit_count = 0
27
+ @branches = []
28
+ end
29
+
30
+ def <<(commit)
31
+ commit = Capillary::Commit.parse(commit) if String === commit
32
+
33
+ commit.parent_ids.each do |parent_id|
34
+ place_commit(CommitNode.new(@commit_count, commit, parent_id))
35
+ @commit_count += 1
36
+ end
37
+ end
38
+
39
+ def to_json
40
+ JSON.unparse(branches.collect { |b| b.collect { |c| c.to_hash } })
41
+ end
42
+
43
+ private
44
+ def place_commit(commit)
45
+ placed = branches.inject(false) do |placed, branch|
46
+ if branch.last.parent_id == commit.id
47
+ branch << commit
48
+ placed = true
49
+ end
50
+
51
+ placed
52
+ end
53
+
54
+ branches << [commit] unless placed
55
+ end
56
+ end
57
+
58
+ class CommitNode
59
+ attr_reader :seq_id, :commit, :parent_id
60
+
61
+ def initialize(seq_id, commit, parent_id)
62
+ @seq_id = seq_id
63
+ @commit = commit
64
+ @parent_id = parent_id
65
+ end
66
+
67
+ def id; commit.id; end
68
+ def to_hash; commit.to_hash.merge({ "seq_id" => seq_id }); end
69
+ end
70
+ end
@@ -0,0 +1,21 @@
1
+ # encoding: utf-8
2
+ #--
3
+ # Copyright (C) 2011 Gitorious AS
4
+ #
5
+ # This program is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU Affero General Public License as published by
7
+ # the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+ #
10
+ # This program is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU Affero General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Affero General Public License
16
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ #++
18
+
19
+ module Capillary
20
+ VERSION = "0.1.1"
21
+ end
@@ -0,0 +1,69 @@
1
+ # encoding: utf-8
2
+ #--
3
+ # Copyright (C) 2011 Gitorious AS
4
+ #
5
+ # This program is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU Affero General Public License as published by
7
+ # the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+ #
10
+ # This program is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU Affero General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Affero General Public License
16
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ #++
18
+
19
+ require "test_helper"
20
+ require "capillary/commit"
21
+
22
+ class CommitTest < MiniTest::Spec
23
+ context "Parsing a commit line" do
24
+ setup do
25
+ git_line = fixture("first_commit.txt")
26
+ @commit = Capillary::Commit.parse(git_line)
27
+ end
28
+
29
+ should "extract the commit sha" do
30
+ assert_equal "a7cf78bfff06d52b5b0aa021508b44c00cad067a", @commit.id
31
+ end
32
+
33
+ should "extract parent(s)" do
34
+ assert_equal(["db75ad82d678d51b29709d26af64d4a85b6f8071"], @commit.parent_ids)
35
+ end
36
+
37
+ should "extract the commit time" do
38
+ assert_equal(Time.parse("2011-07-13 07:55:47 +0200"), @commit.committed_at)
39
+ end
40
+
41
+ should "extract the committer email" do
42
+ assert_equal "chris@example.com", @commit.committer_email
43
+ end
44
+
45
+ should "extract the commit message" do
46
+ assert_equal "And this is commit 10 Merge branch 'topic'", @commit.message
47
+ end
48
+
49
+ should "include specified ref names" do
50
+ assert_equal(["master","refactor"], @commit.ref_names)
51
+ end
52
+
53
+ should "not include non-specified ref names" do
54
+ @commit.ref_names = ""
55
+ assert_nil @commit.ref_names
56
+ end
57
+
58
+ should "convert commit to JSON" do
59
+ assert_equal JSON.parse(@commit.to_json), {
60
+ "id" => "a7cf78bfff06d52b5b0aa021508b44c00cad067a",
61
+ "parent_ids" => ["db75ad82d678d51b29709d26af64d4a85b6f8071"],
62
+ "commited_at" => "Wed Jul 13 07:55:47 +0200 2011",
63
+ "committer_email" => "chris@example.com",
64
+ "ref_names" => ["master", "refactor"],
65
+ "message" => "And this is commit 10 Merge branch 'topic'"
66
+ }
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,201 @@
1
+ # encoding: utf-8
2
+ #--
3
+ # Copyright (C) 2011 Gitorious AS
4
+ #
5
+ # This program is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU Affero General Public License as published by
7
+ # the Free Software Foundation, either version 3 of the License, or
8
+ # (at your option) any later version.
9
+ #
10
+ # This program is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU Affero General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Affero General Public License
16
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ #++
18
+
19
+ require "test_helper"
20
+ require "capillary/log_parser"
21
+
22
+ class LogParserTest < MiniTest::Spec
23
+ # * a7cf78bfff06d52b5b0aa021508b44c00cad067a
24
+ # * db75ad82d678d51b29709d26af64d4a85b6f8071
25
+ context "A linear graph" do
26
+ setup do
27
+ first_line = Capillary::Commit.parse(fixture("first_commit.txt"))
28
+ second_line = Capillary::Commit.parse(fixture("parent_commit.txt"))
29
+ @log_parser = Capillary::LogParser.new
30
+ @log_parser << first_line
31
+ @log_parser << second_line
32
+ end
33
+
34
+ should "have one branch" do
35
+ assert_equal 1, @log_parser.branches.size
36
+ end
37
+
38
+ should "index the commits correctly" do
39
+ branch = @log_parser.branches.first
40
+ ids = branch.map { |commit| commit.seq_id }
41
+ assert_equal([0, 1], ids)
42
+ end
43
+
44
+ should "collect the shas in correct order" do
45
+ shas = @log_parser.branches.first.map { |commit| commit.id }
46
+ assert_equal(["a7cf78bfff06d52b5b0aa021508b44c00cad067a","db75ad82d678d51b29709d26af64d4a85b6f8071"], shas)
47
+ end
48
+
49
+ should "render JSON" do
50
+ result = JSON.parse(@log_parser.to_json)
51
+ assert_equal(1, result.size)
52
+ commits = result.first
53
+ assert_equal(2, commits.size)
54
+ end
55
+ end
56
+
57
+ # *
58
+ # |\
59
+ # | *
60
+ # * |
61
+ # | |
62
+ context "Two merged branches" do
63
+ setup do
64
+ fixtures = fixture("two_merged_branches.txt").split("\n")
65
+ @lines = [Capillary::Commit.parse(fixtures[0]),
66
+ Capillary::Commit.parse(fixtures[1]),
67
+ Capillary::Commit.parse(fixtures[2])]
68
+
69
+ @log_parser = Capillary::LogParser.new
70
+ @log_parser << @lines[0]
71
+ @log_parser << @lines[1]
72
+ @log_parser << @lines[2]
73
+ end
74
+
75
+ should "have two branches" do
76
+ assert_equal 2, @log_parser.branches.size
77
+ end
78
+
79
+ should "have two commits in the first branch" do
80
+ first_branch = @log_parser.branches.first
81
+ assert_equal 2, first_branch.size
82
+ end
83
+
84
+ should "have two commits in the second branch" do
85
+ last_branch = @log_parser.branches.last
86
+ assert_equal 2, last_branch.size
87
+ end
88
+
89
+ should "put the right commits in the right branch" do
90
+ branches = @log_parser.branches
91
+
92
+ assert_equal @lines[0].id, branches[0][0].id
93
+ assert_equal @lines[2].id, branches[0][1].id
94
+
95
+ assert_equal @lines[0].id, branches[1][0].id
96
+ assert_equal @lines[1].id, branches[1][1].id
97
+ end
98
+
99
+ should "render JSON" do
100
+ result = JSON.parse(@log_parser.to_json)
101
+ assert_equal(2, result.size)
102
+ assert_equal(2, result.first.size)
103
+ assert_equal(2, result.last.size)
104
+ end
105
+ end
106
+
107
+ #
108
+ # 0
109
+ # |\
110
+ # | 0
111
+ # | |
112
+ # | 0
113
+ # | |\
114
+ # | | 0
115
+ # | | |\
116
+ # | 0 | |
117
+ # | | | |
118
+ # | | | 0
119
+ # | | | |
120
+ # | | 0 |
121
+ # | | | |
122
+ # | 0 | |
123
+ # | | | |
124
+ # | | | 0
125
+ # | | |/
126
+ # | | 0
127
+ # | | |
128
+ context "Complex graph merged with --no-ff" do
129
+ setup do
130
+ fixtures = fixture("complex_graph_no_ff.txt").split("\n")
131
+ @log_parser = Capillary::LogParser.new
132
+ @lines = []
133
+
134
+ fixtures.reject { |f| f.strip == "" }.each do |fixture|
135
+ @lines << Capillary::Commit.parse(fixture)
136
+ @log_parser << @lines.last
137
+ end
138
+ end
139
+
140
+ should "have four branches" do
141
+ assert_equal 4, @log_parser.branches.size
142
+ end
143
+
144
+ should "have one commit in the first branch" do
145
+ branch = @log_parser.branches.first
146
+ assert_equal 1, branch.size
147
+ end
148
+
149
+ should "have five commits in the second branch" do
150
+ branch = @log_parser.branches[1]
151
+ assert_equal 5, branch.size
152
+ end
153
+
154
+ should "have four commits in the third branch" do
155
+ branch = @log_parser.branches[2]
156
+ assert_equal 4, branch.size
157
+ end
158
+
159
+ should "have four commits in the fourth branch" do
160
+ branch = @log_parser.branches[3]
161
+ assert_equal 4, branch.size
162
+ end
163
+
164
+ should "put the right commits in the right branch" do
165
+ branches = @log_parser.branches
166
+
167
+ assert_equal @lines[0].id, branches[0][0].id
168
+ assert_equal @lines[0].id, branches[1][0].id
169
+ assert_equal @lines[2].id, branches[2][0].id
170
+ assert_equal @lines[3].id, branches[3][0].id
171
+ end
172
+
173
+ should "render JSON" do
174
+ result = JSON.parse(@log_parser.to_json)
175
+
176
+ assert_equal(4, result.size)
177
+ assert_equal(1, result.first.size)
178
+ assert_equal(5, result[1].size)
179
+ assert_equal(4, result[2].size)
180
+ end
181
+ end
182
+
183
+ context "Streaming parser" do
184
+ setup do
185
+ @lines = fixture("complex_graph_no_ff.txt").split("\n")
186
+ @log = Capillary::LogParser.new
187
+ end
188
+
189
+ should "add parsed line" do
190
+ @log << Capillary::Commit.parse(@lines[0])
191
+
192
+ assert_equal 2, @log.branches.length
193
+ end
194
+
195
+ should "add raw line" do
196
+ @log << @lines[0]
197
+
198
+ assert_equal 2, @log.branches.length
199
+ end
200
+ end
201
+ end
@@ -0,0 +1,10 @@
1
+ 82114b2e3b1b5241167faeffd9bcfaa4fbc1e19c§eab56eadbb2c475e0d3ec5a5d32939600865f868 f9eb74cb5aff19119549335ade867a2b97a1f192§Wed Jul 13 19:05:18 2011 +0200§christian@gitorious.org§ (HEAD, master)§Merge branch 'branch2'§
2
+ f9eb74cb5aff19119549335ade867a2b97a1f192§9e3304e57349493fe311ca45d4e7d60173831f53§Wed Jul 13 16:23:59 2011 +0200§christian@gitorious.org§ (branch2)§Commit #2/branch #2§
3
+ 9e3304e57349493fe311ca45d4e7d60173831f53§dfbb8f1790f05f5fb30dc23da93111626a9bf8f1 e1ef4ee181cba23d93a3513f246e3d5d7ae97a6b§Wed Jul 13 16:23:44 2011 +0200§christian@gitorious.org§§Commit #3/branch #2, merge 3->2§
4
+ e1ef4ee181cba23d93a3513f246e3d5d7ae97a6b§1e260b557384ddec5e8f862705fdecf3c5515c98 61291e76367a8ec47a1f9e2647dfecf0e80d5b41§Wed Jul 13 16:22:55 2011 +0200§christian@gitorious.org§ (branch3)§Commit #4/branch #3, merge 4->3§
5
+ dfbb8f1790f05f5fb30dc23da93111626a9bf8f1§563d5292c32c733add5997d24dac25ee05ec06f7§Wed Jul 13 16:08:56 2011 +0200§christian@gitorious.org§§Commit #5/branch #2§
6
+ 61291e76367a8ec47a1f9e2647dfecf0e80d5b41§c97d4784e631f6451b5a3b541aea11faf51ae5f5§Wed Jul 13 16:08:40 2011 +0200§christian@gitorious.org§ (branch4)§Commit #6/branch #4§
7
+ 1e260b557384ddec5e8f862705fdecf3c5515c98§8798362ef2ab68c46cc09bdf2951cf4d0994caa9§Wed Jul 13 16:08:28 2011 +0200§christian@gitorious.org§§Commit #7/branch #3§
8
+ 563d5292c32c733add5997d24dac25ee05ec06f7§eab56eadbb2c475e0d3ec5a5d32939600865f868§Wed Jul 13 16:08:09 2011 +0200§christian@gitorious.org§§Commit #8/branch #2§
9
+ c97d4784e631f6451b5a3b541aea11faf51ae5f5§8798362ef2ab68c46cc09bdf2951cf4d0994caa9§Wed Jul 13 16:07:52 2011 +0200§christian@gitorious.org§§Commit #9/branch #4§
10
+ 8798362ef2ab68c46cc09bdf2951cf4d0994caa9§eab56eadbb2c475e0d3ec5a5d32939600865f868§Wed Jul 13 16:07:32 2011 +0200§christian@gitorious.org§§Commit #10/branch #3§
@@ -0,0 +1 @@
1
+ a7cf78bfff06d52b5b0aa021508b44c00cad067a§db75ad82d678d51b29709d26af64d4a85b6f8071§2011-07-13 07:55:47 +0200§chris@example.com§(master, refactor)§And this is commit 10 Merge branch 'topic'§
@@ -0,0 +1 @@
1
+ db75ad82d678d51b29709d26af64d4a85b6f8071§a7cf78bfff06d52b5b0aa021508b44c00cad067a§2011-07-13 07:55:47 +0200§chris@example.com§(master, refactor)§Adding some magic powers to the witch§
@@ -0,0 +1,3 @@
1
+ dfa624cc5f5cd7951526bbce93f273d0644d60c4§eddad9a65f2d673f92f02b97e4bdc34357263c87§2011-07-13 13:00:00 +0200§marius@gitorious.org§ (HEAD, master)§A third commit§
2
+ e34585780eab510da518f3dd55282de42c7f0297§eddad9a65f2d673f92f02b97e4bdc34357263c87§2011-07-13 12:59:38 +0200§marius@gitorious.org§ (Another)§Another commit§
3
+ eddad9a65f2d673f92f02b97e4bdc34357263c87§§2011-07-13 12:59:18 +0200§marius@gitorious.org§§Initial commit§
@@ -0,0 +1,4 @@
1
+ c3cdee5e70272c2be977063e42346402de10c0fb§cf860e9b74b11100db4bf2db639089832dcd7549 cfa5ba7818834630cea5419987038456051cbc79§2011-07-13 13:05:32 +0200§marius@gitorious.org§ (HEAD, master)§Merge branch 'refactor'§
2
+ cfa5ba7818834630cea5419987038456051cbc79§fa7674e8bfb3779a1d66d3200786d322a2ded020§2011-07-13 13:05:24 +0200§marius@gitorious.org§ (refactor)§Commit på branch§
3
+ cf860e9b74b11100db4bf2db639089832dcd7549§fa7674e8bfb3779a1d66d3200786d322a2ded020§2011-07-13 13:05:12 +0200§marius@gitorious.org§§Nederste synlige commit på master§
4
+ fa7674e8bfb3779a1d66d3200786d322a2ded020§§2011-07-13 13:04:07 +0200§marius@gitorious.org§§Initial commit, we won't use this in our test§
@@ -0,0 +1,20 @@
1
+ require "rubygems"
2
+ require "bundler/setup"
3
+ require "minitest/autorun"
4
+ require "mini_shoulda"
5
+
6
+ module Fixtures
7
+ def fixture(filename)
8
+ File.read(File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", filename))
9
+ end
10
+ end
11
+
12
+ module Deferred
13
+ def deferred_context(name)
14
+ end
15
+ end
16
+
17
+ class MiniTest::Spec
18
+ include Fixtures
19
+ extend Deferred
20
+ end
metadata ADDED
@@ -0,0 +1,132 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capillary
3
+ version: !ruby/object:Gem::Version
4
+ hash: 25
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 1
10
+ version: 0.1.1
11
+ platform: ruby
12
+ authors:
13
+ - Marius Mathiesen
14
+ - Christian Johansen
15
+ autorequire:
16
+ bindir: bin
17
+ cert_chain: []
18
+
19
+ date: 2011-07-14 00:00:00 +02:00
20
+ default_executable:
21
+ dependencies:
22
+ - !ruby/object:Gem::Dependency
23
+ name: json
24
+ prerelease: false
25
+ requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ~>
29
+ - !ruby/object:Gem::Version
30
+ hash: 1
31
+ segments:
32
+ - 1
33
+ - 5
34
+ - 1
35
+ version: 1.5.1
36
+ type: :runtime
37
+ version_requirements: *id001
38
+ - !ruby/object:Gem::Dependency
39
+ name: minitest
40
+ prerelease: false
41
+ requirement: &id002 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ hash: 3
47
+ segments:
48
+ - 2
49
+ - 0
50
+ version: "2.0"
51
+ type: :development
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ name: mini_shoulda
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ hash: 19
62
+ segments:
63
+ - 0
64
+ - 3
65
+ - 0
66
+ version: 0.3.0
67
+ type: :development
68
+ version_requirements: *id003
69
+ description: Capillary works in conjunction with capillary.js, which outputs a beautiful graphical representation of your repository history
70
+ email:
71
+ - marius@gitorious.org
72
+ - christian@gitorious.org
73
+ executables:
74
+ - capillary
75
+ extensions: []
76
+
77
+ extra_rdoc_files: []
78
+
79
+ files:
80
+ - Gemfile
81
+ - Gemfile.lock
82
+ - README
83
+ - Rakefile
84
+ - bin/capillary
85
+ - lib/capillary.rb
86
+ - lib/capillary/commit.rb
87
+ - lib/capillary/log_parser.rb
88
+ - lib/capillary/version.rb
89
+ - test/capillary/commit_test.rb
90
+ - test/capillary/log_parser_test.rb
91
+ - test/fixtures/complex_graph_no_ff.txt
92
+ - test/fixtures/first_commit.txt
93
+ - test/fixtures/parent_commit.txt
94
+ - test/fixtures/third_commit.txt
95
+ - test/fixtures/two_merged_branches.txt
96
+ - test/test_helper.rb
97
+ has_rdoc: true
98
+ homepage: http://gitorious.org/capillary
99
+ licenses: []
100
+
101
+ post_install_message:
102
+ rdoc_options: []
103
+
104
+ require_paths:
105
+ - lib
106
+ required_ruby_version: !ruby/object:Gem::Requirement
107
+ none: false
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ hash: 3
112
+ segments:
113
+ - 0
114
+ version: "0"
115
+ required_rubygems_version: !ruby/object:Gem::Requirement
116
+ none: false
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ hash: 3
121
+ segments:
122
+ - 0
123
+ version: "0"
124
+ requirements: []
125
+
126
+ rubyforge_project: capillary
127
+ rubygems_version: 1.3.7
128
+ signing_key:
129
+ specification_version: 3
130
+ summary: Capillary generates a JSON payload from Git log output
131
+ test_files: []
132
+