Hello community, here is the log from the commit of package rubygem-yast-rake for openSUSE:Factory checked in at 2018-07-24 17:28:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-yast-rake (Old) and /work/SRC/openSUSE:Factory/.rubygem-yast-rake.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-yast-rake" Tue Jul 24 17:28:37 2018 rev:23 rq:624091 version:0.2.26 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-yast-rake/rubygem-yast-rake.changes 2018-06-19 11:53:25.228850405 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-yast-rake.new/rubygem-yast-rake.changes 2018-07-24 17:28:44.191785159 +0200 @@ -1,0 +2,8 @@ +Fri Jun 22 14:05:30 UTC 2018 - lsle...@suse.cz + +- Added "check:rubocop" and "check:rubocop:auto_correct" tasks + which run Rubocop in parallel (much faster that the traditional + sequential way) (bsc#1094875) +- 0.2.26 + +------------------------------------------------------------------- Old: ---- yast-rake-0.2.25.gem New: ---- yast-rake-0.2.26.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-yast-rake.spec ++++++ --- /var/tmp/diff_new_pack.hgIl8r/_old 2018-07-24 17:28:45.755787140 +0200 +++ /var/tmp/diff_new_pack.hgIl8r/_new 2018-07-24 17:28:45.755787140 +0200 @@ -17,7 +17,7 @@ Name: rubygem-yast-rake -Version: 0.2.25 +Version: 0.2.26 Release: 0 %define mod_name yast-rake %define mod_full_name %{mod_name}-%{version} ++++++ yast-rake-0.2.25.gem -> yast-rake-0.2.26.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/VERSION new/VERSION --- old/VERSION 2018-04-11 12:13:28.000000000 +0200 +++ new/VERSION 2018-04-10 12:38:47.000000000 +0200 @@ -1 +1 @@ -0.2.25 +0.2.26 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 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/tasks/rubocop.rake 2018-04-10 12:38:47.000000000 +0200 @@ -0,0 +1,45 @@ +#-- +# Yast rake +# +# Copyright (C) 2018 SUSE LLC +# This library is free software; you can redistribute it and/or modify +# it only under the terms of version 2.1 of the GNU Lesser General Public +# License as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +#++ + +# 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 -L | sort -R | xargs -P`nproc` -n$(expr `rubocop -L | wc -l` / " \ + "`nproc` + 1) rubocop #{params}" +end + +namespace :check do + desc "Run Rubocop in parallel" + task :rubocop, [:options] do |_task, args| + args.with_defaults = { options: "" } + run_rubocop(args[:options]) + end + + desc "Run Rubocop in parallel in the auto correct mode" + task :"rubocop:auto_correct", [:options] do |_task, args| + args.with_defaults = { options: "" } + run_rubocop("-a #{args[:options]}") + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2018-06-18 11:45:28.000000000 +0200 +++ new/metadata 2018-07-19 16:48:52.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: yast-rake version: !ruby/object:Gem::Version - version: 0.2.25 + version: 0.2.26 platform: ruby authors: - Josef Reidinger autorequire: bindir: bin cert_chain: [] -date: 2018-06-18 00:00:00.000000000 Z +date: 2018-07-19 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rake @@ -52,6 +52,7 @@ - data/targets.yml - lib/tasks/install.rake - lib/tasks/pot.rake +- lib/tasks/rubocop.rake - lib/tasks/run.rake - lib/tasks/spell.yml - lib/tasks/spellcheck.rake