tarantula 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,30 +2,23 @@ require "erb"
2
2
  module Relevance::Tarantula::HtmlReportHelper
3
3
  include ERB::Util
4
4
  include Relevance::Tarantula
5
- def wrap_in_line_number_table(text, &blk)
5
+ def wrap_in_line_number_table_row(text, &blk)
6
6
  x = Builder::XmlMarkup.new
7
- x.table(:class => "grid tablesorter") do
8
- x.thead do
9
- x.tr do
10
- x.th(:class => "line-number") do
11
- x.span("Line \#")
12
- end
13
- x.th(:align => "center") do
14
- x.span("Line")
15
- end
7
+
8
+ x.tr do
9
+ lines = text.split("\n")
10
+ x.td(:class => "numbers") do
11
+ lines.size.times do |index|
12
+ x.span(index+1, :class => "line number")
16
13
  end
17
14
  end
18
- text.split("\n").each_with_index do |line, index|
19
- x.tr do
20
- x.td(index+1, :class => "line-number")
21
- if block_given?
22
- x.td {x << yield(line)}
23
- else
24
- x.td(line)
25
- end
15
+ x.td(:class => "lines") do
16
+ lines.each do |line|
17
+ x.span(line, :class => "line")
26
18
  end
27
- end
19
+ end
28
20
  end
21
+
29
22
  x.target!
30
23
  end
31
24
 
@@ -1,53 +1,37 @@
1
1
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
-
4
- <html>
5
- <head>
6
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
7
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
8
- <meta name="Author" content="Erik Yowell; erik[at]thinkrelevance.com"/>
9
- <title>Tarantula report</title>
10
- <script type="text/javascript" src="javascripts/jquery-1.2.3.js"></script>
11
- <script type="text/javascript" src="javascripts/jquery.tablesorter.js"></script>
12
- <script type="text/javascript" src="javascripts/jquery-ui-tabs.js"></script>
13
- <script type="text/javascript" src="javascripts/tarantula.js"></script>
14
- <script type="text/javascript" src="javascripts/niftycube.js"></script>
15
- <link type="text/css" media="screen" rel="stylesheet" href="stylesheets/tarantula.css"/>
16
- <link type="text/css" media="screen" rel="stylesheet" href="stylesheets/ui.tabs.css"/>
17
-
18
- <script type="text/javascript">
19
- window.onload=function() {
20
- Nifty("div#sidebar", "big");
21
- Nifty("div#results-container", "big");
22
- }
23
- </script>
24
- </head>
25
-
26
- <body>
27
-
28
- <div id="container">
29
-
30
- <div id="header">
31
- <div class="header_text">Tarantula : Eight Legs, Two Fangs, and an Attitude</div>
32
- <div id="tabs-container">
33
- <ul></ul>
34
- </div>
35
- </div>
36
-
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+
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
+ <script type="text/javascript" src="javascripts/jquery-1.2.3.js"></script>
9
+ <script type="text/javascript" src="javascripts/jquery.tablesorter.js"></script>
10
+ <script type="text/javascript" src="javascripts/jquery-ui-tabs.js"></script>
11
+ <script type="text/javascript" src="javascripts/tarantula.js"></script>
12
+
13
+ <title>Tarantula</title>
14
+ </head>
15
+
16
+ <body>
17
+ <div id="container">
18
+ <div id="header">
19
+ <h1>Tarantula by Relevance</h1>
20
+ <h2>Eight legs, two fangs ... and an attitude</h2>
21
+ <p>Tarantula is an open source tool for testing Rails web
22
+ applications. Tarantula is developed by <a href="http://thinkrelevance.com">Relevance, Inc.</a>
23
+ and lives at <a href="http://github.com/relevance/tarantula">http://github.com/relevance/tarantula</a>.</p>
24
+ <hr/>
25
+ </div>
26
+ <div id="page">
27
+ <div id="tabs-container">
28
+ <ul class="tabs"></ul>
29
+ </div>
30
+
37
31
  <div id="results-container">
38
32
 
39
33
  </div>
40
-
41
- <div id="sidebar">
42
- Tarantula is an open-source tool for testing Rails web applications. Tarantula is developed by
43
- <a href="http://thinkrelevance.com">Relevance, Inc.</a>
44
- and lives at <a href="http://github.com/relevance/tarantula">http://github.com/relevance/tarantula</a>.
45
- </div>
46
-
47
- <div class="clearer"></div>
48
-
49
- </div>
50
-
51
- </body>
52
-
34
+ </div>
35
+ </div>
36
+ </body>
53
37
  </html>
@@ -1,34 +1,32 @@
1
1
  <div id="<%= test_name %>">
2
2
  <% %w{failures successes}.each do |result_type| %>
3
- <table class="grid tablesorter" cellspacing="0">
4
- <caption><%= result_type.capitalize %> (<%= send(result_type).size %>)</caption>
3
+ <table class="list tablesorter" cellspacing="0">
4
+ <caption><%= send(result_type).size %> <%= result_type.capitalize %></caption>
5
5
  <thead>
6
6
  <tr>
7
- <th class="sort asc"><span>URL</span><span class="sort"><em>&#8613;</em></span></th>
8
- <th><span>Action</span><span class="sort"><em>&#8613;</em></span></th>
9
- <th><span>Response</span><span class="sort"><em>&#8613;</em></span></th>
10
- <th><span>Description</span><span class="sort"><em>&#8613;</em></span></th>
11
- <th><span>Referrer</span><span class="sort"><em>&#8613;</em></span></th>
7
+ <th class="sort asc"><span>URL</span><span class="sort">&nbsp;</span></th>
8
+ <th><span>Action</span><span class="sort">&nbsp;</span></th>
9
+ <th><span>Response</span><span class="sort">&nbsp;</span></th>
10
+ <th class="left"><span>Description</span><span class="sort">&nbsp;</span></th>
11
+ <th><span>Referrer</span><span class="sort">&nbsp;</span></th>
12
12
  </tr>
13
13
  </thead>
14
14
  <tfoot>
15
- <tr>
16
- <td colspan="5">
17
- <br /><br />
18
- </td>
19
- </tr>
15
+ <tr><td colspan="5">&nbsp;</td></tr>
20
16
  </tfoot>
17
+
21
18
  <tbody>
22
19
  <% send(result_type).sort{|x,y| y.code.to_s <=> x.code.to_s}.each_with_index do |result,i| %>
23
20
  <tr class="<%= (i%2 == 0) ? 'even' : 'odd' %>">
24
- <td align="center" width="120"><a href="<%= "#{test_name}/#{result.file_name}" %>"><%= result.url.ellipsize(30) %></a></td>
25
- <td align="center" width="60"><%= result.method %></td>
26
- <td align="center" width="60"><span class="<%= class_for_code(result.code) %>"><%= result.code %></span></td>
27
- <td align="center"><%= result.description %></td>
28
- <td align="center" width="120"><%= result.referrer.ellipsize(30) %></td>
21
+ <td class="left"><a href="<%= "#{test_name}/#{result.file_name}" %>"><%= result.url.ellipsize(30) %></a></td>
22
+ <td class="method"><%= result.method.to_s.upcase %></td> <!-- TODO Clean up demeter violation -->
23
+ <td><span class="<%= class_for_code(result.code) %>"><%= result.code %></span></td>
24
+ <td class="left"><%= result.description %></td>
25
+ <td class="left"><%= result.referrer.ellipsize(30) %></td>
29
26
  </tr>
30
27
  <% end %>
31
28
  </tbody>
32
- </table>
29
+ </table>
30
+ <br/>
33
31
  <% end %>
34
32
  </div>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tarantula
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Relevance, Inc.
@@ -57,11 +57,12 @@ files:
57
57
  - examples/relevance/tarantula/transform_example.rb
58
58
  - examples/relevance/tarantula_example.rb
59
59
  - laf/images
60
- - laf/images/background.jpg
61
- - laf/images/relevance-os-logo.gif
62
- - laf/images/tab.png
63
- - laf/images/table-sort.gif
64
- - laf/images/tarantula-sprites.png
60
+ - laf/images/button_active.png
61
+ - laf/images/button_hover.png
62
+ - laf/images/button_inactive.png
63
+ - laf/images/header_bg.jpg
64
+ - laf/images/logo.png
65
+ - laf/images/tagline.png
65
66
  - laf/javascripts
66
67
  - laf/javascripts/jquery-1.2.3.js
67
68
  - laf/javascripts/jquery-ui-tabs.js
@@ -71,12 +72,7 @@ files:
71
72
  - laf/javascripts/niftyLayout.js
72
73
  - laf/javascripts/tarantula.js
73
74
  - laf/stylesheets
74
- - laf/stylesheets/niftyCorners.css
75
- - laf/stylesheets/NiftyLayout.css
76
- - laf/stylesheets/old.css
77
75
  - laf/stylesheets/tarantula.css
78
- - laf/stylesheets/tarantula.v2.css
79
- - laf/stylesheets/ui.tabs.css
80
76
  - laf/v2
81
77
  - laf/v2/detail.html
82
78
  - laf/v2/images
Binary file
Binary file
data/laf/images/tab.png DELETED
Binary file
Binary file
Binary file
@@ -1,47 +0,0 @@
1
- html,body{margin:0;padding:0}
2
- body{font: 85%/1.3 Verdana,Arial,sans-serif;
3
- text-align: center;background: #757D88;padding-bottom:20px}
4
- p{margin-top:0}
5
- h1,h2,h3{font: normal normal 200% "Trebuchet MS",Arial,sans-serif}
6
- h2{font-size:160%}
7
- h3{font-size:120%}
8
-
9
- div#header{width:100%;overflow:hidden;background: #595D66}
10
- div#header h1,div#menu{width:770px;margin:0 auto;text-align:left}
11
- div#header h1{padding: 30px 0 10px;color: #FFF}
12
-
13
- ul#nav,ul#nav li{list-style-type:none;margin:0;padding:0}
14
- ul#nav{float:right;font-size: 80%}
15
- ul#nav li{float:left;margin-left: 3px;text-align: center}
16
- ul#nav a{float:left;width: 95px;padding: 5px 0;background: #369A3D;text-decoration:none;color: #FFC}
17
- ul#nav a:hover{background: #CDFFA1;color: #006A35}
18
- ul#nav li.activelink a,ul#nav li.activelink a:hover{background: #FFF;color: #003}
19
-
20
- div#container{width:770px;margin:0 auto 10px;padding:20px 0 10px;text-align:left;background:#FFF}
21
- div#content{float:left;display:inline;width:560px;margin:0 0 10px 10px}
22
-
23
- ul#intro,ul#intro li{list-style-type:none;margin:0;padding:0}
24
- ul#intro{width:100%;overflow:hidden;margin-bottom:20px}
25
- ul#intro li{float:left;width:180px;margin-right:10px;padding: 10px 0}
26
- li#mission{background: #E65714}
27
- li#services{background: #42B4AC}
28
- ul#intro li#more{margin-right:0;background: #7D63A9}
29
- ul#intro p,ul#intro h3{margin:0;padding: 0 10px}
30
- ul#intro h3{text-transform:uppercase;padding-bottom:3px;color: #FFF}
31
-
32
- div#content h2{margin: 10px 0;color: #007BC4}
33
- div.date{float:left;width: 4em;padding: 5px 0;background: #F1DDC4;color:#B0001E;
34
- text-align:center;margin: 0 4px 4px 0;font-size: 80%;line-height:0.9}
35
- div.date span{display:block;font-size: 150%;font-weight:bold}
36
-
37
- div.comments div{background: #EEE;margin-bottom:10px}
38
- div.comments p{padding: 10px;margin:0}
39
- div.comments div.odd{background:#DAE6FE}
40
-
41
- div#side{float:right;display:inline;width: 180px;background:#F3CF00; margin:0 10px 10px 0}
42
- div#side p{margin:5px 0 10px;padding: 0 10px}
43
- div#side div{margin: 0 0 10px;padding: 10px 0}
44
-
45
- div#footer{clear:both;width:750px;margin:0 10px 0;padding: 10px 0;
46
- background: #586695;color: #FFF;text-align:center}
47
- div#footer p{margin:0}
@@ -1,35 +0,0 @@
1
- /*Nifty Corners Cube CSS by Alessandro Fulciniti
2
- The following classes are added dinamically by javascript,
3
- and their use should be avoided in the markup */
4
-
5
- b.niftycorners,b.niftyfill{display:block}
6
- b.niftycorners *{display:block;height: 1px;line-height:1px;font-size: 1px;
7
- overflow:hidden;border-style:solid;border-width: 0 1px}
8
- /*normal*/
9
- b.r1{margin: 0 3px;border-width: 0 2px}
10
- b.r2{margin: 0 2px}
11
- b.r3{margin: 0 1px}
12
- b.r4{height: 2px}
13
- b.rb1{margin: 0 8px;border-width:0 2px}
14
- b.rb2{margin: 0 6px;border-width:0 2px}
15
- b.rb3{margin: 0 5px}
16
- b.rb4{margin: 0 4px}
17
- b.rb5{margin: 0 3px}
18
- b.rb6{margin: 0 2px}
19
- b.rb7{margin: 0 1px;height:2px}
20
- b.rb8{margin: 0;height:2px}
21
- b.rs1{margin: 0 1px}
22
- /*transparent inside*/
23
- b.t1{border-width: 0 5px}
24
- b.t2{border-width: 0 3px}
25
- b.t3{border-width: 0 2px}
26
- b.t4{height: 2px}
27
- b.tb1{border-width: 0 10px}
28
- b.tb2{border-width: 0 8px}
29
- b.tb3{border-width: 0 6px}
30
- b.tb4{border-width: 0 5px}
31
- b.tb5{border-width: 0 4px}
32
- b.tb6{border-width: 0 3px}
33
- b.tb7{border-width: 0 2px;height:2px}
34
- b.tb8{border-width: 0 1px;height:2px}
35
- b.ts1{border-width: 0 2px}