Project

warnings

0.0
No commit activity in last 3 years
No release in over 3 years
Warnings provides a searchable and more readable Warning Message facility for Ruby. With Warnings, one can save all warning messages generated by your code, search through them and print them upon exit.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.4
~> 2.4
~> 0.7.0
 Project Readme

warnings

Description

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

Features

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

Examples

require 'warnings'

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

danger!
danger!

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

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

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

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

Install

$ gem install warnings

Copyright

Copyright (c) 2011 Hal Brodigan

See {file:LICENSE.txt} for details.