Skip to content

Commit

Permalink
Merge pull request #8008 from Homebrew/dependabot/bundler/Library/Hom…
Browse files Browse the repository at this point in the history
…ebrew/zeitwerk-2.4.0

build(deps): bump zeitwerk from 2.3.1 to 2.4.0 in /Library/Homebrew
  • Loading branch information
jonchang authored Jul 15, 2020
2 parents b79aed5 + afc5d99 commit 1663304
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Library/Homebrew/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ GEM
unf_ext (0.0.7.7)
unicode-display_width (1.7.0)
webrobots (0.1.2)
zeitwerk (2.3.1)
zeitwerk (2.4.0)

PLATFORMS
ruby
Expand Down
6 changes: 3 additions & 3 deletions Library/Homebrew/vendor/bundle/bundler/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/minitest-5.14.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/thread_safe-0.3.6/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tzinfo-1.2.7/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/zeitwerk-2.3.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/zeitwerk-2.4.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/activesupport-6.0.3.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ast-2.4.1/lib"
$:.unshift "#{path}/"
Expand All @@ -20,7 +20,7 @@
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/docile-1.3.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-html-0.12.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-0.18.5/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/codecov-0.1.19/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/codecov-0.2.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/connection_pool-2.2.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/diff-lcs-1.4.4/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-19/2.6.0/unf_ext-0.0.7.7"
Expand Down Expand Up @@ -62,7 +62,7 @@
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-0.1.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.10.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-1.7.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-0.87.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-0.88.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.7.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-1.42.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.2.0/lib"
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Inflector
# @param _abspath [String]
# @return [String]
def camelize(basename, _abspath)
overrides[basename] || basename.split('_').map!(&:capitalize).join
overrides[basename] || basename.split('_').each(&:capitalize!).join
end

# Configures hard-coded inflections:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,19 @@ def dirs
# or descendants.
#
# @param path [<String, Pathname>]
# @param namespace [Class, Module]
# @raise [Zeitwerk::Error]
# @return [void]
def push_dir(path)
def push_dir(path, namespace: Object)
# Note that Class < Module.
unless namespace.is_a?(Module)
raise Error, "#{namespace.inspect} is not a class or module object, should be"
end

abspath = File.expand_path(path)
if dir?(abspath)
raise_if_conflicting_directory(abspath)
root_dirs[abspath] = true
root_dirs[abspath] = namespace
else
raise Error, "the root directory #{abspath} does not exist"
end
Expand Down Expand Up @@ -268,7 +274,9 @@ def setup
mutex.synchronize do
break if @setup

actual_root_dirs.each { |root_dir| set_autoloads_in_dir(root_dir, Object) }
actual_root_dirs.each do |root_dir, namespace|
set_autoloads_in_dir(root_dir, namespace)
end
do_preload

@setup = true
Expand Down Expand Up @@ -368,8 +376,11 @@ def eager_load
mutex.synchronize do
break if @eager_loaded

queue = actual_root_dirs.reject { |dir| eager_load_exclusions.member?(dir) }
queue.map! { |dir| [Object, dir] }
queue = []
actual_root_dirs.each do |root_dir, namespace|
queue << [namespace, root_dir] unless eager_load_exclusions.member?(root_dir)
end

while to_eager_load = queue.shift
namespace, dir = to_eager_load

Expand Down Expand Up @@ -498,7 +509,7 @@ def all_dirs

# @return [<String>]
def actual_root_dirs
root_dirs.keys.delete_if do |root_dir|
root_dirs.reject do |root_dir, _namespace|
!dir?(root_dir) || ignored_paths.member?(root_dir)
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Zeitwerk
VERSION = "2.3.1"
VERSION = "2.4.0"
end

0 comments on commit 1663304

Please sign in to comment.