dolt 0.29.0 → 0.30.0
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/dolt.gemspec +1 -1
- data/lib/dolt/sinatra/multi_repo_browser.rb +11 -31
- data/lib/dolt/sinatra/repo_browser.rb +47 -0
- data/lib/dolt/sinatra/single_repo_browser.rb +15 -29
- metadata +4 -75
- data/vendor/ui/.gitignore +0 -4
- data/vendor/ui/.gitmodules +0 -39
- data/vendor/ui/Makefile +0 -48
- data/vendor/ui/autolint.js +0 -13
- data/vendor/ui/buster.js +0 -31
- data/vendor/ui/css/gitorious.css +0 -660
- data/vendor/ui/css/syntax-highlight.css +0 -140
- data/vendor/ui/dist/gitorious3-capillary.min.js +0 -12
- data/vendor/ui/dist/gitorious3.min.css +0 -1
- data/vendor/ui/dist/gitorious3.min.js +0 -3
- data/vendor/ui/favicon.ico +0 -0
- data/vendor/ui/iconic/lock_stroke.svg +0 -17
- data/vendor/ui/images/f5f5f5-980x1.png +0 -0
- data/vendor/ui/images/gitorious.png +0 -0
- data/vendor/ui/images/gitorious2013.png +0 -0
- data/vendor/ui/images/powered-by.png +0 -0
- data/vendor/ui/images/white-980x1.png +0 -0
- data/vendor/ui/js/src/app.js +0 -20
- data/vendor/ui/js/src/cache.js +0 -27
- data/vendor/ui/js/src/capillary.js +0 -7
- data/vendor/ui/js/src/components/abbrev.js +0 -24
- data/vendor/ui/js/src/components/blob.js +0 -154
- data/vendor/ui/js/src/components/capillary.js +0 -51
- data/vendor/ui/js/src/components/clone-name-suggestion.js +0 -38
- data/vendor/ui/js/src/components/clone-url-selection.js +0 -35
- data/vendor/ui/js/src/components/collapse.js +0 -17
- data/vendor/ui/js/src/components/comments.js +0 -111
- data/vendor/ui/js/src/components/commit-linker.js +0 -26
- data/vendor/ui/js/src/components/dropdown.js +0 -74
- data/vendor/ui/js/src/components/ganalytics.js +0 -19
- data/vendor/ui/js/src/components/live-markdown-preview.js +0 -35
- data/vendor/ui/js/src/components/loading.js +0 -33
- data/vendor/ui/js/src/components/oid-ref-interpolator.js +0 -9
- data/vendor/ui/js/src/components/profile-menu.js +0 -36
- data/vendor/ui/js/src/components/rails-links.js +0 -24
- data/vendor/ui/js/src/components/ref-selector.js +0 -116
- data/vendor/ui/js/src/components/repository.js +0 -162
- data/vendor/ui/js/src/components/select-details.js +0 -20
- data/vendor/ui/js/src/components/slugify.js +0 -32
- data/vendor/ui/js/src/components/timeago.js +0 -38
- data/vendor/ui/js/src/components/tree-history.js +0 -140
- data/vendor/ui/js/src/components/url.js +0 -65
- data/vendor/ui/js/src/components/user-repo-view-state.js +0 -4
- data/vendor/ui/js/src/gitorious.js +0 -171
- data/vendor/ui/js/src/json-request.js +0 -6
- data/vendor/ui/js/src/logger.js +0 -84
- data/vendor/ui/js/src/spacer.js +0 -5
- data/vendor/ui/js/test-libs/jquery-1.9.1.min.js +0 -5
- data/vendor/ui/js/test/cache-test.js +0 -47
- data/vendor/ui/js/test/components/abbrev-test.js +0 -22
- data/vendor/ui/js/test/components/blob-test.js +0 -90
- data/vendor/ui/js/test/components/clone-name-suggestion-test.js +0 -37
- data/vendor/ui/js/test/components/clone-url-selection-test.js +0 -25
- data/vendor/ui/js/test/components/comments-test.js +0 -139
- data/vendor/ui/js/test/components/commit-linker-test.js +0 -46
- data/vendor/ui/js/test/components/live-markdown-preview-test.js +0 -37
- data/vendor/ui/js/test/components/profile-menu-test.js +0 -46
- data/vendor/ui/js/test/components/ref-selector-test.js +0 -140
- data/vendor/ui/js/test/components/repository-admin-test.js +0 -37
- data/vendor/ui/js/test/components/repository-watching-test.js +0 -74
- data/vendor/ui/js/test/components/timeago-test.js +0 -74
- data/vendor/ui/js/test/components/tree-history-test.js +0 -324
- data/vendor/ui/js/test/components/url-template-test.js +0 -65
- data/vendor/ui/js/test/test-helper.js +0 -2
- data/vendor/ui/lib/bootstrap/css/bootstrap-responsive.min.css +0 -9
- data/vendor/ui/lib/bootstrap/css/bootstrap.min.css +0 -9
- data/vendor/ui/lib/bootstrap/img/glyphicons-halflings-white.png +0 -0
- data/vendor/ui/lib/bootstrap/img/glyphicons-halflings.png +0 -0
- data/vendor/ui/lib/bootstrap/js/bootstrap.min.js +0 -6
- data/vendor/ui/package.json +0 -21
- data/vendor/ui/todo.org +0 -4
@@ -1,37 +0,0 @@
|
|
1
|
-
/*global buster, assert, refute, gts*/
|
2
|
-
|
3
|
-
buster.testCase("Repository admin", {
|
4
|
-
setUp: function () {
|
5
|
-
this.data = {
|
6
|
-
editPath: "/edit",
|
7
|
-
destroyPath: "/destroy",
|
8
|
-
ownershipPath: "/ownership",
|
9
|
-
committershipsPath: "/committerships",
|
10
|
-
webHooksPath: "/webhooks"
|
11
|
-
};
|
12
|
-
},
|
13
|
-
|
14
|
-
"includes link to admin pull-down": function () {
|
15
|
-
var menu = gts.repository.admin.build(this.data);
|
16
|
-
|
17
|
-
assert.className(menu, "dropdown");
|
18
|
-
assert.match(menu.innerHTML, "dropdown-toggle");
|
19
|
-
assert.match(menu.innerHTML, "<i class=\"icon-cog\"></i> Admin");
|
20
|
-
},
|
21
|
-
|
22
|
-
"includes dropdown menu": function () {
|
23
|
-
var menu = gts.repository.admin.build(this.data);
|
24
|
-
|
25
|
-
assert.match(menu.innerHTML, "<ul class=\"dropdown-menu");
|
26
|
-
},
|
27
|
-
|
28
|
-
"includes links": function () {
|
29
|
-
var menu = gts.repository.admin.build(this.data);
|
30
|
-
|
31
|
-
assert.match(menu.innerHTML, "/edit");
|
32
|
-
assert.match(menu.innerHTML, "/destroy");
|
33
|
-
assert.match(menu.innerHTML, "/ownership");
|
34
|
-
assert.match(menu.innerHTML, "/committerships");
|
35
|
-
assert.match(menu.innerHTML, "/webhooks");
|
36
|
-
}
|
37
|
-
});
|
@@ -1,74 +0,0 @@
|
|
1
|
-
/*global buster, dome, gts*/
|
2
|
-
|
3
|
-
buster.testCase("Repository watching", {
|
4
|
-
setUp: function () {
|
5
|
-
this.el = dome.el("div", dome.el("div"));
|
6
|
-
},
|
7
|
-
|
8
|
-
"replaces placeholder": function () {
|
9
|
-
gts.repository.watching(this.el.firstChild, {
|
10
|
-
watching: false,
|
11
|
-
watchPath: "/watchit"
|
12
|
-
});
|
13
|
-
|
14
|
-
assert.equals(this.el.childNodes.length, 1);
|
15
|
-
assert.match(this.el.firstChild.innerHTML, "Watch");
|
16
|
-
assert.match(this.el.firstChild.href, "/watchit");
|
17
|
-
},
|
18
|
-
|
19
|
-
"renders unwatch link": function () {
|
20
|
-
gts.repository.watching(this.el.firstChild, {
|
21
|
-
watching: true,
|
22
|
-
unwatchPath: "/dropit"
|
23
|
-
});
|
24
|
-
|
25
|
-
assert.match(this.el.firstChild.innerHTML, "Unwatch");
|
26
|
-
assert.match(this.el.firstChild.href, "/dropit");
|
27
|
-
},
|
28
|
-
|
29
|
-
"toggleState": {
|
30
|
-
setUp: function () {
|
31
|
-
this.server = this.useFakeServer();
|
32
|
-
this.link = this.el.firstChild;
|
33
|
-
this.repository = {
|
34
|
-
watching: false,
|
35
|
-
watchPath: "/watchit"
|
36
|
-
};
|
37
|
-
gts.repository.watching(this.link, this.repository);
|
38
|
-
},
|
39
|
-
|
40
|
-
"displays spinner while loading": function () {
|
41
|
-
gts.repository.watching.toggleState(this.link, this.repository);
|
42
|
-
|
43
|
-
assert.match(this.link.innerHTML, "Loading");
|
44
|
-
},
|
45
|
-
|
46
|
-
"replaces spinner when server responds": function () {
|
47
|
-
gts.repository.watching.toggleState(this.link, this.repository);
|
48
|
-
this.server.requests[0].respond(200, { location: "/dropit" }, "");
|
49
|
-
|
50
|
-
refute.match(this.link.innerHTML, "Loading");
|
51
|
-
assert.match(this.link.innerHTML, "Unwatch");
|
52
|
-
assert.equals(this.link.href, "/dropit");
|
53
|
-
},
|
54
|
-
|
55
|
-
"watches, then unwatches": function () {
|
56
|
-
gts.repository.watching.toggleState(this.link, this.repository);
|
57
|
-
this.server.requests[0].respond(200, { location: "/dropit" }, "");
|
58
|
-
|
59
|
-
gts.repository.watching.toggleState(this.link, this.repository);
|
60
|
-
this.server.requests[1].respond(200, {}, "");
|
61
|
-
|
62
|
-
refute.match(this.link.innerHTML, "Loading");
|
63
|
-
assert.match(this.link.innerHTML, "Watch");
|
64
|
-
assert.equals(this.link.href, "/watchit");
|
65
|
-
},
|
66
|
-
|
67
|
-
"tells user to try again when request fails": function () {
|
68
|
-
gts.repository.watching.toggleState(this.link, this.repository);
|
69
|
-
this.server.requests[0].respond(500, {}, "");
|
70
|
-
|
71
|
-
assert.match(this.link.innerHTML, "Failed");
|
72
|
-
}
|
73
|
-
}
|
74
|
-
});
|
@@ -1,74 +0,0 @@
|
|
1
|
-
/*global buster, assert, dome, gts*/
|
2
|
-
|
3
|
-
buster.testCase("Timeago", {
|
4
|
-
"converts abbr content to casual date representation": function () {
|
5
|
-
var el = dome.el("abbr", { title: "2008-02-27T00:23:00Z" });
|
6
|
-
gts.timeago(el);
|
7
|
-
assert.match(el.innerHTML, "ago");
|
8
|
-
},
|
9
|
-
|
10
|
-
"uses pre-existing content as title": function () {
|
11
|
-
var el = dome.el("abbr", { title: "2008-02-27T00:23:00Z" }, "Today");
|
12
|
-
gts.timeago(el);
|
13
|
-
assert.match(el.title, "Today");
|
14
|
-
},
|
15
|
-
|
16
|
-
"does not use empty content as title": function () {
|
17
|
-
var el = dome.el("abbr", { title: "2008-02-27T00:23:00Z" });
|
18
|
-
gts.timeago(el);
|
19
|
-
assert.match(el.title, "2008-02-27T00:23:00Z");
|
20
|
-
},
|
21
|
-
|
22
|
-
"leaves element untouched if no title": function () {
|
23
|
-
var el = dome.el("abbr", "Hmm");
|
24
|
-
gts.timeago(el);
|
25
|
-
assert.equals(el.title, "");
|
26
|
-
assert.equals(el.innerHTML, "Hmm");
|
27
|
-
},
|
28
|
-
|
29
|
-
"leaves element untouched if title contains invalid date": function () {
|
30
|
-
var el = dome.el("abbr", { title: "Oops" }, "Hmm");
|
31
|
-
gts.timeago(el);
|
32
|
-
assert.equals(el.title, "Oops");
|
33
|
-
assert.equals(el.innerHTML, "Hmm");
|
34
|
-
},
|
35
|
-
|
36
|
-
"returns element": function () {
|
37
|
-
var el = dome.el("abbr", { title: "2008-02-27T00:23:00Z" });
|
38
|
-
assert.same(gts.timeago(el), el);
|
39
|
-
|
40
|
-
var invalidEl = dome.el("abbr", { title: "Oops" }, "Hmm");
|
41
|
-
assert.same(gts.timeago(invalidEl), invalidEl);
|
42
|
-
},
|
43
|
-
|
44
|
-
"periodic": {
|
45
|
-
"updates representation immediately": function () {
|
46
|
-
var el = dome.el("abbr", { title: "1970-01-01T00:00:00Z" });
|
47
|
-
var timeago = gts.timeago.periodic(60000);
|
48
|
-
timeago(el);
|
49
|
-
|
50
|
-
assert.match(el.innerHTML, "ago");
|
51
|
-
},
|
52
|
-
|
53
|
-
"// updates representations periodically": function () {
|
54
|
-
var clock = this.useFakeTimers();
|
55
|
-
var now = new Date();
|
56
|
-
var els = [
|
57
|
-
dome.el("abbr", { title: "1970-01-01T00:00:00Z" }),
|
58
|
-
dome.el("abbr", { title: "1970-01-01T00:03:00Z" })
|
59
|
-
];
|
60
|
-
|
61
|
-
var timeago = gts.timeago.periodic(60000);
|
62
|
-
timeago(els[0]);
|
63
|
-
timeago(els[1]);
|
64
|
-
var contents = [els[0].innerHTML, els[1].innerHTML];
|
65
|
-
clock.tick(59999);
|
66
|
-
assert.equals(els[0].innerHTML, contents[0]);
|
67
|
-
assert.equals(els[1].innerHTML, contents[1]);
|
68
|
-
|
69
|
-
clock.tick(1);
|
70
|
-
refute.equals(els[0].innerHTML, contents[0]);
|
71
|
-
refute.equals(els[1].innerHTML, contents[1]);
|
72
|
-
}
|
73
|
-
}
|
74
|
-
});
|
@@ -1,324 +0,0 @@
|
|
1
|
-
/*global buster, assert, refute, jQuery, gts*/
|
2
|
-
/*jslint maxlen: 130*/
|
3
|
-
buster.testCase("Tree history", {
|
4
|
-
setUp: function () {
|
5
|
-
/*:DOC table = <table class="table table-striped gts-tree-explorer">
|
6
|
-
<thead>
|
7
|
-
<tr>
|
8
|
-
<th colspan="0">File</th>
|
9
|
-
<th class="gts-col-changed">Changed</th>
|
10
|
-
<th colspan="2" class="gts-col-commit">Last commit</th>
|
11
|
-
</tr>
|
12
|
-
</thead>
|
13
|
-
<tbody>
|
14
|
-
<tr>
|
15
|
-
<td class="gts-name">
|
16
|
-
<a href="/tree/master:bin"><i class="icon icon-folder-close"></i> bin</a>
|
17
|
-
</td>
|
18
|
-
<td></td>
|
19
|
-
<td class="gts-commit-oid"></td>
|
20
|
-
<td></td>
|
21
|
-
</tr>
|
22
|
-
<tr>
|
23
|
-
<td class="gts-name">
|
24
|
-
<a href="/tree/master:lib"><i class="icon icon-folder-close"></i> lib</a>
|
25
|
-
</td>
|
26
|
-
<td></td>
|
27
|
-
<td class="gts-commit-oid"></td>
|
28
|
-
<td></td>
|
29
|
-
</tr>
|
30
|
-
<tr>
|
31
|
-
<td class="gts-name">
|
32
|
-
<a href="/tree/master:test"><i class="icon icon-folder-close"></i> test</a>
|
33
|
-
</td>
|
34
|
-
<td></td>
|
35
|
-
<td class="gts-commit-oid"></td>
|
36
|
-
<td></td>
|
37
|
-
</tr>
|
38
|
-
<tr>
|
39
|
-
<td class="gts-name">
|
40
|
-
<a href="/tree/master:vendor"><i class="icon icon-folder-close"></i> vendor</a>
|
41
|
-
</td>
|
42
|
-
<td></td>
|
43
|
-
<td class="gts-commit-oid"></td>
|
44
|
-
<td></td>
|
45
|
-
</tr>
|
46
|
-
<tr>
|
47
|
-
<td class="gts-name">
|
48
|
-
<a href="/tree/master:views"><i class="icon icon-folder-close"></i> views</a>
|
49
|
-
</td>
|
50
|
-
<td></td>
|
51
|
-
<td class="gts-commit-oid"></td>
|
52
|
-
<td></td>
|
53
|
-
</tr>
|
54
|
-
<tr>
|
55
|
-
<td class="gts-name">
|
56
|
-
<a href="/blob/master:.gitmodules"><i class="icon icon-file"></i> .gitmodules</a>
|
57
|
-
</td>
|
58
|
-
<td></td>
|
59
|
-
<td class="gts-commit-oid"></td>
|
60
|
-
<td></td>
|
61
|
-
</tr>
|
62
|
-
<tr>
|
63
|
-
<td class="gts-name">
|
64
|
-
<a href="/blob/master:Gemfile"><i class="icon icon-file"></i> Gemfile</a>
|
65
|
-
</td>
|
66
|
-
<td></td>
|
67
|
-
<td class="gts-commit-oid"></td>
|
68
|
-
<td></td>
|
69
|
-
</tr>
|
70
|
-
<tr>
|
71
|
-
<td class="gts-name">
|
72
|
-
<a href="/blob/master:Gemfile.lock"><i class="icon icon-file"></i> Gemfile.lock</a>
|
73
|
-
</td>
|
74
|
-
<td></td>
|
75
|
-
<td class="gts-commit-oid"></td>
|
76
|
-
<td></td>
|
77
|
-
</tr>
|
78
|
-
<tr>
|
79
|
-
<td class="gts-name">
|
80
|
-
<a href="/blob/master:Rakefile"><i class="icon icon-file"></i> Rakefile</a>
|
81
|
-
</td>
|
82
|
-
<td></td>
|
83
|
-
<td class="gts-commit-oid"></td>
|
84
|
-
<td></td>
|
85
|
-
</tr>
|
86
|
-
<tr>
|
87
|
-
<td class="gts-name">
|
88
|
-
<a href="/blob/master:Readme.md"><i class="icon icon-file"></i> Readme.md</a>
|
89
|
-
</td>
|
90
|
-
<td></td>
|
91
|
-
<td class="gts-commit-oid"></td>
|
92
|
-
<td></td>
|
93
|
-
</tr>
|
94
|
-
<tr>
|
95
|
-
<td class="gts-name">
|
96
|
-
<a href="/blob/master:dolt.gemspec"><i class="icon icon-file"></i> dolt.gemspec</a>
|
97
|
-
</td>
|
98
|
-
<td></td>
|
99
|
-
<td class="gts-commit-oid"></td>
|
100
|
-
<td></td>
|
101
|
-
</tr>
|
102
|
-
</tbody>
|
103
|
-
</table>*/
|
104
|
-
|
105
|
-
this.server = this.useFakeServer();
|
106
|
-
|
107
|
-
this.treeData = function (tree) {
|
108
|
-
var json = JSON.stringify(tree);
|
109
|
-
var response = [200, { "Content-Type": "application/json" }, json];
|
110
|
-
this.server.respondWith("GET", "/tree-data.json", response);
|
111
|
-
};
|
112
|
-
},
|
113
|
-
|
114
|
-
"puts spinner in first row": function () {
|
115
|
-
gts.treeHistory(this.table, "/tree-data.json");
|
116
|
-
var $table = jQuery(this.table);
|
117
|
-
var spinners = $table.find(".spinner");
|
118
|
-
|
119
|
-
assert.equals(spinners.length, 1);
|
120
|
-
assert.equals(spinners[0].parentNode.parentNode,
|
121
|
-
$table.find("tbody tr:first")[0]);
|
122
|
-
},
|
123
|
-
|
124
|
-
"fires request for data": function () {
|
125
|
-
gts.treeHistory(this.table, "/tree-data.json");
|
126
|
-
|
127
|
-
assert.equals(this.server.requests.length, 1);
|
128
|
-
assert.equals(this.server.requests[0].method, "GET");
|
129
|
-
assert.equals(this.server.requests[0].url, "/tree-data.json");
|
130
|
-
},
|
131
|
-
|
132
|
-
"removes spinner when server responds": function () {
|
133
|
-
gts.treeHistory(this.table, "/tree-data.json");
|
134
|
-
|
135
|
-
this.treeData([]);
|
136
|
-
this.server.respond();
|
137
|
-
|
138
|
-
assert.equals(jQuery(this.table).find(".spinner").length, 0);
|
139
|
-
},
|
140
|
-
|
141
|
-
"adding history": {
|
142
|
-
setUp: function () {
|
143
|
-
this.treeData([{
|
144
|
-
type: "blob",
|
145
|
-
oid: "e90021f89616ddf86855d05337c188408d3b417e",
|
146
|
-
filemode: 33188,
|
147
|
-
name: ".gitmodules",
|
148
|
-
history: [{
|
149
|
-
oid: "906d67b4f3e5de7364ba9b57d174d8998d53ced6",
|
150
|
-
author: { name: "Christian Johansen", email: "christian@cjohansen.no" },
|
151
|
-
summary: "Working Moron server for viewing blobs",
|
152
|
-
date: "2012-09-10T15:07:39+0200"
|
153
|
-
}]
|
154
|
-
}, {
|
155
|
-
type: "blob",
|
156
|
-
oid: "c80ee3697054566d1a4247d80be78ec3ddfde295",
|
157
|
-
filemode: 33188,
|
158
|
-
name: "Gemfile",
|
159
|
-
history: [{
|
160
|
-
oid: "26139a3aba4aac8cbf658c0d0ea58b8983e4090b",
|
161
|
-
author: { name: "Christian Johansen", email: "christian@cjohansen.no" },
|
162
|
-
summary: "Initial commit",
|
163
|
-
date: "2012-08-23T11:40:39+0200"
|
164
|
-
}]
|
165
|
-
}]);
|
166
|
-
|
167
|
-
gts.treeHistory(this.table, "/tree-data.json");
|
168
|
-
this.server.respond();
|
169
|
-
},
|
170
|
-
|
171
|
-
"adds history for .gitmodules": function () {
|
172
|
-
var row = this.table.getElementsByTagName("tr")[6];
|
173
|
-
var cells = row.getElementsByTagName("td");
|
174
|
-
|
175
|
-
assert.equals(cells[1].innerHTML, "Sep 10 2012");
|
176
|
-
assert.equals(jQuery(cells[2]).attr("data-gts-commit-oid"),
|
177
|
-
"906d67b4f3e5de7364ba9b57d174d8998d53ced6");
|
178
|
-
assert.equals(cells[2].innerHTML, "#906d67b");
|
179
|
-
assert.match(cells[3].innerHTML, "Working Moron server for viewing blobs");
|
180
|
-
assert.match(cells[3].innerHTML, "Christian Johansen");
|
181
|
-
},
|
182
|
-
|
183
|
-
"adds history for Gemfile": function () {
|
184
|
-
var row = this.table.getElementsByTagName("tr")[7];
|
185
|
-
var cells = row.getElementsByTagName("td");
|
186
|
-
|
187
|
-
assert.equals(cells[1].innerHTML, "Aug 23 2012");
|
188
|
-
assert.equals(jQuery(cells[2]).attr("data-gts-commit-oid"),
|
189
|
-
"26139a3aba4aac8cbf658c0d0ea58b8983e4090b");
|
190
|
-
assert.equals(cells[2].innerHTML, "#26139a3");
|
191
|
-
assert.match(cells[3].innerHTML, "Initial commit");
|
192
|
-
assert.match(cells[3].innerHTML, "Christian Johansen");
|
193
|
-
}
|
194
|
-
},
|
195
|
-
|
196
|
-
"adding history in nested tree": {
|
197
|
-
setUp: function () {
|
198
|
-
/*:DOC table = <table data-gts-tree-history="/tree_history/master:lib" class="table table-striped gts-tree-explorer">
|
199
|
-
<thead>
|
200
|
-
<tr>
|
201
|
-
<th colspan="2">File</th>
|
202
|
-
<th class="gts-col-changed">Changed</th>
|
203
|
-
<th colspan="2" class="gts-col-commit">Last commit</th>
|
204
|
-
</tr>
|
205
|
-
</thead>
|
206
|
-
<tbody>
|
207
|
-
<tr>
|
208
|
-
<td colspan="5">
|
209
|
-
<a href="/tree/master:lib">
|
210
|
-
<i class="icon icon-folder-open"></i> lib
|
211
|
-
</a>
|
212
|
-
</td>
|
213
|
-
</tr>
|
214
|
-
<tr>
|
215
|
-
<td></td>
|
216
|
-
<td class="gts-name">
|
217
|
-
<a href="/tree/master:lib/dolt">
|
218
|
-
<i class="icon icon-folder-close"></i>
|
219
|
-
dolt
|
220
|
-
</a>
|
221
|
-
</td>
|
222
|
-
<td></td>
|
223
|
-
<td class="gts-commit-oid"></td>
|
224
|
-
<td></td>
|
225
|
-
</tr>
|
226
|
-
</tbody>
|
227
|
-
</table>*/
|
228
|
-
|
229
|
-
this.treeData([{
|
230
|
-
history: [{
|
231
|
-
oid: "2ca8e4e51aeb7d4cff7145c1e4e2ccb9cde19181",
|
232
|
-
summary: "Add support for async tree history",
|
233
|
-
message: "",
|
234
|
-
author: {
|
235
|
-
email: "christian@gitorious.com",
|
236
|
-
name: "Christian Johansen"
|
237
|
-
},
|
238
|
-
date: "Tue Oct 02 14:04:22 +0200 2012"
|
239
|
-
}],
|
240
|
-
oid: "7b83452d4ca77e2e81b5a7de8cfe4c0b0430bec3",
|
241
|
-
filemode: 16384,
|
242
|
-
type: "tree",
|
243
|
-
name: "dolt"
|
244
|
-
}]);
|
245
|
-
},
|
246
|
-
|
247
|
-
"annotates correct row": function () {
|
248
|
-
gts.treeHistory(this.table, "/tree-data.json");
|
249
|
-
this.server.respond();
|
250
|
-
|
251
|
-
var row = this.table.getElementsByTagName("tr")[2];
|
252
|
-
var cells = row.getElementsByTagName("td");
|
253
|
-
|
254
|
-
assert.equals(cells[2].innerHTML, "Oct 2 2012");
|
255
|
-
assert.equals(jQuery(cells[3]).attr("data-gts-commit-oid"),
|
256
|
-
"2ca8e4e51aeb7d4cff7145c1e4e2ccb9cde19181");
|
257
|
-
assert.equals(cells[3].innerHTML, "#2ca8e4e");
|
258
|
-
assert.match(cells[4].innerHTML, "Add support for async tree history");
|
259
|
-
assert.match(cells[4].innerHTML, "Christian Johansen");
|
260
|
-
}
|
261
|
-
},
|
262
|
-
|
263
|
-
"adding history with long commit summary": {
|
264
|
-
setUp: function () {
|
265
|
-
/*:DOC table = <table data-gts-tree-history="/tree_history/master:lib" class="table table-striped gts-tree-explorer">
|
266
|
-
<thead>
|
267
|
-
<tr>
|
268
|
-
<th colspan="2">File</th>
|
269
|
-
<th class="gts-col-changed">Changed</th>
|
270
|
-
<th colspan="2" class="gts-col-commit">Last commit</th>
|
271
|
-
</tr>
|
272
|
-
</thead>
|
273
|
-
<tbody>
|
274
|
-
<tr>
|
275
|
-
<td colspan="5">
|
276
|
-
<a href="/tree/master:lib">
|
277
|
-
<i class="icon icon-folder-open"></i> lib
|
278
|
-
</a>
|
279
|
-
</td>
|
280
|
-
</tr>
|
281
|
-
<tr>
|
282
|
-
<td></td>
|
283
|
-
<td class="gts-name">
|
284
|
-
<a href="/tree/master:lib/dolt">
|
285
|
-
<i class="icon icon-folder-close"></i>
|
286
|
-
dolt
|
287
|
-
</a>
|
288
|
-
</td>
|
289
|
-
<td></td>
|
290
|
-
<td class="gts-commit-oid"></td>
|
291
|
-
<td></td>
|
292
|
-
</tr>
|
293
|
-
</tbody>
|
294
|
-
</table>*/
|
295
|
-
|
296
|
-
this.treeData([{
|
297
|
-
history: [{
|
298
|
-
oid: "2ca8e4e51aeb7d4cff7145c1e4e2ccb9cde19181",
|
299
|
-
summary: "Aaaaaaaaa Bbbbbbbbb Ccccccccc Ddddddddd Eeeeeeeee Fffffffff ",
|
300
|
-
message: "",
|
301
|
-
author: {
|
302
|
-
email: "christian@gitorious.com",
|
303
|
-
name: "Christian Johansen"
|
304
|
-
},
|
305
|
-
date: "Tue Oct 02 14:04:22 +0200 2012"
|
306
|
-
}],
|
307
|
-
oid: "7b83452d4ca77e2e81b5a7de8cfe4c0b0430bec3",
|
308
|
-
filemode: 16384,
|
309
|
-
type: "tree",
|
310
|
-
name: "dolt"
|
311
|
-
}]);
|
312
|
-
},
|
313
|
-
|
314
|
-
"annotates correct row": function () {
|
315
|
-
gts.treeHistory(this.table, "/tree-data.json");
|
316
|
-
this.server.respond();
|
317
|
-
|
318
|
-
var row = this.table.getElementsByTagName("tr")[2];
|
319
|
-
var summary = row.getElementsByTagName("td")[4].innerHTML;
|
320
|
-
|
321
|
-
assert.match(summary, "Aaaaaaaaa Bbbbbbbbb Ccccccccc Ddddddddd [...]");
|
322
|
-
}
|
323
|
-
}
|
324
|
-
});
|