Created
April 15, 2011 10:56
-
-
Save paneq/921513 to your computer and use it in GitHub Desktop.
watchr script to observe changes in Rails.root/app/ directory and store the info about last change time in hidden Rails.root/.watchr file. # This file: touch.watchr is in Rails.root/scripts/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
rails_root = File.expand_path('../..', __FILE__) | |
watchr_file = File.join(rails_root, '.watchr') | |
watch( 'app/(.*)\.rb' ) {|md| FileUtils.touch(watchr_file) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment