Merge pull request #89 from dry-rb/deprecate

[changelog]

version: unreleased
added: "Add a warning about deprecation of the gem (via #89) (@solnic)"
This commit is contained in:
Peter Solnica 2022-10-31 10:17:41 +01:00 committed by GitHub
commit 77a5376c7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -7,6 +7,7 @@ eval_gemfile "Gemfile.devtools"
gemspec
gem "dry-configurable"
gem "dry-core", github: "dry-rb/dry-core", branch: "main"
group :tools do
gem "pry-byebug", platform: :mri

View File

@ -8,6 +8,17 @@ require "dry/container/namespace_dsl"
require "dry/container/mixin"
require "dry/container/version"
begin
require "dry/core"
if defined?(Dry::Core::Container)
warn "dry-container is deprecated and is now provided by dry-core as Dry::Core::Container"
else
warn "dry-container is deprecated, please upgrade to the latest dry-core as it now ships with Dry::Core::Container built-in"
end
rescue NameError
end
# A collection of micro-libraries, each intended to encapsulate
# a common task in Ruby
module Dry