Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
---|---|---|---|---|
lib/helpers.rb | 55 | 45 | 56.36%
|
57.78%
|
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 Sinatra |
2 module NoahHelpers |
3 |
4 def host(opts = {}) |
5 Host.find(opts).first |
6 end |
7 |
8 def hosts(opts = {}) |
9 Hosts.all(opts) |
10 end |
11 |
12 def service(opts = {}) |
13 Service.find(options) |
14 end |
15 |
16 def services(opts = {}) |
17 Services.all(opts) |
18 end |
19 |
20 def host_service(hostname, servicename) |
21 h = Host.find(:name => hostname).first |
22 if h.nil? |
23 nil |
24 else |
25 Service.find(:host_id => h.id, :name => servicename).first |
26 end |
27 end |
28 |
29 def host_services(hostname) |
30 h = Host.find(:name => hostname).first |
31 if h.nil? |
32 nil |
33 else |
34 Services.all(:host_id => id) |
35 end |
36 end |
37 |
38 def application(opts = {}) |
39 Application.find(opts).first |
40 end |
41 |
42 def applications(opts = {}) |
43 Applications.all(opts) |
44 end |
45 |
46 def configuration(opts = {}) |
47 Configuration.find(opts).first |
48 end |
49 |
50 def configurations(opts = {}) |
51 Configurations.all(opts) |
52 end |
53 end |
54 helpers NoahHelpers |
55 end |
Generated on 2011-01-31 05:03:32 -0500 with rcov 0.9.8