Update to dry-core 1.0.0
This commit is contained in:
parent
9a7912a329
commit
e90203843a
4
Gemfile
4
Gemfile
|
@ -11,9 +11,11 @@ if ENV["DRY_CONFIGURABLE_FROM_MAIN"].eql?("true")
|
||||||
end
|
end
|
||||||
|
|
||||||
if ENV["DRY_LOGIC_FROM_MAIN"].eql?("true")
|
if ENV["DRY_LOGIC_FROM_MAIN"].eql?("true")
|
||||||
gem "dry-logic", github: "dry-rb/dry-logic", branch: "main"
|
gem "dry-logic", github: "dry-rb/dry-logic", branch: "release-1.4"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
gem "dry-types", github: "dry-rb/dry-types", branch: "main"
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
gem "dry-monads", require: false, github: "dry-rb/dry-monads", branch: "main"
|
gem "dry-monads", require: false, github: "dry-rb/dry-monads", branch: "main"
|
||||||
gem "dry-struct", require: false, github: "dry-rb/dry-struct", branch: "main"
|
gem "dry-struct", require: false, github: "dry-rb/dry-struct", branch: "main"
|
||||||
|
|
|
@ -35,12 +35,12 @@ Gem::Specification.new do |spec|
|
||||||
|
|
||||||
# to update dependencies edit project.yml
|
# to update dependencies edit project.yml
|
||||||
spec.add_runtime_dependency "concurrent-ruby", "~> 1.0"
|
spec.add_runtime_dependency "concurrent-ruby", "~> 1.0"
|
||||||
spec.add_runtime_dependency "dry-configurable", "~> 0.16", ">= 0.16"
|
|
||||||
spec.add_runtime_dependency "dry-core", "~> 0.9", ">= 0.9"
|
|
||||||
spec.add_runtime_dependency "dry-initializer", "~> 3.0"
|
|
||||||
spec.add_runtime_dependency "dry-logic", "~> 1.3"
|
|
||||||
spec.add_runtime_dependency "dry-types", "~> 1.6"
|
|
||||||
spec.add_runtime_dependency "zeitwerk", "~> 2.6"
|
spec.add_runtime_dependency "zeitwerk", "~> 2.6"
|
||||||
|
spec.add_runtime_dependency "dry-configurable", "~> 1.0", "< 2"
|
||||||
|
spec.add_runtime_dependency "dry-core", "~> 1.0", "< 2"
|
||||||
|
spec.add_runtime_dependency "dry-initializer", "~> 3.0"
|
||||||
|
spec.add_runtime_dependency "dry-logic", ">= 1.4", "< 2"
|
||||||
|
spec.add_runtime_dependency "dry-types", ">= 1.7", "< 2"
|
||||||
|
|
||||||
spec.add_development_dependency "bundler"
|
spec.add_development_dependency "bundler"
|
||||||
spec.add_development_dependency "rake"
|
spec.add_development_dependency "rake"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "dry/container"
|
require "dry/core/container"
|
||||||
require "dry/types"
|
require "dry/types"
|
||||||
|
|
||||||
module Dry
|
module Dry
|
||||||
|
@ -13,7 +13,7 @@ module Dry
|
||||||
#
|
#
|
||||||
# @api public
|
# @api public
|
||||||
class TypeContainer
|
class TypeContainer
|
||||||
include Dry::Container::Mixin
|
include Dry::Core::Container::Mixin
|
||||||
|
|
||||||
def initialize(types_container = Dry::Types.container)
|
def initialize(types_container = Dry::Types.container)
|
||||||
super()
|
super()
|
||||||
|
|
|
@ -16,8 +16,8 @@ gemspec:
|
||||||
runtime_dependencies:
|
runtime_dependencies:
|
||||||
- [concurrent-ruby, "~> 1.0"]
|
- [concurrent-ruby, "~> 1.0"]
|
||||||
- [zeitwerk, "~> 2.6"]
|
- [zeitwerk, "~> 2.6"]
|
||||||
- [dry-configurable, "~> 0.16", ">= 0.16"]
|
- [dry-core, "~> 1.0", "< 2"]
|
||||||
- [dry-core, "~> 0.9", ">= 0.9"]
|
- [dry-configurable, "~> 1.0", "< 2"]
|
||||||
- [dry-initializer, "~> 3.0"]
|
- [dry-initializer, "~> 3.0"]
|
||||||
- [dry-logic, "~> 1.3"]
|
- [dry-logic, ">= 1.4", "< 2"]
|
||||||
- [dry-types, "~> 1.6"]
|
- [dry-types, ">= 1.7", "< 2"]
|
||||||
|
|
|
@ -46,7 +46,7 @@ RSpec.describe "Registering custom types" do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "raises exception that nothing is registered with the key" do
|
it "raises exception that nothing is registered with the key" do
|
||||||
expect { result }.to raise_exception(Dry::Container::KeyError)
|
expect { result }.to raise_exception(Dry::Core::Container::KeyError)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ RSpec.describe "Registering custom types" do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "raises exception that nothing is registered with the key" do
|
it "raises exception that nothing is registered with the key" do
|
||||||
expect { result }.to raise_exception(Dry::Container::KeyError)
|
expect { result }.to raise_exception(Dry::Core::Container::KeyError)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue