aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/evented_file_update_checker.rb
Commit message (Collapse)AuthorAgeFilesLines
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* starts_with? is removed in Ruby 2.4Rafael Mendonça França2017-03-281-1/+1
|
* Merge pull request #1 from radiospiel/tickets/26955-listen-pathsRafael Mendonça França2017-03-281-0/+5
|\ | | | | | | No longer listens to dirs outside of the app directory.
| * No longer listens to dirs inside of installed gemseno2016-11-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | rails5 uses the listen gem to watch for changes from autoload directories and from i18n directories. Changes there would be reflected by the running app, in development mode usually. However, files outside of the application directory or locally installed gems should not change during development, and rails does not need to reflect changes there if they do. This change makes sure only those paths that do not originate from the app itself are watched. This can help especially with the situation on OSX, where rb-fsevent - which implements file watching - is quite a resource hog.
* | Raise in the initialize not in the executeRafael Mendonça França2017-01-311-5/+5
| |
* | Merge pull request #27824 from kenta-s/raise-an-error-if-no-block-givenRafael França2017-01-311-1/+5
|\ \ | | | | | | Raise an error if FileUpdateChecker#execute is called with no block
| * | Raise an error if FileUpdateChecker#execute is called with no blockkenta-s2017-01-281-1/+5
| |/
* / Fix broken sample code for EventedFileUpdateChecker [ci skip]kenta-s2017-01-281-1/+1
|/
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-50/+50
|
* applies new string literal convention in activesupport/libXavier Noria2016-08-061-5/+5
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Lock the whole boot step, get rid of unneeded hashschneems2016-06-131-5/+9
|
* Listen earlier in EventedFileUpdateCheckerschneems2016-06-061-6/+8
| | | | | | Some files like routes.rb may be very large and vary between the initialization of the app and the first request. In these scenarios if we are using a forked process we cannot rely on the files to be unchanged between when the code is booted and the listener is started. For that reason we start a listener on the main process immediately, when we detect that a process does not have a listener started we force the updated state to be true, so we are guaranteed to catch any changes made between the code initialization and the fork.
* [ci skip] document EventedFileUpdateCheckerschneems2016-06-061-0/+28
|
* EventedFileUpdateChecker boots once per processschneems2016-06-061-5/+10
| | | | | | | | | | We need one file checker booted per process as talked about in #24990. Before we do a check to see if any updates have been registered by the listener we first check to make sure that the current process has booted a listener. We are intentionally not starting a listener when the checker is created. This way we can avoid #25259 in which puma warns of multiple threads created before fork. As written the listener for each process will be invoked by the `ActionDispatch::Executor` middleware when the `updated?` method is called. This is the first middleware on the stack and will be invoked before application code is read into memory. The downside of this approach is that the API is a little less obvious. I.e. that you have to call `updated?` to get the listener to start is not intuitive. We could make `boot!` not private if we want to make the API a little nicer. Alternatively we could boot when the checker is initialized however this reintroduces the puma threads warning, and also means that in cases of `rails server` or when using `preload!` that we have extra threads notifying of changes on a process that we don't care about. [close #24990] [close #25259]
* fix boot performance issueAaron Patterson2016-04-221-12/+10
| | | | | Slight refactor to improve boot performance on some Ruby implementations (for now).
* friendly error message if missing listenJerry Cheung2016-03-081-1/+7
|
* Publish AS::Executor and AS::Reloader APIsMatthew Draper2016-03-021-0/+1
| | | | | | These should allow external code to run blocks of user code to do "work", at a similar unit size to a web request, without needing to get intimate with ActionDipatch.
* lazy load listen in coreXavier Noria2015-12-131-1/+4
| | | | See the rationale in the comment present in this patch.
* renames AS::FileEventedUpdateChecker to AS::EventedFileUpdateCheckerXavier Noria2015-12-091-0/+147
Better English.