Hello community,

here is the log from the commit of package rubygem-rspec-core for 
openSUSE:Factory checked in at 2016-09-14 23:31:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-rspec-core (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-rspec-core.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-rspec-core"

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-rspec-core/rubygem-rspec-core.changes    
2016-08-17 11:59:56.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-rspec-core.new/rubygem-rspec-core.changes   
    2016-09-14 23:31:32.000000000 +0200
@@ -1,0 +2,20 @@
+Sat Sep  3 04:45:14 UTC 2016 - co...@suse.com
+
+- updated to version 3.5.3
+ see installed Changelog.md
+
+  ### 3.5.3 / 2016-09-02
+  [Full Changelog](http://github.com/rspec/rspec-core/compare/v3.5.2...v3.5.3)
+  
+  Bug Fixes:
+  
+  * When applying shared group metadata to a host group, overwrite
+    conflicting keys if the value in the host group was inherited from
+    a parent group instead of being specified at that level.
+    (Myron Marston, #2307)
+  * Handle errors in `:suite` hooks and provide the same nicely formatted
+    output as errors that happen in examples. (Myron Marston, #2316)
+  * Set the exit status to non-zero when an error occurs in an
+    `after(:context)` hook. (Myron Marston, #2320)
+
+-------------------------------------------------------------------

Old:
----
  rspec-core-3.5.2.gem

New:
----
  rspec-core-3.5.3.gem

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

Other differences:
------------------
++++++ rubygem-rspec-core.spec ++++++
--- /var/tmp/diff_new_pack.oJTxA1/_old  2016-09-14 23:31:33.000000000 +0200
+++ /var/tmp/diff_new_pack.oJTxA1/_new  2016-09-14 23:31:33.000000000 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-rspec-core
-Version:        3.5.2
+Version:        3.5.3
 Release:        0
 %define mod_name rspec-core
 %define mod_full_name %{mod_name}-%{version}

++++++ rspec-core-3.5.2.gem -> rspec-core-3.5.3.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Changelog.md new/Changelog.md
--- old/Changelog.md    2016-07-28 16:27:01.000000000 +0200
+++ new/Changelog.md    2016-09-02 14:31:34.000000000 +0200
@@ -1,3 +1,17 @@
+### 3.5.3 / 2016-09-02
+[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.5.2...v3.5.3)
+
+Bug Fixes:
+
+* When applying shared group metadata to a host group, overwrite
+  conflicting keys if the value in the host group was inherited from
+  a parent group instead of being specified at that level.
+  (Myron Marston, #2307)
+* Handle errors in `:suite` hooks and provide the same nicely formatted
+  output as errors that happen in examples. (Myron Marston, #2316)
+* Set the exit status to non-zero when an error occurs in an
+  `after(:context)` hook. (Myron Marston, #2320)
+
 ### 3.5.2 / 2016-07-28
 [Full Changelog](http://github.com/rspec/rspec-core/compare/v3.5.1...v3.5.2)
 
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
Files old/checksums.yaml.gz.sig and new/checksums.yaml.gz.sig differ
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 2016-07-28 16:27:01.000000000 +0200
+++ new/lib/rspec/core/configuration.rb 2016-09-02 14:31:34.000000000 +0200
@@ -1830,12 +1830,11 @@
       def with_suite_hooks
         return yield if dry_run?
 
-        hook_context = SuiteHookContext.new
         begin
-          run_hooks_with(@before_suite_hooks, hook_context)
+          run_suite_hooks("a `before(:suite)` hook", @before_suite_hooks)
           yield
         ensure
-          run_hooks_with(@after_suite_hooks, hook_context)
+          run_suite_hooks("an `after(:suite)` hook", @after_suite_hooks)
         end
       end
 
@@ -1875,8 +1874,16 @@
         yield
       end
 
-      def run_hooks_with(hooks, hook_context)
-        hooks.each { |h| h.run(hook_context) }
+      def run_suite_hooks(hook_description, hooks)
+        context = SuiteHookContext.new(hook_description, reporter)
+
+        hooks.each do |hook|
+          begin
+            hook.run(context)
+          rescue Support::AllExceptionsExceptOnesWeMustNotRescue => ex
+            context.set_exception(ex)
+          end
+        end
       end
 
       def get_files_to_run(paths)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rspec/core/example.rb 
new/lib/rspec/core/example.rb
--- old/lib/rspec/core/example.rb       2016-07-28 16:27:01.000000000 +0200
+++ new/lib/rspec/core/example.rb       2016-09-02 14:31:34.000000000 +0200
@@ -632,16 +632,16 @@
     # @private
     # Provides an execution context for before/after :suite hooks.
     class SuiteHookContext < Example
-      def initialize
-        super(AnonymousExampleGroup, "", {})
+      def initialize(hook_description, reporter)
+        super(AnonymousExampleGroup, hook_description, {})
         @example_group_instance = AnonymousExampleGroup.new
+        @reporter = reporter
       end
 
       # rubocop:disable Style/AccessorMethodName
-
-      # To ensure we don't silence errors.
       def set_exception(exception)
-        raise exception
+        reporter.notify_non_example_exception(exception, "An error occurred in 
#{description}.")
+        RSpec.world.wants_to_quit = true
       end
       # rubocop:enable Style/AccessorMethodName
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rspec/core/example_group.rb 
new/lib/rspec/core/example_group.rb
--- old/lib/rspec/core/example_group.rb 2016-07-28 16:27:01.000000000 +0200
+++ new/lib/rspec/core/example_group.rb 2016-09-02 14:31:34.000000000 +0200
@@ -415,10 +415,10 @@
         # not be applied where they should.
         registration_collection << self
 
-        user_metadata = Metadata.build_hash_from(args)
+        @user_metadata = Metadata.build_hash_from(args)
 
         @metadata = Metadata::ExampleGroupHash.create(
-          superclass_metadata, user_metadata,
+          superclass_metadata, @user_metadata,
           superclass.method(:next_runnable_index_for),
           description, *args, &example_group_block
         )
@@ -705,8 +705,8 @@
 
       # @private
       def self.update_inherited_metadata(updates)
-        metadata.update(updates) do |_key, existing_group_value, 
_new_inherited_value|
-          existing_group_value
+        metadata.update(updates) do |key, existing_group_value, 
new_inherited_value|
+          @user_metadata.key?(key) ? existing_group_value : new_inherited_value
         end
 
         RSpec.configuration.configure_group(self)
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        2016-07-28 
16:27:01.000000000 +0200
+++ new/lib/rspec/core/formatters/exception_presenter.rb        2016-09-02 
14:31:35.000000000 +0200
@@ -122,7 +122,8 @@
         end
 
         def indent_lines(lines, failure_number)
-          alignment_basis = "#{' ' * @indentation}#{failure_number}) "
+          alignment_basis = ' ' * @indentation
+          alignment_basis <<  "#{failure_number}) " if failure_number
           indentation = ' ' * alignment_basis.length
 
           lines.each_with_index.map do |line, index|
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rspec/core/hooks.rb new/lib/rspec/core/hooks.rb
--- old/lib/rspec/core/hooks.rb 2016-07-28 16:27:01.000000000 +0200
+++ new/lib/rspec/core/hooks.rb 2016-09-02 14:31:35.000000000 +0200
@@ -365,14 +365,7 @@
         def run(example)
           example.instance_exec(example, &block)
         rescue Support::AllExceptionsExceptOnesWeMustNotRescue => e
-          # TODO: Come up with a better solution for this.
-          RSpec.configuration.reporter.message <<-EOS
-
-An error occurred in an `after(:context)` hook.
-  #{e.class}: #{e.message}
-  occurred at #{e.backtrace.first}
-
-EOS
+          RSpec.configuration.reporter.notify_non_example_exception(e, "An 
error occurred in an `after(:context)` hook.")
         end
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rspec/core/metadata.rb 
new/lib/rspec/core/metadata.rb
--- old/lib/rspec/core/metadata.rb      2016-07-28 16:27:01.000000000 +0200
+++ new/lib/rspec/core/metadata.rb      2016-09-02 14:31:35.000000000 +0200
@@ -178,6 +178,7 @@
 
         def build_description_from(parent_description=nil, my_description=nil)
           return parent_description.to_s unless my_description
+          return my_description.to_s if parent_description.to_s == ''
           separator = description_separator(parent_description, my_description)
           (parent_description.to_s + separator) << my_description.to_s
         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 2016-07-28 16:27:01.000000000 +0200
+++ new/lib/rspec/core/notifications.rb 2016-09-02 14:31:35.000000000 +0200
@@ -51,8 +51,7 @@
                   FailedExampleNotification
                 end
 
-        exception_presenter = 
Formatters::ExceptionPresenter::Factory.new(example).build
-        klass.new(example, exception_presenter)
+        klass.new(example)
       end
 
       private_class_method :new
@@ -202,7 +201,7 @@
 
     private
 
-      def initialize(example, exception_presenter)
+      def initialize(example, 
exception_presenter=Formatters::ExceptionPresenter::Factory.new(example).build)
         @exception_presenter = exception_presenter
         super(example)
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rspec/core/reporter.rb 
new/lib/rspec/core/reporter.rb
--- old/lib/rspec/core/reporter.rb      2016-07-28 16:27:01.000000000 +0200
+++ new/lib/rspec/core/reporter.rb      2016-09-02 14:31:35.000000000 +0200
@@ -152,6 +152,18 @@
     end
 
     # @private
+    # Provides a way to notify of an exception that is not tied to any
+    # particular exception (such as an exception encountered in a :suite hook).
+    # Exceptions will be formatted the same way they normally are.
+    def notify_non_example_exception(exception, context_description)
+      @configuration.world.non_example_failure = true
+
+      example = Example.new(AnonymousExampleGroup, context_description, {})
+      presenter = Formatters::ExceptionPresenter.new(exception, example, 
:indentation => 0)
+      message presenter.fully_formatted(nil)
+    end
+
+    # @private
     def finish
       close_after do
         stop
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        2016-07-28 16:27:01.000000000 +0200
+++ new/lib/rspec/core/runner.rb        2016-09-02 14:31:35.000000000 +0200
@@ -108,11 +108,13 @@
       #   or the configured failure exit code (1 by default) if specs
       #   failed.
       def run_specs(example_groups)
-        @configuration.reporter.report(@world.example_count(example_groups)) 
do |reporter|
+        success = 
@configuration.reporter.report(@world.example_count(example_groups)) do 
|reporter|
           @configuration.with_suite_hooks do
-            example_groups.map { |g| g.run(reporter) }.all? ? 0 : 
@configuration.failure_exit_code
+            example_groups.map { |g| g.run(reporter) }.all?
           end
-        end
+        end && !@world.non_example_failure
+
+        success ? 0 : @configuration.failure_exit_code
       end
 
     private
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       2016-07-28 16:27:01.000000000 +0200
+++ new/lib/rspec/core/version.rb       2016-09-02 14:31:35.000000000 +0200
@@ -3,7 +3,7 @@
     # Version information for RSpec Core.
     module Version
       # Current version of RSpec Core, in semantic versioning format.
-      STRING = '3.5.2'
+      STRING = '3.5.3'
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rspec/core/world.rb new/lib/rspec/core/world.rb
--- old/lib/rspec/core/world.rb 2016-07-28 16:27:01.000000000 +0200
+++ new/lib/rspec/core/world.rb 2016-09-02 14:31:35.000000000 +0200
@@ -10,6 +10,12 @@
       # Used internally to determine what to do when a SIGINT is received.
       attr_accessor :wants_to_quit
 
+      # Used internally to signal that a failure outside of an example
+      # has occurred, and that therefore the exit status should indicate
+      # the run failed.
+      # @private
+      attr_accessor :non_example_failure
+
       def initialize(configuration=RSpec.configuration)
         @configuration = configuration
         configuration.world = self
@@ -224,6 +230,9 @@
       # @private
       # Provides a null implementation for initial use by configuration.
       module Null
+        def self.non_example_failure; end
+        def self.non_example_failure=(_); end
+
         def self.registered_example_group_files
           []
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2016-07-28 16:27:01.000000000 +0200
+++ new/metadata        2016-09-02 14:31:34.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: rspec-core
 version: !ruby/object:Gem::Version
-  version: 3.5.2
+  version: 3.5.3
 platform: ruby
 authors:
 - Steven Baker
@@ -46,7 +46,7 @@
   ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
   F3MdtaDehhjC
   -----END CERTIFICATE-----
-date: 2016-07-28 00:00:00.000000000 Z
+date: 2016-09-02 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: rspec-support
@@ -283,6 +283,6 @@
 rubygems_version: 2.2.2
 signing_key: 
 specification_version: 4
-summary: rspec-core-3.5.2
+summary: rspec-core-3.5.3
 test_files: []
 has_rdoc: 
Files old/metadata.gz.sig and new/metadata.gz.sig differ


Reply via email to