commit rubygem-rspec-core for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rubygem-rspec-core for openSUSE:Factory checked in at 2024-06-22 13:22:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-rspec-core (Old) and /work/SRC/openSUSE:Factory/.rubygem-rspec-core.new.18349 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rubygem-rspec-core" Sat Jun 22 13:22:47 2024 rev:34 rq:1169132 version:3.13.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-rspec-core/rubygem-rspec-core.changes 2023-11-15 21:07:16.465345947 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-rspec-core.new.18349/rubygem-rspec-core.changes 2024-06-22 13:23:18.682421128 +0200 @@ -1,0 +2,6 @@ +Fri Apr 19 09:12:49 UTC 2024 - Andreas Schneider <asn@cryptomilk.org> + +- Update to version 3.13.3 + See bundled Changelog.md + +------------------------------------------------------------------- Old: ---- rspec-core-3.12.2.gem New: ---- rspec-core-3.13.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-rspec-core.spec ++++++ --- /var/tmp/diff_new_pack.184YJR/_old 2024-06-22 13:23:20.282479634 +0200 +++ /var/tmp/diff_new_pack.184YJR/_new 2024-06-22 13:23:20.286479780 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-rspec-core # -# 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,10 +24,11 @@ # Name: rubygem-rspec-core -Version: 3.12.2 +Version: 3.13.0 Release: 0 %define mod_name rspec-core %define mod_full_name %{mod_name}-%{version} +BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: %{ruby >= 1.8.7} BuildRequires: %{rubygem gem2rpm} BuildRequires: %{rubygem rdoc > 3.10} @@ -38,6 +39,7 @@ Source1: gem2rpm.yml Summary: RSpec runner and formatters License: MIT +Group: Development/Languages/Ruby PreReq: update-alternatives %description ++++++ rspec-core-3.12.2.gem -> rspec-core-3.13.0.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Changelog.md new/Changelog.md --- old/Changelog.md 2023-04-18 22:36:02.000000000 +0200 +++ new/Changelog.md 2024-02-04 13:22:12.000000000 +0100 @@ -1,5 +1,30 @@ ### Development -[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.12.2...3-12-maintenance) +[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.12.3...main) + +### 3.13.0 / 2024-02-04 +[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.12.3...v3.13.0) + +Enhancements: + +* Support the `--backtrace` flag when using the JSON formatter. (Matt Larraz, #2980) +* Ignore commented out lines in CLI config files (e.g. `.rspec`). (Junichi Ito, #2984) +* Add `pending_failure_output` config option to allow skipping backtraces or + muting pending specs output. (Phil Pirozhkov, #2957) +* Process `--dry-run` before configuration flags that read files so that introspecting + it returns the correct value. (Xenor Chang, #3008) +* Allow specifying custom ordering strategies via `--order`. (Jon Rowe, #3025) +* Use the improved `syntax_suggest` output for `SyntaxError` when available. + (Richard Schneeman, #3015, #3026) +* Add config option (`RSpec::Core::Configuration#full_cause_backtrace`) to print the + entire backtrace of an exception cause. (David Taylor, #3046) + +### 3.12.3 / 2024-02-04 +[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.12.2...v3.12.3) + +Bug fixes: + +* Use `__send__` in output wrapper to avoid issues with IO objects that implement `send` + like `Socket`. (Richard Platel, #3045) ### 3.12.2 / 2023-04-18 [Full Changelog](http://github.com/rspec/rspec-core/compare/v3.12.1...v3.12.2) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2023-04-18 22:36:02.000000000 +0200 +++ new/README.md 2024-02-04 13:22:12.000000000 +0100 @@ -116,6 +116,11 @@ more accurate naming when you share hooks, `let` declarations, helper methods, etc, but no examples. +If you want to reuse shared examples or contexts across your RSpec suite you can +define them in a stand alone _*.rb_ files (_spec/support/shared_examples/definition.rb_ +for example). But you will have to manually `require` them (there is no autoloading of +_spec/support/_ directory unless you set it up yourself). + ## Metadata rspec-core stores a metadata hash with every example and group, which 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/core/configuration.rb new/lib/rspec/core/configuration.rb --- old/lib/rspec/core/configuration.rb 2023-04-18 22:36:02.000000000 +0200 +++ new/lib/rspec/core/configuration.rb 2024-02-04 13:22:12.000000000 +0100 @@ -453,11 +453,30 @@ add_setting :threadsafe # @macro add_setting - # Maximum count of failed source lines to display in the failure reports. - # (default `10`). + # Maximum count of failed source lines to display in the failure reports + # (defaults to `10`). # return [Integer] add_setting :max_displayed_failure_line_count + # @macro full_cause_backtrace + # Display the full backtrace of an exceptions cause (defaults to `false`). + # return [Boolean] + add_setting :full_cause_backtrace + + # @macro add_setting + # Format the output for pending examples. Can be set to: + # - :full (default) - pending examples appear similarly to failures + # - :no_backtrace - same as above, but with no backtrace + # - :skip - do not show the section at all + # return [Symbol] + add_read_only_setting :pending_failure_output + def pending_failure_output=(mode) + raise ArgumentError, + "`pending_failure_output` can be set to :full, :no_backtrace, " \ + "or :skip" unless [:full, :no_backtrace, :skip].include?(mode) + @pending_failure_output = mode + end + # Determines which bisect runner implementation gets used to run subsets # of the suite during a bisection. Your choices are: # @@ -557,8 +576,10 @@ @derived_metadata_blocks = FilterableItemRepository::QueryOptimized.new(:any?) @threadsafe = true @max_displayed_failure_line_count = 10 + @full_cause_backtrace = false @world = World::Null @shared_context_metadata_behavior = :trigger_inclusion + @pending_failure_output = :full define_built_in_hooks end @@ -2120,6 +2141,13 @@ suggestions = DidYouMean.new(relative_file).call reporter.notify_non_example_exception(ex, "An error occurred while loading #{relative_file}.#{suggestions}") RSpec.world.wants_to_quit = true + rescue SyntaxError => ex + relative_file = Metadata.relative_path(file) + reporter.notify_non_example_exception( + ex, + "While loading #{relative_file} a `raise SyntaxError` occurred, RSpec will now quit." + ) + RSpec.world.rspec_is_quitting = true rescue Support::AllExceptionsExceptOnesWeMustNotRescue => ex relative_file = Metadata.relative_path(file) reporter.notify_non_example_exception(ex, "An error occurred while loading #{relative_file}.") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/configuration_options.rb new/lib/rspec/core/configuration_options.rb --- old/lib/rspec/core/configuration_options.rb 2023-04-18 22:36:02.000000000 +0200 +++ new/lib/rspec/core/configuration_options.rb 2024-02-04 13:22:12.000000000 +0100 @@ -79,6 +79,10 @@ # deprecation (or otherwise access the reporter). :deprecation_stream, + # In order for `RSpec.configuration.dry_run?` to return `true` during + # processing the `requires` option, it must be parsed before it. + :dry_run, + # load paths depend on nothing, but must be set before `requires` # to support load-path-relative requires. :libs, @@ -169,7 +173,8 @@ def args_from_options_file(path) return [] unless path && File.exist?(path) config_string = options_file_as_erb_string(path) - FlatMap.flat_map(config_string.split(/\n+/), &:shellsplit) + config_lines = config_string.split(/\n+/).reject { |s| s =~ /\A\s*#/ } + FlatMap.flat_map(config_lines, &:shellsplit) end def options_file_as_erb_string(path) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/formatters/exception_presenter.rb new/lib/rspec/core/formatters/exception_presenter.rb --- old/lib/rspec/core/formatters/exception_presenter.rb 2023-04-18 22:36:02.000000000 +0200 +++ new/lib/rspec/core/formatters/exception_presenter.rb 2024-02-04 13:22:12.000000000 +0100 @@ -56,7 +56,12 @@ end unless last_cause.backtrace.nil? || last_cause.backtrace.empty? - cause << (" #{backtrace_formatter.format_backtrace(last_cause.backtrace, example.metadata).first}") + lines = backtrace_formatter.format_backtrace(last_cause.backtrace, example.metadata) + lines = [lines[0]] unless RSpec.configuration.full_cause_backtrace # rubocop:disable Metrics/BlockNesting + + lines.each do |line| + cause << (" #{line}") + end end end @@ -175,10 +180,22 @@ end # rubocop:disable Lint/RescueException - def exception_message_string(exception) - exception.message.to_s - rescue Exception => other - "A #{exception.class} for which `exception.message.to_s` raises #{other.class}." + if SyntaxError.instance_methods.include?(:detailed_message) + def exception_message_string(exception) + case exception + when SyntaxError then exception.detailed_message.to_s + else + exception.message.to_s + end + rescue Exception => other + "A #{exception.class} for which `exception.message.to_s` raises #{other.class}." + end + else + def exception_message_string(exception) + exception.message.to_s + rescue Exception => other + "A #{exception.class} for which `exception.message.to_s` raises #{other.class}." + end end # rubocop:enable Lint/RescueException @@ -312,10 +329,14 @@ ] } elsif @execution_result.status == :pending - { + options = { :message_color => RSpec.configuration.pending_color, :detail_formatter => PENDING_DETAIL_FORMATTER } + if RSpec.configuration.pending_failure_output == :no_backtrace + options[:backtrace_formatter] = EmptyBacktraceFormatter + end + options end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/formatters/json_formatter.rb new/lib/rspec/core/formatters/json_formatter.rb --- old/lib/rspec/core/formatters/json_formatter.rb 2023-04-18 22:36:02.000000000 +0200 +++ new/lib/rspec/core/formatters/json_formatter.rb 2024-02-04 13:22:12.000000000 +0100 @@ -32,15 +32,16 @@ @output_hash[:summary_line] = summary.totals_line end - def stop(notification) - @output_hash[:examples] = notification.examples.map do |example| - format_example(example).tap do |hash| - e = example.exception + def stop(group_notification) + @output_hash[:examples] = group_notification.notifications.map do |notification| + format_example(notification.example).tap do |hash| + e = notification.example.exception + if e - hash[:exception] = { + hash[:exception] = { :class => e.class.name, :message => e.message, - :backtrace => e.backtrace, + :backtrace => notification.formatted_backtrace, } end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/notifications.rb new/lib/rspec/core/notifications.rb --- old/lib/rspec/core/notifications.rb 2023-04-18 22:36:02.000000000 +0200 +++ new/lib/rspec/core/notifications.rb 2024-02-04 13:22:12.000000000 +0100 @@ -120,6 +120,8 @@ # @return [String] The list of pending examples, fully formatted in the # way that RSpec's built-in formatters emit. def fully_formatted_pending_examples(colorizer=::RSpec::Core::Formatters::ConsoleCodes) + return if RSpec.configuration.pending_failure_output == :skip + formatted = "\nPending: (Failures listed here are expected and do not affect your suite's status)\n".dup pending_notifications.each_with_index do |notification, index| diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/ordering.rb new/lib/rspec/core/ordering.rb --- old/lib/rspec/core/ordering.rb 2023-04-18 22:36:02.000000000 +0200 +++ new/lib/rspec/core/ordering.rb 2024-02-04 13:22:12.000000000 +0100 @@ -79,6 +79,30 @@ end # @private + # A strategy which delays looking up the ordering until needed + class Delayed + def initialize(registry, name) + @registry = registry + @name = name + end + + def order(list) + strategy.order(list) + end + + private + + def strategy + @strategy ||= lookup_strategy + end + + def lookup_strategy + raise "Undefined ordering strategy #{@name.inspect}" unless @registry.has_strategy?(@name) + @registry.fetch(@name) + end + end + + # @private # Stores the different ordering strategies. class Registry def initialize(configuration) @@ -99,6 +123,10 @@ @strategies.fetch(name, &fallback) end + def has_strategy?(name) + @strategies.key?(name) + end + def register(sym, strategy) @strategies[sym] = strategy end @@ -143,9 +171,20 @@ :defined elsif order == 'recently-modified' :recently_modified + else + order.to_sym end - register_ordering(:global, ordering_registry.fetch(ordering_name)) if ordering_name + if ordering_name + strategy = + if ordering_registry.has_strategy?(ordering_name) + ordering_registry.fetch(ordering_name) + else + Delayed.new(ordering_registry, ordering_name) + end + + register_ordering(:global, strategy) + end end def force(hash) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/output_wrapper.rb new/lib/rspec/core/output_wrapper.rb --- old/lib/rspec/core/output_wrapper.rb 2023-04-18 22:36:02.000000000 +0200 +++ new/lib/rspec/core/output_wrapper.rb 2024-02-04 13:22:12.000000000 +0100 @@ -15,13 +15,13 @@ end def method_missing(name, *args, &block) - output.send(name, *args, &block) + output.__send__(name, *args, &block) end # Redirect calls for IO interface methods IO.instance_methods(false).each do |method| define_method(method) do |*args, &block| - output.send(method, *args, &block) + output.__send__(method, *args, &block) end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/runner.rb new/lib/rspec/core/runner.rb --- old/lib/rspec/core/runner.rb 2023-04-18 22:36:02.000000000 +0200 +++ new/lib/rspec/core/runner.rb 2024-02-04 13:22:12.000000000 +0100 @@ -182,7 +182,11 @@ exit!(1) else RSpec.world.wants_to_quit = true - $stderr.puts "\nRSpec is shutting down and will print the summary report... Interrupt again to force quit." + + $stderr.puts( + "\nRSpec is shutting down and will print the summary report... Interrupt again to force quit " \ + "(warning: at_exit hooks will be skipped if you force quit)." + ) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/core/version.rb new/lib/rspec/core/version.rb --- old/lib/rspec/core/version.rb 2023-04-18 22:36:02.000000000 +0200 +++ new/lib/rspec/core/version.rb 2024-02-04 13:22:12.000000000 +0100 @@ -3,7 +3,7 @@ # Version information for RSpec Core. module Version # Current version of RSpec Core, in semantic versioning format. - STRING = '3.12.2' + STRING = '3.13.0' end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2023-04-18 22:36:02.000000000 +0200 +++ new/metadata 2024-02-04 13:22:12.000000000 +0100 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: rspec-core version: !ruby/object:Gem::Version - version: 3.12.2 + version: 3.13.0 platform: ruby authors: - Steven Baker @@ -46,7 +46,7 @@ ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ F3MdtaDehhjC -----END CERTIFICATE----- -date: 2023-04-18 00:00:00.000000000 Z +date: 2024-02-04 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rspec-support @@ -54,14 +54,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: cucumber requirement: !ruby/object:Gem::Requirement @@ -267,7 +267,7 @@ - MIT metadata: bug_tracker_uri: https://github.com/rspec/rspec-core/issues - changelog_uri: https://github.com/rspec/rspec-core/blob/v3.12.2/Changelog.md + changelog_uri: https://github.com/rspec/rspec-core/blob/v3.13.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-core @@ -290,5 +290,5 @@ rubygems_version: 3.4.10 signing_key: specification_version: 4 -summary: rspec-core-3.12.2 +summary: rspec-core-3.13.0 test_files: [] Binary files old/metadata.gz.sig and new/metadata.gz.sig differ
participants (1)
-
Source-Sync