Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-dry-container for 
openSUSE:Factory checked in at 2022-08-09 15:26:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-dry-container (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-dry-container.new.1521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-dry-container"

Tue Aug  9 15:26:26 2022 rev:4 rq:993475 version:0.10.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/rubygem-dry-container/rubygem-dry-container.changes  
    2022-02-24 18:23:31.646657155 +0100
+++ 
/work/SRC/openSUSE:Factory/.rubygem-dry-container.new.1521/rubygem-dry-container.changes
    2022-08-09 15:26:36.205325353 +0200
@@ -1,0 +2,32 @@
+Thu Aug  4 13:07:57 UTC 2022 - Stephan Kulow <[email protected]>
+
+updated to version 0.10.1
+ see installed CHANGELOG.md
+
+  ## 0.10.1 2022-07-29
+  
+  
+  ### Changed
+  
+  - Make `DidYouMean` integration optional (via #86) (@jbourassa)
+  
+  [Compare 
v0.10.0...v0.10.1](https://github.com/dry-rb/dry-container/compare/v0.10.0...v0.10.1)
+  
+  ## 0.10.0 2022-07-10
+  
+  ?????? Notice that dry-container no longer depends on dry-configurable. If 
you happen to rely on the advanced configurable functionality, add 
dry-configurable as a dependency and require it **before** requiring 
dry-container.
+  
+  ### Added
+  
+  - Accept block given to `#merge` (via #83) (@timriley)
+  
+  ### Changed
+  
+  - [BREAKING] Replace dep on dry-configurable with a simple `Configuration` 
mod (see #84 for more details) (@solnic)
+  - Raise KeyError for missing key, with DidYouMean integration (via #82) 
(@cllns)
+  - Wrap FrozenError, to state that the container itself is frozen (see #74) 
(@cllns)
+  
+  [Compare 
v0.9.0...v0.10.0](https://github.com/dry-rb/dry-container/compare/v0.9.0...v0.10.0)
+  
+
+-------------------------------------------------------------------

Old:
----
  dry-container-0.9.0.gem

New:
----
  dry-container-0.10.1.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-dry-container.spec ++++++
--- /var/tmp/diff_new_pack.ZAVKT4/_old  2022-08-09 15:26:36.725326838 +0200
+++ /var/tmp/diff_new_pack.ZAVKT4/_new  2022-08-09 15:26:36.729326850 +0200
@@ -24,12 +24,12 @@
 #
 
 Name:           rubygem-dry-container
-Version:        0.9.0
+Version:        0.10.1
 Release:        0
 %define mod_name dry-container
 %define mod_full_name %{mod_name}-%{version}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-BuildRequires:  %{ruby >= 2.6.0}
+BuildRequires:  %{ruby >= 2.7.0}
 BuildRequires:  %{rubygem gem2rpm}
 BuildRequires:  ruby-macros >= 5
 URL:            https://dry-rb.org/gems/dry-container

++++++ dry-container-0.9.0.gem -> dry-container-0.10.1.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    2021-09-12 14:31:04.000000000 +0200
+++ new/CHANGELOG.md    2022-07-29 08:27:23.000000000 +0200
@@ -1,5 +1,30 @@
 <!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
 
+## 0.10.1 2022-07-29
+
+
+### Changed
+
+- Make `DidYouMean` integration optional (via #86) (@jbourassa)
+
+[Compare 
v0.10.0...v0.10.1](https://github.com/dry-rb/dry-container/compare/v0.10.0...v0.10.1)
+
+## 0.10.0 2022-07-10
+
+?????? Notice that dry-container no longer depends on dry-configurable. If you 
happen to rely on the advanced configurable functionality, add dry-configurable 
as a dependency and require it **before** requiring dry-container.
+
+### Added
+
+- Accept block given to `#merge` (via #83) (@timriley)
+
+### Changed
+
+- [BREAKING] Replace dep on dry-configurable with a simple `Configuration` mod 
(see #84 for more details) (@solnic)
+- Raise KeyError for missing key, with DidYouMean integration (via #82) 
(@cllns)
+- Wrap FrozenError, to state that the container itself is frozen (see #74) 
(@cllns)
+
+[Compare 
v0.9.0...v0.10.0](https://github.com/dry-rb/dry-container/compare/v0.9.0...v0.10.0)
+
 ## 0.9.0 2021-09-12
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LICENSE new/LICENSE
--- old/LICENSE 2021-09-12 14:31:04.000000000 +0200
+++ new/LICENSE 2022-07-29 08:27:23.000000000 +0200
@@ -1,6 +1,6 @@
 The MIT License (MIT)
 
-Copyright (c) 2015-2021 dry-rb team
+Copyright (c) 2015-2022 dry-rb team
 
 Permission is hereby granted, free of charge, to any person obtaining a copy of
 this software and associated documentation files (the "Software"), to deal in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2021-09-12 14:31:04.000000000 +0200
+++ new/README.md       2022-07-29 08:27:23.000000000 +0200
@@ -8,10 +8,10 @@
 # dry-container [![Join the chat at 
https://dry-rb.zulipchat.com](https://img.shields.io/badge/dry--rb-join%20chat-%23346b7a.svg)][chat]
 
 [![Gem Version](https://badge.fury.io/rb/dry-container.svg)][gem]
-[![CI 
Status](https://github.com/dry-rb/dry-container/workflows/CI/badge.svg)][actions]
+[![CI 
Status](https://github.com/dry-rb/dry-container/workflows/ci/badge.svg)][actions]
 [![Codacy 
Badge](https://api.codacy.com/project/badge/Grade/227509c9034340b493f769f6277f4ecb)][codacy]
 [![Codacy 
Badge](https://api.codacy.com/project/badge/Coverage/227509c9034340b493f769f6277f4ecb)][codacy]
-[![Inline 
docs](http://inch-ci.org/github/dry-rb/dry-container.svg?branch=master)][inchpages]
+[![Inline 
docs](http://inch-ci.org/github/dry-rb/dry-container.svg?branch=main)][inchpages]
 
 ## Links
 
@@ -22,8 +22,8 @@
 
 This library officially supports the following Ruby versions:
 
-* MRI `>= 2.6.0`
-* ~~jruby~~ `>= 9.3` (we are waiting for [2.6 
support](https://github.com/jruby/jruby/issues/6161))
+* MRI `>= 2.7.0`
+* jruby `>= 9.3` (postponed until 2.7 is supported)
 
 ## License
 
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dry-container.gemspec new/dry-container.gemspec
--- old/dry-container.gemspec   2021-09-12 14:31:04.000000000 +0200
+++ new/dry-container.gemspec   2022-07-29 08:27:23.000000000 +0200
@@ -26,11 +26,10 @@
   spec.metadata["source_code_uri"]   = 
"https://github.com/dry-rb/dry-container";
   spec.metadata["bug_tracker_uri"]   = 
"https://github.com/dry-rb/dry-container/issues";
 
-  spec.required_ruby_version = ">= 2.6.0"
+  spec.required_ruby_version = ">= 2.7.0"
 
   # to update dependencies edit project.yml
   spec.add_runtime_dependency "concurrent-ruby", "~> 1.0"
-  spec.add_runtime_dependency "dry-configurable", "~> 0.13", ">= 0.13.0"
 
   spec.add_development_dependency "bundler"
   spec.add_development_dependency "rake"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/container/error.rb 
new/lib/dry/container/error.rb
--- old/lib/dry/container/error.rb      2021-09-12 14:31:04.000000000 +0200
+++ new/lib/dry/container/error.rb      2022-07-29 08:27:23.000000000 +0200
@@ -4,5 +4,12 @@
   class Container
     # @api public
     Error = Class.new(StandardError)
+
+    KeyError = Class.new(::KeyError)
+    if defined?(DidYouMean::KeyErrorChecker)
+      DidYouMean.correct_error(KeyError, DidYouMean::KeyErrorChecker)
+    end
+
+    deprecate_constant(:Error)
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/container/item/memoizable.rb 
new/lib/dry/container/item/memoizable.rb
--- old/lib/dry/container/item/memoizable.rb    2021-09-12 14:31:04.000000000 
+0200
+++ new/lib/dry/container/item/memoizable.rb    2022-07-29 08:27:23.000000000 
+0200
@@ -41,7 +41,7 @@
 
         # @private
         def raise_not_supported_error
-          raise ::Dry::Container::Error, "Memoize only supported for a block 
or a proc".freeze
+          raise ::Dry::Container::Error, "Memoize only supported for a block 
or a proc"
         end
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/container/mixin.rb 
new/lib/dry/container/mixin.rb
--- old/lib/dry/container/mixin.rb      2021-09-12 14:31:04.000000000 +0200
+++ new/lib/dry/container/mixin.rb      2022-07-29 08:27:23.000000000 +0200
@@ -4,6 +4,61 @@
 
 module Dry
   class Container
+    # @api public
+    class Config
+      DEFAULT_NAMESPACE_SEPARATOR = "."
+      DEFAULT_RESOLVER = Resolver.new
+      DEFAULT_REGISTRY = Registry.new
+
+      # @api public
+      attr_accessor :namespace_separator
+
+      # @api public
+      attr_accessor :resolver
+
+      # @api public
+      attr_accessor :registry
+
+      # @api private
+      def initialize(
+        namespace_separator: DEFAULT_NAMESPACE_SEPARATOR,
+        resolver: DEFAULT_RESOLVER,
+        registry: DEFAULT_REGISTRY
+      )
+        @namespace_separator = namespace_separator
+        @resolver = resolver
+        @registry = registry
+      end
+    end
+
+    # @api public
+    module Configuration
+      # Use dry/configurable if it's available
+      if defined?(Configurable)
+        # @api private
+        def self.extended(klass)
+          super
+          klass.class_eval do
+            extend Dry::Configurable
+
+            setting :namespace_separator, default: 
Config::DEFAULT_NAMESPACE_SEPARATOR
+            setting :resolver, default: Config::DEFAULT_RESOLVER
+            setting :registry, default: Config::DEFAULT_REGISTRY
+          end
+        end
+      else
+        # @api private
+        def config
+          @config ||= Config.new
+        end
+      end
+
+      # @api private
+      def configure
+        yield config
+      end
+    end
+
     PREFIX_NAMESPACE = lambda do |namespace, key, config|
       [namespace, key].join(config.namespace_separator)
     end
@@ -31,7 +86,6 @@
     #   container.resolve(:item)
     #   => 'item'
     #
-    #
     # @api public
     module Mixin
       # @private
@@ -44,13 +98,9 @@
         end
 
         base.class_eval do
-          extend ::Dry::Configurable
+          extend Configuration
           extend hooks_mod
 
-          setting :registry, default: Dry::Container::Registry.new
-          setting :resolver, default: Dry::Container::Resolver.new
-          setting :namespace_separator, default: "."
-
           @_container = ::Concurrent::Hash.new
         end
       end
@@ -66,13 +116,9 @@
       # @private
       def self.included(base)
         base.class_eval do
-          extend ::Dry::Configurable
+          extend Configuration
           prepend Initializer
 
-          setting :registry, default: Dry::Container::Registry.new
-          setting :resolver, default: Dry::Container::Resolver.new
-          setting :namespace_separator, default: "."
-
           def config
             self.class.config
           end
@@ -105,6 +151,9 @@
         config.registry.call(_container, key, item, options)
 
         self
+      rescue FrozenError
+        raise FrozenError,
+              "can't modify frozen #{self.class} (when attempting to register 
'#{key}')"
       end
 
       # Resolve an item from the container
@@ -145,15 +194,16 @@
       # @return [Dry::Container::Mixin] self
       #
       # @api public
-      def merge(other, namespace: nil)
+      def merge(other, namespace: nil, &block)
         if namespace
           _container.merge!(
-            other._container.each_with_object(::Concurrent::Hash.new) do |a, h|
-              h[PREFIX_NAMESPACE.call(namespace, a.first, config)] = a.last
-            end
+            other._container.each_with_object(::Concurrent::Hash.new) { |(key, 
item), hsh|
+              hsh[PREFIX_NAMESPACE.call(namespace, key, config)] = item
+            },
+            &block
           )
         else
-          _container.merge!(other._container)
+          _container.merge!(other._container, &block)
         end
 
         self
@@ -192,7 +242,8 @@
         self
       end
 
-      # Calls block once for each key/value pair in the container, passing the 
key and the registered item parameters.
+      # Calls block once for each key/value pair in the container, passing the 
key and
+      # the registered item parameters.
       #
       # If no block is given, an enumerator is returned instead.
       #
@@ -200,9 +251,9 @@
       #
       # @api public
       #
-      # @note In discussions with other developers, it was felt that being 
able to iterate over not just
-      #       the registered keys, but to see what was registered would be 
very helpful. This is a step
-      #       toward doing that.
+      # @note In discussions with other developers, it was felt that being 
able to iterate
+      #       over not just the registered keys, but to see what was 
registered would be
+      #       very helpful. This is a step toward doing that.
       def each(&block)
         config.resolver.each(_container, &block)
       end
@@ -293,5 +344,6 @@
         copy
       end
     end
+    # rubocop: enable Metrics/ModuleLength
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/container/namespace.rb 
new/lib/dry/container/namespace.rb
--- old/lib/dry/container/namespace.rb  2021-09-12 14:31:04.000000000 +0200
+++ new/lib/dry/container/namespace.rb  2022-07-29 08:27:23.000000000 +0200
@@ -24,6 +24,7 @@
       attr_reader :name
       # @return [Proc] The block to be executed when the namespace is imported
       attr_reader :block
+
       # Create a new namespace
       #
       # @param [Mixed] name
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/container/resolver.rb 
new/lib/dry/container/resolver.rb
--- old/lib/dry/container/resolver.rb   2021-09-12 14:31:04.000000000 +0200
+++ new/lib/dry/container/resolver.rb   2022-07-29 08:27:23.000000000 +0200
@@ -16,7 +16,7 @@
       #   Fallback block to call when a key is missing. Its result will be 
returned
       # @yieldparam [Mixed] key Missing key
       #
-      # @raise [Dry::Container::Error]
+      # @raise [KeyError]
       #   If the given key is not registered with the container (and no block 
provided)
       #
       #
@@ -28,7 +28,7 @@
           if block_given?
             return yield(key)
           else
-            raise Error, "Nothing registered with the key #{key.inspect}"
+            raise KeyError.new(%(key not found: "#{key}"), key: key.to_s, 
receiver: container)
           end
         end
 
@@ -69,16 +69,17 @@
         container.each_key(&block)
       end
 
-      # Calls block once for each key in container, passing the key and the 
registered item parameters.
+      # Calls block once for each key in container, passing the key and
+      # the registered item parameters.
       #
       # If no block is given, an enumerator is returned instead.
       #
       # @return Key, Value
       #
       # @api public
-      # @note In discussions with other developers, it was felt that being 
able to iterate over not just
-      #       the registered keys, but to see what was registered would be 
very helpful. This is a step
-      #       toward doing that.
+      # @note In discussions with other developers, it was felt that being able
+      #       to iterate over not just the registered keys, but to see what was
+      #       registered would be very helpful. This is a step toward doing 
that.
       def each(container, &block)
         container.map { |key, value| [key, value.call] }.each(&block)
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/container/version.rb 
new/lib/dry/container/version.rb
--- old/lib/dry/container/version.rb    2021-09-12 14:31:04.000000000 +0200
+++ new/lib/dry/container/version.rb    2022-07-29 08:27:23.000000000 +0200
@@ -3,6 +3,6 @@
 module Dry
   class Container
     # @api public
-    VERSION = "0.9.0".freeze
+    VERSION = "0.10.1"
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/container.rb new/lib/dry/container.rb
--- old/lib/dry/container.rb    2021-09-12 14:31:04.000000000 +0200
+++ new/lib/dry/container.rb    2022-07-29 08:27:23.000000000 +0200
@@ -1,6 +1,5 @@
 # frozen_string_literal: true
 
-require "dry-configurable"
 require "dry/container/error"
 require "dry/container/namespace"
 require "dry/container/registry"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2021-09-12 14:31:04.000000000 +0200
+++ new/metadata        2022-07-29 08:27:23.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: dry-container
 version: !ruby/object:Gem::Version
-  version: 0.9.0
+  version: 0.10.1
 platform: ruby
 authors:
 - Andy Holland
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2021-09-12 00:00:00.000000000 Z
+date: 2022-07-29 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: concurrent-ruby
@@ -25,26 +25,6 @@
       - !ruby/object:Gem::Version
         version: '1.0'
 - !ruby/object:Gem::Dependency
-  name: dry-configurable
-  requirement: !ruby/object:Gem::Requirement
-    requirements:
-    - - "~>"
-      - !ruby/object:Gem::Version
-        version: '0.13'
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: 0.13.0
-  type: :runtime
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    requirements:
-    - - "~>"
-      - !ruby/object:Gem::Version
-        version: '0.13'
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: 0.13.0
-- !ruby/object:Gem::Dependency
   name: bundler
   requirement: !ruby/object:Gem::Requirement
     requirements:
@@ -127,7 +107,7 @@
   requirements:
   - - ">="
     - !ruby/object:Gem::Version
-      version: 2.6.0
+      version: 2.7.0
 required_rubygems_version: !ruby/object:Gem::Requirement
   requirements:
   - - ">="

Reply via email to