Module: Hoe::RCov

### Home Classes Methods

### In Files

- lib/hoe/rcov.rb

### Methods

- #activate_rcov_deps
- #define_rcov_tasks

### Files

- History.txt
- Manifest.txt

### Class/Module Index

Quicksearch

- Hoe
- Hoe::Clean
- Hoe::Compiler
- Hoe::Debug
- Hoe::Deps
- Hoe::Flay
- Hoe::Flog
- Hoe::GemPreludeSucks
- Hoe::Gemcutter
- Hoe::Inline
- Hoe::Newb
- Hoe::Package
- Hoe::Publish
- Hoe::RCov
- Hoe::Racc
- Hoe::RubyForge
- Hoe::Signing
- Hoe::Test
- Rake
- Rake::Task
- Rake::TaskManager
- File
- Object
- String

No matching classes.

# Hoe::RCov

RCov plugin for hoe.

### Tasks Provided:

rcov | Analyze code coverage with tests

### Public Instance Methods

activate_rcov_deps() click to toggle source

Activate the rcov dependencies.

    # File lib/hoe/rcov.rb, line 13
    def activate_rcov_deps
      dependency "rcov", "~> 0.9", :development
    end

define_rcov_tasks() click to toggle source

Define tasks for plugin.

    # File lib/hoe/rcov.rb, line 20
    def define_rcov_tasks
      begin # take a whack at defining rcov tasks
        task :isolate # ensure it exists

        task :rcov => :isolate do
          sh(*make_rcov_cmd)
        end

        task :clobber_rcov do
          rm_rf "coverage"
        end

        task :clobber => :clobber_rcov

        # this is for my emacs rcov overlay stuff on emacswiki.
        task :rcov_overlay do
          path = ENV["FILE"]
          rcov, eol = Marshal.load(File.read("coverage.info")).last[path], 1
          puts rcov[:lines].zip(rcov[:coverage]).map { |line, coverage|
            bol, eol = eol, eol + line.length
            [bol, eol, "#ffcccc"] unless coverage
          }.compact.inspect
        end
      rescue LoadError
        # skip
        task :clobber_rcov # in case rcov didn't load
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.