C0 code coverage information
Generated on Fri Aug 25 10:11:29 PDT 2006 with rcov 0.7.0
Code reported as executed by Ruby looks like this...
and this: this line is also marked as covered.
Lines considered as run by rcov, but not reported by Ruby, look like this,
and this: these lines were inferred by rcov (using simple heuristics).
Finally, here's a line marked as not executed.
1 module AdsHelper
2 #a square advert
3 def ad_square
4 return build_ad('a575c1a3',3)
5 end
6 # the main top middle banner
7 def ad_top
8 return build_ad('a00b7093',1)
9 end
10 # the left hand panel ads and their alternatives
11 def ad_left_top
12 return build_ad('ac74b398',14)
13 end
14 def ad_left_top_alternate
15 return build_ad('a9349277',6)
16 end
17 def ad_left_mid
18 return build_ad('ad828c54',4)
19 end
20 def ad_left_bottom
21 return build_ad('afec016a',2)
22 end
23
24 def ad_center_top
25 return build_ad('a7d8cc69',5)
26 end
27
28 def ad_center_mid
29 return build_ad('a575c1a3',3)
30 end
31 # note this is same as ad_center_top
32 def ad_center_bottom
33 return build_ad('a7d8cc69',5)
34 end
35
36 def build_ad(ad_id,zone)
37 # this is done like this incase either of them are strings already
38 ad_id = ad_id.to_s
39 zone = zone.to_s
40 ad = '
41 <script language=\'JavaScript\' type=\'text/javascript\'>
42 <!--
43 // Insert click tracking URL here
44 document.phpAds_ct0 =\'\'
45
46 var awrz_rnd = Math.floor(Math.random()*99999999999);
47 var awrz_protocol = location.protocol.indexOf(\'https\')>-1?\'https:\':\'http:\';
48 if (!document.phpAds_used) document.phpAds_used = \',\';
49 document.write ("<" + "script language=\'JavaScript\' type=\'text/javascript\' src=\'");
50 document.write (awrz_protocol+"//adserv.pitchforkmedia.com/adjs.php?n='+ad_id+'");
51 document.write ("&zoneid='+zone+'");
52 document.write ("&exclude=" + document.phpAds_used);
53 document.write ("&loc=" + escape(window.location));
54 if (document.referrer)
55 document.write ("&referer=" + escape(document.referrer));
56 document.write (\'&r=\' + awrz_rnd);
57 document.write ("&ct0=" + escape(document.phpAds_ct0));
58 document.write ("\'><" + "/script>");
59 //-->
60 </script><noscript><a href="http://adserv.pitchforkmedia.com/adclick.php?n='+ad_id+'" target="_blank"><img src="http://adserv.pitchforkmedia.com/adview.php?zoneid='+zone+'&n='+ad_id+'" border="0" alt=""></a></noscript>
61 '
62 return ad
63 end
64
65 end
Generated using the rcov code coverage analysis tool for Ruby version 0.7.0.