This project is (or will be) a best effort semi-static verifier for your Ruby on Rails projects. Delivered as a Ruby gem it provides a shell command task "railscheck" that you can run against your Rails projects to test for a number of typical bugs, potential problems and inconsistencies.
It is a law of software development that the earlier you identify a problem the cheaper it is to fix. This project aims to help you quickly identify quality assurance problems as early as possible (thus avoiding unnecessary debugging work for you and your development team ; as well as avoiding unnecessary, negative "surprises" for your users)... And best of all, it is all done automatically for you - no extra work required!
This project is hosted on http://rubyforge.org/projects/railscheck/. Refer to the latest README for up-to-date information on this gem or to the online RDoc's for code details. See also the blog 41 tecnologies for occasional postings about Railscheck.
tc_syntax_check_ruby.rb)tc_config.rb)tc_xml.rb)tc_views.rb)tc_html_and_css.rb) currently using W3C web services.tc_html_and_css.rb) currently using W3C web services.tc_database.rb)tc_database.rb)tc_database.rb)tc_database.rb)tc_models.rb)tc_models.rb)tc_rails_deprecations.rb)tc_project.rb)sudo gem install railscheck
Note: Before running railscheck do make sure this gem is installed, your project is configured and that all your migrations are run for the project(s) you want to check.
Full usage instructions including useful details about including/excluding individual checks:railscheck -h
Check your project using all build-in checks:
$ railscheck /mypath/myrailsproject Railscheck 0.2.0 (nb. help & more information avilable with -h argument): Booted RoR 2.0.2 project at "/mypath/myrailsproject". Running all railscheck tests satisfying /.*/ and not satisfying /html/: Loading test file "./../lib/test/tc_config.rb". Loading test file "./../lib/test/tc_database.rb". Loading test file "./../lib/test/tc_models.rb". Loading test file "./../lib/test/tc_project.rb". Loading test file "./../lib/test/tc_rails_deprecations.rb". Loading test file "./../lib/test/tc_syntax_check_ruby.rb". Loading test file "./../lib/test/tc_views.rb". Loading test file "./../lib/test/tc_xml.rb". Loading test file "./../lib/test/html_and_css.rb". Loaded suite ./railscheck Started .............. Finished in 0.352005 seconds. 14 tests, 61 assertions, 0 failures, 0 errorsNote: The above project has no problems - what about your project?
You can easily add your own checks to the "lib\test" folder. Checks are tests based on the standard ruby unit test framework and following the standard conventions they should be placed in Ruby files starting with "tc_" in order to be picked up by Railscheck automatically. All test classes should inherit from Railscheck::TestCase which in turns inherits from Test::Unit::TestCase. See the existing test files for examples.
Any added code that you contribute will be given due credit! However make sure that you assign undersigned shared copyright so I am allowed to release and license your work together with this project.
The source code is available anonymously (readonly) using subversion:svn checkout svn://rubyforge.org/var/svn/railscheck/trunk
Once you have added your tests write undersigned an email in order to get registered and get your contribution into Railscheck. When you are registered as a project contributor you may access the source code from subversion with full read/write rights using:
svn checkout svn+ssh://YOUR-RUBYFORGE-LOGIN-NAME@rubyforge.org/var/svn/railscheck/trunk