Commit Graph

42 Commits

Author SHA1 Message Date
Michael Kessler
53802ed355 Add yardoc to listeners. 2011-09-20 13:58:25 +02:00
Thibaud Guillaume-Gentil
667b248ad0 Add attrib on linux listener 2011-09-03 14:25:12 +02:00
Thibaud Guillaume-Gentil
3717179591 Refactor new interactor/listener mechanic now it's
look pretty.
Specs still need some love :)
2011-08-30 21:13:51 +02:00
Rob Eanes
e846068e89 Polling#watch_change should use listener directory, not Dir.pwd 2011-08-12 10:03:06 -05:00
Rémy Coutable
06be2107af Dir.glob now ignores files that don't need to be watched
By default, we don't watch ., .., .bundle, .git (this is HUGE), log, tmp and vendor (this is also HUGE). Also don't append '/' to the dir given to Guard::Listener#potentially_modified_files, the method now handles it internally.

In my case, Guard::Listener#potentially_modified_files was taking ~56 seconds (in a big Rails project), it takes now... less than 1 second.

Enjoy.
2011-07-21 01:40:40 +02:00
Rémy Coutable
9cc1cf64d1 Use Guard::Listener#worker as much as possible 2011-07-21 01:30:22 +02:00
Rémy Coutable
802d134165 Don't add attr_reader and attr_writer when unecessary
Rename Guard::Listener#relativate_paths to Guard::Listener#relativize_paths
2011-07-21 01:29:05 +02:00
Rémy Coutable
8a1ca41626 Moved Guard::Listener#update_last_event inside Guard::Listener#modified_files
Since the pattern was to always call Guard::Listener#update_last_event after Guard::Listener#modified_files.
2011-07-21 01:25:06 +02:00
Michael Kessler
d78ecb45fb Change inotify event flags (Closes #12).
There have been some issues with Guard in Linux, which all lead back
to the selection of the proper inotify flags. It seems that almost each
editors behaves different when it comes to save a file. @jeffutter
started to collect information about these events, which are now listed
in the Guard wiki:

https://github.com/guard/guard/wiki/Analysis-of-inotify-events-for-different-editors

If you miss your favorite editor, please add your analysis to the list.
2011-06-30 09:23:12 +02:00
Yann Lugrin
a6f3ebebfa Linux listener work more like others listeners
Now use modified_file method from listener api to ensure similar
behavior to the other platform. This change avoid unwanted behavior
when multiple events are raised for a file (like running tests more
one times).
2011-06-20 16:09:47 +02:00
Ricardo Markiewicz
d51b457b71 Improve INotify support on linux (fixes #79 #82)
Improve usage with several text editors that writes to temporal
files and then move over the original filename instead of write
files directly. Tested with GEdit, Nano, vim (with 'set backup'
and 'set nobackup') and emacs.
2011-06-17 18:48:35 +02:00
slavic
61b0a7aa05 Fix issue #12. Specs don't work. Fails beacause of ".git/index" 2011-06-17 00:36:16 +03:00
Konstantin Shabanov
668e0f4d85 Use RbConfig instead of obsolete and deprecated Config. 2011-06-16 18:14:51 +07:00
Mislav Marohnić
2997ed6962 skip version comparison if Gem::Version is not available
This decouples Guard from RubyGems
2011-06-07 15:46:30 +02:00
Thibaud Guillaume-Gentil
deec4135a9 Updated version deps for rb-fsevent & rb-inotify 2011-06-04 21:38:09 +02:00
Thibaud Guillaume-Gentil
6a77f01645 Merge branch 'master' of https://github.com/niklas/guard into niklas-master
Conflicts:
	lib/guard/listener.rb
	spec/guard/listeners/linux_spec.rb
2011-05-28 17:15:09 +02:00
Niklas Hofer
2f0870abfc refactor Polling Listener to catch deleted and moved files 2011-05-15 21:45:30 +02:00
Niklas Hofer
bc740d725f create shared examples all listeners should behave like 2011-05-15 21:45:30 +02:00
Niklas Hofer
9c44f89a61 can specify directory to listen to, still defaulting to pwd 2011-05-15 21:45:30 +02:00
slavic
92f81d383a Merge with current guard (commit '5352528530f29d3db523261560ee6920063c85b5') 2011-05-07 15:17:41 +03:00
Bruno Tavares
ed0b086cc5 Removed the unless with multiple conditions. Changed it back to if 2011-05-05 20:52:11 -03:00
Bruno Tavares
cefb872360 Changed some conditions to positive statement 2011-05-05 20:14:58 -03:00
slavic
0f7bca7bbd now all specs work 2011-05-01 21:49:16 +03:00
slavic
94e04ec7e0 add support for Windows using rb-fchange. Specs fail because of k32WaitForMultipleObjects blocks all threads 2011-04-30 13:38:57 +03:00
Marian Schubert
9ff627cfaa Return unique filenames from Linux listener
so that we don't get duplicate entries for same file. This solves problem with
commonly used Linux editors (e.g. Vim, Emacs) that generate multiple inotify
events on file save.

http://schettino72.wordpress.com/2010/03/07/inotify-text-editors-emacs-vim/
2011-01-26 12:17:09 +00:00
Thibaud Guillaume-Gentil
9772e9d9c8 Replaced Thread (incompatible with inotify) by a whole dir scan after each run_on_changes 2011-01-19 23:05:45 +01:00
Thibaud Guillaume-Gentil
53a79691a5 Kept listener running in thread even when guards plugin are also running. 2010-11-30 21:15:03 +01:00
Thibaud Guillaume-Gentil
edeaa1e864 Depends on rb-fsevent >= 0.3.5 for ruby 1.8.6 support 2010-10-26 21:24:04 +02:00
Thibaud Guillaume-Gentil
5d0ec698de Properly close rb-fsevent pipe after killed it
Closes #5.
2010-10-25 21:36:04 +02:00
Yann Lugrin
7bae189eba more specs on linux listener 2010-10-25 11:16:56 +02:00
Yann Lugrin
0bff5e86d8 wait latency before inotify process to better prevent multiple run of guard on change 2010-10-25 10:24:33 +02:00
Thibaud Guillaume-Gentil
9742ce86a0 Updated rb-fsevent 2010-10-24 10:31:00 +02:00
Yann Lugrin
7af452dc4c don't need to be dup 2010-10-24 04:30:10 +08:00
Yann Lugrin
dd04914657 Linux support work fine now, don't loop more one time on same test. 2010-10-24 04:30:10 +08:00
Yann Lugrin
080ffe2efc stop linux listener quickly 2010-10-24 04:30:09 +08:00
Yann Lugrin
e19a9304ec Change inotify watch options to not fire event when file is juste read 2010-10-24 04:30:08 +08:00
Yann Lugrin
08a9df7bab better support for jruby under linux (but all spec don't pass) 2010-10-22 02:24:02 +08:00
Yann Lugrin
ffe9f933b0 test of linux listener usability work with ruby 1.9.2 2010-10-22 02:24:02 +08:00
Yann Lugrin
31cfcc23d4 linux listener (and spec) work 2010-10-22 02:24:01 +08:00
Yann Lugrin
8a63b94247 waiting on file system event don't block process on linux now (guard can be stopped, spec run but don't pass) 2010-10-22 02:23:59 +08:00
Yann Lugrin
a9d31d292a rescue Interrupt in Linux Listeners 2010-10-20 03:10:34 +08:00
Thibaud Guillaume-Gentil
3f922a0667 Refactorized listeners support
Added polling fallback
Removed sys-uname dependency
2010-10-17 21:42:40 +02:00