push
travis-ci
227 of 529 relevant lines covered (42.91%)
1.78 hits per line
1 |
require_relative 'log'
|
4 all except jruby-9.0.0.0 ✔ |
2 |
require_relative 'mail'
|
4 all except jruby-9.0.0.0 ✔ |
3 |
|
|
4 |
module DoSnapshot |
4 all except jruby-9.0.0.0 ✔ |
5 |
# Helpers for main class.
|
|
6 |
#
|
|
7 |
module Helpers |
4 all except jruby-9.0.0.0 ✔ |
8 |
def logger |
4 all except jruby-9.0.0.0 ✔ |
9 |
UniversalLogger
|
× |
10 |
end
|
× |
11 |
|
|
12 |
# UniversalLogger is a module to deal with singleton methods.
|
|
13 |
# Used to give classes access only for selected methods
|
|
14 |
#
|
|
15 |
module UniversalLogger |
4 all except jruby-9.0.0.0 ✔ |
16 |
%w(debug info warn error fatal unknown).each do |name| |
4 all except jruby-9.0.0.0 ✔ |
17 |
define_singleton_method(:"#{name}") { |*args, &block| DoSnapshot.logger.send(:"#{name}", *args, &block) } |
24 all except jruby-9.0.0.0 ✔ |
18 |
end
|
|
19 |
|
|
20 |
def self.close |
4 all except jruby-9.0.0.0 ✔ |
21 |
DoSnapshot.logger.close
|
× |
22 |
end
|
|
23 |
end
|
|
24 |
|
|
25 |
def mailer |
4 all except jruby-9.0.0.0 ✔ |
26 |
DoSnapshot.mailer
|
× |
27 |
end
|
|
28 |
end
|
|
29 |
end
|