Changeset 1484 for branches/locker-dev/locker
- Timestamp:
- Feb 22, 2010, 3:31:06 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/locker-dev/locker/deploy/bin/rails
r1469 r1484 133 133 # You may want to also watch public or vendor, depending on your needs. 134 134 Thread.current[:watched_dirs] = ['app', 'config', 'db', 'lib'] 135 136 # List of specific files to watch for changes. 137 Thread.current[:watched_files] = ['public/dispatch.fcgi', 138 'public/.htaccess'] 135 139 # Sample filter: /(\.rb|\.erb)\$/. Default filter: watch all files 136 140 Thread.current[:watched_extensions] = // … … 176 180 # Wait until the modify time changes, then reload. 177 181 while true 178 reload if Thread.current[:watched_dirs].inject(false) {|z, dir| z || modified_dir(File.join(File.dirname(__FILE__), '..', dir))} 182 dir_modified = Thread.current[:watched_dirs].inject(false) {|z, dir| z || modified_dir(File.join(File.dirname(__FILE__), '..', dir))} 183 file_modified = Thread.current[:watched_files].inject(false) {|z, file| z || modified(File.join(File.dirname(__FILE__), '..', file))} 184 reload if dir_modified || file_modified 179 185 Thread.current[:iterations] += 1 180 186 sleep 1
Note: See TracChangeset
for help on using the changeset viewer.