Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Provides a better Warning Message facility to Ruby.

tree: 8ead972430

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .document
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rspec
Octocat-spinner-32 .yardopts
Octocat-spinner-32 ChangeLog.md
Octocat-spinner-32 LICENSE.txt
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 gemspec.yml
Octocat-spinner-32 warnings.gemspec
README.md

warnings

Description

Warnings provides a searchable and more readable Warning Message facility to Ruby. With Warnings, one can queue all warning messages generated by your code, search through them and/or print them upon exit.

Features

  • Respects $VERBOSE (ruby -w) and $DEBUG (ruby -d)
  • Search Warning Messages by:
    • Source File
    • Source Method
    • Message
  • Prints Messages upon exit.
  • ANSI Coloring.

Examples

require 'warnings'

def danger!
  warn "Fire in the disco!"
end

danger!

Warnings.grep(/fire/)
# => [...]

Warnings.from_method('danger!')
# => [...]

Warnings.from_file('foo/bar.rb')
# => [...]

exit
#
# Warnings:
#
# fire in the disco!          lib/foo/bar.rb:42

Requirements

Install

$ gem install warnings

Copyright

Copyright (c) 2011 Hal Brodigan

See {file:LICENSE.txt} for details.

Something went wrong with that request. Please try again.