vigiles 0.1.0.pre.beta3 → 0.1.0.pre.beta5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +10 -1
- data/lib/vigiles/archive/extras.rb +4 -3
- data/lib/vigiles/archive/metadata.rb +3 -2
- data/lib/vigiles/archive/request.rb +18 -4
- data/lib/vigiles/archive.rb +15 -3
- data/lib/vigiles/constants.rb +7 -0
- data/lib/vigiles/middleware/record_conversation.rb +6 -22
- data/lib/vigiles/spec.rb +1 -1
- data/lib/vigiles/utilities/uri.rb +18 -0
- data/lib/vigiles/version.rb +2 -2
- data/lib/vigiles.rb +5 -1
- data/sorbet/rbi/gems/{activemodel@7.0.5.rbi → actioncable@7.1.3.3.rbi} +2 -2
- data/sorbet/rbi/gems/actionmailbox@7.1.3.3.rbi +8 -0
- data/sorbet/rbi/gems/{activerecord@7.0.5.rbi → actionmailer@7.1.3.3.rbi} +2 -2
- data/sorbet/rbi/gems/actionpack@7.1.3.3.rbi +20046 -0
- data/sorbet/rbi/gems/actiontext@7.1.3.3.rbi +8 -0
- data/sorbet/rbi/gems/actionview@7.1.3.3.rbi +15953 -0
- data/sorbet/rbi/gems/activejob@7.1.3.3.rbi +8 -0
- data/sorbet/rbi/gems/activemodel@7.1.3.3.rbi +6657 -0
- data/sorbet/rbi/gems/activerecord@7.1.3.3.rbi +41520 -0
- data/sorbet/rbi/gems/activestorage@7.1.3.3.rbi +8 -0
- data/sorbet/rbi/gems/activesupport@7.1.3.3.rbi +20570 -0
- data/sorbet/rbi/gems/base64@0.2.0.rbi +508 -0
- data/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +77 -0
- data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
- data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +8 -0
- data/sorbet/rbi/gems/crass@1.0.6.rbi +622 -0
- data/sorbet/rbi/gems/date@3.3.4.rbi +74 -0
- data/sorbet/rbi/gems/drb@2.2.1.rbi +1346 -0
- data/sorbet/rbi/gems/globalid@1.2.1.rbi +8 -0
- data/sorbet/rbi/gems/i18n@1.14.5.rbi +2358 -0
- data/sorbet/rbi/gems/io-console@0.7.2.rbi +8 -0
- data/sorbet/rbi/gems/loofah@2.22.0.rbi +1080 -0
- data/sorbet/rbi/gems/{i18n@1.14.1.rbi → mail@2.8.1.rbi} +2 -2
- data/sorbet/rbi/gems/marcel@1.0.4.rbi +8 -0
- data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +8 -0
- data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +93 -0
- data/sorbet/rbi/gems/net-imap@0.4.11.rbi +8 -0
- data/sorbet/rbi/gems/net-pop@0.1.2.rbi +8 -0
- data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +291 -0
- data/sorbet/rbi/gems/net-smtp@0.5.0.rbi +8 -0
- data/sorbet/rbi/gems/nio4r@2.7.3.rbi +8 -0
- data/sorbet/rbi/gems/nokogiri@1.16.5.rbi +7310 -0
- data/sorbet/rbi/gems/psych@5.1.2.rbi +1768 -0
- data/sorbet/rbi/gems/rack-session@2.0.0.rbi +729 -0
- data/sorbet/rbi/gems/rack-test@2.1.0.rbi +749 -0
- data/sorbet/rbi/gems/rack@3.0.11.rbi +5195 -0
- data/sorbet/rbi/gems/rackup@2.1.0.rbi +406 -0
- data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +691 -0
- data/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi +721 -0
- data/sorbet/rbi/gems/rails@7.1.3.3.rbi +8 -0
- data/sorbet/rbi/gems/railties@7.1.3.3.rbi +2167 -0
- data/sorbet/rbi/gems/rdoc@6.6.3.1.rbi +12715 -0
- data/sorbet/rbi/gems/reline@0.5.7.rbi +8 -0
- data/sorbet/rbi/gems/stringio@3.1.0.rbi +8 -0
- data/sorbet/rbi/gems/timeout@0.4.1.rbi +148 -0
- data/sorbet/rbi/gems/webrick@1.8.1.rbi +2606 -0
- data/sorbet/rbi/gems/websocket-driver@0.7.6.rbi +8 -0
- data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +8 -0
- data/sorbet/rbi/gems/zeitwerk@2.6.13.rbi +1003 -0
- data/vigiles.gemspec +1 -1
- metadata +54 -7
- data/sorbet/rbi/gems/activesupport@7.0.5.rbi +0 -14
@@ -0,0 +1,1003 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `zeitwerk` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem zeitwerk`.
|
6
|
+
|
7
|
+
# source://zeitwerk//lib/zeitwerk/kernel.rb#3
|
8
|
+
module Kernel
|
9
|
+
private
|
10
|
+
|
11
|
+
# source://zeitwerk//lib/zeitwerk/kernel.rb#23
|
12
|
+
def require(path); end
|
13
|
+
|
14
|
+
class << self
|
15
|
+
# source://zeitwerk//lib/zeitwerk/kernel.rb#23
|
16
|
+
def require(path); end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
# source://zeitwerk//lib/zeitwerk.rb#3
|
21
|
+
module Zeitwerk
|
22
|
+
class << self
|
23
|
+
# This is a dangerous method.
|
24
|
+
#
|
25
|
+
# source://zeitwerk//lib/zeitwerk.rb#21
|
26
|
+
def with_loader; end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
# source://zeitwerk//lib/zeitwerk/error.rb#4
|
31
|
+
class Zeitwerk::Error < ::StandardError; end
|
32
|
+
|
33
|
+
# Centralizes the logic for the trace point used to detect the creation of
|
34
|
+
# explicit namespaces, needed to descend into matching subdirectories right
|
35
|
+
# after the constant has been defined.
|
36
|
+
#
|
37
|
+
# The implementation assumes an explicit namespace is managed by one loader.
|
38
|
+
# Loaders that reopen namespaces owned by other projects are responsible for
|
39
|
+
# loading their constant before setup. This is documented.
|
40
|
+
#
|
41
|
+
# source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#11
|
42
|
+
module Zeitwerk::ExplicitNamespace
|
43
|
+
extend ::Zeitwerk::RealModName
|
44
|
+
|
45
|
+
class << self
|
46
|
+
# source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#35
|
47
|
+
def __register(cpath, loader); end
|
48
|
+
|
49
|
+
# source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#53
|
50
|
+
def __registered?(cpath); end
|
51
|
+
|
52
|
+
# source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#45
|
53
|
+
def __unregister_loader(loader); end
|
54
|
+
|
55
|
+
private
|
56
|
+
|
57
|
+
# Maps constant paths that correspond to explicit namespaces according to
|
58
|
+
# the file system, to the loader responsible for them.
|
59
|
+
#
|
60
|
+
# source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#20
|
61
|
+
def cpaths; end
|
62
|
+
|
63
|
+
# source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#58
|
64
|
+
def disable_tracer_if_unneeded; end
|
65
|
+
|
66
|
+
# Returns the value of attribute mutex.
|
67
|
+
#
|
68
|
+
# source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#24
|
69
|
+
def mutex; end
|
70
|
+
|
71
|
+
# source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#35
|
72
|
+
def register(cpath, loader); end
|
73
|
+
|
74
|
+
# source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#53
|
75
|
+
def registered?(cpath); end
|
76
|
+
|
77
|
+
# source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#65
|
78
|
+
def tracepoint_class_callback(event); end
|
79
|
+
|
80
|
+
# Returns the value of attribute tracer.
|
81
|
+
#
|
82
|
+
# source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#28
|
83
|
+
def tracer; end
|
84
|
+
|
85
|
+
# source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#45
|
86
|
+
def unregister_loader(loader); end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# source://zeitwerk//lib/zeitwerk/gem_inflector.rb#4
|
91
|
+
class Zeitwerk::GemInflector < ::Zeitwerk::Inflector
|
92
|
+
# @return [GemInflector] a new instance of GemInflector
|
93
|
+
#
|
94
|
+
# source://zeitwerk//lib/zeitwerk/gem_inflector.rb#6
|
95
|
+
def initialize(root_file); end
|
96
|
+
|
97
|
+
# source://zeitwerk//lib/zeitwerk/gem_inflector.rb#13
|
98
|
+
def camelize(basename, abspath); end
|
99
|
+
end
|
100
|
+
|
101
|
+
# @private
|
102
|
+
#
|
103
|
+
# source://zeitwerk//lib/zeitwerk/gem_loader.rb#5
|
104
|
+
class Zeitwerk::GemLoader < ::Zeitwerk::Loader
|
105
|
+
# @return [GemLoader] a new instance of GemLoader
|
106
|
+
#
|
107
|
+
# source://zeitwerk//lib/zeitwerk/gem_loader.rb#19
|
108
|
+
def initialize(root_file, namespace:, warn_on_extra_files:); end
|
109
|
+
|
110
|
+
# source://zeitwerk//lib/zeitwerk/gem_loader.rb#34
|
111
|
+
def setup; end
|
112
|
+
|
113
|
+
private
|
114
|
+
|
115
|
+
# source://zeitwerk//lib/zeitwerk/gem_loader.rb#42
|
116
|
+
def warn_on_extra_files; end
|
117
|
+
|
118
|
+
class << self
|
119
|
+
# @private
|
120
|
+
#
|
121
|
+
# source://zeitwerk//lib/zeitwerk/gem_loader.rb#14
|
122
|
+
def __new(root_file, namespace:, warn_on_extra_files:); end
|
123
|
+
|
124
|
+
private
|
125
|
+
|
126
|
+
def new(*_arg0); end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
# source://zeitwerk//lib/zeitwerk/inflector.rb#4
|
131
|
+
class Zeitwerk::Inflector
|
132
|
+
# Very basic snake case -> camel case conversion.
|
133
|
+
#
|
134
|
+
# inflector = Zeitwerk::Inflector.new
|
135
|
+
# inflector.camelize("post", ...) # => "Post"
|
136
|
+
# inflector.camelize("users_controller", ...) # => "UsersController"
|
137
|
+
# inflector.camelize("api", ...) # => "Api"
|
138
|
+
#
|
139
|
+
# Takes into account hard-coded mappings configured with `inflect`.
|
140
|
+
#
|
141
|
+
# source://zeitwerk//lib/zeitwerk/inflector.rb#15
|
142
|
+
def camelize(basename, _abspath); end
|
143
|
+
|
144
|
+
# Configures hard-coded inflections:
|
145
|
+
#
|
146
|
+
# inflector = Zeitwerk::Inflector.new
|
147
|
+
# inflector.inflect(
|
148
|
+
# "html_parser" => "HTMLParser",
|
149
|
+
# "mysql_adapter" => "MySQLAdapter"
|
150
|
+
# )
|
151
|
+
#
|
152
|
+
# inflector.camelize("html_parser", abspath) # => "HTMLParser"
|
153
|
+
# inflector.camelize("mysql_adapter", abspath) # => "MySQLAdapter"
|
154
|
+
# inflector.camelize("users_controller", abspath) # => "UsersController"
|
155
|
+
#
|
156
|
+
# source://zeitwerk//lib/zeitwerk/inflector.rb#32
|
157
|
+
def inflect(inflections); end
|
158
|
+
|
159
|
+
private
|
160
|
+
|
161
|
+
# Hard-coded basename to constant name user maps that override the default
|
162
|
+
# inflection logic.
|
163
|
+
#
|
164
|
+
# source://zeitwerk//lib/zeitwerk/inflector.rb#42
|
165
|
+
def overrides; end
|
166
|
+
end
|
167
|
+
|
168
|
+
# This is a private module.
|
169
|
+
#
|
170
|
+
# source://zeitwerk//lib/zeitwerk/internal.rb#4
|
171
|
+
module Zeitwerk::Internal
|
172
|
+
# source://zeitwerk//lib/zeitwerk/internal.rb#5
|
173
|
+
def internal(method_name); end
|
174
|
+
end
|
175
|
+
|
176
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#7
|
177
|
+
class Zeitwerk::Loader
|
178
|
+
include ::Zeitwerk::RealModName
|
179
|
+
include ::Zeitwerk::Loader::Callbacks
|
180
|
+
include ::Zeitwerk::Loader::Helpers
|
181
|
+
include ::Zeitwerk::Loader::Config
|
182
|
+
include ::Zeitwerk::Loader::EagerLoad
|
183
|
+
extend ::Zeitwerk::Internal
|
184
|
+
extend ::Zeitwerk::RealModName
|
185
|
+
|
186
|
+
# @return [Loader] a new instance of Loader
|
187
|
+
#
|
188
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#99
|
189
|
+
def initialize; end
|
190
|
+
|
191
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#43
|
192
|
+
def __autoloaded_dirs; end
|
193
|
+
|
194
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#33
|
195
|
+
def __autoloads; end
|
196
|
+
|
197
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#77
|
198
|
+
def __namespace_dirs; end
|
199
|
+
|
200
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#310
|
201
|
+
def __shadowed_file?(file); end
|
202
|
+
|
203
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#88
|
204
|
+
def __shadowed_files; end
|
205
|
+
|
206
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#59
|
207
|
+
def __to_unload; end
|
208
|
+
|
209
|
+
# @raise [Zeitwerk::Error]
|
210
|
+
#
|
211
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#234
|
212
|
+
def cpath_expected_at(path); end
|
213
|
+
|
214
|
+
# Unloads all loaded code, and calls setup again so that the loader is able
|
215
|
+
# to pick any changes in the file system.
|
216
|
+
#
|
217
|
+
# This method is not thread-safe, please see how this can be achieved by
|
218
|
+
# client code in the README of the project.
|
219
|
+
#
|
220
|
+
# @raise [Zeitwerk::Error]
|
221
|
+
#
|
222
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#223
|
223
|
+
def reload; end
|
224
|
+
|
225
|
+
# Sets autoloads in the root namespaces.
|
226
|
+
#
|
227
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#119
|
228
|
+
def setup; end
|
229
|
+
|
230
|
+
# Removes loaded constants and configured autoloads.
|
231
|
+
#
|
232
|
+
# The objects the constants stored are no longer reachable through them. In
|
233
|
+
# addition, since said objects are normally not referenced from anywhere
|
234
|
+
# else, they are eligible for garbage collection, which would effectively
|
235
|
+
# unload them.
|
236
|
+
#
|
237
|
+
# This method is public but undocumented. Main interface is `reload`, which
|
238
|
+
# means `unload` + `setup`. This one is available to be used together with
|
239
|
+
# `unregister`, which is undocumented too.
|
240
|
+
#
|
241
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#145
|
242
|
+
def unload; end
|
243
|
+
|
244
|
+
# Says if the given constant path would be unloaded on reload. This
|
245
|
+
# predicate returns `false` if reloading is disabled.
|
246
|
+
#
|
247
|
+
# @return [Boolean]
|
248
|
+
#
|
249
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#285
|
250
|
+
def unloadable_cpath?(cpath); end
|
251
|
+
|
252
|
+
# Returns an array with the constant paths that would be unloaded on reload.
|
253
|
+
# This predicate returns an empty array if reloading is disabled.
|
254
|
+
#
|
255
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#293
|
256
|
+
def unloadable_cpaths; end
|
257
|
+
|
258
|
+
# This is a dangerous method.
|
259
|
+
#
|
260
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#301
|
261
|
+
def unregister; end
|
262
|
+
|
263
|
+
private
|
264
|
+
|
265
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#456
|
266
|
+
def autoload_file(parent, cname, file); end
|
267
|
+
|
268
|
+
# @return [Boolean]
|
269
|
+
#
|
270
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#514
|
271
|
+
def autoload_path_set_by_me_for?(parent, cname); end
|
272
|
+
|
273
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#426
|
274
|
+
def autoload_subdir(parent, cname, subdir); end
|
275
|
+
|
276
|
+
# We keep track of autoloaded directories to remove them from the registry
|
277
|
+
# at the end of eager loading.
|
278
|
+
#
|
279
|
+
# Files are removed as they are autoloaded, but directories need to wait due
|
280
|
+
# to concurrency (see why in Zeitwerk::Loader::Callbacks#on_dir_autoloaded).
|
281
|
+
#
|
282
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#43
|
283
|
+
def autoloaded_dirs; end
|
284
|
+
|
285
|
+
# Maps absolute paths for which an autoload has been set ---and not
|
286
|
+
# executed--- to their corresponding parent class or module and constant
|
287
|
+
# name.
|
288
|
+
#
|
289
|
+
# "/Users/fxn/blog/app/models/user.rb" => [Object, :User],
|
290
|
+
# "/Users/fxn/blog/app/models/hotel/pricing.rb" => [Hotel, :Pricing]
|
291
|
+
# ...
|
292
|
+
#
|
293
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#33
|
294
|
+
def autoloads; end
|
295
|
+
|
296
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#493
|
297
|
+
def define_autoload(parent, cname, abspath); end
|
298
|
+
|
299
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#410
|
300
|
+
def define_autoloads_for_dir(dir, parent); end
|
301
|
+
|
302
|
+
# Returns the value of attribute dirs_autoload_monitor.
|
303
|
+
#
|
304
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#96
|
305
|
+
def dirs_autoload_monitor; end
|
306
|
+
|
307
|
+
# Returns the value of attribute mutex.
|
308
|
+
#
|
309
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#92
|
310
|
+
def mutex; end
|
311
|
+
|
312
|
+
# Maps namespace constant paths to their respective directories.
|
313
|
+
#
|
314
|
+
# For example, given this mapping:
|
315
|
+
#
|
316
|
+
# "Admin" => [
|
317
|
+
# "/Users/fxn/blog/app/controllers/admin",
|
318
|
+
# "/Users/fxn/blog/app/models/admin",
|
319
|
+
# ...
|
320
|
+
# ]
|
321
|
+
#
|
322
|
+
# when `Admin` gets defined we know that it plays the role of a namespace
|
323
|
+
# and that its children are spread over those directories. We'll visit them
|
324
|
+
# to set up the corresponding autoloads.
|
325
|
+
#
|
326
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#77
|
327
|
+
def namespace_dirs; end
|
328
|
+
|
329
|
+
# `dir` is the directory that would have autovivified a namespace. `file` is
|
330
|
+
# the file where we've found the namespace is explicitly defined.
|
331
|
+
#
|
332
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#482
|
333
|
+
def promote_namespace_from_implicit_to_explicit(dir:, file:, parent:, cname:); end
|
334
|
+
|
335
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#528
|
336
|
+
def raise_if_conflicting_directory(dir); end
|
337
|
+
|
338
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#523
|
339
|
+
def register_explicit_namespace(cpath); end
|
340
|
+
|
341
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#552
|
342
|
+
def run_on_unload_callbacks(cpath, value, abspath); end
|
343
|
+
|
344
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#310
|
345
|
+
def shadowed_file?(file); end
|
346
|
+
|
347
|
+
# A shadowed file is a file managed by this loader that is ignored when
|
348
|
+
# setting autoloads because its matching constant is already taken.
|
349
|
+
#
|
350
|
+
# This private set is populated as we descend. For example, if the loader
|
351
|
+
# has only scanned the top-level, `shadowed_files` does not have shadowed
|
352
|
+
# files that may exist deep in the project tree yet.
|
353
|
+
#
|
354
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#88
|
355
|
+
def shadowed_files; end
|
356
|
+
|
357
|
+
# Stores metadata needed for unloading. Its entries look like this:
|
358
|
+
#
|
359
|
+
# "Admin::Role" => [".../admin/role.rb", [Admin, :Role]]
|
360
|
+
#
|
361
|
+
# The cpath as key helps implementing unloadable_cpath? The file name is
|
362
|
+
# stored in order to be able to delete it from $LOADED_FEATURES, and the
|
363
|
+
# pair [Module, Symbol] is used to remove_const the constant from the class
|
364
|
+
# or module object.
|
365
|
+
#
|
366
|
+
# If reloading is enabled, this hash is filled as constants are autoloaded
|
367
|
+
# or eager loaded. Otherwise, the collection remains empty.
|
368
|
+
#
|
369
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#59
|
370
|
+
def to_unload; end
|
371
|
+
|
372
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#559
|
373
|
+
def unload_autoload(parent, cname); end
|
374
|
+
|
375
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#565
|
376
|
+
def unload_cref(parent, cname); end
|
377
|
+
|
378
|
+
class << self
|
379
|
+
# Returns an array with the absolute paths of the root directories of all
|
380
|
+
# registered loaders. This is a read-only collection.
|
381
|
+
#
|
382
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#404
|
383
|
+
def all_dirs; end
|
384
|
+
|
385
|
+
# Returns the value of attribute default_logger.
|
386
|
+
#
|
387
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#320
|
388
|
+
def default_logger; end
|
389
|
+
|
390
|
+
# Sets the attribute default_logger
|
391
|
+
#
|
392
|
+
# @param value the value to set the attribute default_logger to.
|
393
|
+
#
|
394
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#320
|
395
|
+
def default_logger=(_arg0); end
|
396
|
+
|
397
|
+
# Broadcasts `eager_load` to all loaders. Those that have not been setup
|
398
|
+
# are skipped.
|
399
|
+
#
|
400
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#376
|
401
|
+
def eager_load_all; end
|
402
|
+
|
403
|
+
# Broadcasts `eager_load_namespace` to all loaders. Those that have not
|
404
|
+
# been setup are skipped.
|
405
|
+
#
|
406
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#390
|
407
|
+
def eager_load_namespace(mod); end
|
408
|
+
|
409
|
+
# This is a shortcut for
|
410
|
+
#
|
411
|
+
# require "zeitwerk"
|
412
|
+
#
|
413
|
+
# loader = Zeitwerk::Loader.new
|
414
|
+
# loader.tag = File.basename(__FILE__, ".rb")
|
415
|
+
# loader.inflector = Zeitwerk::GemInflector.new(__FILE__)
|
416
|
+
# loader.push_dir(__dir__)
|
417
|
+
#
|
418
|
+
# except that this method returns the same object in subsequent calls from
|
419
|
+
# the same file, in the unlikely case the gem wants to be able to reload.
|
420
|
+
#
|
421
|
+
# This method returns a subclass of Zeitwerk::Loader, but the exact type
|
422
|
+
# is private, client code can only rely on the interface.
|
423
|
+
#
|
424
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#338
|
425
|
+
def for_gem(warn_on_extra_files: T.unsafe(nil)); end
|
426
|
+
|
427
|
+
# This is a shortcut for
|
428
|
+
#
|
429
|
+
# require "zeitwerk"
|
430
|
+
#
|
431
|
+
# loader = Zeitwerk::Loader.new
|
432
|
+
# loader.tag = namespace.name + "-" + File.basename(__FILE__, ".rb")
|
433
|
+
# loader.inflector = Zeitwerk::GemInflector.new(__FILE__)
|
434
|
+
# loader.push_dir(__dir__, namespace: namespace)
|
435
|
+
#
|
436
|
+
# except that this method returns the same object in subsequent calls from
|
437
|
+
# the same file, in the unlikely case the gem wants to be able to reload.
|
438
|
+
#
|
439
|
+
# This method returns a subclass of Zeitwerk::Loader, but the exact type
|
440
|
+
# is private, client code can only rely on the interface.
|
441
|
+
#
|
442
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#359
|
443
|
+
def for_gem_extension(namespace); end
|
444
|
+
end
|
445
|
+
end
|
446
|
+
|
447
|
+
# source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#3
|
448
|
+
module Zeitwerk::Loader::Callbacks
|
449
|
+
include ::Zeitwerk::RealModName
|
450
|
+
extend ::Zeitwerk::Internal
|
451
|
+
|
452
|
+
# source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#41
|
453
|
+
def __on_dir_autoloaded(dir); end
|
454
|
+
|
455
|
+
# source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#10
|
456
|
+
def __on_file_autoloaded(file); end
|
457
|
+
|
458
|
+
# Invoked when a class or module is created or reopened, either from the
|
459
|
+
# tracer or from module autovivification. If the namespace has matching
|
460
|
+
# subdirectories, we descend into them now.
|
461
|
+
#
|
462
|
+
# @private
|
463
|
+
#
|
464
|
+
# source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#81
|
465
|
+
def on_namespace_loaded(namespace); end
|
466
|
+
|
467
|
+
private
|
468
|
+
|
469
|
+
# source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#41
|
470
|
+
def on_dir_autoloaded(dir); end
|
471
|
+
|
472
|
+
# source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#10
|
473
|
+
def on_file_autoloaded(file); end
|
474
|
+
|
475
|
+
# source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#92
|
476
|
+
def run_on_load_callbacks(cpath, value, abspath); end
|
477
|
+
end
|
478
|
+
|
479
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#6
|
480
|
+
module Zeitwerk::Loader::Config
|
481
|
+
include ::Zeitwerk::RealModName
|
482
|
+
extend ::Zeitwerk::Internal
|
483
|
+
|
484
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#86
|
485
|
+
def initialize; end
|
486
|
+
|
487
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#296
|
488
|
+
def __ignores?(abspath); end
|
489
|
+
|
490
|
+
def __roots; end
|
491
|
+
|
492
|
+
# Configure directories or glob patterns to be collapsed.
|
493
|
+
#
|
494
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#216
|
495
|
+
def collapse(*glob_patterns); end
|
496
|
+
|
497
|
+
# If `namespaces` is falsey (default), returns an array with the absolute
|
498
|
+
# paths of the root directories as strings. If truthy, returns a hash table
|
499
|
+
# instead. Keys are the absolute paths of the root directories as strings,
|
500
|
+
# values are their corresponding namespaces, class or module objects.
|
501
|
+
#
|
502
|
+
# If `ignored` is falsey (default), ignored root directories are filtered out.
|
503
|
+
#
|
504
|
+
# These are read-only collections, please add to them with `push_dir`.
|
505
|
+
#
|
506
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#156
|
507
|
+
def dirs(namespaces: T.unsafe(nil), ignored: T.unsafe(nil)); end
|
508
|
+
|
509
|
+
# Let eager load ignore the given files or directories. The constants defined
|
510
|
+
# in those files are still autoloadable.
|
511
|
+
#
|
512
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#198
|
513
|
+
def do_not_eager_load(*paths); end
|
514
|
+
|
515
|
+
# You need to call this method before setup in order to be able to reload.
|
516
|
+
# There is no way to undo this, either you want to reload or you don't.
|
517
|
+
#
|
518
|
+
# @raise [Zeitwerk::Error]
|
519
|
+
#
|
520
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#177
|
521
|
+
def enable_reloading; end
|
522
|
+
|
523
|
+
# Configure files, directories, or glob patterns to be totally ignored.
|
524
|
+
#
|
525
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#205
|
526
|
+
def ignore(*glob_patterns); end
|
527
|
+
|
528
|
+
# Returns the value of attribute inflector.
|
529
|
+
#
|
530
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#11
|
531
|
+
def inflector; end
|
532
|
+
|
533
|
+
# Sets the attribute inflector
|
534
|
+
#
|
535
|
+
# @param value the value to set the attribute inflector to.
|
536
|
+
#
|
537
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#11
|
538
|
+
def inflector=(_arg0); end
|
539
|
+
|
540
|
+
# Logs to `$stdout`, handy shortcut for debugging.
|
541
|
+
#
|
542
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#288
|
543
|
+
def log!; end
|
544
|
+
|
545
|
+
# Returns the value of attribute logger.
|
546
|
+
#
|
547
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#14
|
548
|
+
def logger; end
|
549
|
+
|
550
|
+
# Sets the attribute logger
|
551
|
+
#
|
552
|
+
# @param value the value to set the attribute logger to.
|
553
|
+
#
|
554
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#14
|
555
|
+
def logger=(_arg0); end
|
556
|
+
|
557
|
+
# Configure a block to be invoked once a certain constant path is loaded.
|
558
|
+
# Supports multiple callbacks, and if there are many, they are executed in
|
559
|
+
# the order in which they were defined.
|
560
|
+
#
|
561
|
+
# loader.on_load("SomeApiClient") do |klass, _abspath|
|
562
|
+
# klass.endpoint = "https://api.dev"
|
563
|
+
# end
|
564
|
+
#
|
565
|
+
# Can also be configured for any constant loaded:
|
566
|
+
#
|
567
|
+
# loader.on_load do |cpath, value, abspath|
|
568
|
+
# # ...
|
569
|
+
# end
|
570
|
+
#
|
571
|
+
# @raise [TypeError]
|
572
|
+
#
|
573
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#252
|
574
|
+
def on_load(cpath = T.unsafe(nil), &block); end
|
575
|
+
|
576
|
+
# Configure a block to be called after setup and on each reload.
|
577
|
+
# If setup was already done, the block runs immediately.
|
578
|
+
#
|
579
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#228
|
580
|
+
def on_setup(&block); end
|
581
|
+
|
582
|
+
# Configure a block to be invoked right before a certain constant is removed.
|
583
|
+
# Supports multiple callbacks, and if there are many, they are executed in the
|
584
|
+
# order in which they were defined.
|
585
|
+
#
|
586
|
+
# loader.on_unload("Country") do |klass, _abspath|
|
587
|
+
# klass.clear_cache
|
588
|
+
# end
|
589
|
+
#
|
590
|
+
# Can also be configured for any removed constant:
|
591
|
+
#
|
592
|
+
# loader.on_unload do |cpath, value, abspath|
|
593
|
+
# # ...
|
594
|
+
# end
|
595
|
+
#
|
596
|
+
# @raise [TypeError]
|
597
|
+
#
|
598
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#277
|
599
|
+
def on_unload(cpath = T.unsafe(nil), &block); end
|
600
|
+
|
601
|
+
# Pushes `path` to the list of root directories.
|
602
|
+
#
|
603
|
+
# Raises `Zeitwerk::Error` if `path` does not exist, or if another loader in
|
604
|
+
# the same process already manages that directory or one of its ascendants or
|
605
|
+
# descendants.
|
606
|
+
#
|
607
|
+
# @raise [Zeitwerk::Error]
|
608
|
+
#
|
609
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#111
|
610
|
+
def push_dir(path, namespace: T.unsafe(nil)); end
|
611
|
+
|
612
|
+
# @return [Boolean]
|
613
|
+
#
|
614
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#190
|
615
|
+
def reloading_enabled?; end
|
616
|
+
|
617
|
+
# Returns the loader's tag.
|
618
|
+
#
|
619
|
+
# Implemented as a method instead of via attr_reader for symmetry with the
|
620
|
+
# writer below.
|
621
|
+
#
|
622
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#135
|
623
|
+
def tag; end
|
624
|
+
|
625
|
+
# Sets a tag for the loader, useful for logging.
|
626
|
+
#
|
627
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#142
|
628
|
+
def tag=(tag); end
|
629
|
+
|
630
|
+
private
|
631
|
+
|
632
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#314
|
633
|
+
def actual_roots; end
|
634
|
+
|
635
|
+
# @return [Boolean]
|
636
|
+
#
|
637
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#339
|
638
|
+
def collapse?(dir); end
|
639
|
+
|
640
|
+
# The actual collection of absolute directory names at the time the collapse
|
641
|
+
# glob patterns were expanded. Computed on setup, and recomputed on reload.
|
642
|
+
#
|
643
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#57
|
644
|
+
def collapse_dirs; end
|
645
|
+
|
646
|
+
# Absolute paths of directories or glob patterns to be collapsed.
|
647
|
+
#
|
648
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#50
|
649
|
+
def collapse_glob_patterns; end
|
650
|
+
|
651
|
+
# Absolute paths of files or directories not to be eager loaded.
|
652
|
+
#
|
653
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#63
|
654
|
+
def eager_load_exclusions; end
|
655
|
+
|
656
|
+
# @return [Boolean]
|
657
|
+
#
|
658
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#326
|
659
|
+
def excluded_from_eager_load?(abspath); end
|
660
|
+
|
661
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#349
|
662
|
+
def expand_glob_patterns(glob_patterns); end
|
663
|
+
|
664
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#344
|
665
|
+
def expand_paths(paths); end
|
666
|
+
|
667
|
+
# Absolute paths of files, directories, or glob patterns to be totally
|
668
|
+
# ignored.
|
669
|
+
#
|
670
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#36
|
671
|
+
def ignored_glob_patterns; end
|
672
|
+
|
673
|
+
# @return [Boolean]
|
674
|
+
#
|
675
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#309
|
676
|
+
def ignored_path?(abspath); end
|
677
|
+
|
678
|
+
# The actual collection of absolute file and directory names at the time the
|
679
|
+
# ignored glob patterns were expanded. Computed on setup, and recomputed on
|
680
|
+
# reload.
|
681
|
+
#
|
682
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#44
|
683
|
+
def ignored_paths; end
|
684
|
+
|
685
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#296
|
686
|
+
def ignores?(abspath); end
|
687
|
+
|
688
|
+
# User-oriented callbacks to be fired when a constant is loaded.
|
689
|
+
#
|
690
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#76
|
691
|
+
def on_load_callbacks; end
|
692
|
+
|
693
|
+
# User-oriented callbacks to be fired on setup and on reload.
|
694
|
+
#
|
695
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#69
|
696
|
+
def on_setup_callbacks; end
|
697
|
+
|
698
|
+
# User-oriented callbacks to be fired before constants are removed.
|
699
|
+
#
|
700
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#83
|
701
|
+
def on_unload_callbacks; end
|
702
|
+
|
703
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#361
|
704
|
+
def recompute_collapse_dirs; end
|
705
|
+
|
706
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#356
|
707
|
+
def recompute_ignored_paths; end
|
708
|
+
|
709
|
+
# @return [Boolean]
|
710
|
+
#
|
711
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#321
|
712
|
+
def root_dir?(dir); end
|
713
|
+
|
714
|
+
# Absolute paths of the root directories, mapped to their respective root namespaces:
|
715
|
+
#
|
716
|
+
# "/Users/fxn/blog/app/channels" => Object,
|
717
|
+
# "/Users/fxn/blog/app/adapters" => ActiveJob::QueueAdapters,
|
718
|
+
# ...
|
719
|
+
#
|
720
|
+
# Stored in a hash to preserve order, easily handle duplicates, and have a
|
721
|
+
# fast lookup by directory.
|
722
|
+
#
|
723
|
+
# This is a private collection maintained by the loader. The public
|
724
|
+
# interface for it is `push_dir` and `dirs`.
|
725
|
+
#
|
726
|
+
# source://zeitwerk//lib/zeitwerk/loader/config.rb#29
|
727
|
+
def roots; end
|
728
|
+
end
|
729
|
+
|
730
|
+
# source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#1
|
731
|
+
module Zeitwerk::Loader::EagerLoad
|
732
|
+
# Eager loads all files in the root directories, recursively. Files do not
|
733
|
+
# need to be in `$LOAD_PATH`, absolute file names are used. Ignored and
|
734
|
+
# shadowed files are not eager loaded. You can opt-out specifically in
|
735
|
+
# specific files and directories with `do_not_eager_load`, and that can be
|
736
|
+
# overridden passing `force: true`.
|
737
|
+
#
|
738
|
+
# source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#9
|
739
|
+
def eager_load(force: T.unsafe(nil)); end
|
740
|
+
|
741
|
+
# @raise [Zeitwerk::SetupRequired]
|
742
|
+
#
|
743
|
+
# source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#32
|
744
|
+
def eager_load_dir(path); end
|
745
|
+
|
746
|
+
# @raise [Zeitwerk::SetupRequired]
|
747
|
+
#
|
748
|
+
# source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#74
|
749
|
+
def eager_load_namespace(mod); end
|
750
|
+
|
751
|
+
# Loads the given Ruby file.
|
752
|
+
#
|
753
|
+
# Raises if the argument is ignored, shadowed, or not managed by the receiver.
|
754
|
+
#
|
755
|
+
# The method is implemented as `constantize` for files, in a sense, to be able
|
756
|
+
# to descend orderly and make sure the file is loadable.
|
757
|
+
#
|
758
|
+
# @raise [Zeitwerk::Error]
|
759
|
+
#
|
760
|
+
# source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#116
|
761
|
+
def load_file(path); end
|
762
|
+
|
763
|
+
private
|
764
|
+
|
765
|
+
# The caller is responsible for making sure `namespace` is the namespace that
|
766
|
+
# corresponds to `dir`.
|
767
|
+
#
|
768
|
+
# source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#160
|
769
|
+
def actual_eager_load_dir(dir, namespace, force: T.unsafe(nil)); end
|
770
|
+
|
771
|
+
# In order to invoke this method, the caller has to ensure `child` is a
|
772
|
+
# strict namespace descendant of `root_namespace`.
|
773
|
+
#
|
774
|
+
# source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#195
|
775
|
+
def eager_load_child_namespace(child, child_name, root_dir, root_namespace); end
|
776
|
+
end
|
777
|
+
|
778
|
+
# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#3
|
779
|
+
module Zeitwerk::Loader::Helpers
|
780
|
+
private
|
781
|
+
|
782
|
+
# @return [Boolean]
|
783
|
+
#
|
784
|
+
# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#128
|
785
|
+
def cdef?(parent, cname); end
|
786
|
+
|
787
|
+
# @raise [NameError]
|
788
|
+
#
|
789
|
+
# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#134
|
790
|
+
def cget(parent, cname); end
|
791
|
+
|
792
|
+
# @raise [Zeitwerk::NameError]
|
793
|
+
#
|
794
|
+
# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#149
|
795
|
+
def cname_for(basename, abspath); end
|
796
|
+
|
797
|
+
# Symbol#name was introduced in Ruby 3.0. It returns always the same
|
798
|
+
# frozen object, so we may save a few string allocations.
|
799
|
+
#
|
800
|
+
# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#118
|
801
|
+
def cpath(parent, cname); end
|
802
|
+
|
803
|
+
# @raise [NameError]
|
804
|
+
#
|
805
|
+
# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#140
|
806
|
+
def crem(parent, cname); end
|
807
|
+
|
808
|
+
# @return [Boolean]
|
809
|
+
#
|
810
|
+
# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#67
|
811
|
+
def dir?(path); end
|
812
|
+
|
813
|
+
# @return [Boolean]
|
814
|
+
#
|
815
|
+
# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#45
|
816
|
+
def has_at_least_one_ruby_file?(dir); end
|
817
|
+
|
818
|
+
# @return [Boolean]
|
819
|
+
#
|
820
|
+
# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#72
|
821
|
+
def hidden?(basename); end
|
822
|
+
|
823
|
+
# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#7
|
824
|
+
def log(message); end
|
825
|
+
|
826
|
+
# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#15
|
827
|
+
def ls(dir); end
|
828
|
+
|
829
|
+
# @return [Boolean]
|
830
|
+
#
|
831
|
+
# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#62
|
832
|
+
def ruby?(path); end
|
833
|
+
|
834
|
+
# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#109
|
835
|
+
def strict_autoload_path(parent, cname); end
|
836
|
+
|
837
|
+
# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#77
|
838
|
+
def walk_up(abspath); end
|
839
|
+
end
|
840
|
+
|
841
|
+
# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#144
|
842
|
+
module Zeitwerk::Loader::Helpers::CNAME_VALIDATOR; end
|
843
|
+
|
844
|
+
# source://zeitwerk//lib/zeitwerk/loader.rb#21
|
845
|
+
Zeitwerk::Loader::MUTEX = T.let(T.unsafe(nil), Thread::Mutex)
|
846
|
+
|
847
|
+
# source://zeitwerk//lib/zeitwerk/error.rb#13
|
848
|
+
class Zeitwerk::NameError < ::NameError; end
|
849
|
+
|
850
|
+
# source://zeitwerk//lib/zeitwerk/null_inflector.rb#1
|
851
|
+
class Zeitwerk::NullInflector
|
852
|
+
# source://zeitwerk//lib/zeitwerk/null_inflector.rb#2
|
853
|
+
def camelize(basename, _abspath); end
|
854
|
+
end
|
855
|
+
|
856
|
+
# source://zeitwerk//lib/zeitwerk/real_mod_name.rb#3
|
857
|
+
module Zeitwerk::RealModName
|
858
|
+
# source://zeitwerk//lib/zeitwerk/real_mod_name.rb#14
|
859
|
+
def real_mod_name(mod); end
|
860
|
+
end
|
861
|
+
|
862
|
+
# source://zeitwerk//lib/zeitwerk/real_mod_name.rb#4
|
863
|
+
Zeitwerk::RealModName::UNBOUND_METHOD_MODULE_NAME = T.let(T.unsafe(nil), UnboundMethod)
|
864
|
+
|
865
|
+
# source://zeitwerk//lib/zeitwerk/registry.rb#4
|
866
|
+
module Zeitwerk::Registry
|
867
|
+
class << self
|
868
|
+
# Maps absolute paths to the loaders responsible for them.
|
869
|
+
#
|
870
|
+
# This information is used by our decorated `Kernel#require` to be able to
|
871
|
+
# invoke callbacks and autovivify modules.
|
872
|
+
#
|
873
|
+
# @private
|
874
|
+
#
|
875
|
+
# source://zeitwerk//lib/zeitwerk/registry.rb#26
|
876
|
+
def autoloads; end
|
877
|
+
|
878
|
+
# Registers gem loaders to let `for_gem` be idempotent in case of reload.
|
879
|
+
#
|
880
|
+
# @private
|
881
|
+
#
|
882
|
+
# source://zeitwerk//lib/zeitwerk/registry.rb#17
|
883
|
+
def gem_loaders_by_root_file; end
|
884
|
+
|
885
|
+
# @private
|
886
|
+
# @return [Boolean]
|
887
|
+
#
|
888
|
+
# source://zeitwerk//lib/zeitwerk/registry.rb#113
|
889
|
+
def inception?(cpath); end
|
890
|
+
|
891
|
+
# This hash table addresses an edge case in which an autoload is ignored.
|
892
|
+
#
|
893
|
+
# For example, let's suppose we want to autoload in a gem like this:
|
894
|
+
#
|
895
|
+
# # lib/my_gem.rb
|
896
|
+
# loader = Zeitwerk::Loader.new
|
897
|
+
# loader.push_dir(__dir__)
|
898
|
+
# loader.setup
|
899
|
+
#
|
900
|
+
# module MyGem
|
901
|
+
# end
|
902
|
+
#
|
903
|
+
# if you require "my_gem", as Bundler would do, this happens while setting
|
904
|
+
# up autoloads:
|
905
|
+
#
|
906
|
+
# 1. Object.autoload?(:MyGem) returns `nil` because the autoload for
|
907
|
+
# the constant is issued by Zeitwerk while the same file is being
|
908
|
+
# required.
|
909
|
+
# 2. The constant `MyGem` is undefined while setup runs.
|
910
|
+
#
|
911
|
+
# Therefore, a directory `lib/my_gem` would autovivify a module according to
|
912
|
+
# the existing information. But that would be wrong.
|
913
|
+
#
|
914
|
+
# To overcome this fundamental limitation, we keep track of the constant
|
915
|
+
# paths that are in this situation ---in the example above, "MyGem"--- and
|
916
|
+
# take this collection into account for the autovivification logic.
|
917
|
+
#
|
918
|
+
# Note that you cannot generally address this by moving the setup code
|
919
|
+
# below the constant definition, because we want libraries to be able to
|
920
|
+
# use managed constants in the module body:
|
921
|
+
#
|
922
|
+
# module MyGem
|
923
|
+
# include MyConcern
|
924
|
+
# end
|
925
|
+
#
|
926
|
+
# @private
|
927
|
+
#
|
928
|
+
# source://zeitwerk//lib/zeitwerk/registry.rb#65
|
929
|
+
def inceptions; end
|
930
|
+
|
931
|
+
# @private
|
932
|
+
#
|
933
|
+
# source://zeitwerk//lib/zeitwerk/registry.rb#121
|
934
|
+
def loader_for(path); end
|
935
|
+
|
936
|
+
# This method returns always a loader, the same instance for the same root
|
937
|
+
# file. That is how Zeitwerk::Loader.for_gem is idempotent.
|
938
|
+
#
|
939
|
+
# @private
|
940
|
+
#
|
941
|
+
# source://zeitwerk//lib/zeitwerk/registry.rb#89
|
942
|
+
def loader_for_gem(root_file, namespace:, warn_on_extra_files:); end
|
943
|
+
|
944
|
+
# Keeps track of all loaders. Useful to broadcast messages and to prevent
|
945
|
+
# them from being garbage collected.
|
946
|
+
#
|
947
|
+
# @private
|
948
|
+
#
|
949
|
+
# source://zeitwerk//lib/zeitwerk/registry.rb#11
|
950
|
+
def loaders; end
|
951
|
+
|
952
|
+
# @private
|
953
|
+
#
|
954
|
+
# source://zeitwerk//lib/zeitwerk/registry.rb#127
|
955
|
+
def on_unload(loader); end
|
956
|
+
|
957
|
+
# @private
|
958
|
+
#
|
959
|
+
# source://zeitwerk//lib/zeitwerk/registry.rb#95
|
960
|
+
def register_autoload(loader, abspath); end
|
961
|
+
|
962
|
+
# @private
|
963
|
+
#
|
964
|
+
# source://zeitwerk//lib/zeitwerk/registry.rb#107
|
965
|
+
def register_inception(cpath, abspath, loader); end
|
966
|
+
|
967
|
+
# Registers a loader.
|
968
|
+
#
|
969
|
+
# @private
|
970
|
+
#
|
971
|
+
# source://zeitwerk//lib/zeitwerk/registry.rb#71
|
972
|
+
def register_loader(loader); end
|
973
|
+
|
974
|
+
# @private
|
975
|
+
#
|
976
|
+
# source://zeitwerk//lib/zeitwerk/registry.rb#101
|
977
|
+
def unregister_autoload(abspath); end
|
978
|
+
|
979
|
+
# @private
|
980
|
+
#
|
981
|
+
# source://zeitwerk//lib/zeitwerk/registry.rb#77
|
982
|
+
def unregister_loader(loader); end
|
983
|
+
end
|
984
|
+
end
|
985
|
+
|
986
|
+
# source://zeitwerk//lib/zeitwerk/error.rb#7
|
987
|
+
class Zeitwerk::ReloadingDisabledError < ::Zeitwerk::Error
|
988
|
+
# @return [ReloadingDisabledError] a new instance of ReloadingDisabledError
|
989
|
+
#
|
990
|
+
# source://zeitwerk//lib/zeitwerk/error.rb#8
|
991
|
+
def initialize; end
|
992
|
+
end
|
993
|
+
|
994
|
+
# source://zeitwerk//lib/zeitwerk/error.rb#16
|
995
|
+
class Zeitwerk::SetupRequired < ::Zeitwerk::Error
|
996
|
+
# @return [SetupRequired] a new instance of SetupRequired
|
997
|
+
#
|
998
|
+
# source://zeitwerk//lib/zeitwerk/error.rb#17
|
999
|
+
def initialize; end
|
1000
|
+
end
|
1001
|
+
|
1002
|
+
# source://zeitwerk//lib/zeitwerk/version.rb#4
|
1003
|
+
Zeitwerk::VERSION = T.let(T.unsafe(nil), String)
|