require 'dev-utils'

The Ruby dev-utils Project

Links
Contents

About dev-utils

dev-utils provides utilites to assist the process of developing Ruby programs. At the moment, the target areas are debugging and unit testing (planned).

Version 1.0 was released on 2004-10-08 as a RubyGem, and made its way into RPA. Version 1.0.1 was released on 2004-10-12, in order to make tarball installation possible. There’s no need to upgrade, as there is no code change.

Throughout this documentation, there are references to planned features. These will be released in 2.0, for which there is no estimated completion date.

Debugging

With dev-utils/debug you can:

  breakpoint
  breakpoint 'Person#name'           # Identify it when it happens.
  breakpoint { @name }               # Default return value. 
  debug 'Database connection established'   # Look in ./debug.log 
  trace 'x + y'
  trace 'Process.pid'
  trace 'names', :pp                 # Pretty-print.
  trace 'page_structure', :yaml      # YAML representation. 

For more information, see Debugging Aids.

Unit Testing (Planned)

With dev-utils/test you can:

For more information, see Unit Test Organisation.

Internet Links

Home page: http://dev-utils.rubyforge.org
Project page: http://rubyforge.org/projects/dev-utils
Download: http://rubyforge.org/frs/?group_id=270
API Documentation: http://dev-utils.rubyforge.org/api

Installation Instructions

RubyGems:
  gem install -r dev-utils 
RPA:
  rpa install dev-utils 
Tarball:
  tar zxvf dev-utils-1.0.1.tgz
  cd dev-utils-1.0.1
  [sudo] ruby setup.rb 

(See the setup.rb instructions webpage for advanced installation options.)

Administrivia

Credits

The breakpoint-related code was contributed unwittingly by Joel VanderWerf and Florian Gross. The rest of the code is by Gavin Sinclair.

Notes

dev-utils depends on extensions, version 0.5 or greater.

Runnable examples are located in the examples directory of the distribution.

License

Copyright© 2004, Gavin Sinclair.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.