C0 code coverage information
Generated on Fri Mar 14 11:11:10 -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 index
22 end
23 def get_images
24 # get all images in images directory or bn directory
25 if params[:bn].nil?
26 imgs = File::join RAILS_ROOT, 'public/images/*png'
27 else
28 imgs = File::join RAILS_ROOT, 'public/images/bn/*png'
29 end
30 files = Dir[imgs]
31 @names = []
32 files.each do |x|
33 filename = File.basename(x)
34 img = []
35 img[0] = filename
36 filename = params[:bn] + '/' + filename if params[:bn]
37 img[1] = filename
38 @names << img
39 end
40 headers['Content-Type']='application/xml'
41 response = "<data/>"
42 render :template => 'list/images.xml'
43 end
44
45 # Log when image is viewed
46 def send_log
47 logger.info('***** Viewed image with id: ' + params[:id])
48
49 # Have to send some dummy back otherwise server chokes on nullpointer exception
50 headers['Content-Type']='application/xml'
51 render :template => 'list/response.xml'
52 end
53
54 def banner
55 # Get ad server url from config manager
56 @ad_url = MOBIO_CONFIG['adserver_url']
57 end
58
59 def view
60 # Get ad server url from config manager
61 @ad_url = MOBIO_CONFIG['adserver_url']
62 end
63
64 def sponsor
65 headers['Content-Type']='application/xml'
66 response = '<data xmlns=""><info>sponsor ' + params[:id] + '</info></data>'
67 render :template => 'list/response.xml'
68 end
69
70 # handle backurl to home
71 def storeBackurl
72 backURL("recipe_burl")
73 end
74
75 def set_index
76 end
77 def err
78 end
79 def err_response
80 end
81 def data_response
82 end
83 def promo
84 end
85
86 end
Generated using the rcov code coverage analysis tool for Ruby version 0.8.1.2.