Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-dry-configurable for 
openSUSE:Factory checked in at 2022-12-13 18:56:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-dry-configurable (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-dry-configurable.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-dry-configurable"

Tue Dec 13 18:56:32 2022 rev:8 rq:1042629 version:1.0.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/rubygem-dry-configurable/rubygem-dry-configurable.changes
        2022-10-30 18:28:54.338406970 +0100
+++ 
/work/SRC/openSUSE:Factory/.rubygem-dry-configurable.new.1835/rubygem-dry-configurable.changes
      2022-12-13 18:56:49.627638695 +0100
@@ -1,0 +2,25 @@
+Wed Dec  7 11:17:57 UTC 2022 - Stephan Kulow <[email protected]>
+
+updated to version 1.0.1
+ see installed CHANGELOG.md
+
+  ## 1.0.1 2022-11-16
+  
+  
+  ### Changed
+  
+  - Renamed `@config` and `@_settings` internal instance variables to 
`@__config__` and `@__settings__` in order to avoid clashes with user-defined 
instance variables (#159 by @timriley)
+  
+  [Compare 
v1.0.0...v1.0.1](https://github.com/dry-rb/dry-configurable/compare/v1.0.0...v1.0.1)
+  
+  ## 1.0.0 2022-11-04
+  
+  
+  ### Changed
+  
+  - Dependency on `dry-core` was updated to ~> 1.0 (@solnic)
+  
+  [Compare 
v0.16.1...v1.0.0](https://github.com/dry-rb/dry-configurable/compare/v0.16.1...v1.0.0)
+  
+
+-------------------------------------------------------------------

Old:
----
  dry-configurable-0.16.1.gem

New:
----
  dry-configurable-1.0.1.gem

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

Other differences:
------------------
++++++ rubygem-dry-configurable.spec ++++++
--- /var/tmp/diff_new_pack.UwG6Sz/_old  2022-12-13 18:56:50.175641620 +0100
+++ /var/tmp/diff_new_pack.UwG6Sz/_new  2022-12-13 18:56:50.179641641 +0100
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-dry-configurable
-Version:        0.16.1
+Version:        1.0.1
 Release:        0
 %define mod_name dry-configurable
 %define mod_full_name %{mod_name}-%{version}

++++++ dry-configurable-0.16.1.gem -> dry-configurable-1.0.1.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    2022-10-12 21:54:12.000000000 +0200
+++ new/CHANGELOG.md    2022-11-16 11:55:21.000000000 +0100
@@ -1,7 +1,26 @@
 <!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
 
+## 1.0.1 2022-11-16
+
+
+### Changed
+
+- Renamed `@config` and `@_settings` internal instance variables to 
`@__config__` and `@__settings__` in order to avoid clashes with user-defined 
instance variables (#159 by @timriley)
+
+[Compare 
v1.0.0...v1.0.1](https://github.com/dry-rb/dry-configurable/compare/v1.0.0...v1.0.1)
+
+## 1.0.0 2022-11-04
+
+
+### Changed
+
+- Dependency on `dry-core` was updated to ~> 1.0 (@solnic)
+
+[Compare 
v0.16.1...v1.0.0](https://github.com/dry-rb/dry-configurable/compare/v0.16.1...v1.0.0)
+
 ## 0.16.1 2022-10-13
 
+
 ### Changed
 
 - Restored performance of config value reads (direct reader methods as well as 
aggregate methods like `#values` and `#to_h`) to pre-0.16.0 levels (#149 by 
@timriley)
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dry-configurable.gemspec new/dry-configurable.gemspec
--- old/dry-configurable.gemspec        2022-10-12 21:54:12.000000000 +0200
+++ new/dry-configurable.gemspec        2022-11-16 11:55:21.000000000 +0100
@@ -29,7 +29,7 @@
   spec.required_ruby_version = ">= 2.7.0"
 
   # to update dependencies edit project.yml
-  spec.add_runtime_dependency "dry-core", "~> 0.6"
+  spec.add_runtime_dependency "dry-core", "~> 1.0", "< 2"
   spec.add_runtime_dependency "zeitwerk", "~> 2.6"
 
   spec.add_development_dependency "bundler"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/configurable/class_methods.rb 
new/lib/dry/configurable/class_methods.rb
--- old/lib/dry/configurable/class_methods.rb   2022-10-12 21:54:12.000000000 
+0200
+++ new/lib/dry/configurable/class_methods.rb   2022-11-16 11:55:21.000000000 
+0100
@@ -13,14 +13,14 @@
 
         subclass.instance_variable_set(:@__config_extension__, 
__config_extension__)
 
-        new_settings = _settings.dup
-        subclass.instance_variable_set(:@_settings, new_settings)
+        new_settings = settings.dup
+        subclass.instance_variable_set(:@__settings__, new_settings)
 
         # Only classes **extending** Dry::Configurable have class-level 
config. When
         # Dry::Configurable is **included**, the class-level config method is 
undefined because it
         # resides at the instance-level instead (see `Configurable.included`).
         if respond_to?(:config)
-          subclass.instance_variable_set(:@config, 
config.dup_for_settings(new_settings))
+          subclass.instance_variable_set(:@__config__, 
config.dup_for_settings(new_settings))
         end
       end
 
@@ -43,29 +43,20 @@
       def setting(*args, **options, &block)
         setting = __config_dsl__.setting(*args, **options, &block)
 
-        _settings << setting
+        settings << setting
 
         __config_reader__.define(setting.name) if setting.reader?
 
         self
       end
 
-      # Return declared settings
-      #
-      # @return [Set<Symbol>]
-      #
-      # @api public
-      def settings
-        Set[*_settings.map(&:name)]
-      end
-
-      # Return declared settings
+      # Returns the defined settings for the class.
       #
       # @return [Settings]
       #
       # @api public
-      def _settings
-        @_settings ||= Settings.new
+      def settings
+        @__settings__ ||= Settings.new
       end
 
       # Return configuration
@@ -74,11 +65,11 @@
       #
       # @api public
       def config
-        @config ||= __config_build__
+        @__config__ ||= __config_build__
       end
 
       # @api private
-      def __config_build__(settings = _settings)
+      def __config_build__(settings = self.settings)
         __config_extension__.config_class.new(settings)
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/configurable/config.rb 
new/lib/dry/configurable/config.rb
--- old/lib/dry/configurable/config.rb  2022-10-12 21:54:12.000000000 +0200
+++ new/lib/dry/configurable/config.rb  2022-11-16 11:55:21.000000000 +0100
@@ -1,10 +1,7 @@
 # frozen_string_literal: true
 
-require "dry/core/constants"
 require "set"
 
-require "dry/core/equalizer"
-
 module Dry
   module Configurable
     # Config exposes setting values through a convenient API
@@ -70,7 +67,7 @@
       # @param [String,Symbol] name
       # @param [Object] value
       def []=(name, value)
-        raise FrozenConfig, "Cannot modify frozen config" if frozen?
+        raise FrozenConfigError, "Cannot modify frozen config" if frozen?
 
         name = name.to_sym
 
@@ -149,7 +146,19 @@
       end
 
       # @api private
+      alias_method :_dry_equalizer_hash, :hash
+
+      # @api public
+      def hash
+        return @__hash__ if instance_variable_defined?(:@__hash__)
+
+        _dry_equalizer_hash
+      end
+
+      # @api public
       def finalize!(freeze_values: false)
+        return self if frozen?
+
         values.each_value do |value|
           if value.is_a?(self.class)
             value.finalize!(freeze_values: freeze_values)
@@ -158,6 +167,13 @@
           end
         end
 
+        # Memoize the hash for the object when finalizing (regardless of 
whether values themselves
+        # are to be frozen; the intention of finalization is that no further 
changes should be
+        # made). The benefit of freezing the hash at this point is that it 
saves repeated expensive
+        # computation (through Dry::Equalizer's hash implementation) if that 
hash is to be used
+        # later in performance-sensitive situations, such as when serving as a 
cache key or similar.
+        @__hash__ = _dry_equalizer_hash
+
         freeze
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/configurable/constants.rb 
new/lib/dry/configurable/constants.rb
--- old/lib/dry/configurable/constants.rb       2022-10-12 21:54:12.000000000 
+0200
+++ new/lib/dry/configurable/constants.rb       2022-11-16 11:55:21.000000000 
+0100
@@ -1,7 +1,5 @@
 # frozen_string_literal: true
 
-require "dry/core/constants"
-
 module Dry
   # Shared constants
   #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/configurable/dsl.rb 
new/lib/dry/configurable/dsl.rb
--- old/lib/dry/configurable/dsl.rb     2022-10-12 21:54:12.000000000 +0200
+++ new/lib/dry/configurable/dsl.rb     2022-11-16 11:55:21.000000000 +0100
@@ -1,7 +1,5 @@
 # frozen_string_literal: true
 
-require "dry/core/deprecations"
-
 module Dry
   module Configurable
     # Setting DSL used by the class API
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/configurable/errors.rb 
new/lib/dry/configurable/errors.rb
--- old/lib/dry/configurable/errors.rb  2022-10-12 21:54:12.000000000 +0200
+++ new/lib/dry/configurable/errors.rb  2022-11-16 11:55:21.000000000 +0100
@@ -6,7 +6,8 @@
   # @api public
   module Configurable
     Error = Class.new(::StandardError)
-    AlreadyIncluded = ::Class.new(Error)
-    FrozenConfig = ::Class.new(Error)
+
+    AlreadyIncludedError = Class.new(Error)
+    FrozenConfigError = Class.new(Error)
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/configurable/extension.rb 
new/lib/dry/configurable/extension.rb
--- old/lib/dry/configurable/extension.rb       2022-10-12 21:54:12.000000000 
+0200
+++ new/lib/dry/configurable/extension.rb       2022-11-16 11:55:21.000000000 
+0100
@@ -26,7 +26,7 @@
 
       # @api private
       def included(klass)
-        raise AlreadyIncluded if klass.include?(InstanceMethods)
+        raise AlreadyIncludedError if klass.include?(InstanceMethods)
 
         super
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/configurable/instance_methods.rb 
new/lib/dry/configurable/instance_methods.rb
--- old/lib/dry/configurable/instance_methods.rb        2022-10-12 
21:54:12.000000000 +0200
+++ new/lib/dry/configurable/instance_methods.rb        2022-11-16 
11:55:21.000000000 +0100
@@ -12,7 +12,7 @@
     module Initializer
       # @api private
       def initialize(*)
-        @config = self.class.__config_build__(self.class._settings)
+        @__config__ = self.class.__config_build__(self.class.settings)
 
         super
       end
@@ -30,7 +30,9 @@
       # @return [Config]
       #
       # @api public
-      attr_reader :config
+      def config
+        @__config__
+      end
 
       # Finalize the config and freeze the object
       #
@@ -45,7 +47,7 @@
       # @api public
       def initialize_copy(source)
         super
-        @config = source.config.dup
+        @__config__ = source.config.dup
       end
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/configurable/methods.rb 
new/lib/dry/configurable/methods.rb
--- old/lib/dry/configurable/methods.rb 2022-10-12 21:54:12.000000000 +0200
+++ new/lib/dry/configurable/methods.rb 2022-11-16 11:55:21.000000000 +0100
@@ -8,7 +8,7 @@
     module Methods
       # @api public
       def configure(&block)
-        raise FrozenConfig, "Cannot modify frozen config" if frozen?
+        raise FrozenConfigError, "Cannot modify frozen config" if 
config.frozen?
 
         yield(config) if block
         self
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/configurable/setting.rb 
new/lib/dry/configurable/setting.rb
--- old/lib/dry/configurable/setting.rb 2022-10-12 21:54:12.000000000 +0200
+++ new/lib/dry/configurable/setting.rb 2022-11-16 11:55:21.000000000 +0100
@@ -2,43 +2,41 @@
 
 require "set"
 
-require "dry/core/equalizer"
-
 module Dry
   module Configurable
-    # This class represents a setting and is used internally.
+    # A defined setting.
     #
-    # @api private
+    # @api public
     class Setting
       include Dry::Equalizer(:name, :default, :constructor, :children, 
:options, inspect: false)
 
-      OPTIONS = %i[default reader constructor cloneable settings 
config_class].freeze
+      OPTIONS = %i[default reader constructor mutable cloneable settings 
config_class].freeze
 
       DEFAULT_CONSTRUCTOR = -> v { v }.freeze
 
-      CLONEABLE_VALUE_TYPES = [Array, Hash, Set, Config].freeze
+      MUTABLE_VALUE_TYPES = [Array, Hash, Set, Config].freeze
 
-      # @api private
+      # @api public
       attr_reader :name
 
-      # @api private
+      # @api public
       attr_reader :default
 
-      # @api private
-      attr_reader :cloneable
+      # @api public
+      attr_reader :mutable
 
-      # @api private
+      # @api public
       attr_reader :constructor
 
-      # @api private
+      # @api public
       attr_reader :children
 
-      # @api private
+      # @api public
       attr_reader :options
 
       # @api private
-      def self.cloneable_value?(value)
-        CLONEABLE_VALUE_TYPES.any? { |type| value.is_a?(type) }
+      def self.mutable_value?(value)
+        MUTABLE_VALUE_TYPES.any? { |type| value.is_a?(type) }
       end
 
       # @api private
@@ -51,8 +49,9 @@
       )
         @name = name
         @default = default
-        @cloneable = children.any? || options.fetch(:cloneable) {
-          Setting.cloneable_value?(default)
+        @mutable = children.any? || options.fetch(:mutable) {
+          # Allow `cloneable` as an option alias for `mutable`
+          options.fetch(:cloneable) { Setting.mutable_value?(default) }
         }
         @constructor = constructor
         @children = children
@@ -64,10 +63,11 @@
         options[:reader].equal?(true)
       end
 
-      # @api private
-      def cloneable?
-        cloneable
+      # @api public
+      def mutable?
+        mutable
       end
+      alias_method :cloneable?, :mutable?
 
       # @api private
       def to_value
@@ -77,7 +77,7 @@
           value = default
           value = constructor.(value) unless value.eql?(Undefined)
 
-          cloneable? ? value.dup : value
+          mutable? ? value.dup : value
         end
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/configurable/settings.rb 
new/lib/dry/configurable/settings.rb
--- old/lib/dry/configurable/settings.rb        2022-10-12 21:54:12.000000000 
+0200
+++ new/lib/dry/configurable/settings.rb        2022-11-16 11:55:21.000000000 
+0100
@@ -1,10 +1,8 @@
 # frozen_string_literal: true
 
-require "dry/core/equalizer"
-
 module Dry
   module Configurable
-    # A settings map
+    # A collection of defined settings on a given class.
     #
     # @api private
     class Settings
@@ -21,36 +19,47 @@
       end
 
       # @api private
+      private def initialize_copy(source)
+        @settings = source.settings.dup
+      end
+
+      # @api private
       def <<(setting)
         settings[setting.name] = setting
         self
       end
 
-      # @api private
+      # Returns the setting for the given name, if found.
+      #
+      # @return [Setting, nil] the setting, or nil if not found
+      #
+      # @api public
       def [](name)
         settings[name]
       end
 
-      # @api private
+      # Returns true if a setting for the given name is defined.
+      #
+      # @return [Boolean]
+      #
+      # @api public
       def key?(name)
         keys.include?(name)
       end
 
-      # @api private
+      # Returns the list of defined setting names.
+      #
+      # @return [Array<Symbol>]
+      #
+      # @api public
       def keys
         settings.keys
       end
 
-      # @api private
+      # @api public
       def each(&block)
         settings.each_value(&block)
       end
-
-      private
-
-      def initialize_copy(source)
-        @settings = source.settings.dup
-      end
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/configurable/test_interface.rb 
new/lib/dry/configurable/test_interface.rb
--- old/lib/dry/configurable/test_interface.rb  2022-10-12 21:54:12.000000000 
+0200
+++ new/lib/dry/configurable/test_interface.rb  2022-11-16 11:55:21.000000000 
+0100
@@ -10,7 +10,7 @@
       #
       # @api public
       def reset_config
-        @config = config.pristine
+        @__config__ = config.pristine
       end
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/configurable/version.rb 
new/lib/dry/configurable/version.rb
--- old/lib/dry/configurable/version.rb 2022-10-12 21:54:12.000000000 +0200
+++ new/lib/dry/configurable/version.rb 2022-11-16 11:55:21.000000000 +0100
@@ -3,6 +3,6 @@
 module Dry
   module Configurable
     # @api public
-    VERSION = "0.16.1"
+    VERSION = "1.0.1"
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/configurable.rb new/lib/dry/configurable.rb
--- old/lib/dry/configurable.rb 2022-10-12 21:54:12.000000000 +0200
+++ new/lib/dry/configurable.rb 2022-11-16 11:55:21.000000000 +0100
@@ -2,7 +2,7 @@
 
 require "zeitwerk"
 
-require "dry/core/constants"
+require "dry/core"
 require "dry/configurable/constants"
 require "dry/configurable/errors"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2022-10-12 21:54:12.000000000 +0200
+++ new/metadata        2022-11-16 11:55:21.000000000 +0100
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: dry-configurable
 version: !ruby/object:Gem::Version
-  version: 0.16.1
+  version: 1.0.1
 platform: ruby
 authors:
 - Andy Holland
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2022-10-12 00:00:00.000000000 Z
+date: 2022-11-16 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: dry-core
@@ -16,14 +16,20 @@
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: '0.6'
+        version: '1.0'
+    - - "<"
+      - !ruby/object:Gem::Version
+        version: '2'
   type: :runtime
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: '0.6'
+        version: '1.0'
+    - - "<"
+      - !ruby/object:Gem::Version
+        version: '2'
 - !ruby/object:Gem::Dependency
   name: zeitwerk
   requirement: !ruby/object:Gem::Requirement

Reply via email to