Skip to content

Commit

Permalink
Zeitwerkify
Browse files Browse the repository at this point in the history
  • Loading branch information
solnic committed Oct 14, 2022
1 parent 29c82b3 commit 4bfe8a5
Show file tree
Hide file tree
Showing 17 changed files with 11 additions and 44 deletions.
3 changes: 1 addition & 2 deletions lib/dry/system.rb
Expand Up @@ -2,7 +2,6 @@

require "zeitwerk"
require "dry/core"
require_relative "system/provider_source_registry"

module Dry
module System
Expand All @@ -15,7 +14,7 @@ def self.loader
loader.push_dir(root)
loader.ignore(
"#{root}/dry-system.rb",
"#{root}/dry/system/{constants,errors,stubs,version}.rb"
"#{root}/dry/system/{constants,errors,plugins,stubs,version}.rb"
)
loader.inflector.inflect("dsl" => "DSL")
end
Expand Down
1 change: 0 additions & 1 deletion lib/dry/system/auto_registrar.rb
@@ -1,7 +1,6 @@
# frozen_string_literal: true

require "dry/system/constants"
require_relative "component"

module Dry
module System
Expand Down
4 changes: 1 addition & 3 deletions lib/dry/system/component.rb
@@ -1,11 +1,9 @@
# frozen_string_literal: true

require "pathname"
require "dry/inflector"
require "dry/system/loader"
require "dry/system/errors"
require "dry/system/constants"
require "pathname"
require_relative "identifier"

module Dry
module System
Expand Down
3 changes: 0 additions & 3 deletions lib/dry/system/component_dir.rb
Expand Up @@ -2,9 +2,6 @@

require "pathname"
require "dry/system/constants"
require_relative "constants"
require_relative "identifier"
require_relative "magic_comments_parser"

module Dry
module System
Expand Down
2 changes: 0 additions & 2 deletions lib/dry/system/config/component_dir.rb
@@ -1,8 +1,6 @@
# frozen_string_literal: true

require "dry/system/constants"
require "dry/system/loader"
require_relative "namespaces"

module Dry
module System
Expand Down
1 change: 0 additions & 1 deletion lib/dry/system/config/component_dirs.rb
Expand Up @@ -2,7 +2,6 @@

require "dry/system/constants"
require "dry/system/errors"
require_relative "component_dir"

module Dry
module System
Expand Down
1 change: 0 additions & 1 deletion lib/dry/system/config/namespace.rb
@@ -1,6 +1,5 @@
# frozen_string_literal: true

require "dry/core/equalizer"
require "dry/system/constants"

module Dry
Expand Down
1 change: 0 additions & 1 deletion lib/dry/system/config/namespaces.rb
@@ -1,7 +1,6 @@
# frozen_string_literal: true

require "dry/system/errors"
require_relative "namespace"

module Dry
module System
Expand Down
15 changes: 0 additions & 15 deletions lib/dry/system/container.rb
Expand Up @@ -5,24 +5,9 @@
require "dry/configurable"
require "dry/auto_inject"
require "dry/container"
require "dry/core"
require "dry/inflector"

require "dry/system/auto_registrar"
require "dry/system/component"
require "dry/system/constants"
require "dry/system/errors"
require "dry/system/identifier"
require "dry/system/importer"
require "dry/system/indirect_component"
require "dry/system/manifest_registrar"
require "dry/system/plugins"
require "dry/system/provider_registrar"
require "dry/system/provider"
require "dry/system/provider/source"

require_relative "component_dir"
require_relative "config/component_dirs"

module Dry
module System
Expand Down
2 changes: 1 addition & 1 deletion lib/dry/system/identifier.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require_relative "constants"
require "dry/system/constants"

module Dry
module System
Expand Down
2 changes: 1 addition & 1 deletion lib/dry/system/importer.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true

require "dry/container"
require_relative "constants"
require "dry/system/constants"

module Dry
module System
Expand Down
2 changes: 0 additions & 2 deletions lib/dry/system/loader/autoloading.rb
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require_relative "../loader"

module Dry
module System
class Loader
Expand Down
3 changes: 1 addition & 2 deletions lib/dry/system/provider.rb
@@ -1,7 +1,6 @@
# frozen_string_literal: true

require_relative "constants"
require_relative "provider/source"
require "dry/system/constants"

module Dry
module System
Expand Down
8 changes: 4 additions & 4 deletions lib/dry/system/provider_registrar.rb
@@ -1,10 +1,10 @@
# frozen_string_literal: true

require "dry/system"
require "pathname"
require_relative "errors"
require_relative "constants"
require_relative "provider"

require "dry/system"
require "dry/system/errors"
require "dry/system/constants"

module Dry
module System
Expand Down
3 changes: 1 addition & 2 deletions lib/dry/system/provider_source_registry.rb
@@ -1,7 +1,6 @@
# frozen_string_literal: true

require_relative "constants"
require_relative "provider/source"
require "dry/system/constants"

module Dry
module System
Expand Down
2 changes: 0 additions & 2 deletions lib/dry/system/provider_sources/settings/config.rb
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require_relative "loader"

module Dry
module System
module ProviderSources
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Expand Up @@ -14,7 +14,7 @@
Dir[SPEC_ROOT.join("support/*.rb").to_s].sort.each { |f| require f }
Dir[SPEC_ROOT.join("shared/*.rb").to_s].sort.each { |f| require f }

require "dry/system/container"
require "dry/system"
require "dry/system/stubs"
require "dry/events"
require "dry/types"
Expand Down

0 comments on commit 4bfe8a5

Please sign in to comment.