<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -30,6 +30,7 @@ options.textmode = false
 options.skip = Rcov::BaseFormatter::DEFAULT_OPTS[:ignore]
 options.include = []
 options.html = true
+options.css = nil
 options.comments_run_by_default = false
 options.test_unit_only = false
 options.spec_only = false
@@ -215,6 +216,10 @@ EOF
     options.html = val
   end
   
+  opts.on(&quot;--css relative/path/to/custom.css&quot;, &quot;Use a custom CSS file for HTML output.&quot;, &quot;Specified as a relative path.&quot;) do |val|
+    options.css = val
+  end
+  
   opts.on(&quot;--sort CRITERION&quot;, [:name, :loc, :coverage], &quot;Sort files in the output by the specified&quot;, &quot;field (name, loc, coverage)&quot;) do |criterion|
     options.sort = criterion
   end
@@ -377,6 +382,7 @@ make_formatter = lambda do |klass|
               :comments_run_by_default =&gt; options.comments_run_by_default,
               :gcc_output =&gt; options.gcc_output,
               :charset =&gt; options.charset,
+              :css =&gt; options.css,
               :failure_threshold =&gt; options.failure_threshold
              )
 end</diff>
      <filename>bin/rcov</filename>
    </modified>
    <modified>
      <diff>@@ -10,6 +10,7 @@ module Rcov
       options = DEFAULT_OPTS.clone.update(opts)
       super(options)
       @dest = options[:destdir]
+      @css = options[:css]
       @color = options[:color]
       @fsr = options[:fsr]
       @do_callsites = options[:callsites]
@@ -28,6 +29,16 @@ module Rcov
         FileUtils.cp(_src, File.join(@dest, &quot;#{_file}&quot;))
       end
 
+      # Copy custom CSS, if any
+      if @css
+        begin
+          _src = File.expand_path(&quot;#{@dest}/../#{@css}&quot;)
+          FileUtils.cp(_src, File.join(@dest, &quot;custom.css&quot;))
+        rescue
+          @css = nil
+        end
+      end
+      
       create_index(File.join(@dest, &quot;index.html&quot;))
 
       each_file_pair_sorted do |filename, fileinfo|
@@ -76,6 +87,7 @@ module Rcov
       doc = Rcov::Formatters::HtmlErbTemplate.new('index.html.erb',
         :project_name =&gt; project_name,
         :generated_on =&gt; Time.now,
+        :css =&gt; @css,
         :rcov =&gt; Rcov,
         :formatter =&gt; self,
         :output_threshold =&gt; @output_threshold,
@@ -89,6 +101,7 @@ module Rcov
       doc = Rcov::Formatters::HtmlErbTemplate.new('detail.html.erb',
         :project_name =&gt; project_name,
         :page_title =&gt; fileinfo.name, 
+        :css =&gt; @css,
         :generated_on =&gt; Time.now,
         :rcov =&gt; Rcov,
         :formatter =&gt; self,</diff>
      <filename>lib/rcov/formatters/html_coverage.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,6 +4,7 @@
     &lt;title&gt;&lt;%= page_title %&gt;&lt;/title&gt;
     &lt;link href=&quot;screen.css&quot; media=&quot;all&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
     &lt;link href=&quot;print.css&quot; media=&quot;print&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
+    &lt;% if css %&gt;&lt;link href=&quot;custom.css&quot; media=&quot;all&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;&lt;% end %&gt;
     &lt;meta http-equiv=&quot;Content-type&quot; content=&quot;text/html;charset=UTF-8&quot; /&gt;
     &lt;script type=&quot;text/javascript&quot; src=&quot;rcov.js&quot;&gt;&lt;/script&gt;
   &lt;/head&gt;</diff>
      <filename>lib/rcov/templates/detail.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -5,6 +5,7 @@
     &lt;title&gt;&lt;%= &quot;#{project_name} C0 Coverage Information - RCov&quot; %&gt;&lt;/title&gt;
     &lt;link href=&quot;screen.css&quot; media=&quot;all&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
     &lt;link href=&quot;print.css&quot; media=&quot;print&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
+    &lt;% if css %&gt;&lt;link href=&quot;custom.css&quot; media=&quot;all&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;&lt;% end %&gt;
     &lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.3.2.min.js&quot;&gt;&lt;/script&gt;
     &lt;script type=&quot;text/javascript&quot; src=&quot;jquery.tablesorter.min.js&quot;&gt;&lt;/script&gt;
     &lt;script type=&quot;text/javascript&quot; src=&quot;rcov.js&quot;&gt;&lt;/script&gt;</diff>
      <filename>lib/rcov/templates/index.html.erb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>512b8a15e60dba555170b95218de70284b6dfac2</id>
    </parent>
  </parents>
  <author>
    <name>Corey</name>
    <email>corey@seologic.com</email>
  </author>
  <url>http://github.com/relevance/rcov/commit/3f399ef8edbfdac8ecb2f4b8f970aad49028f301</url>
  <id>3f399ef8edbfdac8ecb2f4b8f970aad49028f301</id>
  <committed-date>2009-08-23T20:59:18-07:00</committed-date>
  <authored-date>2009-08-23T20:59:18-07:00</authored-date>
  <message>Support for new command-line option --css which allows user to specify a custom CSS file to use for HTML output.</message>
  <tree>f4354b1c676ba70ae85bc8682e20895b22b18cb3</tree>
  <committer>
    <name>Corey</name>
    <email>corey@seologic.com</email>
  </committer>
</commit>
