Astute C0 Coverage Information - Simploco - RCov

lib/astute.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
lib/astute.rb 63 37
93.65%
89.19%

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

2 #    Copyright 2013 Mirantis, Inc.
3 #
4 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
5 #    not use this file except in compliance with the License. You may obtain
6 #    a copy of the License at
7 #
8 #         http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #    Unless required by applicable law or agreed to in writing, software
11 #    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 #    License for the specific language governing permissions and limitations
14 #    under the License.
15 
16 require 'astute/ruby_removed_functions'
17 
18 require 'json'
19 require 'logger'
20 
21 require 'astute/config'
22 require 'astute/logparser'
23 require 'astute/orchestrator'
24 require 'astute/metadata'
25 require 'astute/deployment_engine'
26 require 'astute/network'
27 require 'astute/puppetd'
28 require 'astute/rpuppet'
29 require 'astute/deployment_engine/simple_puppet'
30 require 'astute/deployment_engine/nailyfact'
31 require 'astute/cobbler'
32 
33 module Astute
34   autoload 'Context', 'astute/context'
35   autoload 'MClient', 'astute/mclient'
36   autoload 'ProxyReporter', 'astute/reporter'
37   autoload 'NodesRemover', 'astute/nodes_remover'
38   autoload 'Node', 'astute/node'
39   autoload 'NodesHash', 'astute/node'
40   LogParser.autoload :ParseDeployLogs, 'astute/logparser/deployment'
41   LogParser.autoload :ParseProvisionLogs, 'astute/logparser/provision'
42   LogParser.autoload :Patterns, 'astute/logparser/parser_patterns'
43   
44   SUCCESS = 0
45   FAIL = 1
46 
47   def self.logger
48     unless @logger
49       @logger = Logger.new('/var/log/astute.log')
50       @logger.formatter = proc do |severity, datetime, progname, msg|
51         severity_map = {'DEBUG' => 'debug', 'INFO' => 'info', 'WARN' => 'warning', 'ERROR' => 'err', 'FATAL' => 'crit'}
52         "#{datetime.strftime("%Y-%m-%dT%H:%M:%S")} #{severity_map[severity]}: [#{Process.pid}] #{msg}\n"
53       end
54     end
55     @logger
56   end
57 
58   def self.logger=(logger)
59     @logger = logger
60   end
61 
62   config_file = '/opt/astute/astute.conf'
63   Astute.config.update(YAML.load(File.read(config_file))) if File.exists?(config_file)
64 end

Generated on 2013-07-19 12:05:31 +0400 with SimpleCov-RCov 0.2.3