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 2024-06-22 13:23:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-rspec-expectations (Old)
and /work/SRC/openSUSE:Factory/.rubygem-rspec-expectations.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-rspec-expectations"
Sat Jun 22 13:23:03 2024 rev:27 rq:1182464 version:3.13.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/rubygem-rspec-expectations/rubygem-rspec-expectations.changes
2023-11-15 21:07:17.541385649 +0100
+++
/work/SRC/openSUSE:Factory/.rubygem-rspec-expectations.new.18349/rubygem-rspec-expectations.changes
2024-06-22 13:23:30.490852899 +0200
@@ -1,0 +2,5 @@
+Fri Jun 21 10:37:20 UTC 2024 - Dan Äermák <[email protected]>
+
+- New upstream release 3.13.1, see bundled Changelog.md
+
+-------------------------------------------------------------------
Old:
----
rspec-expectations-3.12.3.gem
New:
----
rspec-expectations-3.13.1.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-rspec-expectations.spec ++++++
--- /var/tmp/diff_new_pack.56LUsH/_old 2024-06-22 13:23:30.954869865 +0200
+++ /var/tmp/diff_new_pack.56LUsH/_new 2024-06-22 13:23:30.958870012 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-rspec-expectations
#
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-rspec-expectations
-Version: 3.12.3
+Version: 3.13.1
Release: 0
%define mod_name rspec-expectations
%define mod_full_name %{mod_name}-%{version}
++++++ rspec-expectations-3.12.3.gem -> rspec-expectations-3.13.1.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Changelog.md new/Changelog.md
--- old/Changelog.md 2023-04-20 09:31:54.000000000 +0200
+++ new/Changelog.md 2024-06-13 16:46:02.000000000 +0200
@@ -1,5 +1,29 @@
### Development
-[Full
Changelog](http://github.com/rspec/rspec-expectations/compare/v3.12.3...3-12-maintenance)
+[Full
Changelog](http://github.com/rspec/rspec-expectations/compare/v3.13.1...3-13-maintenance)
+
+### 3.13.1 / 2024-06-13
+[Full
Changelog](http://github.com/rspec/rspec-expectations/compare/v3.13.0...v3.13.1)
+
+Bug Fixes:
+
+* Fix the "false positive" warning message when using a negated `raise_error`
matcher
+ with a `RegExp` instance. (Eric Mueller, #1456)
+
+### 3.13.0 / 2024-02-04
+[Full
Changelog](http://github.com/rspec/rspec-expectations/compare/v3.12.4...v3.13.0)
+
+Enhancements:
+
+* Update `eq` and `eql` matchers to better highlight difference in string
encoding.
+ (Alan Foster, #1425)
+
+### 3.12.4 / 2024-02-04
+[Full
Changelog](http://github.com/rspec/rspec-expectations/compare/v3.12.3...v3.12.4)
+
+Bug Fixes:
+
+* Fix the diff for redefined `actual` and reassigned `@actual` in compound
+ expectations failure messages. (Phil Pirozhkov, #1440)
### 3.12.3 / 2023-04-20
[Full
Changelog](http://github.com/rspec/rspec-expectations/compare/v3.12.2...v3.12.3)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md 2023-04-20 09:31:54.000000000 +0200
+++ new/README.md 2024-06-13 16:46:02.000000000 +0200
@@ -13,7 +13,9 @@
and RubyGems will also install rspec-expectations for you (along with
rspec-core and rspec-mocks):
- gem install rspec
+```shell
+gem install rspec
+```
Want to run against the `main` branch? You'll need to include the dependent
RSpec repos as well. Add the following to your `Gemfile`:
@@ -27,7 +29,9 @@
If you want to use rspec-expectations with another tool, like Test::Unit,
Minitest, or Cucumber, you can install it directly:
- gem install rspec-expectations
+```shell
+gem install rspec-expectations
+```
## Contributing
@@ -67,8 +71,10 @@
expresses an expected outcome. If `order.total == Money.new(5.55, :USD)`, then
the example passes. If not, it fails with a message like:
- expected: #<Money @value=5.55 @currency=:USD>
- got: #<Money @value=1.11 @currency=:USD>
+```
+ expected: #<Money @value=5.55 @currency=:USD>
+ got: #<Money @value=1.11 @currency=:USD>
+```
## Built-in matchers
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/fail_with.rb
new/lib/rspec/expectations/fail_with.rb
--- old/lib/rspec/expectations/fail_with.rb 2023-04-20 09:31:54.000000000
+0200
+++ new/lib/rspec/expectations/fail_with.rb 2024-06-13 16:46:02.000000000
+0200
@@ -30,7 +30,7 @@
"appropriate failure_message[_when_negated]
method to return a string?"
end
- message =
::RSpec::Matchers::ExpectedsForMultipleDiffs.from(expected).message_with_diff(message,
differ, actual)
+ message = ::RSpec::Matchers::MultiMatcherDiff.from(expected,
actual).message_with_diff(message, differ)
RSpec::Support.notify_failure(RSpec::Expectations::ExpectationNotMetError.new
message)
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 2023-04-20 09:31:54.000000000
+0200
+++ new/lib/rspec/expectations/version.rb 2024-06-13 16:46:02.000000000
+0200
@@ -2,7 +2,7 @@
module Expectations
# @private
module Version
- STRING = '3.12.3'
+ STRING = '3.13.1'
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 2023-04-20
09:31:54.000000000 +0200
+++ new/lib/rspec/matchers/built_in/base_matcher.rb 2024-06-13
16:46:02.000000000 +0200
@@ -161,6 +161,47 @@
include HashFormatting
+ # @private
+ module StringEncodingFormatting
+ # @api private
+ # @return [Boolean] True if the actual and expected string encoding
are different.
+ # i.e. the failure may be related to encoding differences and the
encoding
+ # should be shown to the user. false otherwise.
+ if String.method_defined?(:encoding)
+ def string_encoding_differs?
+ actual.is_a?(String) && expected.is_a?(String) &&
actual.encoding != expected.encoding
+ end
+ else
+ # @api private
+ # @return [Boolean] False always as the curent Ruby version does
not support String encoding
+ def string_encoding_differs?
+ false
+ end
+ end
+ module_function :string_encoding_differs?
+
+ if String.method_defined?(:encoding)
+ # @api private
+ # Formats a String's encoding as a human readable string
+ # @param value [String]
+ # @return [String]
+ def format_encoding(value)
+ "#<Encoding:#{value.encoding.name}>"
+ end
+ else
+ # @api private
+ # Formats a String's encoding as a human readable string
+ # @param _value [String]
+ # @return [nil] nil as the curent Ruby version does not support
String encoding
+ def format_encoding(_value)
+ nil
+ end
+ end
+ module_function :format_encoding
+ end
+
+ include StringEncodingFormatting
+
# @api private
# Provides default implementations of failure messages, based on the
`description`.
module DefaultFailureMessages
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 2023-04-20 09:31:54.000000000
+0200
+++ new/lib/rspec/matchers/built_in/compound.rb 2024-06-13 16:46:02.000000000
+0200
@@ -51,10 +51,10 @@
end
# @api private
- # @return [RSpec::Matchers::ExpectedsForMultipleDiffs]
+ # @return [RSpec::Matchers::MultiMatcherDiff]
def expected
return nil unless evaluator
-
::RSpec::Matchers::ExpectedsForMultipleDiffs.for_many_matchers(diffable_matcher_list)
+
::RSpec::Matchers::MultiMatcherDiff.for_many_matchers(diffable_matcher_list)
end
protected
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rspec/matchers/built_in/eq.rb
new/lib/rspec/matchers/built_in/eq.rb
--- old/lib/rspec/matchers/built_in/eq.rb 2023-04-20 09:31:54.000000000
+0200
+++ new/lib/rspec/matchers/built_in/eq.rb 2024-06-13 16:46:02.000000000
+0200
@@ -8,7 +8,11 @@
# @api private
# @return [String]
def failure_message
- "\nexpected: #{expected_formatted}\n got:
#{actual_formatted}\n\n(compared using ==)\n"
+ if string_encoding_differs?
+ "\nexpected: #{format_encoding(expected)} #{expected_formatted}\n
got: #{format_encoding(actual)} #{actual_formatted}\n\n(compared using ==)\n"
+ else
+ "\nexpected: #{expected_formatted}\n got:
#{actual_formatted}\n\n(compared using ==)\n"
+ end
end
# @api private
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rspec/matchers/built_in/eql.rb
new/lib/rspec/matchers/built_in/eql.rb
--- old/lib/rspec/matchers/built_in/eql.rb 2023-04-20 09:31:54.000000000
+0200
+++ new/lib/rspec/matchers/built_in/eql.rb 2024-06-13 16:46:02.000000000
+0200
@@ -8,7 +8,11 @@
# @api private
# @return [String]
def failure_message
- "\nexpected: #{expected_formatted}\n got:
#{actual_formatted}\n\n(compared using eql?)\n"
+ if string_encoding_differs?
+ "\nexpected: #{format_encoding(expected)} #{expected_formatted}\n
got: #{format_encoding(actual)} #{actual_formatted}\n\n(compared using
eql?)\n"
+ else
+ "\nexpected: #{expected_formatted}\n got:
#{actual_formatted}\n\n(compared using eql?)\n"
+ end
end
# @api private
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 2023-04-20
09:31:54.000000000 +0200
+++ new/lib/rspec/matchers/built_in/raise_error.rb 2024-06-13
16:46:02.000000000 +0200
@@ -13,6 +13,10 @@
# argument. We can't use `nil` for that because we need to warn when
`nil` is
# passed in a different way. It's an Object, not a Module, since
Module's `===`
# does not evaluate to true when compared to itself.
+ #
+ # Note; this _is_ the default value supplied for
expected_error_or_message, but
+ # because there are two method-calls involved, that default is
actually supplied
+ # in the definition of the _matcher_ method,
`RSpec::Matchers#raise_error`
UndefinedValue = Object.new.freeze
def initialize(expected_error_or_message, expected_message, &block)
@@ -25,7 +29,7 @@
when nil, UndefinedValue
@expected_error = Exception
@expected_message = expected_message
- when String
+ when String, Regexp
@expected_error = Exception
@expected_message = expected_error_or_message
else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rspec/matchers/expecteds_for_multiple_diffs.rb
new/lib/rspec/matchers/expecteds_for_multiple_diffs.rb
--- old/lib/rspec/matchers/expecteds_for_multiple_diffs.rb 2023-04-20
09:31:54.000000000 +0200
+++ new/lib/rspec/matchers/expecteds_for_multiple_diffs.rb 1970-01-01
01:00:00.000000000 +0100
@@ -1,82 +0,0 @@
-module RSpec
- module Matchers
- # @api private
- # Handles list of expected values when there is a need to render
- # multiple diffs. Also can handle one value.
- class ExpectedsForMultipleDiffs
- # @private
- # Default diff label when there is only one matcher in diff
- # output
- DEFAULT_DIFF_LABEL = "Diff:".freeze
-
- # @private
- # Maximum readable matcher description length
- DESCRIPTION_MAX_LENGTH = 65
-
- def initialize(expected_list)
- @expected_list = expected_list
- end
-
- # @api private
- # Wraps provided expected value in instance of
- # ExpectedForMultipleDiffs. If provided value is already an
- # ExpectedForMultipleDiffs then it just returns it.
- # @param [Any] expected value to be wrapped
- # @return [RSpec::Matchers::ExpectedsForMultipleDiffs]
- def self.from(expected)
- return expected if self === expected
- new([[expected, DEFAULT_DIFF_LABEL]])
- end
-
- # @api private
- # Wraps provided matcher list in instance of
- # ExpectedForMultipleDiffs.
- # @param [Array<Any>] matchers list of matchers to wrap
- # @return [RSpec::Matchers::ExpectedsForMultipleDiffs]
- def self.for_many_matchers(matchers)
- new(matchers.map { |m| [m.expected, diff_label_for(m)] })
- end
-
- # @api private
- # Returns message with diff(s) appended for provided differ
- # factory and actual value if there are any
- # @param [String] message original failure message
- # @param [Proc] differ
- # @param [Any] actual value
- # @return [String]
- def message_with_diff(message, differ, actual)
- diff = diffs(differ, actual)
- message = "#{message}\n#{diff}" unless diff.empty?
- message
- end
-
- private
-
- class << self
- private
-
- def diff_label_for(matcher)
- "Diff for
(#{truncated(RSpec::Support::ObjectFormatter.format(matcher))}):"
- end
-
- def truncated(description)
- return description if description.length <= DESCRIPTION_MAX_LENGTH
- description[0...DESCRIPTION_MAX_LENGTH - 3] << "..."
- end
- end
-
- def diffs(differ, actual)
- @expected_list.map do |(expected, diff_label)|
- diff = differ.diff(actual, expected)
- next if diff.strip.empty?
- if diff == "\e[0m\n\e[0m"
- "#{diff_label}\n" \
- " <The diff is empty, are your objects producing identical
`#inspect` output?>"
- else
- "#{diff_label}#{diff}"
- end
- end.compact.join("\n")
- end
- end
- end
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rspec/matchers/matcher_delegator.rb
new/lib/rspec/matchers/matcher_delegator.rb
--- old/lib/rspec/matchers/matcher_delegator.rb 2023-04-20 09:31:54.000000000
+0200
+++ new/lib/rspec/matchers/matcher_delegator.rb 2024-06-13 16:46:02.000000000
+0200
@@ -1,8 +1,34 @@
module RSpec
module Matchers
+ # Provides a base class with as little methods as possible, so that
+ # most methods can be delegated via `method_missing`.
+ #
+ # On Ruby 2.0+ BasicObject could be used for this purpose, but it
+ # introduce some extra complexity with constant resolution, so the
+ # BlankSlate pattern was prefered.
+ # @private
+ class BaseDelegator
+ kept_methods = [
+ # Methods that raise warnings if removed.
+ :__id__, :__send__, :object_id,
+
+ # Methods that are explicitly undefined in some subclasses.
+ :==, :===,
+
+ # Methods we keep on purpose.
+ :class, :respond_to?, :__method__, :method, :dup,
+ :clone, :initialize_dup, :initialize_copy, :initialize_clone,
+ ]
+ instance_methods.each do |method|
+ unless kept_methods.include?(method.to_sym)
+ undef_method(method)
+ end
+ end
+ end
+
# Provides the necessary plumbing to wrap a matcher with a decorator.
# @private
- class MatcherDelegator
+ class MatcherDelegator < BaseDelegator
include Composable
attr_reader :base_matcher
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rspec/matchers/multi_matcher_diff.rb
new/lib/rspec/matchers/multi_matcher_diff.rb
--- old/lib/rspec/matchers/multi_matcher_diff.rb 1970-01-01
01:00:00.000000000 +0100
+++ new/lib/rspec/matchers/multi_matcher_diff.rb 2024-06-13
16:46:02.000000000 +0200
@@ -0,0 +1,82 @@
+module RSpec
+ module Matchers
+ # @api private
+ # Handles list of expected and actual value pairs when there is a need
+ # to render multiple diffs. Also can handle one pair.
+ class MultiMatcherDiff
+ # @private
+ # Default diff label when there is only one matcher in diff
+ # output
+ DEFAULT_DIFF_LABEL = "Diff:".freeze
+
+ # @private
+ # Maximum readable matcher description length
+ DESCRIPTION_MAX_LENGTH = 65
+
+ def initialize(expected_list)
+ @expected_list = expected_list
+ end
+
+ # @api private
+ # Wraps provided expected value in instance of
+ # MultiMatcherDiff. If provided value is already an
+ # MultiMatcherDiff then it just returns it.
+ # @param [Any] expected value to be wrapped
+ # @param [Any] actual value
+ # @return [RSpec::Matchers::MultiMatcherDiff]
+ def self.from(expected, actual)
+ return expected if self === expected
+ new([[expected, DEFAULT_DIFF_LABEL, actual]])
+ end
+
+ # @api private
+ # Wraps provided matcher list in instance of
+ # MultiMatcherDiff.
+ # @param [Array<Any>] matchers list of matchers to wrap
+ # @return [RSpec::Matchers::MultiMatcherDiff]
+ def self.for_many_matchers(matchers)
+ new(matchers.map { |m| [m.expected, diff_label_for(m), m.actual] })
+ end
+
+ # @api private
+ # Returns message with diff(s) appended for provided differ
+ # factory and actual value if there are any
+ # @param [String] message original failure message
+ # @param [Proc] differ
+ # @return [String]
+ def message_with_diff(message, differ)
+ diff = diffs(differ)
+ message = "#{message}\n#{diff}" unless diff.empty?
+ message
+ end
+
+ private
+
+ class << self
+ private
+
+ def diff_label_for(matcher)
+ "Diff for
(#{truncated(RSpec::Support::ObjectFormatter.format(matcher))}):"
+ end
+
+ def truncated(description)
+ return description if description.length <= DESCRIPTION_MAX_LENGTH
+ description[0...DESCRIPTION_MAX_LENGTH - 3] << "..."
+ end
+ end
+
+ def diffs(differ)
+ @expected_list.map do |(expected, diff_label, actual)|
+ diff = differ.diff(actual, expected)
+ next if diff.strip.empty?
+ if diff == "\e[0m\n\e[0m"
+ "#{diff_label}\n" \
+ " <The diff is empty, are your objects producing identical
`#inspect` output?>"
+ else
+ "#{diff_label}#{diff}"
+ end
+ end.compact.join("\n")
+ end
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rspec/matchers.rb new/lib/rspec/matchers.rb
--- old/lib/rspec/matchers.rb 2023-04-20 09:31:54.000000000 +0200
+++ new/lib/rspec/matchers.rb 2024-06-13 16:46:02.000000000 +0200
@@ -10,7 +10,7 @@
dsl
matcher_delegator
aliased_matcher
- expecteds_for_multiple_diffs
+ multi_matcher_diff
].each { |file| RSpec::Support.require_rspec_matchers(file) }
# RSpec's top level namespace. All of rspec-expectations is contained
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2023-04-20 09:31:54.000000000 +0200
+++ new/metadata 2024-06-13 16:46:02.000000000 +0200
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: rspec-expectations
version: !ruby/object:Gem::Version
- version: 3.12.3
+ version: 3.13.1
platform: ruby
authors:
- Steven Baker
@@ -45,7 +45,7 @@
ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
F3MdtaDehhjC
-----END CERTIFICATE-----
-date: 2023-04-20 00:00:00.000000000 Z
+date: 2024-06-13 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: rspec-support
@@ -53,14 +53,14 @@
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: 3.12.0
+ version: 3.13.0
type: :runtime
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: 3.12.0
+ version: 3.13.0
- !ruby/object:Gem::Dependency
name: diff-lcs
requirement: !ruby/object:Gem::Requirement
@@ -193,17 +193,17 @@
- lib/rspec/matchers/composable.rb
- lib/rspec/matchers/dsl.rb
- lib/rspec/matchers/english_phrasing.rb
-- lib/rspec/matchers/expecteds_for_multiple_diffs.rb
- lib/rspec/matchers/fail_matchers.rb
- lib/rspec/matchers/generated_descriptions.rb
- lib/rspec/matchers/matcher_delegator.rb
- lib/rspec/matchers/matcher_protocol.rb
+- lib/rspec/matchers/multi_matcher_diff.rb
homepage: https://github.com/rspec/rspec-expectations
licenses:
- MIT
metadata:
bug_tracker_uri: https://github.com/rspec/rspec-expectations/issues
- changelog_uri:
https://github.com/rspec/rspec-expectations/blob/v3.12.3/Changelog.md
+ changelog_uri:
https://github.com/rspec/rspec-expectations/blob/v3.13.1/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.26
signing_key:
specification_version: 4
-summary: rspec-expectations-3.12.3
+summary: rspec-expectations-3.13.1
test_files: []
Binary files old/metadata.gz.sig and new/metadata.gz.sig differ