Geminstaller C0 Coverage Information - RCov

lib/geminstaller/output_filter.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
lib/geminstaller/output_filter.rb 49 42
100.00%
100.00%

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 module GemInstaller
2   class OutputFilter
3     attr_writer :output_proxy, :options
4     
5     def rubygems_output(type, message)
6       return if @options[:silent]
7       return unless rubygems_output_type_matches?(type)
8       output(:rubygems, type, message)
9     end
10       
11     def geminstaller_output(type, message)
12       return if @options[:silent]
13       return unless geminstaller_output_type_matches?(type)
14       output(:geminstaller, type, message)
15     end
16       
17     def output(source, type, message)
18       message = format_rubygems_message(type,message) if source == :rubygems
19       if (source == :geminstaller and type == :error)
20         @output_proxy.syserr(message)
21         
22       else
23         @output_proxy.sysout(message)
24       end
25     end
26     
27     def format_rubygems_message(type, message)
28       prefix = case type
29       when :stdout then "[RubyGems:stdout] "
30       when :stderr then "[RubyGems:stderr] "
31       end
32       "#{prefix}#{message}"
33     end
34 
35     def rubygems_output_type_matches?(type)
36       return false unless @options[:rubygems_output]
37       return true if @options[:rubygems_output].include?(:all)
38       return true if @options[:rubygems_output].include?(type)
39       return false
40     end
41 
42     def geminstaller_output_type_matches?(type)
43       return false unless @options[:geminstaller_output]
44       return true if @options[:geminstaller_output].include?(:all)
45       return true if @options[:geminstaller_output].include?(type)
46       return false
47     end
48   end
49 end

Generated on Mon May 10 23:40:28 -0700 2010 with rcov 0.9.8