ursm-ditz 0.4 → 0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/Changelog +15 -0
  2. data/INSTALL +20 -0
  3. data/LICENSE +674 -0
  4. data/Manifest.txt +40 -0
  5. data/PLUGINS.txt +140 -0
  6. data/README.txt +43 -27
  7. data/Rakefile +36 -3
  8. data/ReleaseNotes +6 -0
  9. data/bin/ditz +49 -63
  10. data/contrib/completion/ditz.bash +25 -9
  11. data/lib/ditz.rb +52 -7
  12. data/lib/ditz/file-storage.rb +54 -0
  13. data/lib/{hook.rb → ditz/hook.rb} +1 -1
  14. data/lib/{html.rb → ditz/html.rb} +42 -4
  15. data/lib/{lowline.rb → ditz/lowline.rb} +31 -11
  16. data/lib/{model-objects.rb → ditz/model-objects.rb} +53 -21
  17. data/lib/ditz/model.rb +321 -0
  18. data/lib/{operator.rb → ditz/operator.rb} +122 -67
  19. data/lib/ditz/plugins/git-sync.rb +83 -0
  20. data/lib/{plugins → ditz/plugins}/git.rb +57 -18
  21. data/lib/ditz/plugins/issue-claiming.rb +174 -0
  22. data/lib/ditz/plugins/issue-labeling.rb +161 -0
  23. data/lib/{util.rb → ditz/util.rb} +4 -0
  24. data/lib/{view.rb → ditz/view.rb} +0 -0
  25. data/lib/{views.rb → ditz/views.rb} +7 -4
  26. data/man/{ditz.1 → man1/ditz.1} +1 -1
  27. data/setup.rb +1585 -0
  28. data/share/ditz/blue-check.png +0 -0
  29. data/{lib → share/ditz}/component.rhtml +7 -5
  30. data/share/ditz/green-bar.png +0 -0
  31. data/share/ditz/green-check.png +0 -0
  32. data/share/ditz/index.rhtml +130 -0
  33. data/share/ditz/issue.rhtml +119 -0
  34. data/share/ditz/issue_table.rhtml +28 -0
  35. data/share/ditz/red-check.png +0 -0
  36. data/share/ditz/release.rhtml +98 -0
  37. data/share/ditz/style.css +226 -0
  38. data/share/ditz/unassigned.rhtml +23 -0
  39. data/share/ditz/yellow-bar.png +0 -0
  40. metadata +50 -28
  41. data/lib/index.rhtml +0 -113
  42. data/lib/issue.rhtml +0 -111
  43. data/lib/issue_table.rhtml +0 -33
  44. data/lib/model.rb +0 -208
  45. data/lib/plugins/issue-claiming.rb +0 -92
  46. data/lib/release.rhtml +0 -69
  47. data/lib/style.css +0 -127
  48. data/lib/trollop.rb +0 -518
  49. data/lib/unassigned.rhtml +0 -31
  50. data/lib/vendor/yaml_waml.rb +0 -28
Binary file
@@ -1,22 +1,24 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
1
2
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
3
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
4
 
4
5
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
6
  <head>
6
7
  <title>Component <%= component.name %></title>
7
- <meta http-equiv="Content-Type" content="text/html; charset=utf8" />
8
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
9
  <link rel="stylesheet" href="style.css" type="text/css" />
9
10
  </head>
10
11
 
11
12
  <body>
12
13
 
13
- <div><%= link_to "index", "&laquo; #{project.name} project page" %></div>
14
+ <div class="main">
14
15
 
15
16
  <h1><%= project.name %> component: <%= component.name %></h1>
17
+ <div class="backptr"><%= link_to "index", "&laquo; #{project.name} project page" %></div>
16
18
 
19
+ <h2>All issues</h2>
17
20
  <%= render "issue_table", :show_component => false, :show_release => true %>
18
-
19
- <p class="footer">Generated by <a
20
- href="http://ditz.rubyforge.org/">ditz</a>.</p>
21
+ </div>
22
+ <div class="footer">Generated by <a href="http://ditz.rubyforge.org/">ditz</a>.</div>
21
23
  </body>
22
24
  </html>
Binary file
@@ -0,0 +1,130 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <title><%= project.name %> Issue Tracker</title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
+ <link rel="stylesheet" href="style.css" type="text/css" />
10
+ </head>
11
+ <body>
12
+
13
+ <div class="main">
14
+ <h1><%= project.name %> Issue Tracker</h1>
15
+
16
+ <h2>Upcoming Releases</h2>
17
+ <% if upcoming_releases.empty? %>
18
+ <p>No upcoming releases.</p>
19
+ <% else %>
20
+ <table>
21
+ <tbody>
22
+ <% upcoming_releases.each do |r| %>
23
+ <%
24
+ issues = project.issues_for_release r
25
+ num_done = issues.count_of { |i| i.closed? }
26
+ pct_done = issues.size == 0 ? 1.0 : (num_done.to_f / issues.size.to_f)
27
+ open_issues = issues.select { |i| i.open? }
28
+ %>
29
+ <tr><td>
30
+ <%= link_to r, "#{r.name}" %>
31
+ </td>
32
+ <td>
33
+ <% if issues.empty? %>
34
+ no issues
35
+ <% elsif open_issues.empty? %>
36
+ ready for release!
37
+ <% else %>
38
+ <%= progress_meter pct_done %>
39
+ <%= sprintf "%.0f%%", pct_done * 100.0 %> complete
40
+ </td>
41
+ </tr><tr><td></td><td>
42
+ <%= num_done %> / <%= issues.size %> issues.
43
+ <%= link_to r, "See issues &raquo;" %>
44
+ <% end %>
45
+ </td>
46
+ </tr>
47
+ <% end %>
48
+ </tbody>
49
+ </table>
50
+ <% end %>
51
+
52
+ <h2>Past Releases</h2>
53
+ <% if past_releases.empty? %>
54
+ <p>No past releases.</p>
55
+ <% else %>
56
+ <table>
57
+ <tbody>
58
+ <% past_releases.sort_by { |r| r.release_time }.reverse.each do |r| %>
59
+ <tr><td><%= link_to r, r.name %></td><td class="littledate">on <%= r.release_time.pretty_date %></td></tr>
60
+ <% end %>
61
+ </tbody>
62
+ </table>
63
+ <% end %>
64
+
65
+ <h2>Unassigned issues</h2>
66
+ <%
67
+ issues = project.unassigned_issues
68
+ open_issues = issues.select { |i| i.open? }
69
+ %>
70
+ <p>
71
+ <% if issues.empty? %>
72
+ No unassigned issues.
73
+ <% else %>
74
+ <%= link_to "unassigned", "unassigned issue".pluralize(issues.size).capitalize %> (<%= open_issues.size.to_pretty_s %> open).
75
+ <% end %>
76
+ </p>
77
+
78
+ <% if components.size > 1 %>
79
+ <h2>Open Issues by component</h2>
80
+ <table>
81
+ <tbody>
82
+ <% components.each do |c| %>
83
+ <%
84
+ issues = project.issues_for_component c
85
+ num_done = issues.count_of { |i| i.closed? }
86
+ pct_done = issues.size == 0 ? 1.0 : (num_done.to_f / issues.size.to_f)
87
+ open_issues = issues.select { |i| i.open? }
88
+ %>
89
+ <% if open_issues.empty? %>
90
+ <tr class="dimmed">
91
+ <% else %>
92
+ <tr>
93
+ <% end %>
94
+ <td>
95
+ <%= link_to c, c.name %>
96
+ </td><td>
97
+ <%= "open issue".pluralize(open_issues.size) %>
98
+ </td></tr>
99
+ <% end %>
100
+ </tbody>
101
+ </table>
102
+ <% end %>
103
+
104
+ <h2>Recent activity</h2>
105
+
106
+ <table class="log">
107
+ <tbody>
108
+ <% project.issues.map { |i| i.log_events.map { |e| [e, i] } }.
109
+ flatten_one_level.
110
+ sort_by { |e| e.first.first }.
111
+ reverse[0 ... 25].
112
+ each_with_index do |((date, who, what, comment), i), idx| %>
113
+ <tr class="<%= idx % 2 == 0 ? "even-row" : "odd-row" %>">
114
+ <td class="date"><%= date.pretty_date %></td>
115
+ <td class="issuename">
116
+ <%= issue_link_for i, :status_image => true %>
117
+ </td>
118
+ <td> <%= what %> </td>
119
+ </tr>
120
+ <tr><td></td></tr>
121
+ <% end %>
122
+ </tbody>
123
+ </table>
124
+
125
+ </div>
126
+
127
+ <div class="footer">Generated by <a href="http://ditz.rubyforge.org/">ditz</a>.</div>
128
+
129
+ </body>
130
+ </html>
@@ -0,0 +1,119 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <title><%= issue.title %></title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
+ <link rel="stylesheet" href="style.css" type="text/css" />
10
+ </head>
11
+
12
+ <body>
13
+
14
+ <div class="main">
15
+
16
+ <h1><%= link_issue_names project, issue.title %></h1>
17
+ <div class="backptr"><%= link_to "index", "&laquo; #{project.name} project page" %></div>
18
+
19
+ <% if issue.desc && !issue.desc.empty? %>
20
+ <div class="description">
21
+ <%= link_issue_names project, p(issue.desc) %>
22
+ </div>
23
+ <% end %>
24
+
25
+ <h2>Details</h2>
26
+ <table>
27
+ <tbody>
28
+ <tr>
29
+ <td class="attrname">Id:</td>
30
+ <td class="attrval"><span class="id"><%= issue.id %></span></td>
31
+ </tr>
32
+
33
+ <tr>
34
+ <td class="attrname">Type:</td>
35
+ <td class="attrval"><%= issue.type %></td>
36
+ </tr>
37
+
38
+ <tr>
39
+ <td class="attrname">Creation time:</td>
40
+ <td class="attrval"><%=t issue.creation_time %></td>
41
+ </tr>
42
+
43
+ <tr>
44
+ <td class="attrname">Creator:</td>
45
+ <td class="attrval"><span class="person"><%=obscured_email issue.reporter %></span></td>
46
+ </tr>
47
+
48
+ <% unless issue.references.empty? %>
49
+ <tr>
50
+ <td class="attrname">References:</td>
51
+ <td class="attrval">
52
+ <% issue.references.each_with_index do |r, i| %>
53
+ [<%= i + 1 %>] <%= link_to r, r %><br/>
54
+ <% end %>
55
+ </td>
56
+ </tr>
57
+
58
+ <% end %>
59
+
60
+ <tr>
61
+ <td class="attrname">Release:</td>
62
+ <td class="attrval">
63
+ <% if release %>
64
+ <%= link_to release, release.name %>
65
+ <% if release.released? %>
66
+ (released <%= release.release_time.pretty_date %>)
67
+ <% else %>
68
+ (unreleased)
69
+ <% end %>
70
+ <% else %>
71
+ <%= link_to "unassigned", "unassigned" %>
72
+ <% end %>
73
+ </td>
74
+ </tr>
75
+
76
+ <tr>
77
+ <td class="attrname">Component:</td>
78
+ <td class="attrval"><%= link_to component, component.name %></td>
79
+ </tr>
80
+
81
+ <tr>
82
+ <td class="attrname">Status:</td>
83
+ <td class="attrval">
84
+ <%= issue.status_string %><% if issue.closed? %>: <%= issue.disposition_string %><% end %>
85
+ <%= issue_status_img_for issue, :class => "inline-status-image" %>
86
+ </td>
87
+ </tr>
88
+
89
+ <%= extra_summary_html %>
90
+ </tbody>
91
+ </table>
92
+
93
+ <%= extra_details_html %>
94
+
95
+ <h2>Issue log</h2>
96
+
97
+ <table class="log">
98
+ <tbody>
99
+ <% issue.log_events.reverse.each_with_index do |(time, who, what, comment), i| %>
100
+ <tr class="<%= i % 2 == 0 ? "even-row" : "odd-row" %>">
101
+ <td class="date"><%=t time %></td>
102
+ <td class="person"><%=obscured_email who %></td>
103
+ <td class="message"><%=h what %></td>
104
+ </tr>
105
+ <% unless comment.empty? %>
106
+ <tr><td colspan="3" class="logcomment">
107
+ <%= link_issue_names project, comment %>
108
+ </td></tr>
109
+ <% end %>
110
+ <tr><td></td></tr>
111
+ <% end %>
112
+ </tbody>
113
+ </table>
114
+
115
+ </div>
116
+ <div class="footer">Generated by <a href="http://ditz.rubyforge.org/">ditz</a>.</div>
117
+
118
+ </body>
119
+ </html>
@@ -0,0 +1,28 @@
1
+ <table>
2
+ <tbody>
3
+ <% issues.sort_by { |i| i.creation_time }.reverse.each do |i| %>
4
+ <tr>
5
+ <td> <%= issue_status_img_for i %> </td>
6
+ <td class="littledate"><%= i.creation_time.pretty_date %></td>
7
+ <td class="issuename">
8
+ <%= issue_link_for i %>
9
+ </td>
10
+ <% if show_release %>
11
+ <td class="issuerelease">
12
+ <% if i.release %>
13
+ <% r = project.release_for i.release %>
14
+ <%= link_to r, i.release %>
15
+ <% else %>
16
+ <% end %>
17
+ </td>
18
+ <% end %>
19
+ <% if show_component %>
20
+ <td class="issuecomponent">
21
+ component <%= link_to project.component_for(i.component), i.component %>
22
+ </td>
23
+ <% end %>
24
+ </tr>
25
+ <% end %>
26
+ </tbody>
27
+ </table>
28
+
Binary file
@@ -0,0 +1,98 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <title><%= project.name %> release <%= release.name %></title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
+ <link rel="stylesheet" href="style.css" type="text/css" />
10
+ </head>
11
+ <body>
12
+
13
+ <div class="main">
14
+
15
+ <h1><%= project.name %> release <%= release.name %></h1>
16
+ <div class="backptr"><%= link_to "index", "&laquo; #{project.name} project page" %></div>
17
+
18
+ <table>
19
+ <tbody>
20
+ <tr>
21
+ <td class="attrname">Status:</td>
22
+ <td class="attrval"><%= release.status %></td>
23
+ </tr>
24
+ <% if release.released? %>
25
+ <tr>
26
+ <td class="attrname">Release time:</td>
27
+ <td class="attrval"><%=t release.release_time %></td>
28
+ </tr>
29
+ <% end %>
30
+ <tr>
31
+ <td class="attrname">Completion:</td>
32
+ <td>
33
+ <%
34
+ num_done = issues.count_of { |i| i.closed? }
35
+ pct_done = issues.size == 0 ? 1.0 : (num_done.to_f / issues.size.to_f)
36
+ %>
37
+ <%= progress_meter pct_done %>
38
+ <%= sprintf "%.0f%%", pct_done * 100.0 %>
39
+ </td>
40
+ </tr>
41
+ <tr><td></td><td class="attrval">
42
+ <%= num_done %> / <%= issues.size %> issues
43
+ </td></tr>
44
+ </tbody>
45
+ </table>
46
+
47
+ <h2>Issues</h2>
48
+ <% if issues.empty? %>
49
+ <p>No issues assigned to this release.</p>
50
+ <% else %>
51
+ <%= render "issue_table", :show_component => false, :show_release => false %>
52
+ <% end %>
53
+
54
+ <h2>Recent activity for this release</h2>
55
+ <table class="log">
56
+ <tbody>
57
+ <% issues.map { |i| i.log_events.map { |e| [e, i] } }.
58
+ flatten_one_level.
59
+ sort_by { |e| e.first.first }.
60
+ reverse[0 ... 10].
61
+ each_with_index do |((date, who, what, comment), i), idx| %>
62
+ <tr class="<%= idx % 2 == 0 ? "even-row" : "odd-row" %>">
63
+ <td class="date"><%= date.pretty_date %></td>
64
+ <td class="issuename">
65
+ <%= issue_link_for i, :status_image => true %>
66
+ </td>
67
+ <td> <%= what %> </td>
68
+ </tr>
69
+ <tr><td></td></tr>
70
+ <% end %>
71
+ </tbody>
72
+ </table>
73
+
74
+ <h2>Release log</h2>
75
+ <table class="log">
76
+ <tbody>
77
+ <% release.log_events.reverse.each_with_index do |(time, who, what, comment), i| %>
78
+ <tr class="<%= i % 2 == 0 ? "even-row" : "odd-row" %>">
79
+ <td class="date"><%=h time %></td>
80
+ <td class="person"><%=obscured_email who %></td>
81
+ <td class="message"><%=h what %></td>
82
+ </tr>
83
+ <tr><td colspan="3" class="logcomment">
84
+ <% if comment.empty? %>
85
+ <% else %>
86
+ <%= link_issue_names project, comment %>
87
+ <% end %>
88
+ </td></tr>
89
+ <tr><td></td></tr>
90
+ <% end %>
91
+ </tbody>
92
+ </table>
93
+
94
+ </div>
95
+ <div class="footer">Generated by <a href="http://ditz.rubyforge.org/">ditz</a>.</div>
96
+
97
+ </body>
98
+ </html>
@@ -0,0 +1,226 @@
1
+ body {
2
+ font-family: "lucida grande", "sans serif";
3
+ color: #333;
4
+ width: 60em;
5
+ margin: auto;
6
+ }
7
+
8
+ div.main {
9
+ padding: 20px;
10
+ margin: auto;
11
+ padding-top: 0;
12
+ margin-top: 1em;
13
+ background-color: #fcfcfc;
14
+ }
15
+
16
+ .person {
17
+ font-family: courier;
18
+ }
19
+
20
+ a, a:visited {
21
+ background: inherit;
22
+ text-decoration: none;
23
+ }
24
+
25
+ a {
26
+ color: #003d41;
27
+ }
28
+
29
+ a:visited {
30
+ color: #553d41;
31
+ }
32
+
33
+ ul {
34
+ list-style-type: none;
35
+ padding: 0;
36
+ }
37
+
38
+ p {
39
+ width: 40em;
40
+ }
41
+
42
+ .inline-status-image {
43
+ position: relative;
44
+ top: 0.2em;
45
+ }
46
+
47
+ .dimmed {
48
+ color: #bbb;
49
+ }
50
+
51
+ table {
52
+ border-style: none;
53
+ border-spacing: 0;
54
+ }
55
+
56
+ table.log {
57
+ }
58
+
59
+
60
+ td {
61
+ border-width: 0;
62
+ border-style: none;
63
+ padding-right: 0.5em;
64
+ padding-left: 0.5em;
65
+ }
66
+
67
+ tr {
68
+ vertical-align: top;
69
+ }
70
+
71
+ h1 {
72
+ padding: 0.5em;
73
+ margin-left: -20px;
74
+ margin-right: -20px;
75
+ background-color: #305275;
76
+ margin-top: 0;
77
+ margin-bottom: 0;
78
+ color: #fff;
79
+ }
80
+
81
+ h2 {
82
+ text-transform: uppercase;
83
+ font-size: smaller;
84
+ margin-top: 1em;
85
+ margin-left: -0.5em;
86
+ width: 100%;
87
+ /*background: #fffbce;*/
88
+ /*background: #628a0d;*/
89
+ padding: 5px;
90
+ color: #305275;
91
+ }
92
+
93
+ .attrname {
94
+ text-align: right;
95
+ font-size: smaller;
96
+ }
97
+
98
+ .attrval {
99
+ color: #222;
100
+ }
101
+
102
+ .issue-closed-fixed {
103
+ background-image: "green-check.png";
104
+ }
105
+
106
+ .issue-closed-wontfix {
107
+ background-image: "red-check.png";
108
+ }
109
+
110
+ .issue-closed-reorg {
111
+ background-image: "blue-check.png";
112
+ }
113
+
114
+ .inline-issue-link {
115
+ text-decoration: underline;
116
+ }
117
+
118
+ img {
119
+ border: 0;
120
+ }
121
+
122
+ /*
123
+ .issuestatus_closed {
124
+ background-color: #f2fff2;
125
+ text-align: center;
126
+ }
127
+
128
+ .issuestatus_in_progress {
129
+ background-color: #fffff2;
130
+ text-align: center;
131
+ }
132
+
133
+ .issuestatus_paused {
134
+ background-color: #fffff2;
135
+ text-align: center;
136
+ }
137
+
138
+ .issuestatus_unstarted {
139
+ background-color: #fff2f2;
140
+ text-align: center;
141
+ }
142
+
143
+ .issuestatus_closed a {
144
+ color: #202020;
145
+ }
146
+
147
+ .issuestatus_in_progress a {
148
+ color: #202020;
149
+ }
150
+
151
+ .issuestatus_paused a {
152
+ color: #202020;
153
+ }
154
+
155
+ .issuestatus_unstarted a {
156
+ color: #202020;
157
+ }
158
+ */
159
+
160
+ div.footer {
161
+ font-size: small;
162
+ padding-left: 20px;
163
+ padding-right: 20px;
164
+ padding-top: 5px;
165
+ padding-bottom: 5px;
166
+ margin: auto;
167
+ background: #305275;
168
+ color: #fffee7;
169
+ }
170
+
171
+ .footer a {
172
+ color: #508d91;
173
+ }
174
+
175
+ .even-row {
176
+ font-size: smaller;
177
+ background-color: #f2f2f2;
178
+ }
179
+
180
+ .odd-row {
181
+ font-size: smaller;
182
+ background-color: #f2f2f2;
183
+ }
184
+
185
+ .backptr {
186
+ font-size: smaller;
187
+ width: 100%;
188
+ text-align: left;
189
+ padding-bottom: 1em;
190
+ margin-top: 0;
191
+ }
192
+
193
+ .logcomment {
194
+ padding-left: 4em;
195
+ font-size: smaller;
196
+ }
197
+
198
+ .id {
199
+ font-family: monospace;
200
+ }
201
+
202
+ .description {
203
+ background: #f2f2f2;
204
+ padding-left: 1em;
205
+ padding-right: 1em;
206
+ padding-top: 0.5em;
207
+ padding-bottom: 0.5em;
208
+ }
209
+
210
+ .message {
211
+ }
212
+
213
+ .littledate {
214
+ font-size: smaller;
215
+ }
216
+
217
+ .progress-meter-done {
218
+ background-color: #03af00;
219
+ }
220
+
221
+ .progress-meter-undone {
222
+ background-color: #ddd;
223
+ }
224
+
225
+ .progress-meter {
226
+ }