No commit activity in last 3 years
No release in over 3 years
Find and report ActiveRecord validation errors.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0
~> 3.2
~> 1.0

Runtime

< 5.0, >= 3.2
 Project Readme

ValidationErrorReporter

Build Status Code Climate Test Coverage Gem Version

Data migrations and multiple changes in model validations over time sometimes leaves the models in an erroneous state and might cause problems if not deteced.

It's unfortunate that one would sometimes need such a tool, but here it is.

Run the task periodically to ensure the data is intact.

Installation

Add this line to your application's Gemfile:

gem 'validation_error_reporter'

And then execute:

$ bundle

Or install it yourself as:

$ gem install validation_error_reporter

Usage

The reports gets creates by a rake task. Printing or emailing the report is controlled by options sent through environment variables.

To print the report, just run the task without any options:

$ bundle exec rake validation_error_reporter:validate

To email the report set the EMAIL_TO and EMAIL_FROM options:

$ bundle exec rake validation_error_reporter:validate EMAIL_TO=me@example.com
EMAIL_FROM=you@example.com

If you want to validate specific models you can explicity say which models you want to validate with the MODELS option:

$ bundle exec rake validation_error_reporter:validate MODELS="Company,
Subscription"

Contributing

  1. Fork it ( https://github.com/olejrosendahl/validation_error_reporter/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

The gem is available as open source under the terms of the MIT License.