Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-yast-rake for
openSUSE:Factory checked in at 2022-01-11 21:17:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-yast-rake (Old)
and /work/SRC/openSUSE:Factory/.rubygem-yast-rake.new.1892 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-yast-rake"
Tue Jan 11 21:17:15 2022 rev:37 rq:945438 version:0.2.44
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-yast-rake/rubygem-yast-rake.changes
2021-12-03 20:35:18.356243416 +0100
+++
/work/SRC/openSUSE:Factory/.rubygem-yast-rake.new.1892/rubygem-yast-rake.changes
2022-01-11 21:20:36.661015437 +0100
@@ -1,0 +2,6 @@
+Thu Jan 6 15:06:25 UTC 2022 - Ladislav Slez??k <[email protected]>
+
+- Support multiple Rubocop versions (bsc#1139270)
+- 0.2.44
+
+-------------------------------------------------------------------
Old:
----
yast-rake-0.2.43.gem
New:
----
yast-rake-0.2.44.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-yast-rake.spec ++++++
--- /var/tmp/diff_new_pack.Yt8COi/_old 2022-01-11 21:20:37.077015730 +0100
+++ /var/tmp/diff_new_pack.Yt8COi/_new 2022-01-11 21:20:37.081015733 +0100
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-yast-rake
#
-# Copyright (c) 2021 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
@@ -21,7 +21,7 @@
%define rb_build_ruby_abis %{rb_default_ruby_abi}
Name: rubygem-yast-rake
-Version: 0.2.43
+Version: 0.2.44
Release: 0
%define mod_name yast-rake
%define mod_full_name %{mod_name}-%{version}
++++++ yast-rake-0.2.43.gem -> yast-rake-0.2.44.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/VERSION new/VERSION
--- old/VERSION 2021-01-22 12:31:49.000000000 +0100
+++ new/VERSION 2021-01-22 12:31:49.000000000 +0100
@@ -1 +1 @@
-0.2.43
+0.2.44
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/tasks/rubocop.rake new/lib/tasks/rubocop.rake
--- old/lib/tasks/rubocop.rake 2021-01-22 12:31:49.000000000 +0100
+++ new/lib/tasks/rubocop.rake 2021-01-22 12:31:49.000000000 +0100
@@ -15,12 +15,24 @@
#
#++
+# the default old version used
+OLD_RUBOCOP_VERSION = "0.41.2"
+
+def rubocop_version
+ return @rubocop_version if @rubocop_version
+
+ @rubocop_version = if
File.read(".rubocop.yml").match(/rubocop-(\d+\.\d+\.\d+)/)
+ Regexp.last_match[1]
+ else
+ OLD_RUBOCOP_VERSION
+ end
+end
+
def rubocop_bin
return @rubocop_bin if @rubocop_bin
return @rubocop_bin = ENV["RUBOCOP_BIN"] if ENV["RUBOCOP_BIN"]
- version = File.read(".rubocop.yml").include?("rubocop-0.71.0") ? "0.71.0" :
"0.41.2"
- binary = `/usr/sbin/update-alternatives --list rubocop | grep
'#{version}'`.strip
+ binary = `/usr/sbin/update-alternatives --list rubocop | grep
'#{rubocop_version}'`.strip
if !system("which #{binary}")
raise "cannot find proper version of rubocop binary in " \
"'/usr/sbin/update-alternatives --list rubocop'." \
@@ -32,18 +44,26 @@
# run Rubocop in parallel
# @param params [String] optional Rubocop parameters
def run_rubocop(params = "")
- # how it works:
- # 1) get the list of inspected files by Rubocop
- # 2) shuffle it randomly (better would be evenly distribute them according to
- # the analysis complexity but that is hard to evaluate and even simply
- # distributing by file size turned out to be ineffective and slower than
- # a simple random shuffling)
- # 3) pass that as input for xargs
- # a) use -P with number of processors to run the commands in parallel
- # b) use -n to set the maximum number of files per process, this number
- # is computed to equally distribute the files across the workers
- sh "#{rubocop_bin} -L | sort -R | xargs -P`nproc` -n$(expr `#{rubocop_bin}
-L | wc -l` / " \
- "`nproc` + 1) #{rubocop_bin} #{params}"
+ # newer Rubocop versions support the "-P" ("--parallel") option,
+ # but that is not compatible with the "-a" ("--auto-correct") option
+ if rubocop_version != OLD_RUBOCOP_VERSION &&
!params.to_s.match(/-a|--auto-correct/)
+ sh "#{rubocop_bin} -P #{params}"
+ else
+ # for older Rubocop or auto-correct mode manually start multiple instances
in parallel
+ #
+ # how it works:
+ # 1) get the list of inspected files by Rubocop
+ # 2) shuffle it randomly (better would be evenly distribute them according
to
+ # the analysis complexity but that is hard to evaluate and even simply
+ # distributing by file size turned out to be ineffective and slower than
+ # a simple random shuffling)
+ # 3) pass that as input for xargs
+ # a) use -P with number of processors to run the commands in parallel
+ # b) use -n to set the maximum number of files per process, this number
+ # is computed to equally distribute the files across the workers
+ sh "#{rubocop_bin} -L | sort -R | xargs -P`nproc` -n$(expr `#{rubocop_bin}
-L | wc -l` / " \
+ "`nproc` + 1) #{rubocop_bin} #{params}"
+ end
end
namespace :check do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2021-11-29 22:14:13.000000000 +0100
+++ new/metadata 2022-01-10 23:55:49.000000000 +0100
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: yast-rake
version: !ruby/object:Gem::Version
- version: 0.2.43
+ version: 0.2.44
platform: ruby
authors:
- Josef Reidinger
autorequire:
bindir: bin
cert_chain: []
-date: 2021-11-29 00:00:00.000000000 Z
+date: 2022-01-10 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: packaging_rake_tasks