- June 18 2010
- « Creating Subdomains with Apache2
With the directory_watcher Gem we can watch whole directories with ease. We let our script know what directory to watch via a argument.
ruby brundle.rb /code/project to start the script and the observer. All files in this directory now will be watched for changes.
My favorite text editor is TextMate so that's what I'm using here. Let's change a file in the project and the observer will trigger and execute the AppleScript.
Firefox (again, choose your browser of choice) will get focus and the following keys are pressed: cmd-1 to select first tab and cmd-r
to reload the site. While reloading TextMate will get the focus again and we can continue developing. Easy!