Merge pull request #13962 from Homebrew/dependabot/bundler/Library/Homebrew/zeitwerk-2.6.1

build(deps): bump zeitwerk from 2.6.0 to 2.6.1 in /Library/Homebrew
This commit is contained in:
Mike McQuaid 2022-10-04 09:03:43 +01:00 committed by GitHub
commit 178d2884c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 23 additions and 14 deletions

View File

@ -198,7 +198,7 @@ GEM
yard-sorbet (0.6.1) yard-sorbet (0.6.1)
sorbet-runtime (>= 0.5) sorbet-runtime (>= 0.5)
yard (>= 0.9) yard (>= 0.9)
zeitwerk (2.6.0) zeitwerk (2.6.1)
PLATFORMS PLATFORMS
ruby ruby

View File

@ -133,7 +133,7 @@ module Zeitwerk::Loader::Config
def collapse(*glob_patterns); end def collapse(*glob_patterns); end
def collapse_dirs; end def collapse_dirs; end
def collapse_glob_patterns; end def collapse_glob_patterns; end
def dirs; end def dirs(namespaces: T.unsafe(nil)); end
def do_not_eager_load(*paths); end def do_not_eager_load(*paths); end
def eager_load_exclusions; end def eager_load_exclusions; end
def enable_reloading; end def enable_reloading; end

View File

@ -7,7 +7,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/concurrent-ruby-1.1.1
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/i18n-1.12.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/i18n-1.12.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/minitest-5.16.3/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/minitest-5.16.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tzinfo-2.0.5/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tzinfo-2.0.5/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/zeitwerk-2.6.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/zeitwerk-2.6.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/activesupport-6.1.7/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/activesupport-6.1.7/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/public_suffix-5.0.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/public_suffix-5.0.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/addressable-2.8.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/addressable-2.8.1/lib"

View File

@ -5,18 +5,19 @@ require "securerandom"
module Zeitwerk::Loader::Config module Zeitwerk::Loader::Config
# Absolute paths of the root directories. Stored in a hash to preserve # Absolute paths of the root directories. Stored in a hash to preserve
# order, easily handle duplicates, and also be able to have a fast lookup, # order, easily handle duplicates, have a fast lookup needed for detecting
# needed for detecting nested paths. # nested paths, and store custom namespaces as values.
# #
# "/Users/fxn/blog/app/assets" => true, # "/Users/fxn/blog/app/assets" => Object,
# "/Users/fxn/blog/app/channels" => true, # "/Users/fxn/blog/app/channels" => Object,
# "/Users/fxn/blog/adapters" => ActiveJob::QueueAdapters,
# ... # ...
# #
# This is a private collection maintained by the loader. The public # This is a private collection maintained by the loader. The public
# interface for it is `push_dir` and `dirs`. # interface for it is `push_dir` and `dirs`.
# #
# @private # @private
# @sig Hash[String, true] # @sig Hash[String, Module]
attr_reader :root_dirs attr_reader :root_dirs
# @sig #camelize # @sig #camelize
@ -136,12 +137,20 @@ module Zeitwerk::Loader::Config
@tag = tag.to_s @tag = tag.to_s
end end
# Absolute paths of the root directories. This is a read-only collection, # If `namespaces` is falsey (default), returns an array with the absolute
# please push here via `push_dir`. # paths of the root directories as strings. If truthy, returns a hash table
# instead. Keys are the absolute paths of the root directories as strings,
# values are their corresponding namespaces, class or module objects.
# #
# @sig () -> Array[String] # These are read-only collections, please add to them with `push_dir`.
def dirs #
root_dirs.keys.freeze # @sig () -> Array[String] | Hash[String, Module]
def dirs(namespaces: false)
if namespaces
root_dirs.clone
else
root_dirs.keys
end.freeze
end end
# You need to call this method before setup in order to be able to reload. # You need to call this method before setup in order to be able to reload.

View File

@ -1,5 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Zeitwerk module Zeitwerk
VERSION = "2.6.0" VERSION = "2.6.1"
end end