From e90203843ae386b5502afeae42e3828e87f4d61d Mon Sep 17 00:00:00 2001 From: Peter Solnica Date: Fri, 4 Nov 2022 17:40:15 +0100 Subject: [PATCH] Update to dry-core 1.0.0 --- Gemfile | 4 +++- dry-schema.gemspec | 10 +++++----- lib/dry/schema/type_container.rb | 4 ++-- project.yml | 8 ++++---- spec/integration/schema/custom_types_spec.rb | 4 ++-- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Gemfile b/Gemfile index ac1caa3..15d83ce 100644 --- a/Gemfile +++ b/Gemfile @@ -11,9 +11,11 @@ if ENV["DRY_CONFIGURABLE_FROM_MAIN"].eql?("true") end 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 +gem "dry-types", github: "dry-rb/dry-types", branch: "main" + group :test do gem "dry-monads", require: false, github: "dry-rb/dry-monads", branch: "main" gem "dry-struct", require: false, github: "dry-rb/dry-struct", branch: "main" diff --git a/dry-schema.gemspec b/dry-schema.gemspec index bd2d0b3..6ec9541 100644 --- a/dry-schema.gemspec +++ b/dry-schema.gemspec @@ -35,12 +35,12 @@ Gem::Specification.new do |spec| # to update dependencies edit project.yml 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 "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 "rake" diff --git a/lib/dry/schema/type_container.rb b/lib/dry/schema/type_container.rb index 98af232..5bb2aec 100644 --- a/lib/dry/schema/type_container.rb +++ b/lib/dry/schema/type_container.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require "dry/container" +require "dry/core/container" require "dry/types" module Dry @@ -13,7 +13,7 @@ module Dry # # @api public class TypeContainer - include Dry::Container::Mixin + include Dry::Core::Container::Mixin def initialize(types_container = Dry::Types.container) super() diff --git a/project.yml b/project.yml index fb50351..94969e2 100644 --- a/project.yml +++ b/project.yml @@ -16,8 +16,8 @@ gemspec: runtime_dependencies: - [concurrent-ruby, "~> 1.0"] - [zeitwerk, "~> 2.6"] - - [dry-configurable, "~> 0.16", ">= 0.16"] - - [dry-core, "~> 0.9", ">= 0.9"] + - [dry-core, "~> 1.0", "< 2"] + - [dry-configurable, "~> 1.0", "< 2"] - [dry-initializer, "~> 3.0"] - - [dry-logic, "~> 1.3"] - - [dry-types, "~> 1.6"] + - [dry-logic, ">= 1.4", "< 2"] + - [dry-types, ">= 1.7", "< 2"] diff --git a/spec/integration/schema/custom_types_spec.rb b/spec/integration/schema/custom_types_spec.rb index 172b31e..5e5c36a 100644 --- a/spec/integration/schema/custom_types_spec.rb +++ b/spec/integration/schema/custom_types_spec.rb @@ -46,7 +46,7 @@ RSpec.describe "Registering custom types" do end 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 @@ -123,7 +123,7 @@ RSpec.describe "Registering custom types" do end 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