tarantula 0.1.4 → 0.1.5

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/README.rdoc CHANGED
@@ -33,10 +33,10 @@ Tarantula into your Rails app.
33
33
  cd vendor/gems
34
34
  gem unpack relevance-tarantula
35
35
 
36
- You can then add the following line into your Rakefile, substituting the proper version of
37
- relevance-tarantula in the path.
36
+ You can then add the following line into your Rakefile, which will allow your application to discover
37
+ Tarantula's rake tasks.
38
38
 
39
- load File.join(RAILS_ROOT, "vendor/gems/relevance-tarantula-0.0.8.1/tasks/tarantula_tasks.rake")
39
+ load File.join(RAILS_ROOT, Dir["vendor/gems/relevance-tarantula-*/tasks/*.rake"])
40
40
 
41
41
  === Crawling Your App
42
42
 
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 4
2
+ :patch: 5
3
3
  :major: 0
4
4
  :minor: 1
@@ -12,10 +12,10 @@ end
12
12
 
13
13
  describe 'Relevance::Tarantula::HtmlReportHelper#wrap_in_line_number_table' do
14
14
  include HtmlReportHelperSpec
15
- it "can wrap text in a line number table" do
16
- html = @reporter.wrap_in_line_number_table("Line 1\nLine 2")
15
+ it "can wrap text in a table row used for displaying lines and line numbers" do
16
+ html = @reporter.wrap_in_line_number_table_row("Line 1\nLine 2")
17
17
  html.should == <<-END.strip
18
- <table class=\"grid tablesorter\"><thead><tr><th class=\"line-number\"><span>Line #</span></th><th align=\"center\"><span>Line</span></th></tr></thead><tr><td class=\"line-number\">1</td><td>Line 1</td></tr><tr><td class=\"line-number\">2</td><td>Line 2</td></tr></table>
18
+ <tr><td class=\"numbers\"><span class=\"line number\">1</span><span class=\"line number\">2</span></td><td class=\"lines\"><span class=\"line\">Line 1</span><span class=\"line\">Line 2</span></td></tr>
19
19
  END
20
20
  end
21
21
  end
@@ -12,7 +12,7 @@ describe "Relevance::Tarantula::HtmlReporter file output" do
12
12
  :success => true,
13
13
  :method => "get",
14
14
  :url => "/widgets/#{index}",
15
- :response => stub(:code => 200, :body => "<h1>header</h1>\n<p>text</p>"),
15
+ :response => stub(:code => "200", :body => "<h1>header</h1>\n<p>text</p>"),
16
16
  :referrer => "/random/#{rand(100)}",
17
17
  :test_name => @test_name,
18
18
  :log => <<-END,
@@ -30,7 +30,7 @@ blah blah blah
30
30
  :success => false,
31
31
  :method => "get",
32
32
  :url => "/widgets/#{index}",
33
- :response => stub(:code => 500, :body => "<h1>header</h1>\n<p>text</p>"),
33
+ :response => stub(:code => "500", :body => "<h1>header</h1>\n<p>text</p>"),
34
34
  :referrer => "/random/#{rand(100)}",
35
35
  :test_name => @test_name,
36
36
  :log => <<-END,
@@ -66,7 +66,7 @@ blah blah blah
66
66
  reporter.finish_report(@test_name)
67
67
  links = Hpricot(File.read(@index)).search('.left a')
68
68
  links.each do |link|
69
- link['href'].should.match(/#{@test_name}\/\d+\.html/)
69
+ link['href'].should match(/#{@test_name}\/\d+\.html/)
70
70
  end
71
71
  end
72
72
 
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -5,6 +5,6 @@ $(document).ready(function() {
5
5
  cssDesc: 'sort desc', // class name for descending sorting action to header
6
6
  headerClass: 'header' // class name for headers (th's)
7
7
  });
8
- $('#tabs-container > ul').tabs();
8
+ $('#tabs-container > ul').tabs();
9
9
  });
10
10
 
@@ -1,3 +1,4 @@
1
+ /* RESET */
1
2
  html, body, div, span, applet, object, iframe,
2
3
  h1, h2, h3, h4, h5, h6, p, blockquote, pre,
3
4
  a, abbr, acronym, address, big, cite, code,
@@ -7,85 +8,232 @@ b, u, i, center,
7
8
  dl, dt, dd, ol, ul, li,
8
9
  fieldset, form, label, legend,
9
10
  table, caption, tbody, tfoot, thead, tr, th, td {
10
- margin: 0;
11
- padding: 0;
12
- border: 0;
13
- outline: 0;
14
- font-size: 100%;
15
- vertical-align: baseline;
16
- background: transparent;
11
+ margin: 0;
12
+ padding: 0;
13
+ border: 0;
14
+ outline: 0;
15
+ font-size: 100%;
16
+ vertical-align: baseline;
17
+ background: transparent;
18
+ }
19
+ body {
20
+ line-height: 1;
21
+ }
22
+ ol, ul {
23
+ list-style: none;
24
+ }
25
+ blockquote, q {
26
+ quotes: none;
27
+ }
28
+
29
+ /* remember to define focus styles! */
30
+ :focus {
31
+ outline: 0;
32
+ }
33
+
34
+ /* remember to highlight inserts somehow! */
35
+ ins {
36
+ text-decoration: none;
37
+ }
38
+ del {
39
+ text-decoration: line-through;
40
+ }
41
+
42
+ /* tables still need 'cellspacing="0"' in the markup */
43
+ table {
44
+ border-collapse: collapse;
45
+ border-spacing: 0;
17
46
  }
18
47
 
19
48
  body {
20
- background-color: #eee;
21
- font-family: "Lucida Grande", veranda, arial, helvetica, sans-serif;
49
+ line-height: 1em;
50
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
51
+ color: #050505;
22
52
  }
23
53
 
54
+ /* header */
24
55
  #header {
25
- background-color: #003366;
26
- font-size: 22px;
27
- height: 70px;
56
+ background: #37302e url(../images/header_bg.jpg) no-repeat top left;
57
+ height: 70px;
58
+ border-bottom: 2px solid #d0d0d0;
28
59
  }
29
60
 
30
- .header_text {
31
- color: #ffcc00;
32
- padding-top: 10px;
33
- padding-left: 15px;
61
+ #header h1 {
62
+ width:206px;
63
+ height:56px;
64
+ text-indent: -9999em;
65
+ background: transparent url(../images/logo.png) no-repeat top center;
66
+ position: absolute;
67
+ top: 7px;
68
+ left: 42px;
34
69
  }
35
70
 
36
- #tabs-container {
37
- padding-top: 7px;
38
- padding-left: 15px;
71
+ #header h2 {
72
+ width:196px;
73
+ height:34px;
74
+ text-indent: -9999em;
75
+ background: transparent url(../images/tagline.png) no-repeat top center;
76
+ position: absolute;
77
+ top: 15px;
78
+ left: 257px;
39
79
  }
40
80
 
41
- #results-container {
42
- float: left;
43
- width: 625px;
44
- margin-left: 20px;
45
- margin-top: 10px;
46
- background-color: #fff;
81
+ #header p {
82
+ display: block;
83
+ position: absolute;
84
+ right: 42px;
85
+ width: 315px;
86
+ padding: 8px;
87
+ color: #fff;
88
+ font-size: 13px;
89
+ line-height: 15px;
47
90
  }
48
91
 
49
- #sidebar {
50
- float: right;
51
- width: 300px;
52
- margin-right: 20px;
53
- margin-top: 10px;
54
- font-size: 12px;
55
- padding: 20px;
56
- background-color: #fff;
92
+ #header a:link, #header a:visited, #header a {
93
+ color: #70b1ca;
57
94
  }
58
95
 
59
- .clearer {
60
- clear: both;
96
+ #header a:hover {
97
+ text-decoration: none;
61
98
  }
62
99
 
63
- .grid {
64
- width: 100%;
65
- font-size: 12px;
100
+ #header hr {
101
+ display: none;
66
102
  }
67
103
 
68
- table caption {
69
- font-size: 16px;
104
+ .left { text-align: left !important; }
105
+ .right { text-align: right !important; }
106
+ .center { text-align: center !important; }
107
+
108
+ /* page */
109
+
110
+ #page {
111
+ padding: 55px 10px 0 10px;
112
+ width: 1000px;
113
+ margin: auto;
114
+ position: relative;
70
115
  }
71
116
 
72
- .even {
73
- background-color: #eee;
117
+ div#page ul.tabs {
118
+
119
+ clear: both;
74
120
  }
75
121
 
76
- .odd {
122
+ div#page ul.tabs li{
123
+ display: block;
124
+ float: left;
125
+ }
77
126
 
127
+ div#page ul.tabs li a {
128
+ display: block;
129
+ float: left;
130
+ clear: right;
131
+ margin-right: 5px;
78
132
  }
79
133
 
80
- table th.line-number, table td.line-number {
134
+ div#page ul.tabs li a.active, .ui-tabs-selected a {
135
+ background: transparent url(../images/button_active.png) no-repeat top left !important;
136
+ color: #050505 !important;
137
+ }
138
+
139
+ div#page ul.tabs li a {
140
+ background: transparent url(../images/button_inactive.png) no-repeat top left;
141
+ height: 38px;
142
+ width: 110px;
143
+ color: #fff;
144
+ padding: 8px 0 0 12px;
145
+ font-size: 14px;
146
+ line-height: 18px;
147
+ text-decoration: none;
148
+ }
149
+
150
+ div#page ul.tabs li a:hover {
151
+ background: transparent url(../images/button_hover.png) no-repeat top left;
152
+ color: #613005;
153
+ }
154
+
155
+ div#page ul.tabs {
156
+ position: absolute;
157
+ top: 7px;
158
+ left: 7px;
159
+ }
160
+
161
+ .list {
162
+ width: 100%;
163
+ }
164
+
165
+ .list th {
166
+ cursor:pointer;
167
+ }
168
+
169
+ .list th, .list th a, .list tfoot td {
170
+ background: #b9b9a9;
171
+ color: #463c38;
172
+ text-decoration: none;
173
+
174
+ }
175
+
176
+ .sort {
177
+ font-size: 75%;
178
+ filter:alpha(opacity=50);
179
+ -moz-opacity:0.5;
180
+ -khtml-opacity: 0.5;
181
+ opacity: 0.5;
182
+ }
183
+
184
+ .list th, .list th a:hover span {
185
+ filter:alpha(opacity=100);
186
+ -moz-opacity:1;
187
+ -khtml-opacity: 1;
188
+ opacity: 1;
189
+ }
190
+
191
+ .list td, .list th {
81
192
  text-align: center;
82
- width: 30px;
193
+ padding: 4px;
194
+ font-size: 14px;
195
+ }
196
+
197
+ .list .sort.asc .sort:after {
198
+ content: "\25BC";
199
+ }
200
+
201
+ .list .sort.desc .sort:after {
202
+ content: "\25B2";
203
+ }
204
+
205
+
206
+ div#page tbody a {
207
+ color: #6699cc;
208
+ }
209
+
210
+ div#page tbody a:hover {
211
+ text-decoration: none;
212
+ }
213
+
214
+ div#page table caption {
215
+ text-align: left;
216
+ padding: 7px;
217
+ background: #d0d0c4;
218
+ border-bottom: 2px solid #aba7a1;
219
+ -moz-border-radius-topleft: 2px;
220
+ -moz-border-radius-topright: 2px;
221
+ }
222
+
223
+ .list tbody td {
224
+ background: #f2f2eb;
83
225
  }
84
226
 
85
- #details {
86
- margin-left: 10px;
87
- margin-top: 5px;
88
- font-size: 12px;
227
+ .list tfoot td {
228
+ line-height: 18px;
229
+ }
230
+
231
+ .list .method {
232
+ width: 6em;
233
+ }
234
+
235
+ tr.even td {
236
+ background: #e9e9e2 !important;
89
237
  }
90
238
 
91
239
  /* Response Codes */
@@ -127,49 +275,71 @@ span.r5 {
127
275
  border: 1px solid #dc0000;
128
276
  }
129
277
 
130
- /* Fixes */
131
-
132
- /* Safari Bold Fix */
133
- /*\*/
134
- html*table th {
135
- font-weight: normal;
136
- }/**/
137
-
138
- /*\*/
139
- html*#header ul.navigation {
140
- top: 30px;
141
- } /**/
278
+ /* Detail */
279
+ #report h3 {
280
+ background: #D0D0C4; font-weight: normal;
281
+ border-bottom: 2px solid #ABA7A1;
282
+ -moz-border-radius-topleft: 2px; -moz-border-radius-topright: 2px;
283
+ -webkit-border-top-left-radius: 2px; -webkit-border-top-right-radius: 2px;
284
+ }
142
285
 
143
- #results table.grid {
144
- background-color: #003366;
286
+ #report h3,
287
+ #report p {
288
+ width: 50%;
289
+ padding:6px 8px;
290
+ margin: 1px 0;
145
291
  }
146
292
 
293
+ #report a {
294
+ color: #70B1CA
295
+ }
147
296
 
148
- #results table th, #results table td {
149
- font-family: Arial, Helvetica, sans-serif;
150
- color: #fff;
151
- background-color: #003366;
152
- }
297
+ #report a:hover {
298
+ text-decoration: none;
299
+ }
153
300
 
154
- #results table.grid {
155
- border-collapse: separate;
156
- margin-bottom: 1em;
157
- width: 100%;
301
+ #report p b {
302
+ color: #050505;
303
+ font-weight: normal;
158
304
  }
159
305
 
160
- #results table.grid tfoot tr td {
161
- padding: 4px;
162
- font-weight: 900;
306
+ #report p {
307
+ color: #463C38;
308
+ background: #f2f2eb;
309
+ line-height: 22px;
163
310
  }
164
-
165
- #results table.grid tbody a {
166
- color: #003366;
311
+
312
+ #report p span {
313
+ display: inline-block;
314
+ display: -moz-inline-block;
315
+ margin: 0;
316
+ padding: 2px 6px;
317
+ line-height: 16px;
167
318
  }
168
319
 
169
- #results table.grid tbody td {
170
- padding: 2px 4px;
171
- background-color: #f6ffcd;
172
- color: #000;
320
+ #report h3 em {
321
+ display: block;
322
+ font-family: Consolas, Lucida Console, Monaco, monospace;
323
+ font-size: 75%;
324
+ font-style: normal;
325
+ font-weight: normal;
326
+ color: #463C38;
327
+ line-height: 22px;
173
328
  }
174
329
 
330
+ /* Output */
331
+ .output {margin: 10px 0; width: 100%; font-size: 82.5%;}
332
+ .output th { background: #b9b9a9; text-align: left; padding-left: 2.25em; font-weight: normal; line-height: 18px; color: #463C38; border-bottom: 1px solid #fff;
333
+ -moz-border-radius-topleft: 2px; -moz-border-radius-topright: 2px;
334
+ -webkit-border-top-left-radius: 2px; -webkit-border-top-right-radius: 2px;
335
+ }
336
+ .output td { background: #f2f2eb; padding: 1px; line-height: 18px; }
337
+ .output { font-family: Consolas, Lucida Console, Monaco, monospace; }
338
+ .output .numbers { width: 3em; text-align: right; border-right: 1px solid #fff;}
339
+ .output .lines { width: auto; text-align: left;}
340
+ .output .line { display: block; text-align: left; padding: 1px 4px;}
341
+ .output .line.number { text-align: right; color: #585850; }
175
342
 
343
+ /* Tabs */
344
+ .ui-tabs-panel {display: block;}
345
+ .ui-tabs-panel.ui-tabs-hide {display: none !important;}
@@ -1,91 +1,82 @@
1
1
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
3
 
4
- <html>
5
- <head>
6
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
7
- <title>Tarantula report detail <%= short_description %></title>
8
-
9
- <script type="text/javascript" src="../javascripts/jquery-1.2.3.js"></script>
10
- <script type="text/javascript" src="../javascripts/jquery.tablesorter.js"></script>
11
- <script type="text/javascript" src="../javascripts/jquery-ui-tabs.js"></script>
12
- <script type="text/javascript" src="../javascripts/tarantula.js"></script>
13
- <script type="text/javascript" src="../javascripts/niftycube-details.js"></script>
14
- <link type="text/css" media="screen" rel="stylesheet" href="../stylesheets/tarantula.css"/>
15
- <link type="text/css" media="screen" rel="stylesheet" href="../stylesheets/ui.tabs.css"/>
16
-
17
- <script type="text/javascript">
18
- window.onload=function() {
19
- Nifty("div#sidebar", "big");
20
- Nifty("div#results-container", "big");
21
- }
22
- </script>
23
-
24
- <!--[if lte IE 7]>
25
- <link rel="stylesheet" href="jqeury.tabs-ie.css" type="text/css" media="projection, screen" />
26
- <![endif]-->
27
- </head>
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
7
+ <link rel="stylesheet" href="../stylesheets/tarantula.css" type="text/css" media="screen" title="no title" charset="utf-8" />
8
+ <title>Detail</title>
9
+ </head>
10
+ <body>
11
+ <div id="container">
12
+ <div id="header">
13
+ <h1>Tarantula by Relevance</h1>
14
+ <h2>Eight legs, two fangs ... and an attitude</h2>
15
+ <p>Tarantula is an open source tool for testing Rails web
16
+ applications. Tarantula is developed by <a href="http://thinkrelevance.com">Relevance, Inc.</a>
17
+ and lives at <a href="http://github.com/relevance/tarantula">http://github.com/relevance/tarantula</a>.</p>
18
+ <hr/>
19
+ </div>
20
+ <div id="page">
21
+ <ul class="tabs">
22
+ <li><a href="../index.html">&laquo; Back</a></li>
23
+ <!-- TODO dynamically hide/show body/log sections based on selected "tab" - dynamically assign the "active" class to the selected tab -->
24
+ <li><a href="#fragment-1" class="active">Body</a></li>
25
+ <li><a href="#fragment-2" class="active">Log</a></li>
26
+ </ul>
28
27
 
29
- <body>
28
+ <div id="report">
29
+ <h3>Detail of <%= short_description %> <em>Generated on <%= Time.now %></em></h3>
30
+ <p><b>Resource</b> <a href="<%= full_url %>"><%= full_url %></a></p>
31
+ <p><b>Response</b> <span class="r<%= code.first %>"><%= code %></span></p>
32
+ <p><b>Referrer</b> <%= referrer || "" %></p>
30
33
 
31
- <div id="container">
32
-
33
- <div id="header">
34
- <div class="header_text">Tarantula : Eight Legs, Two Fangs, and an Attitude</div>
35
- <div id="tabs-container">
36
- <ul>
37
- <li><a href="#fragment-1"><span>Data</span></a></li>
38
- <li><a href="#fragment-2"><span>Body</span></a></li>
39
- <li><a href="#fragment-3"><span>Log</span></a></li>
40
- </ul>
41
- </div>
42
- </div>
34
+ <table class="output">
35
+ <tbody>
36
+ <tr>
37
+ <th colspan="2">#&nbsp;&nbsp;Data</th>
38
+ </tr>
39
+ <% if data %>
40
+ <%= wrap_in_line_number_table_row(data) %>
41
+ <% else %>
42
+ <tr>
43
+ <td colspan="2">No Data</td>
44
+ </tr>
45
+ <% end %>
46
+ </tbody>
47
+ </table>
43
48
 
44
- <div id="results-container">
45
- <div id="details">
46
- <p>Tarantula report detail <strong><%= short_description %></strong></p>
47
- <p>Generated on <%= Time.now %> (<a href="../index.html">Back</a>)</p>
48
- <p>Visit <a href="<%= full_url %>"><%= full_url %></a></p>
49
- <p>Response: <%= code %></p>
50
- <p>Referrer: <%= referrer || "" %></p>
51
- </div>
49
+ <table class="output" id="fragment-1">
50
+ <tbody>
51
+ <tr>
52
+ <th colspan="2">#&nbsp;&nbsp;Body</th>
53
+ </tr>
54
+ <% if body %>
55
+ <%= wrap_in_line_number_table_row(body) %>
56
+ <% else %>
57
+ <tr>
58
+ <td colspan="2">No Body</td>
59
+ </tr>
60
+ <% end %>
61
+ </tbody>
62
+ </table>
52
63
 
53
- <div id="results">
54
- <div id="fragment-1">
55
- <% if data %>
56
- <%= wrap_in_line_number_table(data) %>
57
- <% else %>
58
- <p>No Data</p>
59
- <% end %>
60
- </div>
61
- <div id="fragment-2">
62
- <% if body %>
63
- <%= wrap_in_line_number_table(body) %>
64
- <% else %>
65
- <p>No Body</p>
66
- <% end %>
67
- </div>
68
- <div id="fragment-3">
64
+ <table class="output" id="fragment-2">
65
+ <tbody>
66
+ <tr>
67
+ <th colspan="2">#&nbsp;&nbsp;Log</th>
68
+ </tr>
69
69
  <% if log %>
70
- <%= wrap_in_line_number_table(log) {|line| wrap_stack_trace_line(line)} %>
70
+ <%= wrap_in_line_number_table_row(log) {|line| wrap_stack_trace_line(line)} %>
71
71
  <% else %>
72
- <p>No Log</p>
72
+ <tr>
73
+ <td colspan="2">No Log</td>
74
+ </tr>
73
75
  <% end %>
74
- </div>
75
- </div>
76
+ </tbody>
77
+ </table>
76
78
  </div>
77
-
78
- <div id="sidebar">
79
- Tarantula is an open-source tool for testing Rails web applications. Tarantula is developed by
80
- <a href="http://thinkrelevance.com">Relevance, Inc.</a>
81
- and lives at <a href="http://github.com/relevance/tarantula">http://github.com/relevance/tarantula</a>.
82
- </div>
83
-
84
- <div class="clearer"></div>
85
-
86
79
  </div>
87
- </body>
88
-
89
- </html>
90
-
91
-
80
+ </div>
81
+ </body>
82
+ </html>