Script 'mail_helper' called by obssrc
Hello community,

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

Package is "rubygem-dry-core"

Tue Aug  9 15:26:27 2022 rev:5 rq:993476 version:0.8.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-dry-core/rubygem-dry-core.changes        
2021-08-24 10:55:13.212293344 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-dry-core.new.1521/rubygem-dry-core.changes  
    2022-08-09 15:26:36.973327547 +0200
@@ -1,0 +2,21 @@
+Thu Aug  4 13:08:07 UTC 2022 - Stephan Kulow <[email protected]>
+
+updated to version 0.8.1
+ see installed CHANGELOG.md
+
+  ## 0.8.0
+  
+  ### Added
+  
+  - `Dry::Core::BasicObject` ported from hanami-utils (@jodosha)
+  
+  ### Changed
+  
+  - [BREAKING] [descendants tracker] switch to using `Class#subclasses` on 
Ruby 3.1+.
+  This changes the order of returned subclasses (immediate subclasses now go 
first) (@flash-gordon)
+  
+  
+  [Compare 
v0.7.1...v0.8.0](https://github.com/dry-rb/dry-core/compare/v0.7.1...master)
+  
+
+-------------------------------------------------------------------

Old:
----
  dry-core-0.7.1.gem

New:
----
  dry-core-0.8.1.gem

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

Other differences:
------------------
++++++ rubygem-dry-core.spec ++++++
--- /var/tmp/diff_new_pack.ZS0SkS/_old  2022-08-09 15:26:37.453328918 +0200
+++ /var/tmp/diff_new_pack.ZS0SkS/_new  2022-08-09 15:26:37.461328941 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-dry-core
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,12 +24,12 @@
 #
 
 Name:           rubygem-dry-core
-Version:        0.7.1
+Version:        0.8.1
 Release:        0
 %define mod_name dry-core
 %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-core

++++++ dry-core-0.7.1.gem -> dry-core-0.8.1.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    2021-07-10 16:03:50.000000000 +0200
+++ new/CHANGELOG.md    2022-07-27 08:54:33.000000000 +0200
@@ -1,5 +1,19 @@
 <!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
 
+## 0.8.0
+
+### Added
+
+- `Dry::Core::BasicObject` ported from hanami-utils (@jodosha)
+
+### Changed
+
+- [BREAKING] [descendants tracker] switch to using `Class#subclasses` on Ruby 
3.1+.
+This changes the order of returned subclasses (immediate subclasses now go 
first) (@flash-gordon)
+
+
+[Compare 
v0.7.1...v0.8.0](https://github.com/dry-rb/dry-core/compare/v0.7.1...master)
+
 ## 0.7.1 2021-07-10
 
 
@@ -43,7 +57,7 @@
 
 [Compare 
v0.5.0...v0.6.0](https://github.com/dry-rb/dry-core/compare/v0.5.0...v0.6.0)
 
-## 0.5.0 2012-12-12
+## 0.5.0 2020-12-12
 
 
 ### Added
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2021-07-10 16:03:50.000000000 +0200
+++ new/README.md       2022-07-27 08:54:33.000000000 +0200
@@ -11,7 +11,7 @@
 [![CI 
Status](https://github.com/dry-rb/dry-core/workflows/ci/badge.svg)][actions]
 [![Codacy 
Badge](https://api.codacy.com/project/badge/Grade/40946292b9094624beec604a149a6023)][codacy]
 [![Codacy 
Badge](https://api.codacy.com/project/badge/Coverage/40946292b9094624beec604a149a6023)][codacy]
-[![Inline 
docs](http://inch-ci.org/github/dry-rb/dry-core.svg?branch=master)][inchpages]
+[![Inline 
docs](http://inch-ci.org/github/dry-rb/dry-core.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-core.gemspec new/dry-core.gemspec
--- old/dry-core.gemspec        2021-07-10 16:03:50.000000000 +0200
+++ new/dry-core.gemspec        2022-07-27 08:54:33.000000000 +0200
@@ -22,11 +22,11 @@
   spec.require_paths = ["lib"]
 
   spec.metadata["allowed_push_host"] = "https://rubygems.org";
-  spec.metadata["changelog_uri"]     = 
"https://github.com/dry-rb/dry-core/blob/master/CHANGELOG.md";
+  spec.metadata["changelog_uri"]     = 
"https://github.com/dry-rb/dry-core/blob/main/CHANGELOG.md";
   spec.metadata["source_code_uri"]   = "https://github.com/dry-rb/dry-core";
   spec.metadata["bug_tracker_uri"]   = 
"https://github.com/dry-rb/dry-core/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"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/core/basic_object.rb 
new/lib/dry/core/basic_object.rb
--- old/lib/dry/core/basic_object.rb    1970-01-01 01:00:00.000000000 +0100
+++ new/lib/dry/core/basic_object.rb    2022-07-27 08:54:33.000000000 +0200
@@ -0,0 +1,144 @@
+# frozen_string_literal: true
+
+# This implementation was imported from `hanami-utils` gem.
+module Dry
+  module Core
+    # BasicObject
+    #
+    # @since 0.8.0
+    class BasicObject < ::BasicObject
+      # Lookups constants at the top-level namespace, if they are missing in 
the
+      # current context.
+      #
+      # @param name [Symbol] the constant name
+      #
+      # @return [Object, Module] the constant
+      #
+      # @raise [NameError] if the constant cannot be found
+      #
+      # @since 0.8.0
+      # @api private
+      #
+      # @see https://ruby-doc.org/core/Module.html#method-i-const_missing
+      def self.const_missing(name)
+        ::Object.const_get(name)
+      end
+
+      # Returns the class for debugging purposes.
+      #
+      # @since 0.8.0
+      #
+      # @see http://ruby-doc.org/core/Object.html#method-i-class
+      def class
+        (class << self; self; end).superclass
+      end
+
+      # Bare minimum inspect for debugging purposes.
+      #
+      # @return [String] the inspect string
+      #
+      # @since 0.8.0
+      #
+      # @see http://ruby-doc.org/core/Object.html#method-i-inspect
+      inspect_method = ::Kernel.instance_method(:inspect)
+      define_method(:inspect) do
+        original = inspect_method.bind_call(self)
+        "#{original[0...-1]}#{__inspect}>"
+      end
+
+      # @!macro [attach] instance_of?(class)
+      #
+      # Determines if self is an instance of given class or module
+      #
+      # @param class [Class,Module] the class of module to verify
+      #
+      # @return [TrueClass,FalseClass] the result of the check
+      #
+      # @raise [TypeError] if the given argument is not of the expected types
+      #
+      # @since 0.8.0
+      #
+      # @see http://ruby-doc.org/core/Object.html#method-i-instance_of-3F
+      define_method :instance_of?, ::Object.instance_method(:instance_of?)
+
+      # @!macro [attach] is_a?(class)
+      #
+      # Determines if self is of the type of the object class or module
+      #
+      # @param class [Class,Module] the class of module to verify
+      #
+      # @return [TrueClass,FalseClass] the result of the check
+      #
+      # @raise [TypeError] if the given argument is not of the expected types
+      #
+      # @since 0.8.0
+      #
+      # @see http://ruby-doc.org/core/Object.html#method-i-is_a-3F
+      define_method :is_a?, ::Object.instance_method(:is_a?)
+
+      # @!macro [attach] kind_of?(class)
+      #
+      # Determines if self is of the kind of the object class or module
+      #
+      # @param class [Class,Module] the class of module to verify
+      #
+      # @return [TrueClass,FalseClass] the result of the check
+      #
+      # @raise [TypeError] if the given argument is not of the expected types
+      #
+      # @since 0.8.0
+      #
+      # @see http://ruby-doc.org/core/Object.html#method-i-kind_of-3F
+      define_method :kind_of?, ::Object.instance_method(:kind_of?)
+
+      # Alias for __id__
+      #
+      # @return [Fixnum] the object id
+      #
+      # @since 0.8.0
+      #
+      # @see http://ruby-doc.org/core/Object.html#method-i-object_id
+      def object_id
+        __id__
+      end
+
+      # Interface for pp
+      #
+      # @param printer [PP] the Pretty Printable printer
+      # @return [String] the pretty-printable inspection of the object
+      #
+      # @since 0.8.0
+      #
+      # @see https://ruby-doc.org/stdlib/libdoc/pp/rdoc/PP.html
+      def pretty_print(printer)
+        printer.text(inspect)
+      end
+
+      # Returns true if responds to the given method.
+      #
+      # @return [TrueClass,FalseClass] the result of the check
+      #
+      # @since 0.8.0
+      #
+      # @see http://ruby-doc.org/core/Object.html#method-i-respond_to-3F
+      def respond_to?(method_name, include_all = false) # rubocop:disable 
Style/OptionalBooleanParameter
+        respond_to_missing?(method_name, include_all)
+      end
+
+      private
+
+      # Must be overridden by descendants
+      #
+      # @since 0.8.0
+      # @api private
+      def respond_to_missing?(_method_name, _include_all)
+        ::Kernel.raise ::NotImplementedError
+      end
+
+      # @since 0.8.0
+      # @api private
+      def __inspect # rubocop:disable Style/EmptyMethod
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/core/cache.rb new/lib/dry/core/cache.rb
--- old/lib/dry/core/cache.rb   2021-07-10 16:03:50.000000000 +0200
+++ new/lib/dry/core/cache.rb   2022-07-27 08:54:33.000000000 +0200
@@ -60,8 +60,8 @@
         # @yield An arbitrary block
         #
         # @return [Object] block's return value
-        def fetch_or_store(*args, &block)
-          self.class.fetch_or_store(*args, &block)
+        def fetch_or_store(...)
+          self.class.fetch_or_store(...)
         end
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/core/class_attributes.rb 
new/lib/dry/core/class_attributes.rb
--- old/lib/dry/core/class_attributes.rb        2021-07-10 16:03:50.000000000 
+0200
+++ new/lib/dry/core/class_attributes.rb        2022-07-27 08:54:33.000000000 
+0200
@@ -80,7 +80,7 @@
               if Undefined.equal?(value)
                 if instance_variable_defined?(ivar)
                   instance_variable_get(ivar)
-                else # rubocop:disable Style/EmptyElse
+                else
                   nil
                 end
               elsif type === value # rubocop:disable Style/CaseEquality
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/core/constants.rb 
new/lib/dry/core/constants.rb
--- old/lib/dry/core/constants.rb       2021-07-10 16:03:50.000000000 +0200
+++ new/lib/dry/core/constants.rb       2022-07-27 08:54:33.000000000 +0200
@@ -62,7 +62,7 @@
         #     1 + Undefined.default(val, 2)
         #   end
         #
-        def undefined.default(x, y = self) # rubocop:disable 
Naming/MethodParameterName
+        def undefined.default(x, y = self)
           if equal?(x)
             if equal?(y)
               yield
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/core/deprecations.rb 
new/lib/dry/core/deprecations.rb
--- old/lib/dry/core/deprecations.rb    2021-07-10 16:03:50.000000000 +0200
+++ new/lib/dry/core/deprecations.rb    2022-07-27 08:54:33.000000000 +0200
@@ -4,7 +4,7 @@
 
 module Dry
   module Core
-    # An extension for issueing warnings on using deprecated methods.
+    # An extension for issuing warnings on using deprecated methods.
     #
     # @example
     #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/core/memoizable.rb 
new/lib/dry/core/memoizable.rb
--- old/lib/dry/core/memoizable.rb      2021-07-10 16:03:50.000000000 +0200
+++ new/lib/dry/core/memoizable.rb      2022-07-27 08:54:33.000000000 +0200
@@ -13,6 +13,13 @@
           def memoize(*names)
             prepend(Memoizer.new(self, names))
           end
+
+          def inherited(base)
+            super
+
+            memoizer = base.ancestors.find { _1.is_a?(Memoizer) }
+            base.prepend(memoizer.dup)
+          end
         end
 
         module BasicObject
@@ -52,6 +59,12 @@
 
       # @api private
       class Memoizer < ::Module
+        KERNEL = {
+          singleton: ::Kernel.instance_method(:singleton_class),
+          ivar_set: ::Kernel.instance_method(:instance_variable_set),
+          frozen: ::Kernel.instance_method(:frozen?)
+        }.freeze
+
         # @api private
         def initialize(klass, names)
           super()
@@ -65,20 +78,50 @@
         private
 
         # @api private
-        def define_memoizable(method:) # rubocop:disable Metrics/AbcSize
+        # rubocop:disable Metrics/AbcSize
+        # rubocop:disable Metrics/PerceivedComplexity
+        def define_memoizable(method:)
           parameters = method.parameters
+          mod = self
+          kernel = KERNEL
 
           if parameters.empty?
-            key = method.name.hash
-            module_eval(<<~RUBY, __FILE__, __LINE__ + 1)
-              def #{method.name}                    # def slow_fetch
-                if @__memoized__.key?(#{key})       #   if 
@__memoized__.key?(12345678)
-                  @__memoized__[#{key}]             #     
@__memoized__[12345678]
-                else                                #   else
-                  @__memoized__[#{key}] = super     #     
@__memoized__[12345678] = super
-                end                                 #   end
-              end                                   # end
-            RUBY
+            key = "#{object_id}:#{method.name}".hash.abs
+
+            define_method(method.name) do
+              value = super()
+
+              if kernel[:frozen].bind(self).call
+                # It's not possible to modify singleton classes
+                # of frozen objects
+                mod.remove_method(method.name)
+                mod.module_eval(<<~RUBY, __FILE__, __LINE__ + 1)
+                  def #{method.name}                          # def slow_calc
+                    cached = @__memoized__[#{key}]            #   cached = 
@__memoized__[12345678]
+                                                              #
+                    if cached || @__memoized__.key?(#{key})   #   if cached || 
@__memoized__.key?(12345678)
+                      cached                                  #     cached
+                    else                                      #   else
+                      @__memoized__[#{key}] = super           #     
@__memoized__[12345678] = super
+                    end                                       #   end
+                  end                                         # end
+                RUBY
+              else
+                # We make an attr_reader for computed value.
+                # Readers are "special-cased" in ruby so such
+                # access will be the fastest way, faster than you'd
+                # expect :)
+                attr_name = :"__memozed_#{key}__"
+                ivar_name = :"@#{attr_name}"
+                kernel[:ivar_set].bind(self).(ivar_name, value)
+                eigenclass = kernel[:singleton].bind(self).call
+                eigenclass.attr_reader(attr_name)
+                eigenclass.alias_method(method.name, attr_name)
+                eigenclass.remove_method(attr_name)
+              end
+
+              value
+            end
           else
             mapping = parameters.to_h { |k, v = nil| [k, v] }
             params, binds = declaration(parameters, mapping)
@@ -95,7 +138,7 @@
 
             m = module_eval(<<~RUBY, __FILE__, __LINE__ + 1)
               def #{method.name}(#{params.join(", ")})                 # def 
slow_calc(arg1, arg2, arg3)
-                key = [:"#{method.name}", #{binds.join(", ")}].hash    #   
[:slow_calc, arg1, arg2, arg3].hash
+                key = [:"#{method.name}", #{binds.join(", ")}].hash    #   key 
= [:slow_calc, arg1, arg2, arg3].hash
                                                                        #
                 if @__memoized__.key?(key)                             #   if 
@__memoized__.key?(key)
                   @__memoized__[key]                                   #     
@__memoized__[key]
@@ -112,6 +155,8 @@
             m
           end
         end
+        # rubocop:enable Metrics/AbcSize
+        # rubocop:enable Metrics/PerceivedComplexity
 
         # @api private
         def declaration(definition, lookup)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dry/core/version.rb new/lib/dry/core/version.rb
--- old/lib/dry/core/version.rb 2021-07-10 16:03:50.000000000 +0200
+++ new/lib/dry/core/version.rb 2022-07-27 08:54:33.000000000 +0200
@@ -2,6 +2,6 @@
 
 module Dry
   module Core
-    VERSION = "0.7.1"
+    VERSION = "0.8.1"
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2021-07-10 16:03:50.000000000 +0200
+++ new/metadata        2022-07-27 08:54:33.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: dry-core
 version: !ruby/object:Gem::Version
-  version: 0.7.1
+  version: 0.8.1
 platform: ruby
 authors:
 - Nikita Shilnikov
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2021-07-10 00:00:00.000000000 Z
+date: 2022-07-27 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: concurrent-ruby
@@ -79,6 +79,7 @@
 - dry-core.gemspec
 - lib/dry-core.rb
 - lib/dry/core.rb
+- lib/dry/core/basic_object.rb
 - lib/dry/core/cache.rb
 - lib/dry/core/class_attributes.rb
 - lib/dry/core/class_builder.rb
@@ -96,7 +97,7 @@
 - MIT
 metadata:
   allowed_push_host: https://rubygems.org
-  changelog_uri: https://github.com/dry-rb/dry-core/blob/master/CHANGELOG.md
+  changelog_uri: https://github.com/dry-rb/dry-core/blob/main/CHANGELOG.md
   source_code_uri: https://github.com/dry-rb/dry-core
   bug_tracker_uri: https://github.com/dry-rb/dry-core/issues
 post_install_message: 
@@ -107,7 +108,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