Skip to content

Commit

Permalink
Merge pull request #77 from dry-rb/use-latest-dry-configurable
Browse files Browse the repository at this point in the history
Use latest dry-configurable setting keyword args
  • Loading branch information
solnic authored Jul 19, 2021
2 parents 6326273 + 7f1a1c5 commit 2d71a7e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ eval_gemfile "Gemfile.devtools"

gemspec

gem "dry-configurable", github: "dry-rb/dry-configurable"

group :tools do
gem "pry-byebug", platform: :mri
end
12 changes: 6 additions & 6 deletions lib/dry/container/mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ def inherited(subclass)
extend ::Dry::Configurable
extend hooks_mod

setting :registry, ::Dry::Container::Registry.new
setting :resolver, ::Dry::Container::Resolver.new
setting :namespace_separator, "."
setting :registry, default: Dry::Container::Registry.new
setting :resolver, default: Dry::Container::Resolver.new
setting :namespace_separator, default: "."

@_container = ::Concurrent::Hash.new
end
Expand All @@ -69,9 +69,9 @@ def self.included(base)
extend ::Dry::Configurable
prepend Initializer

setting :registry, ::Dry::Container::Registry.new
setting :resolver, ::Dry::Container::Resolver.new
setting :namespace_separator, "."
setting :registry, default: Dry::Container::Registry.new
setting :resolver, default: Dry::Container::Resolver.new
setting :namespace_separator, default: "."

def config
self.class.config
Expand Down

0 comments on commit 2d71a7e

Please sign in to comment.