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:
commit
77a5376c7d
1
Gemfile
1
Gemfile
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue