Hello community, here is the log from the commit of package rubygem-cheetah for openSUSE:Factory checked in at 2020-01-16 18:12:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-cheetah (Old) and /work/SRC/openSUSE:Factory/.rubygem-cheetah.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-cheetah" Thu Jan 16 18:12:59 2020 rev:4 rq:761119 version:0.5.2 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-cheetah/rubygem-cheetah.changes 2019-10-23 15:35:25.605652433 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-cheetah.new.26092/rubygem-cheetah.changes 2020-01-16 18:13:01.820696152 +0100 @@ -1,0 +2,15 @@ +Mon Jan 6 12:32:16 UTC 2020 - Josef Reidinger <jreidin...@suse.com> + +- updated to version 0.5.2 + see installed CHANGELOG + + 0.5.2 (2020-01-06) + ------------------ + + * If listed in allowed_exitstatus, log exit code as Info, not as Error + (bsc#1153749) + * Added support for ruby 2.7 + + + +------------------------------------------------------------------- Old: ---- cheetah-0.5.1.gem New: ---- cheetah-0.5.2.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-cheetah.spec ++++++ --- /var/tmp/diff_new_pack.JQfN4u/_old 2020-01-16 18:13:02.596696592 +0100 +++ /var/tmp/diff_new_pack.JQfN4u/_new 2020-01-16 18:13:02.600696593 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-cheetah # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 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-cheetah -Version: 0.5.1 +Version: 0.5.2 Release: 0 %define mod_name cheetah %define mod_full_name %{mod_name}-%{version} ++++++ cheetah-0.5.1.gem -> cheetah-0.5.2.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG new/CHANGELOG --- old/CHANGELOG 2019-10-17 10:05:14.000000000 +0200 +++ new/CHANGELOG 2020-01-02 17:40:46.000000000 +0100 @@ -1,3 +1,10 @@ +0.5.2 (2020-01-06) +------------------ + +* If listed in allowed_exitstatus, log exit code as Info, not as Error + (bsc#1153749) +* Added support for ruby 2.7 + 0.5.1 (2019-10-16) ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/VERSION new/VERSION --- old/VERSION 2019-10-17 10:05:14.000000000 +0200 +++ new/VERSION 2020-01-02 17:40:46.000000000 +0100 @@ -1 +1 @@ -0.5.1 +0.5.2 Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/cheetah.rb new/lib/cheetah.rb --- old/lib/cheetah.rb 2019-10-17 10:05:14.000000000 +0200 +++ new/lib/cheetah.rb 2020-01-02 17:40:46.000000000 +0100 @@ -402,8 +402,12 @@ select_loop(streams, pipes, recorder) _pid, status = Process.wait2(pid) + # when more exit status are allowed, then redefine success as command + # not failed (bsc#1153749) + adapt_status(status, options) + begin - check_errors(commands, status, streams, streamed, options) + check_errors(commands, status, streams, streamed) ensure recorder.record_status(status) end @@ -413,6 +417,14 @@ private + def adapt_status(status, options) + return unless allowed_exitstatus?(options) + + status.define_singleton_method(:success?) do + options[:allowed_exitstatus].include?(exitstatus) + end + end + # Parts of Cheetah.run def with_env(env, &block) @@ -558,7 +570,7 @@ next if (0..2).include?(fd) # here we intentionally ignore some failures when fd close failed - # rubocop:disable Lint/HandleExceptions + # rubocop:disable Lint/SuppressedException begin IO.new(fd).close # Ruby reserves some fds for its VM and it result in this exception @@ -566,7 +578,7 @@ # Ignore if close failed with invalid FD rescue Errno::EBADF end - # rubocop:enable Lint/HandleExceptions + # rubocop:enable Lint/SuppressedException end end @@ -643,9 +655,8 @@ end end - def check_errors(commands, status, streams, streamed, options) + def check_errors(commands, status, streams, streamed) return if status.success? - return if options[:allowed_exitstatus].include?(status.exitstatus) stderr_part = if streamed[:stderr] " (error output streamed away)" @@ -678,8 +689,7 @@ [streams[:stdout].string, streams[:stderr].string] end - # do not capture only for empty array or nil converted to empty array - if !options[:allowed_exitstatus].is_a?(Array) || !options[:allowed_exitstatus].empty? + if allowed_exitstatus?(options) if res.nil? res = status.exitstatus else @@ -691,6 +701,11 @@ res end + def allowed_exitstatus?(options) + # more exit status allowed for non array or non empty array + !options[:allowed_exitstatus].is_a?(Array) || !options[:allowed_exitstatus].empty? + end + def format_commands(commands) '"' + commands.map { |c| Shellwords.join(c) }.join(" | ") + '"' end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2019-10-17 10:05:14.000000000 +0200 +++ new/metadata 2020-01-06 13:02:25.000000000 +0100 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: cheetah version: !ruby/object:Gem::Version - version: 0.5.1 + version: 0.5.2 platform: ruby authors: - David Majda autorequire: bindir: bin cert_chain: [] -date: 2019-10-17 00:00:00.000000000 Z +date: 2020-01-06 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: abstract_method @@ -84,7 +84,8 @@ - !ruby/object:Gem::Version version: '0' requirements: [] -rubygems_version: 3.0.3 +rubyforge_project: +rubygems_version: 2.7.6.2 signing_key: specification_version: 4 summary: Your swiss army knife for executing external commands in Ruby safely and