Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-flog for openSUSE:Factory 
checked in at 2022-08-09 15:26:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-flog (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-flog.new.1521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-flog"

Tue Aug  9 15:26:30 2022 rev:27 rq:993482 version:4.6.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-flog/rubygem-flog.changes        
2020-03-07 21:38:07.436267506 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-flog.new.1521/rubygem-flog.changes      
2022-08-09 15:26:40.681338142 +0200
@@ -1,0 +2,28 @@
+Thu Aug  4 13:10:54 UTC 2022 - Stephan Kulow <[email protected]>
+
+updated to version 4.6.6
+ see installed History.rdoc
+
+  === 4.6.6 / 2022-07-03
+  
+  * 1 minor enhancement:
+  
+    * Added support for to_proc w/ hash(?!?). (t-kinoshita)
+  
+  * 2 bug fixes:
+  
+    * Removed to_proc_normal (eg &:sym/call) as benchmarks are much better.
+    * ruby3: Fixed anonymous block pass. (prtngn)
+  
+  === 4.6.5 / 2022-04-09
+  
+  * 1 minor enhancement:
+  
+    * Changed :iter scoring from branch to block_call (same score).
+  
+  * 1 bug fix:
+  
+    * Fixed support for ruby 3 (only affected block_pass / to_proc_normal).
+  
+
+-------------------------------------------------------------------

Old:
----
  flog-4.6.4.gem

New:
----
  flog-4.6.6.gem

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

Other differences:
------------------
++++++ rubygem-flog.spec ++++++
--- /var/tmp/diff_new_pack.jHQYJO/_old  2022-08-09 15:26:41.177339559 +0200
+++ /var/tmp/diff_new_pack.jHQYJO/_new  2022-08-09 15:26:41.181339570 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-flog
 #
-# 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-flog
-Version:        4.6.4
+Version:        4.6.6
 Release:        0
 %define mod_name flog
 %define mod_full_name %{mod_name}-%{version}

++++++ flog-4.6.4.gem -> flog-4.6.6.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/History.rdoc new/History.rdoc
--- old/History.rdoc    2019-12-15 02:03:36.000000000 +0100
+++ new/History.rdoc    2022-07-04 04:48:21.000000000 +0200
@@ -1,3 +1,24 @@
+=== 4.6.6 / 2022-07-03
+
+* 1 minor enhancement:
+
+  * Added support for to_proc w/ hash(?!?). (t-kinoshita)
+
+* 2 bug fixes:
+
+  * Removed to_proc_normal (eg &:sym/call) as benchmarks are much better.
+  * ruby3: Fixed anonymous block pass. (prtngn)
+
+=== 4.6.5 / 2022-04-09
+
+* 1 minor enhancement:
+
+  * Changed :iter scoring from branch to block_call (same score).
+
+* 1 bug fix:
+
+  * Fixed support for ruby 3 (only affected block_pass / to_proc_normal).
+
 === 4.6.4 / 2019-12-14
 
 * 2 minor enhancements:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Rakefile new/Rakefile
--- old/Rakefile        2019-12-15 02:03:36.000000000 +0100
+++ new/Rakefile        2022-07-04 04:48:21.000000000 +0200
@@ -7,12 +7,13 @@
                      "../../RubyInline/dev/lib",
                      "../../sexp_processor/dev/lib",
                      "../../ZenTest/dev/lib",
-                     "../../minitest/dev/lib",
                      "../../path_expander/dev/lib",
                      "lib")
 
 Hoe.plugin :seattlerb
+Hoe.plugin :isolate
 Hoe.plugin :rdoc
+Hoe.plugin :bundler
 
 Hoe.spec 'flog' do
   developer 'Ryan Davis', '[email protected]'
@@ -25,6 +26,8 @@
   dependency "sexp_processor", "~> 4.8"
   dependency "ruby_parser",    ["~> 3.1", "> 3.1.0"]
   dependency "path_expander", "~> 1.0"
+
+  dependency "minitest",       "~> 5.0", :dev
 end
 
 task :debug do
@@ -51,9 +54,12 @@
       exit 0
     end
     flog.flog file
-  else
+  elsif ruby
     flog.flog_ruby ruby, "-"
     flog.calculate_total_scores
+  else
+    flog.flog
+    flog.calculate_total_scores
   end
 
   flog.report
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
Binary files old/checksums.yaml.gz.sig and new/checksums.yaml.gz.sig differ
Binary files old/data.tar.gz.sig and new/data.tar.gz.sig differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/flog.rb new/lib/flog.rb
--- old/lib/flog.rb     2019-12-15 02:03:36.000000000 +0100
+++ new/lib/flog.rb     2022-07-04 04:48:21.000000000 +0200
@@ -11,7 +11,7 @@
 end
 
 class Flog < MethodBasedSexpProcessor
-  VERSION = "4.6.4" # :nodoc:
+  VERSION = "4.6.6" # :nodoc:
 
   ##
   # Cut off point where the report should stop unless --all given.
@@ -38,22 +38,13 @@
     :assignment     => 1,
     :block          => 1,
     :block_pass     => 1,
+    :block_call     => 1,
     :branch         => 1,
     :lit_fixnum     => 0.25,
     :sclass         => 5,
     :super          => 1,
     :to_proc_icky!  => 10,
     :to_proc_lasgn  => 15,
-    :to_proc_normal => case RUBY_VERSION
-                       when /^1\.8\.7/ then
-                         2
-                       when /^1\.9/ then
-                         1.5
-                       when /^2\./ then
-                         1
-                       else
-                         5
-                       end,
     :yield          => 1,
   }
 
@@ -175,9 +166,9 @@
 
   def flog(*files)
     files.each do |file|
-      next unless file == '-' or File.readable? file
+      next unless file == "-" or File.readable? file
 
-      ruby = file == '-' ? $stdin.read : File.binread(file)
+      ruby = file == "-" ? $stdin.read : File.binread(file)
 
       flog_ruby ruby, file
     end
@@ -198,7 +189,7 @@
     q = option[:quiet]
     if e.inspect =~ /<\%|%\>/ or ruby =~ /<\%|%\>/ then
       return if q
-      warn "#{e.inspect} at #{e.backtrace.first(5).join(', ')}"
+      warn "#{e.inspect} at #{e.backtrace.first(5).join(", ")}"
       warn "\n...stupid lemmings and their bad erb templates... skipping"
     else
       warn "ERROR: parsing ruby file #{file}" unless q
@@ -288,7 +279,7 @@
     tally.each do |cat, score|
       case cat
       when :assignment then a += score
-      when :branch     then b += score
+      when :branch, :block_call then b += score
       else                  c += score
       end
     end
@@ -364,18 +355,23 @@
 
     add_to_score :block_pass
 
+    return s() unless arg
+
     case arg.sexp_type
     when :lvar, :dvar, :ivar, :cvar, :self, :const, :colon2, :nil then # f(&b)
       # do nothing
-    when :lit, :call then                                              # f(&:b)
-      add_to_score :to_proc_normal
+    when :lit then                                                     # f(&:b)
+      # do nothing -- this now costs about the same as a block
+    when :call then                                                    # 
f(&x.b)
+      # do nothing -- I don't like the indirection, but that's already scored
     when :lasgn then                                                   # 
f(&l=b)
       add_to_score :to_proc_lasgn
-    when :iter, :dsym, :dstr, *BRANCHING then                          # below
+    when :iter, :dsym, :dstr, :hash, *BRANCHING then                   # below
       # f(&proc { ... })
       # f(&"#{...}")
       # f(&:"#{...}")
       # f(&if ... then ... end") and all other branching forms
+      # f(&{ a: 42 })  WHY?!?
       add_to_score :to_proc_icky!
     else
       raise({:block_pass_even_ickier! => arg}.inspect)
@@ -493,7 +489,7 @@
       end
     end
 
-    add_to_score :branch
+    add_to_score :block_call
 
     process exp.shift # no penalty for LHS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2019-12-15 02:03:36.000000000 +0100
+++ new/metadata        2022-07-04 04:48:21.000000000 +0200
@@ -1,18 +1,18 @@
 --- !ruby/object:Gem::Specification
 name: flog
 version: !ruby/object:Gem::Version
-  version: 4.6.4
+  version: 4.6.6
 platform: ruby
 authors:
 - Ryan Davis
-autorequire: 
+autorequire:
 bindir: bin
 cert_chain:
 - |
   -----BEGIN CERTIFICATE-----
-  MIIDPjC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Ejga8iM1LbZUfiISZ+WrB
+  AQCKB5jfsuSnKb+t/Wrh3UpdkmX7TrEsjVmERC0pPqzQ5GQJgmEXDD7oMgaKXaAq
+  x2m+KSZDrqk7c8uho5OX6YMqg4KdxehfSLqqTZGoeV78qwf/jpPQZKTf+W9gUSJh
+  zsWpo4K50MP+QtdSbKXZwjAafpQ8hK0MnnZ/aeCsW9ov5vdXpYbf3dpg6ADXRGE7
+  lQY2y1tJ5/chqu6h7dQmnm2ABUqx9O+JcN9hbCYoA5i/EeubUEtFIh2w3SpO6YfB
+  JFmxn4h9YO/pVdB962BdBNNDia0kgIjI3ENnkLq0dKpYU3+F3KhEuTksLO0L6X/V
+  YsuyUzsMz6GQA4khyaMgKNSD
   -----END CERTIFICATE-----
-date: 2019-12-15 00:00:00.000000000 Z
+date: 2022-07-04 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: sexp_processor
@@ -49,22 +49,22 @@
   name: ruby_parser
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - ">"
-      - !ruby/object:Gem::Version
-        version: 3.1.0
     - - "~>"
       - !ruby/object:Gem::Version
         version: '3.1'
+    - - ">"
+      - !ruby/object:Gem::Version
+        version: 3.1.0
   type: :runtime
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - ">"
-      - !ruby/object:Gem::Version
-        version: 3.1.0
     - - "~>"
       - !ruby/object:Gem::Version
         version: '3.1'
+    - - ">"
+      - !ruby/object:Gem::Version
+        version: 3.1.0
 - !ruby/object:Gem::Dependency
   name: path_expander
   requirement: !ruby/object:Gem::Requirement
@@ -80,6 +80,20 @@
       - !ruby/object:Gem::Version
         version: '1.0'
 - !ruby/object:Gem::Dependency
+  name: minitest
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - "~>"
+      - !ruby/object:Gem::Version
+        version: '5.0'
+  type: :development
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - "~>"
+      - !ruby/object:Gem::Version
+        version: '5.0'
+- !ruby/object:Gem::Dependency
   name: rdoc
   requirement: !ruby/object:Gem::Requirement
     requirements:
@@ -105,14 +119,14 @@
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: '3.20'
+        version: '3.24'
   type: :development
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: '3.20'
+        version: '3.24'
 description: |-
   Flog reports the most tortured code in an easy to read pain
   report. The higher the score, the more pain the code is in.
@@ -144,7 +158,7 @@
 metadata:
   homepage_uri: http://ruby.sadi.st/
   source_code_uri: https://github.com/seattlerb/flog
-post_install_message: 
+post_install_message:
 rdoc_options:
 - "--main"
 - README.rdoc
@@ -161,8 +175,8 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubygems_version: 3.0.3
-signing_key: 
+rubygems_version: 3.3.12
+signing_key:
 specification_version: 4
 summary: Flog reports the most tortured code in an easy to read pain report
 test_files: []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata.gz.sig new/metadata.gz.sig
--- old/metadata.gz.sig 2019-12-15 02:03:36.000000000 +0100
+++ new/metadata.gz.sig 2022-07-04 04:48:21.000000000 +0200
@@ -1,2 +1,2 @@
-???@ZC|(k(j*????r+?w?Cq?]?L??+zOve0Q?SHR@??!$????0:?????>???Z??QDn???^?Tl{?W,,?y8?JF#?wQ8.??g???F?q:??Ec???-?
       ?E?,E%?z???su?U1? ???o??????D??/F
-?IOG>!?d?T7?)???"G#?$v??g??<?????}??@"Ev??KE???I?6?  ??o????_#??G
??|?O5B?,M?qP??????
\ No newline at end of file
+?|?f?(??U??z{|??-4????&?/w*???TL?Ai'?(T??]?:??F???Y[?R?????@????]L???AF?0%_?4?????|??O???6Q%`;
d??/K$&?*??|?5???i??M??$VG???S.xq?<??B???WZG?????D???
+?Y?<??.?qEN?c???j??&???????????D??P??H??f?1??     
I?[????t?B]????y?#????MK???l?J?>P?7?
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/test_flog.rb new/test/test_flog.rb
--- old/test/test_flog.rb       2019-12-15 02:03:36.000000000 +0100
+++ new/test/test_flog.rb       2022-07-04 04:48:21.000000000 +0200
@@ -127,25 +127,24 @@
     assert_process sexp, 1.1, :branch => 1.1 # 10% penalty over process_and
   end
 
-  def test_process_block_pass
+  def test_process_block_pass__call
     sexp = s(:call, nil, :a,
              s(:block_pass,
                s(:call, nil, :b)))
 
-    bonus = case RUBY_VERSION
-            when /^1\.8\.7/ then 0.4
-            when /^1\.9/    then 0.3
-            when /^2\./     then 0.2
-            else raise "Unhandled version #{RUBY_VERSION}"
-            end
+    assert_process(sexp, 3.4,
+                   :a              => 1.0,
+                   :block_pass     => 1.2,
+                   :b              => 1.2)
+  end
 
-    bonus += Flog::OTHER_SCORES[:to_proc_normal]
+  def test_process_block_pass__to_proc
+    sexp = s(:call, nil, :a,
+             s(:block_pass, s(:lit, :to_i)))
 
-    assert_process(sexp, 3.4 + bonus,
+    assert_process(sexp, 2.2,
                    :a              => 1.0,
-                   :block_pass     => 1.2,
-                   :b              => 1.2,
-                   :to_proc_normal => 0.0 + bonus)
+                   :block_pass     => 1.2)
   end
 
   def test_process_block_pass_colon2
@@ -158,6 +157,17 @@
                    :block_pass     => 1.2)
   end
 
+  def test_process_block_pass__hash_wtf
+    sexp = s(:call, nil, :a,
+             s(:block_pass,
+               s(:hash, s(:lit, :a), s(:lit, :b))))
+
+    assert_process(sexp, 14.2,
+                   :a              => 1.0,
+                   :block_pass     => 1.2,
+                   :to_proc_icky!  => 12.0)
+  end
+
   def test_process_block_pass_iter
     sexp = s(:block_pass,
              s(:iter, s(:call, nil, :lambda), nil, s(:lit, 1)))
@@ -166,7 +176,7 @@
                    :lit_fixnum    =>  0.275,
                    :block_pass    =>  1.0,
                    :lambda        =>  1.0,
-                   :branch        =>  1.0,
+                   :block_call    =>  1.0,
                    :to_proc_icky! => 10.0)
   end
 
@@ -181,10 +191,17 @@
                    :block_pass    =>  1.0,
                    :lambda        =>  1.0,
                    :assignment    =>  1.0,
-                   :branch        =>  1.0,
+                   :block_call    =>  1.0,
                    :to_proc_lasgn => 15.0)
   end
 
+  def test_process_block_pass__nil
+    sexp = s(:block_pass)
+
+    assert_process(sexp, 1.0,
+                   :block_pass    =>  1.0)
+  end
+
   def test_process_call
     sexp = s(:call, nil, :a)                                       # a
     assert_process sexp, 1.0, :a => 1.0
@@ -324,7 +341,7 @@
              s(:call, nil, :loop), nil,
              s(:if, s(:true), s(:break), nil))
 
-    assert_process sexp, 2.326, :loop => 1.0, :branch => 2.1
+    assert_process sexp, 2.326, :loop => 1.0, :branch => 1.1, :block_call => 1
   end
 
   def test_process_iter_dsl
@@ -382,7 +399,7 @@
              nil,
              s(:call, nil, :something))
 
-    assert_process sexp, 2.326, :something => 1.1, :task => 1.0, :branch => 1
+    assert_process sexp, 2.326, :something => 1.1, :task => 1.0, :block_call 
=> 1
   end
 
   def test_process_iter_dsl_namespaced
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/test_flog_cli.rb new/test/test_flog_cli.rb
--- old/test/test_flog_cli.rb   2019-12-15 02:03:36.000000000 +0100
+++ new/test/test_flog_cli.rb   2022-07-04 04:48:21.000000000 +0200
@@ -1,4 +1,4 @@
-require "test/test_flog"
+require "test_flog"
 require "flog_cli"
 
 class FlogCLI

Reply via email to