ticketmaster-trac 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm 1.8.7@ticketmaster-trac --create
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.7
1
+ 0.2.8
@@ -0,0 +1,405 @@
1
+
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml">
4
+
5
+
6
+
7
+
8
+
9
+
10
+ <head>
11
+ <title>
12
+ #142 (Accredited investor reminder on forwarded deals)
13
+ – CapLinked ProjectLocker
14
+ </title>
15
+ <link rel="search" href="/CapLinked/Website/trac/search" />
16
+ <link rel="prev" href="/CapLinked/Website/trac/ticket/115" title="Ticket #115" />
17
+ <link rel="last" href="/CapLinked/Website/trac/ticket/165" title="Ticket #165" />
18
+ <link rel="help" href="/CapLinked/Website/trac/wiki/TracGuide" />
19
+ <link rel="alternate" href="/CapLinked/Website/trac/ticket/142?format=csv" type="text/csv" class="csv" title="Comma-delimited Text" /><link rel="alternate" href="/CapLinked/Website/trac/ticket/142?format=tab" type="text/tab-separated-values" class="tab" title="Tab-delimited Text" /><link rel="alternate" href="/CapLinked/Website/trac/ticket/142?format=rss" type="application/rss+xml" class="rss" title="RSS Feed" />
20
+ <link rel="up" href="/CapLinked/Website/trac/report/6?USER=ron%40hybridgroup.com&amp;page=1" />
21
+ <link rel="next" href="/CapLinked/Website/trac/ticket/154" title="Ticket #154" />
22
+ <link rel="start" href="/CapLinked/Website/trac/wiki" />
23
+ <link rel="stylesheet" href="/CapLinked/Website/trac/chrome/common/css/trac.css" type="text/css" /><link rel="stylesheet" href="/CapLinked/Website/trac/chrome/common/css/ticket.css" type="text/css" />
24
+ <link rel="first" href="/CapLinked/Website/trac/ticket/172" title="Ticket #172" />
25
+ <link rel="shortcut icon" href="/CapLinked/Website/trac/chrome/site/button_folder.jpg" type="image/jpeg" />
26
+ <link rel="icon" href="/CapLinked/Website/trac/chrome/site/button_folder.jpg" type="image/jpeg" />
27
+ <link type="application/opensearchdescription+xml" rel="search" href="/CapLinked/Website/trac/search/opensearch" title="Search CapLinked ProjectLocker" />
28
+ <script type="text/javascript" src="/CapLinked/Website/trac/chrome/common/js/jquery.js"></script><script type="text/javascript" src="/CapLinked/Website/trac/chrome/common/js/trac.js"></script><script type="text/javascript" src="/CapLinked/Website/trac/chrome/common/js/search.js"></script>
29
+ <!--[if lt IE 7]>
30
+ <script type="text/javascript" src="/CapLinked/Website/trac/chrome/common/js/ie_pre7_hacks.js"></script>
31
+ <![endif]-->
32
+ <script type="text/javascript" src="/CapLinked/Website/trac/chrome/common/js/wikitoolbar.js"></script><script type="text/javascript">
33
+ jQuery(document).ready(function($) {
34
+ $("div.description").find("h1,h2,h3,h4,h5,h6").addAnchor("Link to this section");
35
+ $("#changelog h3.change").addAnchor("Link to this change");
36
+ /* only enable control elements for the currently selected action */
37
+ var actions = $("#action input[name='action']");
38
+ function updateActionFields() {
39
+ actions.each(function () {
40
+ $(this).siblings().find("*[id]").enable($(this).checked());
41
+ $(this).siblings().filter("*[id]").enable($(this).checked());
42
+ });
43
+ }
44
+ actions.click(updateActionFields);
45
+ updateActionFields();
46
+ });
47
+ </script>
48
+ </head>
49
+ <body>
50
+ <div id="banner">
51
+ <div id="header">
52
+ <a id="logo" href="https://portal.projectlocker.com/user/home"><img src="/CapLinked/Website/trac/chrome/common/ProjectLocker_logo.gif" alt="ProjectLocker Logo" height="64" width="289" /></a>
53
+ </div>
54
+ <form id="search" action="/CapLinked/Website/trac/search" method="get">
55
+ <div>
56
+ <label for="proj-search">Search:</label>
57
+ <input type="text" id="proj-search" name="q" size="18" value="" />
58
+ <input type="submit" value="Search" />
59
+ </div>
60
+ </form>
61
+ <div id="metanav" class="nav">
62
+ <ul>
63
+ <li class="first">logged in as ron@hybridgroup.com</li><li><a href="/CapLinked/Website/trac/prefs">Preferences</a></li><li><a href="/CapLinked/Website/trac/wiki/TracGuide">Help/Guide</a></li><li><a href="/CapLinked/Website/trac/about">About Trac</a></li><li><a href="/CapLinked/Website/trac/rpc">RPC API</a></li><li class="last"><a href="/CapLinked/Website/trac/logout">Logout</a></li>
64
+ </ul>
65
+ </div>
66
+ </div>
67
+ <div id="mainnav" class="nav">
68
+ <ul>
69
+ <li class="first"><a href="/CapLinked/Website/trac/wiki">Wiki</a></li><li><a href="/CapLinked/Website/trac/timeline">Timeline</a></li><li><a href="/CapLinked/Website/trac/roadmap">Roadmap</a></li><li><a href="/CapLinked/Website/trac/browser">Browse Source</a></li><li class="active"><a href="/CapLinked/Website/trac/report">View Tickets</a></li><li><a href="/CapLinked/Website/trac/newticket">New Ticket</a></li><li><a href="/CapLinked/Website/trac/search">Search</a></li><li class="last"><a href="/CapLinked/Website/trac/admin" title="Administration">Admin</a></li>
70
+ </ul>
71
+ </div>
72
+ <div id="main">
73
+ <div id="ctxtnav" class="nav">
74
+ <h2>Context Navigation</h2>
75
+ <ul>
76
+ <li class="first"><span>&larr; <a class="prev" href="/CapLinked/Website/trac/ticket/115" title="Ticket #115">Previous Ticket</a></span></li><li><a href="/CapLinked/Website/trac/report/6?USER=ron%40hybridgroup.com&amp;page=1">Back to Query</a></li><li class="last"><span><a class="next" href="/CapLinked/Website/trac/ticket/154" title="Ticket #154">Next Ticket</a> &rarr;</span></li>
77
+ </ul>
78
+ <hr />
79
+ </div>
80
+ <div id="content" class="ticket">
81
+ <h1>
82
+ Ticket #142
83
+ <span class="status">(closed defect: fixed)</span>
84
+ </h1>
85
+ <!-- Do not show the ticket (pre)view when the user first comes to the "New Ticket" page.
86
+ Wait until they hit preview. -->
87
+ <!-- Ticket Box (ticket fields along with description) -->
88
+ <div id="ticket">
89
+ <div class="date">
90
+ <p>Opened <a class="timeline" href="/CapLinked/Website/trac/timeline?from=2010-09-24T19%3A49%3A29-0500&amp;precision=second" title="2010-09-24T19:49:29-0500 in Timeline">7 months</a> ago</p>
91
+ <p>Last modified <a class="timeline" href="/CapLinked/Website/trac/timeline?from=2010-10-27T23%3A55%3A16-0500&amp;precision=second" title="2010-10-27T23:55:16-0500 in Timeline">6 months</a> ago</p>
92
+ </div>
93
+ <!-- use a placeholder if it's a new ticket -->
94
+ <h2 class="summary searchable">Accredited investor reminder on forwarded deals</h2>
95
+ <table class="properties">
96
+ <tr>
97
+ <th id="h_reporter">Reported by:</th>
98
+ <td headers="h_reporter" class="searchable">eric@…</td>
99
+ <th id="h_owner">Owned by:</th>
100
+ <td headers="h_owner">george@…
101
+ </td>
102
+ </tr>
103
+ <tr>
104
+ <th id="h_priority">
105
+ Priority:
106
+ </th>
107
+ <td headers="h_priority">
108
+ High (urgent)
109
+ </td>
110
+ <th id="h_milestone">
111
+ Milestone:
112
+ </th>
113
+ <td headers="h_milestone">
114
+ <a class="milestone" href="/CapLinked/Website/trac/milestone/milestone4">milestone4</a>
115
+ </td>
116
+ </tr><tr>
117
+ <th id="h_component">
118
+ Component:
119
+ </th>
120
+ <td headers="h_component">
121
+ UI
122
+ </td>
123
+ <th id="h_keywords">
124
+ Keywords:
125
+ </th>
126
+ <td headers="h_keywords" class="searchable">
127
+ </td>
128
+ </tr><tr>
129
+ <th id="h_cc">
130
+ Cc:
131
+ </th>
132
+ <td headers="h_cc" class="searchable">
133
+ dave@…
134
+ </td>
135
+ <th>
136
+ </th>
137
+ <td>
138
+ </td>
139
+ </tr>
140
+ </table>
141
+ <div class="description">
142
+ <h3 id="comment:description">
143
+ Description
144
+ </h3>
145
+ <form id="addreply" method="get" action="#comment">
146
+ <div class="inlinebuttons">
147
+ <input type="hidden" name="replyto" value="description" />
148
+ <input type="submit" name="reply" value="Reply" title="Reply, quoting this description" />
149
+ </div>
150
+ </form>
151
+ <div class="searchable">
152
+ <p>
153
+ Upon further consideration and discussion with counsel, Chris and I concluded we ought to display the following message on a deal when it is sent to a recipient:<br />
154
+ </p>
155
+ <p>
156
+ "Remember that you may need to be an accredited investor (see the Disclaimer for a full description of this) in order to make an investent in this deal that complies with applicable securities laws. Please make sure that you understand whether or not you qualify as an accredited investor before considering this as an investment. Thank you."<br />
157
+ </p>
158
+ <p>
159
+ The message could be displayed as a modal window or as small text under the <a class="missing wiki" href="/CapLinked/Website/trac/wiki/Note/Things" rel="nofollow">Note/Things?</a>-to-Do section.<br />
160
+ </p>
161
+
162
+ </div>
163
+ </div>
164
+ </div>
165
+ <h2>Attachments</h2>
166
+ <div id="attachments">
167
+ <form method="get" action="/CapLinked/Website/trac/attachment/ticket/142/" id="attachfile">
168
+ <div>
169
+ <input type="hidden" name="action" value="new" />
170
+ <input type="submit" name="attachfilebutton" value="Attach file" />
171
+ </div>
172
+ </form>
173
+ </div>
174
+ <h2>Change History</h2>
175
+ <div id="changelog">
176
+ <form method="get" action="#comment" class="printableform">
177
+ <div class="change">
178
+ <h3 class="change" id="comment:1">
179
+ Changed <a class="timeline" href="/CapLinked/Website/trac/timeline?from=2010-09-25T18%3A13%3A35-0500&amp;precision=second" title="2010-09-25T18:13:35-0500 in Timeline">7 months</a> ago by eric@…
180
+ </h3>
181
+ <div class="inlinebuttons">
182
+ <input type="hidden" name="replyto" value="1" />
183
+ <input type="submit" value="Reply" title="Reply to comment 1" />
184
+ </div>
185
+ <div class="comment searchable">
186
+ <p>
187
+ Revised text: "Remember that you may need to be an accredited investor (see the Disclaimer for a description of this term) in order to make an investent in this deal that complies with applicable securities laws. Please make sure that you understand who is eligible to invest in this deal before making any investment."<br />
188
+ </p>
189
+
190
+ </div>
191
+ </div>
192
+ </form><form method="get" action="#comment" class="printableform">
193
+ <div class="change">
194
+ <h3 class="change" id="comment:2">
195
+ Changed <a class="timeline" href="/CapLinked/Website/trac/timeline?from=2010-09-26T20%3A22%3A40-0500&amp;precision=second" title="2010-09-26T20:22:40-0500 in Timeline">7 months</a> ago by eric@…
196
+ </h3>
197
+ <div class="inlinebuttons">
198
+ <input type="hidden" name="replyto" value="2" />
199
+ <input type="submit" value="Reply" title="Reply to comment 2" />
200
+ </div>
201
+ <ul class="changes">
202
+ <li>
203
+ <strong>priority</strong>
204
+ changed from <em>critical</em> to <em>blocker</em>
205
+ </li>
206
+ </ul>
207
+ <div class="comment searchable">
208
+ <p>
209
+ Note -- this one is a blocker for Deals launch tonight. Please add the revised text that was posted yesterday onto the Deal summary page under the "Things To Do" section.<br />
210
+ </p>
211
+
212
+ </div>
213
+ </div>
214
+ </form><form method="get" action="#comment" class="printableform">
215
+ <div class="change">
216
+ <h3 class="change" id="comment:3">
217
+ Changed <a class="timeline" href="/CapLinked/Website/trac/timeline?from=2010-10-03T14%3A47%3A30-0500&amp;precision=second" title="2010-10-03T14:47:30-0500 in Timeline">6 months</a> ago by cg@…
218
+ </h3>
219
+ <div class="inlinebuttons">
220
+ <input type="hidden" name="replyto" value="3" />
221
+ <input type="submit" value="Reply" title="Reply to comment 3" />
222
+ </div>
223
+ <ul class="changes">
224
+ <li>
225
+ <strong>milestone</strong>
226
+ changed from <em>None</em> to <em>milestone4</em>
227
+ </li>
228
+ </ul>
229
+ <div class="comment searchable">
230
+
231
+ </div>
232
+ </div>
233
+ </form><form method="get" action="#comment" class="printableform">
234
+ <div class="change">
235
+ <h3 class="change" id="comment:4">
236
+ Changed <a class="timeline" href="/CapLinked/Website/trac/timeline?from=2010-10-27T23%3A55%3A16-0500&amp;precision=second" title="2010-10-27T23:55:16-0500 in Timeline">6 months</a> ago by dave@…
237
+ </h3>
238
+ <div class="inlinebuttons">
239
+ <input type="hidden" name="replyto" value="4" />
240
+ <input type="submit" value="Reply" title="Reply to comment 4" />
241
+ </div>
242
+ <ul class="changes">
243
+ <li>
244
+ <strong>status</strong>
245
+ changed from <em>new</em> to <em>closed</em>
246
+ </li><li>
247
+ <strong>resolution</strong>
248
+ set to <em>fixed</em>
249
+ </li>
250
+ </ul>
251
+ <div class="comment searchable">
252
+ <p>
253
+ This functionality has been on the system since the release of Deals.<br />
254
+ </p>
255
+
256
+ </div>
257
+ </div>
258
+ </form>
259
+ </div>
260
+ <form action="/CapLinked/Website/trac/ticket/142" method="post" id="propertyform"><div><input type="hidden" name="__FORM_TOKEN" value="cb2a4cc2d44af8aa40b13882" /></div>
261
+ <h3><a id="edit" onfocus="$('#comment').get(0).focus()">
262
+ Add/Change #142 (Accredited investor reminder on forwarded deals)</a></h3>
263
+ <div class="field">
264
+ <fieldset class="iefix">
265
+ <label for="comment">Comment (you may use
266
+ <a tabindex="42" href="/CapLinked/Website/trac/wiki/WikiFormatting">WikiFormatting</a>
267
+ here):
268
+ </label><br />
269
+ <p><textarea id="comment" name="comment" class="wikitext" rows="10" cols="78">
270
+ </textarea></p>
271
+ </fieldset>
272
+ </div>
273
+ <fieldset id="properties">
274
+ <legend>
275
+ Change Properties
276
+ </legend>
277
+ <table>
278
+ <tr>
279
+ <th><label for="field-summary">Summary:</label></th>
280
+ <td class="fullrow" colspan="3">
281
+ <input type="text" id="field-summary" name="field_summary" value="Accredited investor reminder on forwarded deals" size="70" />
282
+ </td>
283
+ </tr>
284
+ <tr>
285
+ <th><label for="field-reporter">Reporter:</label></th>
286
+ <td class="fullrow" colspan="3">
287
+ <input type="text" id="field-reporter" name="field_reporter" value="eric@caplinked.com" size="70" />
288
+ </td>
289
+ </tr>
290
+ <tr>
291
+ <th><label for="field-description">Description:</label></th>
292
+ <td class="fullrow" colspan="3">
293
+ <textarea id="field-description" name="field_description" class="wikitext" rows="10" cols="68">
294
+ Upon further consideration and discussion with counsel, Chris and I concluded we ought to display the following message on a deal when it is sent to a recipient:
295
+
296
+ "Remember that you may need to be an accredited investor (see the Disclaimer for a full description of this) in order to make an investent in this deal that complies with applicable securities laws. Please make sure that you understand whether or not you qualify as an accredited investor before considering this as an investment. Thank you."
297
+
298
+ The message could be displayed as a modal window or as small text under the Note/Things-to-Do section.</textarea>
299
+ </td>
300
+ </tr>
301
+ <tr>
302
+ <th class="col1">
303
+ <label for="field-type">Type:</label>
304
+ </th>
305
+ <td class="col1">
306
+ <select id="field-type" name="field_type">
307
+ <option selected="selected">defect</option><option>enhancement</option><option>task</option>
308
+ </select>
309
+ </td>
310
+ <th class="col2">
311
+ <label for="field-priority">Priority:</label>
312
+ </th>
313
+ <td class="col2">
314
+ <select id="field-priority" name="field_priority">
315
+ <option selected="selected">High (urgent)</option><option>Medium-High</option><option>Medium (normal)</option><option>Medium-Low</option><option>Low (not time sensitive)</option>
316
+ </select>
317
+ </td>
318
+ </tr><tr>
319
+ <th class="col1">
320
+ <label for="field-milestone">Milestone:</label>
321
+ </th>
322
+ <td class="col1">
323
+ <select id="field-milestone" name="field_milestone">
324
+ <option></option>
325
+ <optgroup label="Open (no due date)">
326
+ <option>"ASAP" (only for bugs)</option><option>"At Bat" (current week)</option><option>"On Deck" (near term)</option><option>"Ongoing"</option><option>None</option><option>milestone1</option><option>milestone2</option><option>milestone3</option><option selected="selected">milestone4</option><option>milestone5</option>
327
+ </optgroup>
328
+ </select>
329
+ </td>
330
+ <th class="col2">
331
+ <label for="field-component">Component:</label>
332
+ </th>
333
+ <td class="col2">
334
+ <select id="field-component" name="field_component">
335
+ <option>Analytics</option><option>Backend</option><option>Frontend</option><option>SystemJobs</option><option selected="selected">UI</option>
336
+ </select>
337
+ </td>
338
+ </tr><tr>
339
+ <th class="col1">
340
+ <label for="field-keywords">Keywords:</label>
341
+ </th>
342
+ <td class="col1">
343
+ <input type="text" id="field-keywords" name="field_keywords" value="" />
344
+ </td>
345
+ <th class="col2">
346
+ <label for="field-cc">Cc:</label>
347
+ </th>
348
+ <td class="col2">
349
+ <span>
350
+ <input type="text" id="field-cc" title="Space or comma delimited email addresses and usernames are accepted." name="field_cc" value="dave@caplinked.com" />
351
+ </span>
352
+ </td>
353
+ </tr>
354
+ </table>
355
+ </fieldset>
356
+ <fieldset id="action">
357
+ <legend>Action</legend>
358
+ <div>
359
+ <input type="radio" id="action_leave" name="action" value="leave" checked="checked" />
360
+ <label for="action_leave">leave</label>
361
+ as closed
362
+ <span class="hint"></span>
363
+ </div><div>
364
+ <input type="radio" id="action_reopen" name="action" value="reopen" />
365
+ <label for="action_reopen">reopen</label>
366
+ <span class="hint">The resolution will be deleted. Next status will be 'reopened'</span>
367
+ </div>
368
+ </fieldset>
369
+ <div class="buttons">
370
+ <input type="hidden" name="ts" value="2010-10-28 04:55:16+00:00" />
371
+ <input type="hidden" name="replyto" />
372
+ <input type="hidden" name="cnum" value="5" />
373
+ <input type="submit" name="preview" value="Preview" />
374
+ <input type="submit" name="submit" value="Submit changes" />
375
+ </div>
376
+ </form>
377
+ <div id="help">
378
+ <strong>Note:</strong> See
379
+ <a href="/CapLinked/Website/trac/wiki/TracTickets">TracTickets</a> for help on using
380
+ tickets.
381
+ </div>
382
+ </div>
383
+ <div id="altlinks">
384
+ <h3>Download in other formats:</h3>
385
+ <ul>
386
+ <li class="first">
387
+ <a rel="nofollow" href="/CapLinked/Website/trac/ticket/142?format=csv" class="csv">Comma-delimited Text</a>
388
+ </li><li>
389
+ <a rel="nofollow" href="/CapLinked/Website/trac/ticket/142?format=tab" class="tab">Tab-delimited Text</a>
390
+ </li><li class="last">
391
+ <a rel="nofollow" href="/CapLinked/Website/trac/ticket/142?format=rss" class="rss">RSS Feed</a>
392
+ </li>
393
+ </ul>
394
+ </div>
395
+ </div>
396
+ <div id="footer" lang="en" xml:lang="en"><hr />
397
+ <a id="tracpowered" href="http://trac.edgewall.org/"><img src="/CapLinked/Website/trac/chrome/common/trac_logo_mini.png" height="30" width="107" alt="Trac Powered" /></a>
398
+ <p class="left">
399
+ Powered by <a href="/CapLinked/Website/trac/about"><strong>Trac 0.11.7</strong></a><br />
400
+ By <a href="http://www.edgewall.org/">Edgewall Software</a>.
401
+ </p>
402
+ <p class="right"><a href="http://portal.projectlocker.com/user/home">Back to My ProjectLocker</a></p>
403
+ </div>
404
+ </body>
405
+ </html>
@@ -75,7 +75,7 @@ module TicketMaster::Provider
75
75
  end
76
76
 
77
77
  def comments(*options)
78
- comments = CommentUtil.new(self.id).comments.collect { |comment| TicketMaster::Provider::Trac::Comment.new comment }
78
+ comments = CommentUtil.new(self.id,TicketMaster::Provider::Trac.api).comments.collect { |comment| TicketMaster::Provider::Trac::Comment.new comment }
79
79
  if options.first.is_a? Array
80
80
  comments.select do |comment|
81
81
  comment if options.first.any? { |id| id == comment.id }
@@ -99,7 +99,7 @@ module TicketMaster::Provider
99
99
  end
100
100
 
101
101
  def comment(*options)
102
- comments = CommentUtil.new(self.id).comments.collect { |comment| TicketMaster::Provider::Trac::Comment.new comment }
102
+ comments = CommentUtil.new(self.id,TicketMaster::Provider::Trac.api).comments.collect { |comment| TicketMaster::Provider::Trac::Comment.new comment }
103
103
  if options.empty?
104
104
  TicketMaster::Provider::Trac::Comment.new
105
105
  elsif options.first.is_a? Fixnum
@@ -1,8 +1,12 @@
1
1
  require 'ticketmaster'
2
+ require 'openssl'
2
3
  require 'trac4r'
3
4
  require 'nokogiri'
4
5
  require 'open-uri'
5
6
 
7
+ # FIXME: Hack for SSL problem
8
+ OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
9
+
6
10
  require File.dirname(__FILE__) + '/trac/trac'
7
11
 
8
12
  %w{ trac ticket project comment }.each do |f|
data/lib/trac/trac.rb CHANGED
@@ -2,9 +2,8 @@
2
2
 
3
3
  class CommentUtil
4
4
 
5
- def initialize(ticket_id)
6
- trac = TicketMaster::Provider::Trac.api
7
- @doc = Nokogiri::HTML(open("#{trac[:url]}/ticket/#{ticket_id}", :http_basic_authentication=>[trac[:username], trac[:password]]))
5
+ def initialize(ticket_id, trac, doc)
6
+ @doc = doc || Nokogiri::HTML(open("#{trac[:url]}/ticket/#{ticket_id}", :http_basic_authentication=>[trac[:username], trac[:password]]))
8
7
  @ticket_id = ticket_id
9
8
  end
10
9
 
@@ -14,7 +13,9 @@ class CommentUtil
14
13
  body = @doc.css('div.comment p')
15
14
  authors = @doc.css('h3.change')
16
15
  comment_id += 1
17
- build_comment_hash(value, comment_id, body[comment_id-1].text, authors[comment_id-1].content)
16
+ unless body[comment_id-1].nil? || authors[comment_id-1].nil?
17
+ build_comment_hash(value, comment_id, body[comment_id-1].text, authors[comment_id-1].content)
18
+ end
18
19
  end
19
20
  end
20
21
 
@@ -0,0 +1,14 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "CommentUtil" do
4
+
5
+ before(:each) do
6
+ trac = {:url => 'http://localhost/trac', :username => 'username', :password => 'password'}
7
+ @comment_util = CommentUtil.new(1, trac, Nokogiri::HTML(File.open('commentutils-data.html')))
8
+ end
9
+
10
+ it "should return all comments for a ticket" do
11
+ @comment_util.comments.should be_instance_of(Array)
12
+ @comment_util.comments.first[:comment_id] == 1
13
+ end
14
+ end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ticketmaster-trac}
8
- s.version = "0.2.7"
8
+ s.version = "0.2.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Rafael George"]
12
- s.date = %q{2011-02-10}
12
+ s.date = %q{2011-04-12}
13
13
  s.description = %q{Allows ticketmaster to interact with Your System.}
14
14
  s.email = %q{rafael@hybridgroup.com}
15
15
  s.extra_rdoc_files = [
@@ -17,10 +17,12 @@ Gem::Specification.new do |s|
17
17
  "README.md"
18
18
  ]
19
19
  s.files = [
20
+ ".rvmrc",
20
21
  "LICENSE",
21
22
  "README.md",
22
23
  "Rakefile",
23
24
  "VERSION",
25
+ "commentutils-data.html",
24
26
  "lib/provider/comment.rb",
25
27
  "lib/provider/project.rb",
26
28
  "lib/provider/ticket.rb",
@@ -28,6 +30,7 @@ Gem::Specification.new do |s|
28
30
  "lib/ticketmaster-trac.rb",
29
31
  "lib/trac/trac.rb",
30
32
  "spec/comments_spec.rb",
33
+ "spec/commentutil_spec.rb",
31
34
  "spec/fixtures/tickets.xml",
32
35
  "spec/projects_spec.rb",
33
36
  "spec/spec.opts",
@@ -38,10 +41,11 @@ Gem::Specification.new do |s|
38
41
  ]
39
42
  s.homepage = %q{http://github.com/hybridgroup/ticketmaster-trac}
40
43
  s.require_paths = ["lib"]
41
- s.rubygems_version = %q{1.3.7}
44
+ s.rubygems_version = %q{1.6.1}
42
45
  s.summary = %q{Ticketmaster Provider for Trac}
43
46
  s.test_files = [
44
47
  "spec/comments_spec.rb",
48
+ "spec/commentutil_spec.rb",
45
49
  "spec/projects_spec.rb",
46
50
  "spec/spec_helper.rb",
47
51
  "spec/ticketmaster-trac_spec.rb",
@@ -49,7 +53,6 @@ Gem::Specification.new do |s|
49
53
  ]
50
54
 
51
55
  if s.respond_to? :specification_version then
52
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
53
56
  s.specification_version = 3
54
57
 
55
58
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ticketmaster-trac
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
5
- prerelease: false
4
+ hash: 7
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 7
10
- version: 0.2.7
9
+ - 8
10
+ version: 0.2.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rafael George
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-10 00:00:00 -04:00
18
+ date: 2011-04-12 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -136,10 +136,12 @@ extra_rdoc_files:
136
136
  - LICENSE
137
137
  - README.md
138
138
  files:
139
+ - .rvmrc
139
140
  - LICENSE
140
141
  - README.md
141
142
  - Rakefile
142
143
  - VERSION
144
+ - commentutils-data.html
143
145
  - lib/provider/comment.rb
144
146
  - lib/provider/project.rb
145
147
  - lib/provider/ticket.rb
@@ -147,6 +149,7 @@ files:
147
149
  - lib/ticketmaster-trac.rb
148
150
  - lib/trac/trac.rb
149
151
  - spec/comments_spec.rb
152
+ - spec/commentutil_spec.rb
150
153
  - spec/fixtures/tickets.xml
151
154
  - spec/projects_spec.rb
152
155
  - spec/spec.opts
@@ -184,12 +187,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
187
  requirements: []
185
188
 
186
189
  rubyforge_project:
187
- rubygems_version: 1.3.7
190
+ rubygems_version: 1.6.1
188
191
  signing_key:
189
192
  specification_version: 3
190
193
  summary: Ticketmaster Provider for Trac
191
194
  test_files:
192
195
  - spec/comments_spec.rb
196
+ - spec/commentutil_spec.rb
193
197
  - spec/projects_spec.rb
194
198
  - spec/spec_helper.rb
195
199
  - spec/ticketmaster-trac_spec.rb