Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-logging for openSUSE:Factory 
checked in at 2022-08-07 18:33:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-logging (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-logging.new.1521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-logging"

Sun Aug  7 18:33:52 2022 rev:3 rq:993496 version:2.3.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-logging/rubygem-logging.changes  
2020-10-05 19:32:08.740953794 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-logging.new.1521/rubygem-logging.changes    
    2022-08-07 18:33:58.585160986 +0200
@@ -1,0 +2,13 @@
+Thu Aug  4 13:17:39 UTC 2022 - Stephan Kulow <[email protected]>
+
+updated to version 2.3.1
+ see installed History.txt
+
+  == 2.3.1 / 2022-05-24
+  
+  Bug Fixes
+  - logging hangs on JRuby when the stdout appender is closed [PR #237]
+  - initialize the Logging framework when a Filter is created [PR #238]
+  
+
+-------------------------------------------------------------------

Old:
----
  logging-2.3.0.gem

New:
----
  logging-2.3.1.gem

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

Other differences:
------------------
++++++ rubygem-logging.spec ++++++
--- /var/tmp/diff_new_pack.jYh8Uy/_old  2022-08-07 18:33:59.401163358 +0200
+++ /var/tmp/diff_new_pack.jYh8Uy/_new  2022-08-07 18:33:59.405163369 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-logging
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 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-logging
-Version:        2.3.0
+Version:        2.3.1
 Release:        0
 %define mod_name logging
 %define mod_full_name %{mod_name}-%{version}

++++++ logging-2.3.0.gem -> logging-2.3.1.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/History.txt new/History.txt
--- old/History.txt     2020-07-05 00:22:10.000000000 +0200
+++ new/History.txt     2022-05-24 17:58:59.000000000 +0200
@@ -1,3 +1,9 @@
+== 2.3.1 / 2022-05-24
+
+Bug Fixes
+- logging hangs on JRuby when the stdout appender is closed [PR #237]
+- initialize the Logging framework when a Filter is created [PR #238]
+
 == 2.3.0 / 2020-07-04
 
 Enhancements
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/logging/appenders/console.rb 
new/lib/logging/appenders/console.rb
--- old/lib/logging/appenders/console.rb        2020-07-05 00:22:10.000000000 
+0200
+++ new/lib/logging/appenders/console.rb        2022-05-24 17:58:59.000000000 
+0200
@@ -37,10 +37,7 @@
     # is currently open then it will be closed and immediately reopened.
     def reopen
       @mutex.synchronize {
-        if defined? @io && @io
-          flush
-          @io.close rescue nil
-        end
+        flush if defined? @io && @io
         @io = open_fd
       }
       super
@@ -51,20 +48,13 @@
 
     def open_fd
       case self.class.name
-      when "Logging::Appenders::Stdout"
-        fd = STDOUT.fileno
-        encoding = STDOUT.external_encoding
-      when "Logging::Appenders::Stderr"
-        fd = STDERR.fileno
-        encoding = STDERR.external_encoding
+      when "Logging::Appenders::Stdout"; STDOUT
+      when "Logging::Appenders::Stderr"; STDERR
       else
         raise RuntimeError, "Please do not use the 
`Logging::Appenders::Console` class directly - " +
                             "use `Logging::Appenders::Stdout` and 
`Logging::Appenders::Stderr` instead" +
                             " [class #{self.class.name}]"
       end
-
-      mode = ::File::WRONLY | ::File::APPEND
-      ::IO.for_fd(fd, mode: mode, encoding: encoding)
     end
   end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/logging/appenders/io.rb 
new/lib/logging/appenders/io.rb
--- old/lib/logging/appenders/io.rb     2020-07-05 00:22:10.000000000 +0200
+++ new/lib/logging/appenders/io.rb     2022-05-24 17:58:59.000000000 +0200
@@ -48,7 +48,7 @@
       super
 
       io, @io = @io, nil
-      unless [STDIN, STDERR, STDOUT].include?(io)
+      if ![STDIN, STDERR, STDOUT].include?(io)
         io.send(@close_method) if @close_method && 
io.respond_to?(@close_method)
       end
     rescue IOError
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/logging/filter.rb new/lib/logging/filter.rb
--- old/lib/logging/filter.rb   2020-07-05 00:22:10.000000000 +0200
+++ new/lib/logging/filter.rb   2022-05-24 17:58:59.000000000 +0200
@@ -8,10 +8,17 @@
   # Otherwise the `allow` method should return `nil`.
   class Filter
 
-    # Returns the event if it should be allowed into the log. Returns `nil` if
-    # the event should _not_ be allowed into the log. Subclasses should 
override
-    # this method and provide their own filtering semantics.
-    def allow( event )
+    # Creates a new level filter that will pass all log events. Create a
+    # subclass and override the `allow` method to filter log events.
+    def initialize
+      ::Logging.init unless ::Logging.initialized?
+    end
+
+    # Returns the event if it should be forwarded to the logging appender.
+    # Returns `nil` if the event should _not_ be forwarded to the logging
+    # appender. Subclasses should override this method and provide their own
+    # filtering semantics.
+    def allow(event)
       event
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/logging/filters/level.rb 
new/lib/logging/filters/level.rb
--- old/lib/logging/filters/level.rb    2020-07-05 00:22:10.000000000 +0200
+++ new/lib/logging/filters/level.rb    2022-05-24 17:58:59.000000000 +0200
@@ -4,8 +4,7 @@
   module Filters
 
     # The `Level` filter class provides a simple level-based filtering 
mechanism
-    # that filters messages to only include those from an enumerated list of
-    # levels to log.
+    # that allows events whose log level matches a preconfigured list of 
values.
     class Level < ::Logging::Filter
 
       # Creates a new level filter that will only allow the given _levels_ to
@@ -15,15 +14,19 @@
       # Examples
       #     Logging::Filters::Level.new(:debug, :info)
       #
-      def initialize( *levels )
-        levels  = levels.map { |level| ::Logging::level_num(level) }
-        @levels = Set.new levels
+      def initialize(*levels)
+        super()
+        levels  = levels.flatten.map {|level| ::Logging::level_num(level)}
+        @levels = Set.new(levels)
       end
 
-      def allow( event )
+      # Returns the event if it should be forwarded to the logging appender.
+      # Otherwise, `nil` is returned. The log event is allowed if the
+      # `event.level` matches one of the levels provided to the filter when it
+      # was constructred.
+      def allow(event)
         @levels.include?(event.level) ? event : nil
       end
-
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/logging/filters.rb new/lib/logging/filters.rb
--- old/lib/logging/filters.rb  2020-07-05 00:22:10.000000000 +0200
+++ new/lib/logging/filters.rb  2022-05-24 17:58:59.000000000 +0200
@@ -1,4 +1,4 @@
 module Logging
   module Filters ; end
   require libpath('logging/filters/level')
-end
\ No newline at end of file
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/logging/log_event.rb new/lib/logging/log_event.rb
--- old/lib/logging/log_event.rb        2020-07-05 00:22:10.000000000 +0200
+++ new/lib/logging/log_event.rb        2022-05-24 17:58:59.000000000 +0200
@@ -12,7 +12,8 @@
     # * $3 == method name (might be nil)
     CALLER_RGXP = %r/([-\.\/\(\)\w]+):(\d+)(?::in `([^']+)')?/o
     #CALLER_INDEX = 2
-    CALLER_INDEX = ((defined? JRUBY_VERSION and JRUBY_VERSION > '1.6') or 
(defined? RUBY_ENGINE and RUBY_ENGINE[%r/^rbx/i])) ? 1 : 2
+    CALLER_INDEX = ((defined?(JRUBY_VERSION) && JRUBY_VERSION > '1.6' && 
JRUBY_VERSION < '9.0') ||
+                    (defined?(RUBY_ENGINE) && RUBY_ENGINE[%r/^rbx/i])) ? 1 : 2
     # :startdoc:
 
     attr_accessor :logger, :level, :data, :time, :file, :line, :method_name
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/logging/version.rb new/lib/logging/version.rb
--- old/lib/logging/version.rb  2020-07-05 00:22:10.000000000 +0200
+++ new/lib/logging/version.rb  2022-05-24 17:58:59.000000000 +0200
@@ -1,5 +1,5 @@
 module Logging
-  VERSION = "2.3.0".freeze
+  VERSION = "2.3.1".freeze
 
   # Returns the version string for the library.
   def self.version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2020-07-05 00:22:10.000000000 +0200
+++ new/metadata        2022-05-24 17:58:59.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: logging
 version: !ruby/object:Gem::Version
-  version: 2.3.0
+  version: 2.3.1
 platform: ruby
 authors:
 - Tim Pease
 autorequire:
 bindir: bin
 cert_chain: []
-date: 2020-07-04 00:00:00.000000000 Z
+date: 2022-05-24 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: little-plugger
@@ -72,14 +72,14 @@
     requirements:
     - - ">="
       - !ruby/object:Gem::Version
-        version: 3.8.4
+        version: 3.8.5
   type: :development
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
     - - ">="
       - !ruby/object:Gem::Version
-        version: 3.8.4
+        version: 3.8.5
 description: |-
   **Logging** is a flexible logging library for use in Ruby programs based on 
the
   design of Java's log4j library. It features a hierarchical logging system,
@@ -196,7 +196,7 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubygems_version: 3.0.1
+rubygems_version: 3.3.7
 signing_key:
 specification_version: 4
 summary: A flexible and extendable logging library for Ruby
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/appenders/test_console.rb 
new/test/appenders/test_console.rb
--- old/test/appenders/test_console.rb  2020-07-05 00:22:10.000000000 +0200
+++ new/test/appenders/test_console.rb  2022-05-24 17:58:59.000000000 +0200
@@ -22,7 +22,7 @@
       assert_equal 'stdout', appender.name
 
       io = appender.instance_variable_get(:@io)
-      refute_same STDOUT, io
+      assert_same STDOUT, io
       assert_equal STDOUT.fileno, io.fileno
 
       appender = Logging.appenders.stdout('foo')
@@ -45,16 +45,16 @@
 
       appender.close
       assert appender.closed?
-      assert io.closed?
+      refute io.closed?
       refute STDOUT.closed?
 
       appender.reopen
       refute appender.closed?
 
       new_io = appender.instance_variable_get(:@io)
-      refute_same io, new_io
+      assert_same io, new_io
       refute new_io.closed?
-      assert io.closed?
+      refute io.closed?
     end
   end
 
@@ -68,8 +68,8 @@
       assert_equal 'stderr', appender.name
 
       io = appender.instance_variable_get(:@io)
-      refute_same STDERR, io
-      assert_same STDERR.fileno, io.fileno
+      assert_same STDERR, io
+      assert_equal STDERR.fileno, io.fileno
 
       appender = Logging.appenders.stderr('foo')
       assert_equal 'foo', appender.name
@@ -91,16 +91,16 @@
 
       appender.close
       assert appender.closed?
-      assert io.closed?
+      refute io.closed?
       refute STDERR.closed?
 
       appender.reopen
       refute appender.closed?
 
       new_io = appender.instance_variable_get(:@io)
-      refute_same io, new_io
+      assert_same io, new_io
       refute new_io.closed?
-      assert io.closed?
+      refute io.closed?
     end
   end
 end

Reply via email to