aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/dependencies/zeitwerk_integration.rb
Commit message (Collapse)AuthorAgeFilesLines
* let autoloaded? support modules with overridden names [closes #36757]Xavier Noria2019-07-251-1/+1
|
* Enable `Layout/EmptyLinesAroundAccessModifier` copRyuta Kamizono2019-06-131-1/+0
| | | | | | | | | | | We sometimes say "✂️ newline after `private`" in a code review (e.g. https://github.com/rails/rails/pull/18546#discussion_r23188776, https://github.com/rails/rails/pull/34832#discussion_r244847195). Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style `EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059). That cop and enforced style will reduce the our code review cost.
* upgrades Zeitwerk to 2.1.4Xavier Noria2019-04-231-2/+7
| | | | | | This commit more or less undoes 9b5401f, restores autoloaded? not to touch the descendants tracker, and autoloaded_constants because it is documented in the guide.
* Auto-correct `Style/RedundantBegin` cop offencesRyuta Kamizono2019-04-121-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | It is newly added at 7b6b10542d5dac2b50f2578143dc5d70120d1146. ``` % be rubocop -a Inspecting 2781 files ...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. Offenses: activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:12:1: C: [Corrected] Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning. activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:12:1: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected. activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:12:13: C: [Corrected] Style/RedundantBegin: Redundant begin block detected. begin ^^^^^ activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:13:11: C: [Corrected] Layout/IndentationWidth: Use 2 (not 4) spaces for indentation. Rails.autoloaders.main.reload ^^^^ activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:16:1: C: [Corrected] Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end. activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:16:1: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected. 2781 files inspected, 6 offenses detected, 6 offenses corrected ```
* improves the reloading disabled error messageXavier Noria2019-04-111-1/+5
| | | | | | | | The original message from Zeitwerk is "can't reload, please call loader.enable_reloading before setup (Zeitwerk::Error)", which is not very informative for Rails programmers. Rails should err with a message worded in terms of its interface.
* depend on Zeitwerk 2.1.0Xavier Noria2019-04-091-11/+2
|
* depend on Zeitwerk 2Xavier Noria2019-04-071-3/+4
|
* fixes eager loading edge case in :zeitwerk modeXavier Noria2019-03-301-7/+13
|
* depend on Zeitwerk 1.4.0Xavier Noria2019-03-191-1/+5
|
* Engines are reloaded in Zeitwerk mode [closes #35618]Xavier Noria2019-03-151-2/+1
|
* Allow autoloader inflectors to be swaped outJean Boussier2019-03-081-4/+0
|
* Let Zeitwerk autoloaders inflect with Active SupportXavier Noria2019-02-231-2/+14
| | | | [Harry Brundage & Xavier Noria]
* simplify AS::Dependencies.verbose=Xavier Noria2019-02-211-1/+1
| | | | Possible thanks to Zeitwerk 1.3.0.
* let Zeitwerk integration unhook AS::DependenciesXavier Noria2019-02-191-0/+5
|
* Implement AS::Dependencies.verbose= compatibility for :zeitwerk modeXavier Noria2019-02-151-0/+5
|
* Replace autoloader accessors with Rails.autoloaders.{main,once}Xavier Noria2019-02-141-6/+4
| | | | | | | | | | | | | | | | Rails.autoloader and Rails.once_autoloader was just tentative API good enough for a first patch. Rails.autoloader is singular and does not convey in its name that there is another autoloader. That might be confusing, for example if you set a logger and miss traces. On the other hand, the name `once_autoloader` is very close to being horrible. Rails.autoloaders.main and Rails.autoloaders.once read better for my taste, and have a nice symmetry. Also, both "main" and "once" are four letters long, short and same length. They are tagged as "rails.main" and "rails.once", respectively. References #35235.
* Refactors a loopXavier Noria2019-02-131-6/+8
| | | | | | | | | I believe the current style does not clearly communicate that we are ignoring non-existing autoload paths altogether. Your eyes may even be looking for an else clause that is easy to miss but that does not exist. With the early `next` and code comment the loop reads better for my taste.
* styleXavier Noria2019-02-121-0/+2
|
* Zeitwerk integrationXavier Noria2019-02-121-0/+71