Dead_view_catcher is a project mainly written in Ruby, based on the MIT license.
Find easily wich views you are not using anymore in your Rails app.
= DeadViewCatcher
DeadViewCatcher is a gem for Ruby on Rails giving you an easy way to find which views you are not using anymore in your app. This might be really useful for big Rails app maintained by a large team.
Works with Rails 2.3 (Will be tested against Rails3 soon)
== Usage
Simply load the gem in your rails app.
Then instantiate DeadViewCatcher during the boot:
DeadViewCatcher.watch!
Now, at any time, you can send a TRAP signal to your rails instance in order to generate a dump of your views status:
kill -s TRAP pid_of_your_instance
If you want to generate a consolidated dump gathering data from all your Rails instances, just choose one instance and send it the URG signal:
kill -s URG pid_of_one_of_your_instances
== Options
The watch! method accepts some options :
DeadViewCatcher.watch!(:grep => 'unicorn_rails worker')
DeadViewCatcher.watch!(:signal => 'USR1')
DeadViewCatcher.watch!(:all_instances_signal => 'USR2')
DeadViewCatcher.watch!(:file => '/tmp/somewhere.txt')
When customizing the signal you want to catch, be careful when picking one, as your server might already catch some (like Unicorn does for USR1 and USR2).
Copyright (c) 2011 Guillaume Luccisano - g-mai|: guillaume.luccisano, released under the MIT license