Jonathan Hefner
86c732a606
Avoid double wait in EventedFileUpdateCheckerTest
...
Waiting after touching the file system is a concern of
`EventedFileUpdateCheckerTest`. Therefore, only call `wait` inside
`EventedFileUpdateCheckerTest`. This avoids calling `wait` an extra
time when calling `touch`.
Before:
$ bin/test test/evented_file_update_checker_test.rb test/file_update_checker_test.rb
Finished in 43.357019s, 0.9918 runs/s, 2.5371 assertions/s.
43 runs, 110 assertions, 0 failures, 0 errors, 0 skips
After:
$ bin/test test/evented_file_update_checker_test.rb test/file_update_checker_test.rb
Finished in 34.351007s, 1.2518 runs/s, 3.2022 assertions/s.
43 runs, 110 assertions, 0 failures, 0 errors, 0 skips
2021-07-22 12:29:27 -05:00
Michael Grosser
203998c916
allow running each test with pure ruby path/to/test.rb
...
also:
- makes test dependencies obvious
- makes tests runnable from within subfolders
2019-12-18 08:49:19 -06:00
Koichi ITO
ac717d65a3
[Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`
2017-07-11 13:12:32 +09:00
Kir Shatrov
72950568dd
Use frozen-string-literal in ActiveSupport
2017-07-09 15:08:29 +03:00
Matthew Draper
87b3e226d6
Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
...
This reverts commit 3420a14590
, reversing
changes made to afb66a5a59
.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e
Enforce frozen string in Rubocop
2017-07-01 02:11:03 +03:00
Xavier Noria
a731125f12
applies new string literal convention in activesupport/test
...
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:10:53 +02:00
Xavier Noria
f3516f171b
applies code style guidelines
2015-11-11 06:42:49 +01:00
Xavier Noria
b7c8ce5bc2
renames the module with shared tests for file monitors
2015-11-10 22:19:35 +01:00
Xavier Noria
a22d431d42
improves waiting in the file monitors suite
2015-11-09 09:24:41 -08:00
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 1abe31670f
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