Hello community,

here is the log from the commit of package rubygem-rspec-expectations for 
openSUSE:Factory checked in at 2020-05-13 22:58:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-rspec-expectations (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-rspec-expectations.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-rspec-expectations"

Wed May 13 22:58:56 2020 rev:20 rq:802641 version:3.9.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/rubygem-rspec-expectations/rubygem-rspec-expectations.changes
    2020-04-29 20:42:16.455625733 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-rspec-expectations.new.2738/rubygem-rspec-expectations.changes
  2020-05-13 22:58:57.331345394 +0200
@@ -1,0 +2,14 @@
+Mon May 11 09:38:27 UTC 2020 - Manuel Schnitzer <[email protected]>
+
+- updated to version 3.9.2
+
+  [Full 
Changelog](http://github.com/rspec/rspec-expectations/compare/v3.9.1...v3.9.2)
+
+  Bug Fixes:
+
+  * Issue a proper `ArgumentError` when invalid arguments are given to 
`yield_control`
+    modifiers such as `at_least` et al. (Marc-André Lafortune, #1167)
+  * Prevent Ruby 2.7 keyword arguments warning from being issued by custom
+    matcher definitions. (Jon Rowe, #1176)
+
+-------------------------------------------------------------------

Old:
----
  rspec-expectations-3.9.1.gem

New:
----
  rspec-expectations-3.9.2.gem

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

Other differences:
------------------
++++++ rubygem-rspec-expectations.spec ++++++
--- /var/tmp/diff_new_pack.YZDB4x/_old  2020-05-13 22:58:57.795346299 +0200
+++ /var/tmp/diff_new_pack.YZDB4x/_new  2020-05-13 22:58:57.795346299 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-rspec-expectations
-Version:        3.9.1
+Version:        3.9.2
 Release:        0
 %define mod_name rspec-expectations
 %define mod_full_name %{mod_name}-%{version}

++++++ rspec-expectations-3.9.1.gem -> rspec-expectations-3.9.2.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Changelog.md new/Changelog.md
--- old/Changelog.md    2020-03-13 11:36:02.000000000 +0100
+++ new/Changelog.md    2020-05-08 11:27:16.000000000 +0200
@@ -1,3 +1,16 @@
+### Development
+[Full 
Changelog](http://github.com/rspec/rspec-expectations/compare/v3.9.2...3-9-maintenance)
+
+### 3.9.2 / 2020-05-08
+[Full 
Changelog](http://github.com/rspec/rspec-expectations/compare/v3.9.1...v3.9.2)
+
+Bug Fixes:
+
+* Issue a proper `ArgumentError` when invalid arguments are given to 
`yield_control`
+  modifiers such as `at_least` et al. (Marc-André Lafortune, #1167)
+* Prevent Ruby 2.7 keyword arguments warning from being issued by custom
+  matcher definitions. (Jon Rowe, #1176)
+
 ### 3.9.1 / 2020-03-13
 [Full 
Changelog](http://github.com/rspec/rspec-expectations/compare/v3.9.0...v3.9.1)
 
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/version.rb 
new/lib/rspec/expectations/version.rb
--- old/lib/rspec/expectations/version.rb       2020-03-13 11:36:02.000000000 
+0100
+++ new/lib/rspec/expectations/version.rb       2020-05-08 11:27:16.000000000 
+0200
@@ -2,7 +2,7 @@
   module Expectations
     # @private
     module Version
-      STRING = '3.9.1'
+      STRING = '3.9.2'
     end
   end
 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    2020-03-13 11:36:02.000000000 
+0100
+++ new/lib/rspec/matchers/built_in/yield.rb    2020-05-08 11:27:16.000000000 
+0200
@@ -98,7 +98,7 @@
       # Not intended to be instantiated directly.
       class YieldControl < BaseMatcher
         def initialize
-          at_least(:once)
+          @expectation_type = @expected_yields_count = nil
         end
 
         # @api public
@@ -153,7 +153,7 @@
         def matches?(block)
           @probe = YieldProbe.probe(block)
           return false unless @probe.has_block?
-
+          return @probe.num_yields > 0 unless @expectation_type
           @probe.num_yields.__send__(@expectation_type, @expected_yields_count)
         end
 
@@ -182,35 +182,44 @@
       private
 
         def set_expected_yields_count(relativity, n)
+          raise "Multiple count constraints are not supported" if 
@expectation_type
+
           @expectation_type = relativity
-          @expected_yields_count = case n
-                                   when Numeric then n
-                                   when :once then 1
-                                   when :twice then 2
-                                   when :thrice then 3
-                                   end
+          @expected_yields_count = count_constraint_to_number(n)
+        end
+
+        def count_constraint_to_number(n)
+          case n
+          when Numeric then n
+          when :once then 1
+          when :twice then 2
+          when :thrice then 3
+          else
+            raise ArgumentError, "Expected a number, :once, :twice or 
:thrice," \
+              " but got #{n}"
+          end
         end
 
         def failure_reason
           return ' but was not a block' unless @probe.has_block?
-          return '' unless @expected_yields_count
-          " 
#{human_readable_expectation_type}#{human_readable_count(@expected_yields_count)}"
 \
-          " but yielded #{human_readable_count(@probe.num_yields)}"
+          
"#{human_readable_expectation_type}#{human_readable_count(@expected_yields_count)}"
 \
+          " but yielded#{human_readable_count(@probe.num_yields)}"
         end
 
         def human_readable_expectation_type
           case @expectation_type
-          when :<= then 'at most '
-          when :>= then 'at least '
+          when :<= then ' at most'
+          when :>= then ' at least'
           else ''
           end
         end
 
         def human_readable_count(count)
           case count
-          when 1 then 'once'
-          when 2 then 'twice'
-          else "#{count} times"
+          when nil then ''
+          when 1 then ' once'
+          when 2 then ' twice'
+          else " #{count} times"
           end
         end
       end
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       2020-03-13 11:36:02.000000000 +0100
+++ new/lib/rspec/matchers/dsl.rb       2020-05-08 11:27:16.000000000 +0200
@@ -1,3 +1,5 @@
+RSpec::Support.require_rspec_support "with_keywords_when_needed"
+
 module RSpec
   module Matchers
     # Defines the custom matcher DSL.
@@ -460,11 +462,12 @@
           @chained_method_clauses = []
           @block_arg = block_arg
 
-          class << self
+          klass = class << self
             # See `Macros#define_user_override` above, for an explanation.
             include(@user_method_defs = Module.new)
             self
-          end.class_exec(*expected, &declarations)
+          end
+          RSpec::Support::WithKeywordsWhenNeeded.class_exec(klass, *expected, 
&declarations)
         end
 
         # Provides the expected value. This will return an array if
@@ -528,6 +531,9 @@
             super(method, *args, &block)
           end
         end
+        # The method_missing method should be refactored to pass kw args in 
RSpec 4
+        # then this can be removed
+        ruby2_keywords :method_missing if respond_to?(:ruby2_keywords, true)
       end
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2020-03-13 11:36:02.000000000 +0100
+++ new/metadata        2020-05-08 11:27:16.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: rspec-expectations
 version: !ruby/object:Gem::Version
-  version: 3.9.1
+  version: 3.9.2
 platform: ruby
 authors:
 - Steven Baker
@@ -45,7 +45,7 @@
   ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
   F3MdtaDehhjC
   -----END CERTIFICATE-----
-date: 2020-03-13 00:00:00.000000000 Z
+date: 2020-05-08 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: rspec-support
@@ -127,14 +127,14 @@
   name: rake
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - "~>"
+    - - ">"
       - !ruby/object:Gem::Version
         version: 10.0.0
   type: :development
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - "~>"
+    - - ">"
       - !ruby/object:Gem::Version
         version: 10.0.0
 description: rspec-expectations provides a simple, readable API to express 
expected
@@ -202,7 +202,7 @@
 - MIT
 metadata:
   bug_tracker_uri: https://github.com/rspec/rspec-expectations/issues
-  changelog_uri: 
https://github.com/rspec/rspec-expectations/blob/v3.9.1/Changelog.md
+  changelog_uri: 
https://github.com/rspec/rspec-expectations/blob/v3.9.2/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
@@ -225,5 +225,5 @@
 rubygems_version: 3.1.2
 signing_key: 
 specification_version: 4
-summary: rspec-expectations-3.9.1
+summary: rspec-expectations-3.9.2
 test_files: []
Binary files old/metadata.gz.sig and new/metadata.gz.sig differ


Reply via email to