Noah C0 Coverage Information - RCov

lib/noah/helpers.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
lib/noah/helpers.rb 57 46
57.89%
58.70%

Key

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.

Coverage Details

1 require File.join(File.dirname(__FILE__), 'models')
2 module Noah
3   module SinatraHelpers
4   extend(Ohm)
5 
6     def host(opts = {})
7      Host.find(opts).first
8     end
9 
10     def hosts(opts = {})
11       Hosts.all(opts)
12     end
13 
14     def service(opts = {})
15       Service.find(options)
16     end
17 
18     def services(opts = {})
19       Services.all(opts)
20     end 
21 
22     def host_service(hostname, servicename)
23       h = Host.find(:name => hostname).first
24       if h.nil?
25         nil
26       else  
27         Service.find(:host_id => h.id, :name => servicename).first
28       end  
29     end
30 
31     def host_services(hostname)
32       h = Host.find(:name => hostname).first
33       if h.nil?
34         nil
35       else  
36         Services.all(:host_id => id)
37       end  
38     end 
39 
40     def application(opts = {})
41       Application.find(opts).first
42     end
43 
44     def applications(opts = {})
45       Applications.all(opts)
46     end
47 
48     def configuration(opts = {})
49       Configuration.find(opts).first
50     end
51 
52     def configurations(opts = {})
53       Configurations.all(opts)
54     end
55   end
56 
57 end

Generated on 2011-02-08 01:54:20 -0500 with rcov 0.9.8