Commit Graph

21 Commits

Author SHA1 Message Date
Xavier Noria
e97200405e renames the monitor creation helper 2015-11-08 22:49:51 -08:00
Xavier Noria
60de179c09 refactors the file monitors test suite
In particular files are no longer created in the current working directory,
but in a temporary folder.
2015-11-08 22:49:51 -08:00
Xavier Noria
cfb487535b remove unused constants in the file monitor suites 2015-11-08 22:49:50 -08:00
Xavier Noria
087a79ab2f initial edit pass over the evented file checker patch 2015-11-08 22:49:49 -08:00
Xavier Noria
785adabc4b implements an evented file update checker [Puneet Agarwal]
This is the implementation of the file update checker written
by Puneet Agarwal for GSoC 2015 (except for the tiny version
of the listen gem, which was 3.0.2 in the original patch).

Puneet's branch became too out of sync with upstream. This is
the final work in one single clean commit.

Credit goes in the first line using a convention understood
by the contrib app.
2015-11-08 22:49:49 -08:00
Carlos Antonio da Silva
33192cfa07 Fix failing test in file update checker
Introduced in 1abe31670fdad2c357b4356b40a4567a46d16693

The test was failing when running on isolation, because the extensions were
not being loaded, thus 1.year.from_now was failing. Just use mktime
instead, adding 1 year to Time.now.
2012-06-29 15:08:08 -03:00
abonec
20519efa6e fix FileUpdateChecker when file has wrong mtime (from future) 2012-06-29 19:43:33 +04:00
Xavier Noria
e25eeed5b8 the file update checker now also detects removed files 2012-04-03 16:18:56 -07:00
Carlos Antonio da Silva
c045eebd5d Remove deprecation from AS::Deprecation behavior, some minor cleanups
* Refactor log subscriber, use select! to avoid a new object
* Remove deprecation messages related to AS::Deprecation behavior
  This was added about 2 years ago for Rails 3:
  d4c7d3fd94
* Remove some not used requires
* Refactor delegate to avoid string conversions and if statements inside each block
2012-03-16 09:01:48 -03:00
Sandeep
15404fd3da fixed - warning: assigned but unused variable - checker 2012-03-16 17:14:54 +05:30
Jon Rowe
4073505065 escape commas in paths before globbing to avoid infinite hang in Dir[] 2012-03-15 12:21:20 +00:00
Aaron Patterson
056b8386d0 removing unnecessary requires 2012-01-06 14:43:04 -08:00
Aaron Patterson
b8d8c50785 use AS::TestCase as the base class 2012-01-05 17:12:46 -08:00
José Valim
80256abb39 FileUpdateChecker should be able to handle deleted files. 2011-12-13 11:23:21 +01:00
José Valim
1f5b9bbdb3 Clean up FileUpdateChecker API. 2011-12-13 10:07:02 +01:00
José Valim
fa1d9a884c Speed up development by only reloading classes if dependencies files changed.
This can be turned off by setting `config.reload_classes_only_on_change` to false.

Extensions like Active Record should add their respective files like db/schema.rb and db/structure.sql to `config.watchable_files` if they want their changes to affect classes reloading.

Thanks to https://github.com/paneq/active_reload and Pastorino for the inspiration. <3
2011-12-12 22:54:04 +01:00
José Valim
62cda03fa8 Provide a dir => extension API to file update checker. 2011-12-12 22:54:04 +01:00
José Valim
9a51053c1d Update checker returns a boolean if callback was executed or not. 2011-12-12 19:41:17 +01:00
José Valim
57e0c038d6 Allow FileUpdateChecker to work with globs. 2011-12-12 14:57:09 +01:00
Arun Agrawal
40e33771e6 Removal require again from tests. 2011-05-22 00:55:12 +05:30
José Valim
71703c98ba Add ActiveSupport::FileUpdateChecker. 2010-06-20 13:26:42 +02:00