Hello community,

here is the log from the commit of package rubygem-test-unit for 
openSUSE:Factory checked in at 2018-05-16 18:43:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-test-unit (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-test-unit.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-test-unit"

Wed May 16 18:43:16 2018 rev:32 rq:609083 version:3.2.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-test-unit/rubygem-test-unit.changes      
2017-12-20 10:40:15.293291397 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-test-unit.new/rubygem-test-unit.changes 
2018-05-16 18:44:49.896272965 +0200
@@ -1,0 +2,13 @@
+Wed May 16 08:20:18 UTC 2018 - factory-a...@kulow.org
+
+- updated to version 3.2.8
+ see installed news.md
+
+  ## 3.2.8 - 2018-05-13 {#version-3-2-8}
+  
+  ### Improvements
+  
+    * [UI][console]: Changed to put code snippet before backtrace on
+      reverse mode.
+
+-------------------------------------------------------------------

Old:
----
  test-unit-3.2.7.gem

New:
----
  test-unit-3.2.8.gem

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

Other differences:
------------------
++++++ rubygem-test-unit.spec ++++++
--- /var/tmp/diff_new_pack.Tm1hMK/_old  2018-05-16 18:44:50.444253162 +0200
+++ /var/tmp/diff_new_pack.Tm1hMK/_new  2018-05-16 18:44:50.448253017 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-test-unit
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # 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-test-unit
-Version:        3.2.7
+Version:        3.2.8
 Release:        0
 %define mod_name test-unit
 %define mod_full_name %{mod_name}-%{version}
@@ -36,7 +36,7 @@
 Source:         https://rubygems.org/gems/%{mod_full_name}.gem
 Source1:        gem2rpm.yml
 Summary:        An xUnit family unit testing framework for Ruby
-License:        Ruby and Python-2.0
+License:        Ruby AND Python-2.0
 Group:          Development/Languages/Ruby
 
 %description

++++++ test-unit-3.2.7.gem -> test-unit-3.2.8.gem ++++++
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doc/text/news.md new/doc/text/news.md
--- old/doc/text/news.md        2017-12-11 16:23:14.000000000 +0100
+++ new/doc/text/news.md        2018-05-13 04:09:16.000000000 +0200
@@ -1,5 +1,12 @@
 # News
 
+## 3.2.8 - 2018-05-13 {#version-3-2-8}
+
+### Improvements
+
+  * [UI][console]: Changed to put code snippet before backtrace on
+    reverse mode.
+
 ## 3.2.7 - 2017-12-12 {#version-3-2-7}
 
 ### Improvements
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/test/unit/ui/console/testrunner.rb 
new/lib/test/unit/ui/console/testrunner.rb
--- old/lib/test/unit/ui/console/testrunner.rb  2017-12-11 16:23:15.000000000 
+0100
+++ new/lib/test/unit/ui/console/testrunner.rb  2018-05-13 04:09:16.000000000 
+0200
@@ -225,27 +225,47 @@
           end
 
           def output_fault_backtrace(fault)
-            snippet_is_shown = false
             detector = FaultLocationDetector.new(fault, @code_snippet_fetcher)
             backtrace = fault.location
             # workaround for test-spec. :<
             # see also GitHub:#22
             backtrace ||= []
-            backtrace = backtrace.reverse if @reverse_output
+
+            code_snippet_backtrace_index = nil
+            code_snippet_lines = nil
             backtrace.each_with_index do |entry, i|
-              output(entry)
-              next if snippet_is_shown
               next unless detector.target?(entry)
               file, line_number, = detector.split_backtrace_entry(entry)
-              snippet_is_shown = output_code_snippet(file, line_number,
-                                                     fault_color(fault))
+              lines = fetch_code_snippet(file, line_number)
+              unless lines.empty?
+                code_snippet_backtrace_index = i
+                code_snippet_lines = lines
+                break
+              end
+            end
+
+            if @reverse_output
+              backtrace.each_with_index.reverse_each do |entry, i|
+                if i == code_snippet_backtrace_index
+                  output_code_snippet(code_snippet_lines, fault_color(fault))
+                end
+                output(entry)
+              end
+            else
+              backtrace.each_with_index do |entry, i|
+                output(entry)
+                if i == code_snippet_backtrace_index
+                  output_code_snippet(code_snippet_lines, fault_color(fault))
+                end
+              end
             end
           end
 
-          def output_code_snippet(file, line_number, target_line_color=nil)
-            lines = @code_snippet_fetcher.fetch(file, line_number)
-            return false if lines.empty?
+          def fetch_code_snippet(file, line_number)
+            @code_snippet_fetcher.fetch(file, line_number)
+          end
 
+          def output_code_snippet(lines, target_line_color=nil)
             max_n = lines.collect {|n, line, attributes| n}.max
             digits = (Math.log10(max_n) + 1).truncate
             lines.each do |n, line, attributes|
@@ -259,7 +279,6 @@
               output("  %2s %*d: %s" % [current_line_mark, digits, n, line],
                      line_color)
             end
-            true
           end
 
           def output_failure_message(failure)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/test/unit/util/procwrapper.rb 
new/lib/test/unit/util/procwrapper.rb
--- old/lib/test/unit/util/procwrapper.rb       2017-12-11 16:23:15.000000000 
+0100
+++ new/lib/test/unit/util/procwrapper.rb       2018-05-13 04:09:16.000000000 
+0200
@@ -31,10 +31,10 @@
 
         def ==(other)
           case(other)
-            when ProcWrapper
-              return @a_proc == other.to_proc
-            else
-              return super
+          when ProcWrapper
+            return @a_proc == other.to_proc
+          else
+            return super
           end
         end
         alias :eql? :==
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/test/unit/version.rb new/lib/test/unit/version.rb
--- old/lib/test/unit/version.rb        2017-12-11 16:23:15.000000000 +0100
+++ new/lib/test/unit/version.rb        2018-05-13 04:09:16.000000000 +0200
@@ -1,5 +1,5 @@
 module Test
   module Unit
-    VERSION = "3.2.7"
+    VERSION = "3.2.8"
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2017-12-11 16:23:14.000000000 +0100
+++ new/metadata        2018-05-13 04:09:15.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: test-unit
 version: !ruby/object:Gem::Version
-  version: 3.2.7
+  version: 3.2.8
 platform: ruby
 authors:
 - Kouhei Sutou
@@ -9,7 +9,7 @@
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2017-12-11 00:00:00.000000000 Z
+date: 2018-05-13 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: power_assert
@@ -231,7 +231,7 @@
       version: '0'
 requirements: []
 rubyforge_project: 
-rubygems_version: 2.5.2.1
+rubygems_version: 2.7.6
 signing_key: 
 specification_version: 4
 summary: An xUnit family unit testing framework for Ruby.


Reply via email to