C0 code coverage information
Generated on Thu Apr 17 09:17:37 -0700 2008 with rcov 0.8.1.2
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 #
2 # Copyright (C) 2007 Mobio Networks, Inc.
3 #
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #
17
18 class ListController < ApplicationController
19 before_filter :checkClient
20
21 def get_images
22 # get all images in images directory or bn directory
23 if params[:bn].nil?
24 imgs = File::join RAILS_ROOT, 'public/images/*png'
25 else
26 imgs = File::join RAILS_ROOT, 'public/images/bn/*png'
27 end
28 files = Dir[imgs]
29 @names = []
30 files.each do |x|
31 filename = File.basename(x)
32 img = []
33 img[0] = filename
34 filename = params[:bn] + '/' + filename if params[:bn]
35 img[1] = filename
36 @names << img
37 end
38 headers['Content-Type']='application/xml'
39 response = "<data/>"
40 render :template => 'list/images.xml'
41 end
42
43 # Log when image is viewed
44 def send_log
45 logger.info('***** Viewed image with id: ' + params[:id])
46
47 # Have to send some dummy back otherwise server chokes on nullpointer exception
48 headers['Content-Type']='application/xml'
49 render :template => 'list/response.xml'
50 end
51
52 def banner
53 # Get ad server url from config manager
54 @ad_url = MOBIO_CONFIG['adserver_url']
55 end
56
57 def view
58 # Get ad server url from config manager
59 @ad_url = MOBIO_CONFIG['adserver_url']
60 end
61
62 def sponsor
63 headers['Content-Type']='application/xml'
64 response = '<data xmlns=""><info>sponsor ' + params[:id] + '</info></data>'
65 render :template => 'list/response.xml'
66 end
67
68 # handle backurl to home
69 def storeBackurl
70 backURL("recipe_burl")
71 end
72
73 def set_index
74 end
75 def err
76 end
77 def err_response
78 end
79 def data_response
80 end
81 def promo
82 end
83
84 end
Generated using the rcov code coverage analysis tool for Ruby version 0.8.1.2.