Permalink
Browse files

updating docs

  • Loading branch information...
1 parent 734afd1 commit 8f12c950ad04767549b4f85c0b0da805269d3784 Aaron Bedra committed Jul 31, 2009
View
3 Rakefile
@@ -81,8 +81,5 @@ Rake::RDocTask.new("rdoc") { |rdoc|
rdoc.rdoc_dir = 'doc'
rdoc.title = "rcov"
rdoc.options << "--line-numbers" << "--inline-source"
- rdoc.rdoc_files.include('doc/readme_for_api')
- rdoc.rdoc_files.include('doc/readme_for_rake')
- rdoc.rdoc_files.include('doc/readme_for_vim')
rdoc.rdoc_files.include('lib/**/*.rb')
}
View
41 doc/readme_for_api
@@ -1,41 +0,0 @@
-
-= +rcov+
-
-+rcov+ is a:
-1. tool for code coverage analysis for Ruby
-2. library for collecting code coverage and execution count information
- introspectively
-
-If you want to use the command line tool, the output from
- rcov -h
-is self-explicative.
-
-If you want to automate the execution of +rcov+ via Rake take a look at
-readme_for_rake[link:files/README_rake.html].
-
-If you want to use the associated library, read on.
-
-== Usage of the +rcov+ runtime/library
-
-+rcov+ is primarily a tool for code coverage analysis, but since 0.4.0 it
-exposes some of its code so that you can build on top of its heuristics for
-code analysis and its capabilities for coverage information and execution
-count gathering.
-
-The main classes of interest are Rcov::FileStatistics,
-Rcov::CodeCoverageAnalyzer and Rcov::CallSiteAnalyzer.
-
-Rcov::FileStatistics can use some heuristics to determine
-which parts of the file are executable and which are mere comments.
-
-Rcov::CodeCoverageAnalyzer is used to gather code coverage and execution
-count information inside a running Ruby program.
-
-Rcov::CallSiteAnalyzer is used to obtain information about where methods are
-defined and who calls them.
-
-The parts of +rcov+'s runtime meant to be reused (i.e. the external API) are
-documented with RDoc. Those not meant to be used are clearly marked as so or
-were deliberately removed from the present documentation.
-
-
View
22 doc/readme_for_api.markdown
@@ -0,0 +1,22 @@
+# RCov
+
+RCov is a:
+
+1. tool for code coverage analysis for Ruby
+2. library for collecting code coverage and execution count information introspectively
+
+If you want to use the command line tool, the output from `rcov -h` is self explanatory. If you want to automate the execution of RCov via Rake take a look at [readme for rake]("http://github.com/relevance/rcov/blob/master/doc/readme_for_rake.markdown"). If you want to use the associated library, read on.
+
+## Usage of the RCov runtime/library
+
+RCov is primarily a tool for code coverage analysis, but since 0.4.0 it exposes some of its code so that you can build on top of its heuristics for code analysis and its capabilities for coverage information and execution count gathering. The main classes of interest are `Rcov::FileStatistics`, `Rcov::CodeCoverageAnalyzer` and `Rcov::CallSiteAnalyzer`.
+
+* `Rcov::FileStatistics` can use some heuristics to determine which parts of the file are executable and which are mere comments.
+
+* `Rcov::CodeCoverageAnalyzer` is used to gather code coverage and execution count information inside a running Ruby program.
+
+* `Rcov::CallSiteAnalyzer` is used to obtain information about where methods are defined and who calls them.
+
+The parts of RCov's runtime meant to be reused (i.e. the external API) are documented with RDoc. Those not meant to be used are clearly marked as so or were deliberately removed from the present documentation.
+
+
View
64 doc/readme_for_emacs
@@ -1,64 +0,0 @@
-
-<tt>rcov.el</tt> allows you to use rcov from Emacs conveniently.
-* Run unit tests and jump to uncovered code by <tt>C-x `</tt>.
-* Run unit tests and save the current coverage status.
-* Run unit tests and jump to uncovered code introduced since the last run.
-* View cross-reference annotated code.
-
-== Installation
-
-Copy <tt>rcov.el</tt> to the appropriate directory, which is in load-path.
-Then require it.
- (require 'rcov)
-
-
-== Usage
-
-There are some commands to run rcov in Emacs.
-All of them displays +rcov+ window, whose major-mode is compilation-mode.
-Therefore you can jump to uncovered code by <tt>C-x `</tt>.
-
-+rcov-command-line+, +rcovsave-command-line+, and +rcovdiff-command-line+ define
-command line to run rcov.
-If you do not use +rcov+ from Rake, you must modify them.
-
-=== Finding uncovered code
-
-Type the following while editing your program:
- M-x rcov
-
-=== Setting the reference point
-
-+rcov+'s <tt>--text-coverage-diff</tt> mode compares the current coverage status against
-the saved one. It therefore needs that information to be recorded
-before you write new code (typically right after you perform a commit) in
-order to have something to compare against.
-
-You can save the current status with the <tt>--save</tt> option.
-
-Type the following to save the current status in Emacs:
- M-x rcovsave
-If you do not use +rcov+ from Rake, you must modify +rcovsave-command-line+ variable.
-
-=== Finding new uncovered code
-
-Type the following to save the current status in Emacs:
- M-x rcovdiff
-
-=== Viewing cross-reference annotated code
-
-If you read cross-reference annotated code, issue
- rake rcov RCOVOPTS='-a'
-at the beginning.
-This command creates +coverage+ directory and many *.rb files in it.
-Filenames of these Ruby scripts are converted from original path.
-You can browse them by normally <tt>C-x C-f</tt>.
-You can think of <tt>-a</tt> option as <tt>--xrefs</tt> option and output format is Ruby script.
-
-After find-file-ed annotated script, the major-mode is rcov-xref-mode,
-which is derived from ruby-mode and specializes navigation.
-
-<tt>Tab</tt> and <tt>M-Tab</tt> goes forward/backward links.
-<tt>Ret</tt> follows selected link.
-
-This feature is useful to read third-party code or to follow control flow.
View
52 doc/readme_for_emacs.markdown
@@ -0,0 +1,52 @@
+# rcov.el
+
+`rcov.el` allows you to use rcov from Emacs conveniently.
+
+* Run unit tests and jump to uncovered code by <code>C-x `</code>
+* Run unit tests and save the current coverage status.
+* Run unit tests and jump to uncovered code introduced since the last run.
+* View cross-reference annotated code.
+
+## Installation
+
+Copy <tt>rcov.el</tt> to the appropriate directory, which is in load-path then require it.
+
+`(require 'rcov)`
+
+## Usage
+
+There are some commands to run RCov in Emacs. All of them will display RCov window, whose `major-mode` is `compilation-mode`. This allow you to jump to uncovered code using C-x `. rcov-command-line, rcovsave-command-line, and rcovdiff-command-line define command line to run rcov. If you do not use RCov from Rake, you must modify them.
+
+### Finding uncovered code
+
+Type the following while editing your program:
+
+`M-x rcov`
+
+### Setting the reference point
+
+RCov's `--text-coverage-diff` mode compares the current coverage status against the saved one. It therefore needs that information to be recorded before you write new code (typically right after you perform a commit) in order to have something to compare against. You can save the current status with the `--save` option. Type the following to save the current status in Emacs:
+
+`M-x rcovsave`
+
+If you do not use RCov from Rake, you must modify `rcovsave-command-line` variable.
+
+### Finding new uncovered code
+
+Type the following to save the current status in Emacs:
+
+`M-x rcovdiff`
+
+### Viewing cross-reference annotated code
+
+If you read cross-reference annotated code, issue
+
+`rake rcov RCOVOPTS='-a'`
+
+at the beginning. This command creates a `coverage` directory and many `*.rb` files in it. Filenames of these Ruby scripts are converted from original path. You can browse them by normally `C-x C-f`. You can think of `-a` option as `--xrefs` option and output format is Ruby script. After `find-file-ed` annotated script, the `major-mode` is `rcov-xref-mode`,
+which is derived from `ruby-mode` and specializes navigation.
+
+* `Tab` and `M-Tab` goes forward/backward links.
+* `Ret` follows selected link.
+
+This feature is useful to read third-party code or to follow control flow.
View
62 doc/readme_for_rake
@@ -1,62 +0,0 @@
-
-== Code coverage analysis automation with Rake
-
-Since 0.4.0, <tt>rcov</tt> features a <tt>Rcov::RcovTask</tt> task for rake
-which can be used to automate test coverage analysis. Basic usage is as
-follows:
-
- require 'rcov/rcovtask'
- Rcov::RcovTask.new do |t|
- t.test_files = FileList['test/test*.rb']
- # t.verbose = true # uncomment to see the executed command
- end
-
-This will create by default a task named <tt>rcov</tt>, and also a task to
-remove the output directory where the XHTML report is generated.
-The latter will be named <tt>clobber_rcob</tt>, and will be added to the main
-<tt>clobber</tt> target.
-
-=== Passing command line options to <tt>rcov</tt>
-
-You can provide a description, change the name of the generated tasks (the
-one used to generate the report(s) and the clobber_ one) and pass options to
-<tt>rcov</tt>:
-
- desc "Analyze code coverage of the unit tests."
- Rcov::RcovTask.new(:coverage) do |t|
- t.test_files = FileList['test/test*.rb']
- t.verbose = true
- ## get a text report on stdout when rake is run:
- t.rcov_opts << "--text-report"
- ## only report files under 80% coverage
- t.rcov_opts << "--threshold 80"
- end
-
-That will generate a <tt>coverage</tt> task and the associated
-<tt>clobber_coverage</tt> task to remove the directory the report is dumped
-to ("<tt>coverage</tt>" by default).
-
-You can specify a different destination directory, which comes handy if you
-have several <tt>RcovTask</tt>s; the <tt>clobber_*</tt> will take care of
-removing that directory:
-
- desc "Analyze code coverage for the FileStatistics class."
- Rcov::RcovTask.new(:rcov_sourcefile) do |t|
- t.test_files = FileList['test/test_FileStatistics.rb']
- t.verbose = true
- t.rcov_opts << "--test-unit-only"
- t.output_dir = "coverage.sourcefile"
- end
-
- Rcov::RcovTask.new(:rcov_ccanalyzer) do |t|
- t.test_files = FileList['test/test_CodeCoverageAnalyzer.rb']
- t.verbose = true
- t.rcov_opts << "--test-unit-only"
- t.output_dir = "coverage.ccanalyzer"
- end
-
-=== Options passed through the <tt>rake</tt> command line
-
-You can override the options defined in the RcovTask by passing the new
-options at the time you invoke rake.
-The documentation for the Rcov::RcovTask explains how this can be done.
View
51 doc/readme_for_rake.markdown
@@ -0,0 +1,51 @@
+# Code coverage analysis automation with Rake
+
+Since 0.4.0, RCov features a `Rcov::RcovTask` task for rake
+which can be used to automate test coverage analysis. Basic usage is as
+follows:
+<pre><code>
+require 'rcov/rcovtask'
+Rcov::RcovTask.new do |t|
+ t.test_files = FileList['test/test*.rb']
+ # t.verbose = true # uncomment to see the executed command
+end
+</pre></code>
+
+This will create by default a task named `rcov`, and also a task to remove the output directory where the XHTML report is generated. The latter will be named `clobber_rcov`, and will be added to the main `clobber` target.
+
+## Passing command line options to RCov
+
+You can provide a description, change the name of the generated tasks (the one used to generate the report(s) and the `clobber_` one) and pass options to RCov:
+<pre><code>
+desc "Analyze code coverage of the unit tests."
+Rcov::RcovTask.new(:coverage) do |t|
+ t.test_files = FileList['test/test*.rb']
+ t.verbose = true
+ ## get a text report on stdout when rake is run:
+ t.rcov_opts << "--text-report"
+ ## only report files under 80% coverage
+ t.rcov_opts << "--threshold 80"
+end
+</pre></code>
+
+This will generate a `coverage` task and the associated `clobber_coverage` task to remove the directory the report is dumped to (`coverage` by default). You can specify a different destination directory, which comes handy if you have several `RcovTask`s; the `clobber_*` will take care of removing that directory:
+<pre><code>
+desc "Analyze code coverage for the FileStatistics class."
+Rcov::RcovTask.new(:rcov_sourcefile) do |t|
+ t.test_files = FileList['test/test_FileStatistics.rb']
+ t.verbose = true
+ t.rcov_opts << "--test-unit-only"
+ t.output_dir = "coverage.sourcefile"
+end
+
+Rcov::RcovTask.new(:rcov_ccanalyzer) do |t|
+ t.test_files = FileList['test/test_CodeCoverageAnalyzer.rb']
+ t.verbose = true
+ t.rcov_opts << "--test-unit-only"
+ t.output_dir = "coverage.ccanalyzer"
+end
+</pre></code>
+
+## Options passed through the `rake` command line
+
+You can override the options defined in the RcovTask by passing the new options at the time you invoke rake. The documentation for the `Rcov::RcovTask` explains how this can be done.
View
47 doc/readme_for_vim
@@ -1,47 +0,0 @@
-
-<tt>rcov.vim</tt> allows you to run unit tests from vim and enter quickfix mode in
-order to jump to uncovered code introduced since the last run.
-
-== Installation
-Copy <tt>rcov.vim</tt> to the appropriate "compiler" directory (typically
-<tt>$HOME/.vim/compiler</tt>).
-
-== Usage
-
-=== Setting the reference point
-
-+rcov+'s <tt>--text-coverage-diff</tt> mode compares the current coverage status against
-the saved one. It therefore needs that information to be recorded
-before you write new code (typically right after you perform a commit) in
-order to have something to compare against.
-
-You can save the current status with the <tt>--save</tt> option.
-If you're running +rcov+ from Rake, you can do something like
- rake rcov_units RCOVOPTS="-T --save --rails"
-in order to take the current status as the reference point.
-
-=== Finding new uncovered code
-
-Type the following in command mode while editing your program:
- :compiler rcov
-
-rcov.vim assumes +rcov+ can be invoked with a rake task (see
-readme_for_rake[link:files/README_rake.html] for
-information on how to create it).
-
-You can then execute +rcov+ and enter quickfix mode by typing
-
- :make <taskname>
-
-where taskname is the +rcov+ task you want to use; if you didn't override the
-default name in the Rakefile, just
-
- :make rcov
-
-will do.
-
-vim will then enter quickfix mode, allowing you to jump to the areas that were
-not covered since the last time you saved the coverage data.
-
---------
-# vim: ft=text :
View
34 doc/readme_for_vim.markdown
@@ -0,0 +1,34 @@
+# rcov.vim
+
+`rcov.vim` allows you to run unit tests from vim and enter quickfix mode in order to jump to uncovered code introduced since the last run.
+
+## Installation
+Copy `rcov.vim` to the appropriate `compiler` directory (typically `$HOME/.vim/compiler`).
+
+### Usage
+
+#### Setting the reference point
+
+RCov's `--text-coverage-diff` mode compares the current coverage status against the saved one. It therefore needs that information to be recorded before you write new code (typically right after you perform a commit) in order to have something to compare against. You can save the current status with the `--save` option. If you're running RCov from Rake, you can do something like
+
+`rake rcov_units RCOVOPTS="-T --save --rails"`
+
+in order to take the current status as the reference point.
+
+#### Finding new uncovered code
+
+Type the following in command mode while editing your program:
+
+`:compiler rcov`
+
+`rcov.vim` assumes RCov can be invoked with a rake task (see [readme for rake]("http://github.com/relevance/rcov/blob/master/doc/readme_for_rake.markdown") for information on how to create it).
+
+You can then execute +rcov+ and enter quickfix mode by typing
+
+`:make <taskname>`
+
+where taskname is the +rcov+ task you want to use; if you didn't override the default name in the Rakefile, just
+
+`:make rcov`
+
+will do. Vim will then enter quickfix mode, allowing you to jump to the areas that were not covered since the last time you saved the coverage data.
View
2 lib/rcov/version.rb
@@ -3,7 +3,7 @@
# See LEGAL and LICENSE for licensing information.
module Rcov
- VERSION = "0.8.3.9"
+ VERSION = "0.8.4"
RELEASE_DATE = "2009-07-31"
RCOVRT_ABI = [2,0,0]
UPSTREAM_URL = "http://github.com/relevance/rcov"
View
9 rcov.gemspec
@@ -8,8 +8,8 @@ PKG_FILES = ["bin/rcov", "lib/rcov.rb", "lib/rcov/lowlevel.rb", "lib/rcov/versio
"lib/rcov/templates/screen.css",
"ext/rcovrt/extconf.rb", "ext/rcovrt/1.8/rcovrt.c", "ext/rcovrt/1.9/rcovrt.c",
"ext/rcovrt/1.8/callsite.c", "ext/rcovrt/1.9/callsite.c", "LICENSE",
- "Rakefile", "doc/readme_for_rake", "doc/readme_for_vim", "doc/readme_for_emacs",
- "doc/readme_for_vim", "doc/readme_for_api", "THANKS", "test/functional_test.rb",
+ "Rakefile", "doc/readme_for_rake.markdown", "doc/readme_for_vim.markdown", "doc/readme_for_emacs.markdown",
+ "doc/readme_for_api.markdown", "THANKS", "test/functional_test.rb",
"test/file_statistics_test.rb", "test/assets/sample_03.rb", "test/assets/sample_05-new.rb",
"test/code_coverage_analyzer_test.rb", "test/assets/sample_04.rb", "test/assets/sample_02.rb",
"test/assets/sample_05-old.rb", "test/assets/sample_01.rb", "test/turn_off_rcovrt.rb",
@@ -18,7 +18,7 @@ PKG_FILES = ["bin/rcov", "lib/rcov.rb", "lib/rcov/lowlevel.rb", "lib/rcov/versio
Gem::Specification.new do |s|
s.name = %q{rcov}
- s.version = "0.8.3.9"
+ s.version = "0.8.4"
s.required_rubygems_version = nil if s.respond_to? :required_rubygems_version=
s.authors = ["Relevance", "Chad Humphries (spicycode)", "Aaron Bedra (abedra)", "Mauricio Fernandez"]
@@ -29,11 +29,10 @@ Gem::Specification.new do |s|
s.email = %q{opensource@thinkrelevance.com}
s.executables = ["rcov"]
s.extensions = ["ext/rcovrt/extconf.rb"]
- s.extra_rdoc_files = ["doc/readme_for_api", "doc/readme_for_rake", "doc/readme_for_vim", "doc/readme_for_emacs"]
s.files = PKG_FILES
s.has_rdoc = true
s.homepage = %q{http://github.com/relevance/rcov}
- s.rdoc_options = ["--main", "doc/readme_for_api", "--title", "rcov code coverage tool"]
+ s.rdoc_options = ["--title", "rcov code coverage tool"]
s.require_paths = ["lib"]
s.required_ruby_version = Gem::Requirement.new("> 0.0.0")
s.summary = %q{Code coverage analysis tool for Ruby}

0 comments on commit 8f12c95

Please sign in to comment.