Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-rspec-expectations for 
openSUSE:Factory checked in at 2022-02-28 19:43:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-rspec-expectations (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-rspec-expectations.new.1958 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-rspec-expectations"

Mon Feb 28 19:43:09 2022 rev:23 rq:957233 version:3.11.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/rubygem-rspec-expectations/rubygem-rspec-expectations.changes
    2022-02-03 23:15:50.556876471 +0100
+++ 
/work/SRC/openSUSE:Factory/.rubygem-rspec-expectations.new.1958/rubygem-rspec-expectations.changes
  2022-02-28 19:43:12.949933366 +0100
@@ -1,0 +2,13 @@
+Thu Feb 24 08:35:38 UTC 2022 - Stephan Kulow <co...@suse.com>
+
+updated to version 3.11.0
+ see installed Changelog.md
+
+  Enhancements:
+   * Return `true` from `aggregate_failures` when no exception occurs. (Jon 
Rowe, #1225)
+
+ Deprecations:
+  * Print a deprecation message when using the implicit block expectation 
syntax.
+    (Phil Pirozhkov, #1139)
+
+-------------------------------------------------------------------

Old:
----
  rspec-expectations-3.10.2.gem

New:
----
  rspec-expectations-3.11.0.gem

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

Other differences:
------------------
++++++ rubygem-rspec-expectations.spec ++++++
--- /var/tmp/diff_new_pack.tJCZ2S/_old  2022-02-28 19:43:13.489933568 +0100
+++ /var/tmp/diff_new_pack.tJCZ2S/_new  2022-02-28 19:43:13.493933569 +0100
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-rspec-expectations
-Version:        3.10.2
+Version:        3.11.0
 Release:        0
 %define mod_name rspec-expectations
 %define mod_full_name %{mod_name}-%{version}

++++++ rspec-expectations-3.10.2.gem -> rspec-expectations-3.11.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Changelog.md new/Changelog.md
--- old/Changelog.md    2022-01-14 17:44:09.000000000 +0100
+++ new/Changelog.md    2022-02-09 12:17:08.000000000 +0100
@@ -1,5 +1,17 @@
 ### Development
-[Full 
Changelog](http://github.com/rspec/rspec-expectations/compare/v3.10.2...3-10-maintenance)
+[Full 
Changelog](http://github.com/rspec/rspec-expectations/compare/v3.11.0...3-11-maintenance)
+
+### 3.11.0 / 2022-02-09
+[Full 
Changelog](http://github.com/rspec/rspec-expectations/compare/v3.10.2...v3.11.0)
+
+Enhancements:
+
+* Return `true` from `aggregate_failures` when no exception occurs. (Jon Rowe, 
#1225)
+
+Deprecations:
+
+* Print a deprecation message when using the implicit block expectation syntax.
+  (Phil Pirozhkov, #1139)
 
 ### 3.10.2 / 2022-01-14
 [Full 
Changelog](http://github.com/rspec/rspec-expectations/compare/v3.10.1...v3.10.2)
@@ -128,7 +140,7 @@
 * Prevent composed `all` matchers from leaking into their siblings leading to 
duplicate
   failures. (Jamie English, #1086)
 * Prevent objects which change their hash on comparison from failing change 
checks.
-  (Phil Pirozhkov, #1110)
+  (Phil Pirozhkov, #1100)
 * Issue an `ArgumentError` rather than a `NoMethodError` when 
`be_an_instance_of` and
   `be_kind_of` matchers encounter objects not supporting those methods.
   (Taichi Ishitani, #1107)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2022-01-14 17:44:09.000000000 +0100
+++ new/README.md       2022-02-09 12:17:08.000000000 +0100
@@ -1,4 +1,4 @@
-# RSpec Expectations [![Build 
Status](https://github.com/rspec/rspec-expectations/workflows/RSpec%20CI/badge.svg?branch=3-10-maintenance)](https://github.com/rspec/rspec-expectations/actions)
 [![Code 
Climate](https://codeclimate.com/github/rspec/rspec-expectations.svg)](https://codeclimate.com/github/rspec/rspec-expectations)
+# RSpec Expectations [![Build 
Status](https://github.com/rspec/rspec-expectations/workflows/RSpec%20CI/badge.svg)](https://github.com/rspec/rspec-expectations/actions)
 [![Code 
Climate](https://codeclimate.com/github/rspec/rspec-expectations.svg)](https://codeclimate.com/github/rspec/rspec-expectations)
 
 RSpec::Expectations lets you express expected outcomes on an object in an
 example.
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
Binary files old/checksums.yaml.gz.sig and new/checksums.yaml.gz.sig differ
Binary files old/data.tar.gz.sig and new/data.tar.gz.sig differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rspec/expectations/expectation_target.rb 
new/lib/rspec/expectations/expectation_target.rb
--- old/lib/rspec/expectations/expectation_target.rb    2022-01-14 
17:44:09.000000000 +0100
+++ new/lib/rspec/expectations/expectation_target.rb    2022-02-09 
12:17:08.000000000 +0100
@@ -42,7 +42,7 @@
         elsif block
           raise ArgumentError, "You cannot pass both an argument and a block 
to `expect`."
         else
-          new(value)
+          ValueExpectationTarget.new(value)
         end
       end
 
@@ -91,6 +91,44 @@
     end
 
     # @private
+    # Validates the provided matcher to ensure it supports block
+    # expectations, in order to avoid user confusion when they
+    # use a block thinking the expectation will be on the return
+    # value of the block rather than the block itself.
+    class ValueExpectationTarget < ExpectationTarget
+      def to(matcher=nil, message=nil, &block)
+        enforce_value_expectation(matcher)
+        super
+      end
+
+      def not_to(matcher=nil, message=nil, &block)
+        enforce_value_expectation(matcher)
+        super
+      end
+
+    private
+
+      def enforce_value_expectation(matcher)
+        return if supports_value_expectations?(matcher)
+
+        RSpec.deprecate(
+          "expect(value).to 
#{RSpec::Support::ObjectFormatter.format(matcher)}",
+          :message =>
+            "The implicit block expectation syntax is deprecated, you should 
pass " \
+            "a block rather than an argument to `expect` to use the provided " 
\
+            "block expectation matcher or the matcher must implement " \
+            "`supports_value_expectations?`. e.g  `expect { value }.to " \
+            "#{RSpec::Support::ObjectFormatter.format(matcher)}` not " \
+            "`expect(value).to 
#{RSpec::Support::ObjectFormatter.format(matcher)}`"
+        )
+      end
+
+      def supports_value_expectations?(matcher)
+        !matcher.respond_to?(:supports_value_expectations?) || 
matcher.supports_value_expectations?
+      end
+    end
+
+    # @private
     # Validates the provided matcher to ensure it supports block
     # expectations, in order to avoid user confusion when they
     # use a block thinking the expectation will be on the return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rspec/expectations/failure_aggregator.rb 
new/lib/rspec/expectations/failure_aggregator.rb
--- old/lib/rspec/expectations/failure_aggregator.rb    2022-01-14 
17:44:09.000000000 +0100
+++ new/lib/rspec/expectations/failure_aggregator.rb    2022-02-09 
12:17:08.000000000 +0100
@@ -80,7 +80,7 @@
         all_errors = failures + other_errors
 
         case all_errors.size
-        when 0 then return nil
+        when 0 then return true
         when 1 then RSpec::Support.notify_failure all_errors.first
         else RSpec::Support.notify_failure 
MultipleExpectationsNotMetError.new(self)
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rspec/expectations/version.rb 
new/lib/rspec/expectations/version.rb
--- old/lib/rspec/expectations/version.rb       2022-01-14 17:44:09.000000000 
+0100
+++ new/lib/rspec/expectations/version.rb       2022-02-09 12:17:08.000000000 
+0100
@@ -2,7 +2,7 @@
   module Expectations
     # @private
     module Version
-      STRING = '3.10.2'
+      STRING = '3.11.0'
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rspec/matchers/built_in/base_matcher.rb 
new/lib/rspec/matchers/built_in/base_matcher.rb
--- old/lib/rspec/matchers/built_in/base_matcher.rb     2022-01-14 
17:44:09.000000000 +0100
+++ new/lib/rspec/matchers/built_in/base_matcher.rb     2022-02-09 
12:17:08.000000000 +0100
@@ -78,6 +78,11 @@
           false
         end
 
+        # @private
+        def supports_value_expectations?
+          true
+        end
+
         # @api private
         def expects_call_stack_jump?
           false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rspec/matchers/built_in/change.rb 
new/lib/rspec/matchers/built_in/change.rb
--- old/lib/rspec/matchers/built_in/change.rb   2022-01-14 17:44:09.000000000 
+0100
+++ new/lib/rspec/matchers/built_in/change.rb   2022-02-09 12:17:08.000000000 
+0100
@@ -77,6 +77,11 @@
           true
         end
 
+        # @private
+        def supports_value_expectations?
+          false
+        end
+
       private
 
         def initialize(receiver=nil, message=nil, &block)
@@ -158,6 +163,11 @@
           true
         end
 
+        # @private
+        def supports_value_expectations?
+          false
+        end
+
       private
 
         def failure_reason
@@ -201,6 +211,11 @@
           true
         end
 
+        # @private
+        def supports_value_expectations?
+          false
+        end
+
       private
 
         def perform_change(event_proc)
@@ -337,6 +352,8 @@
       class ChangeDetails
         attr_reader :actual_after
 
+        UNDEFINED = Module.new.freeze
+
         def initialize(matcher_name, receiver=nil, message=nil, &block)
           if receiver && !message
             raise(
@@ -351,6 +368,11 @@
           @receiver = receiver
           @message = message
           @value_proc = block
+          # TODO: temporary measure to mute warning of access to an initialized
+          # instance variable when a deprecated implicit block expectation
+          # syntax is used. This may be removed once `fail` is used, and the
+          # matcher never issues this warning.
+          @actual_after = UNDEFINED
         end
 
         def value_representation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rspec/matchers/built_in/compound.rb 
new/lib/rspec/matchers/built_in/compound.rb
--- old/lib/rspec/matchers/built_in/compound.rb 2022-01-14 17:44:09.000000000 
+0100
+++ new/lib/rspec/matchers/built_in/compound.rb 2022-02-09 12:17:08.000000000 
+0100
@@ -26,11 +26,19 @@
           "#{matcher_1.description} #{conjunction} #{matcher_2.description}"
         end
 
+        # @api private
         def supports_block_expectations?
           matcher_supports_block_expectations?(matcher_1) &&
           matcher_supports_block_expectations?(matcher_2)
         end
 
+        # @api private
+        def supports_value_expectations?
+          matcher_supports_value_expectations?(matcher_1) &&
+          matcher_supports_value_expectations?(matcher_2)
+        end
+
+        # @api private
         def expects_call_stack_jump?
           NestedEvaluator.matcher_expects_call_stack_jump?(matcher_1) ||
           NestedEvaluator.matcher_expects_call_stack_jump?(matcher_2)
@@ -102,6 +110,12 @@
           false
         end
 
+        def matcher_supports_value_expectations?(matcher)
+          matcher.supports_value_expectations?
+        rescue NoMethodError
+          true
+        end
+
         def matcher_is_diffable?(matcher)
           matcher.diffable?
         rescue NoMethodError
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rspec/matchers/built_in/output.rb 
new/lib/rspec/matchers/built_in/output.rb
--- old/lib/rspec/matchers/built_in/output.rb   2022-01-14 17:44:09.000000000 
+0100
+++ new/lib/rspec/matchers/built_in/output.rb   2022-02-09 12:17:08.000000000 
+0100
@@ -94,6 +94,13 @@
           true
         end
 
+        # @api private
+        # Indicates this matcher matches against a block only.
+        # @return [False]
+        def supports_value_expectations?
+          false
+        end
+
       private
 
         def captured?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rspec/matchers/built_in/raise_error.rb 
new/lib/rspec/matchers/built_in/raise_error.rb
--- old/lib/rspec/matchers/built_in/raise_error.rb      2022-01-14 
17:44:09.000000000 +0100
+++ new/lib/rspec/matchers/built_in/raise_error.rb      2022-02-09 
12:17:08.000000000 +0100
@@ -86,6 +86,12 @@
           true
         end
 
+        # @private
+        def supports_value_expectations?
+          false
+        end
+
+        # @private
         def expects_call_stack_jump?
           true
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rspec/matchers/built_in/throw_symbol.rb 
new/lib/rspec/matchers/built_in/throw_symbol.rb
--- old/lib/rspec/matchers/built_in/throw_symbol.rb     2022-01-14 
17:44:09.000000000 +0100
+++ new/lib/rspec/matchers/built_in/throw_symbol.rb     2022-02-09 
12:17:08.000000000 +0100
@@ -94,6 +94,12 @@
           true
         end
 
+        # @api private
+        def supports_value_expectations?
+          false
+        end
+
+        # @api private
         def expects_call_stack_jump?
           true
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rspec/matchers/built_in/yield.rb 
new/lib/rspec/matchers/built_in/yield.rb
--- old/lib/rspec/matchers/built_in/yield.rb    2022-01-14 17:44:09.000000000 
+0100
+++ new/lib/rspec/matchers/built_in/yield.rb    2022-02-09 12:17:08.000000000 
+0100
@@ -129,6 +129,11 @@
           true
         end
 
+        # @private
+        def supports_value_expectations?
+          false
+        end
+
       private
 
         def failure_reason
@@ -169,6 +174,11 @@
           true
         end
 
+        # @private
+        def supports_value_expectations?
+          false
+        end
+
       private
 
         def positive_failure_reason
@@ -231,6 +241,11 @@
           true
         end
 
+        # @private
+        def supports_value_expectations?
+          false
+        end
+
       private
 
         def positive_failure_reason
@@ -328,6 +343,11 @@
           true
         end
 
+        # @private
+        def supports_value_expectations?
+          false
+        end
+
       private
 
         def expected_arg_description
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rspec/matchers/dsl.rb 
new/lib/rspec/matchers/dsl.rb
--- old/lib/rspec/matchers/dsl.rb       2022-01-14 17:44:09.000000000 +0100
+++ new/lib/rspec/matchers/dsl.rb       2022-02-09 12:17:08.000000000 +0100
@@ -403,6 +403,10 @@
           false
         end
 
+        def supports_value_expectations?
+          true
+        end
+
         # Most matchers do not expect call stack jumps.
         def expects_call_stack_jump?
           false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rspec/matchers/matcher_protocol.rb 
new/lib/rspec/matchers/matcher_protocol.rb
--- old/lib/rspec/matchers/matcher_protocol.rb  2022-01-14 17:44:09.000000000 
+0100
+++ new/lib/rspec/matchers/matcher_protocol.rb  2022-02-09 12:17:08.000000000 
+0100
@@ -60,6 +60,12 @@
       #   @return [Boolean] true if this matcher can be used in block 
expressions.
       #   @note If not defined, RSpec assumes a value of `false` for this 
method.
 
+      # @!method supports_value_expectations?
+      #   Indicates that this matcher can be used in a value expectation 
expression,
+      #   such as `expect(foo).to eq(bar)`.
+      #   @return [Boolean] true if this matcher can be used in value 
expressions.
+      #   @note If not defined, RSpec assumes a value of `true` for this 
method.
+
       # @!method expects_call_stack_jump?
       #   Indicates that when this matcher is used in a block expectation
       #   expression, it expects the block to use a ruby construct that causes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2022-01-14 17:44:09.000000000 +0100
+++ new/metadata        2022-02-09 12:17:08.000000000 +0100
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: rspec-expectations
 version: !ruby/object:Gem::Version
-  version: 3.10.2
+  version: 3.11.0
 platform: ruby
 authors:
 - Steven Baker
@@ -45,7 +45,7 @@
   ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
   F3MdtaDehhjC
   -----END CERTIFICATE-----
-date: 2022-01-14 00:00:00.000000000 Z
+date: 2022-02-09 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: rspec-support
@@ -53,14 +53,14 @@
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: 3.10.0
+        version: 3.11.0
   type: :runtime
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: 3.10.0
+        version: 3.11.0
 - !ruby/object:Gem::Dependency
   name: diff-lcs
   requirement: !ruby/object:Gem::Requirement
@@ -203,7 +203,7 @@
 - MIT
 metadata:
   bug_tracker_uri: https://github.com/rspec/rspec-expectations/issues
-  changelog_uri: 
https://github.com/rspec/rspec-expectations/blob/v3.10.2/Changelog.md
+  changelog_uri: 
https://github.com/rspec/rspec-expectations/blob/v3.11.0/Changelog.md
   documentation_uri: https://rspec.info/documentation/
   mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
   source_code_uri: https://github.com/rspec/rspec-expectations
@@ -226,5 +226,5 @@
 rubygems_version: 3.3.3
 signing_key:
 specification_version: 4
-summary: rspec-expectations-3.10.2
+summary: rspec-expectations-3.11.0
 test_files: []
Binary files old/metadata.gz.sig and new/metadata.gz.sig differ

Reply via email to