Hello community, here is the log from the commit of package rubygem-flog for openSUSE:Factory checked in at 2020-03-07 21:38:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-flog (Old) and /work/SRC/openSUSE:Factory/.rubygem-flog.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-flog" Sat Mar 7 21:38:04 2020 rev:26 rq:773760 version:4.6.4 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-flog/rubygem-flog.changes 2018-02-18 11:44:57.288021201 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-flog.new.26092/rubygem-flog.changes 2020-03-07 21:38:07.436267506 +0100 @@ -1,0 +2,24 @@ +Mon Feb 10 14:35:01 UTC 2020 - Stephan Kulow <co...@suse.com> + +- updated to version 4.6.4 + see installed History.rdoc + + === 4.6.4 / 2019-12-14 + + * 2 minor enhancements: + + * Added basic support for safe_call (nic-potter). + * Added extra complexity penalty to safe_call processing. + + === 4.6.3 / 2019-09-14 + + * 1 minor enhancement: + + * Removed --18 and --19 options to cmdline. No real value anymore. + + * 2 bug fixes: + + * Fixed some sexp access under STRICT_SEXP=2. + * Fixed option / arg processing bug that caused a hang (reading from stdin). + +------------------------------------------------------------------- Old: ---- flog-4.6.2.gem New: ---- flog-4.6.4.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-flog.spec ++++++ --- /var/tmp/diff_new_pack.K2xswk/_old 2020-03-07 21:38:07.884267809 +0100 +++ /var/tmp/diff_new_pack.K2xswk/_new 2020-03-07 21:38:07.888267811 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-flog # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -24,7 +24,7 @@ # Name: rubygem-flog -Version: 4.6.2 +Version: 4.6.4 Release: 0 %define mod_name flog %define mod_full_name %{mod_name}-%{version} @@ -34,7 +34,7 @@ BuildRequires: %{ruby} BuildRequires: ruby-macros >= 5 BuildRequires: update-alternatives -Url: http://ruby.sadi.st/ +URL: http://ruby.sadi.st/ Source: https://rubygems.org/gems/%{mod_full_name}.gem Source1: gem2rpm.yml Summary: Flog reports the most tortured code in an easy to read pain report ++++++ flog-4.6.2.gem -> flog-4.6.4.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/History.rdoc new/History.rdoc --- old/History.rdoc 2018-02-14 23:19:16.000000000 +0100 +++ new/History.rdoc 2019-12-15 02:03:36.000000000 +0100 @@ -1,3 +1,21 @@ +=== 4.6.4 / 2019-12-14 + +* 2 minor enhancements: + + * Added basic support for safe_call (nic-potter). + * Added extra complexity penalty to safe_call processing. + +=== 4.6.3 / 2019-09-14 + +* 1 minor enhancement: + + * Removed --18 and --19 options to cmdline. No real value anymore. + +* 2 bug fixes: + + * Fixed some sexp access under STRICT_SEXP=2. + * Fixed option / arg processing bug that caused a hang (reading from stdin). + === 4.6.2 / 2018-02-14 * 1 bug fix: 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 2018-02-14 23:19:16.000000000 +0100 +++ new/lib/flog.rb 2019-12-15 02:03:36.000000000 +0100 @@ -11,7 +11,7 @@ end class Flog < MethodBasedSexpProcessor - VERSION = "4.6.2" # :nodoc: + VERSION = "4.6.4" # :nodoc: ## # Cut off point where the report should stop unless --all given. @@ -143,10 +143,12 @@ def dsl_name? args return false unless args and not args.empty? - first_arg = args.first - first_arg = first_arg[1] if first_arg[0] == :hash + first_arg, = args + first_arg = first_arg[1] if first_arg.sexp_type == :hash - [:lit, :str].include? first_arg[0] and first_arg[1] + type, value, * = first_arg + + value if [:lit, :str].include? type end ## @@ -362,7 +364,7 @@ add_to_score :block_pass - case arg.first + case arg.sexp_type when :lvar, :dvar, :ivar, :cvar, :self, :const, :colon2, :nil then # f(&b) # do nothing when :lit, :call then # f(&:b) @@ -400,6 +402,22 @@ s() end + def process_safe_call(exp) + penalize_by 0.3 do + process exp.shift # recv + end + + name = exp.shift + + penalize_by 0.2 do + process_until_empty exp + end + + add_to_score name, SCORES[name] + + s() + end + def process_case(exp) add_to_score :branch process exp.shift # recv @@ -455,7 +473,7 @@ exp.delete 0 # { || ... } has 0 in arg slot if context == [:block, :iter] or context == [:iter] then - recv = exp.first + recv, = exp # DSL w/ names. eg task :name do ... end # looks like s(:call, nil, :task, s(:lit, :name)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/flog_cli.rb new/lib/flog_cli.rb --- old/lib/flog_cli.rb 2018-02-14 23:19:16.000000000 +0100 +++ new/lib/flog_cli.rb 2019-12-15 02:03:36.000000000 +0100 @@ -19,11 +19,11 @@ expander = PathExpander.new args, "**/*.{rb,rake}" files = expander.process + options = parse_options args + abort "no files or stdin (-) to process, aborting." if files.empty? and args.empty? - options = parse_options args - flogger = new options flogger.flog(*files) flogger.report @@ -131,14 +131,6 @@ option[:verbose] = true end - opts.on("--18", "Use a ruby 1.8 parser.") do - option[:parser] = Ruby18Parser - end - - opts.on("--19", "Use a ruby 1.9 parser.") do - option[:parser] = Ruby19Parser - end - next if self.plugins.empty? opts.separator "Plugin options:" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2018-02-14 23:19:16.000000000 +0100 +++ new/metadata 2019-12-15 02:03:36.000000000 +0100 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: flog version: !ruby/object:Gem::Version - version: 4.6.2 + version: 4.6.4 platform: ruby authors: - Ryan Davis @@ -10,9 +10,9 @@ cert_chain: - | -----BEGIN CERTIFICATE----- - MIIDPjCCAiagAwIBAgIBAjANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu + MIIDPjCCAiagAwIBAgIBBDANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB - GRYDY29tMB4XDTE3MTEyMTIxMTExMFoXDTE4MTEyMTIxMTExMFowRTETMBEGA1UE + GRYDY29tMB4XDTE5MTIxMzAwMDIwNFoXDTIwMTIxMjAwMDIwNFowRTETMBEGA1UE AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx @@ -21,15 +21,15 @@ GiadM9GHRaDiaxuX0cIUBj19T01mVE2iymf9I6bEsiayK/n6QujtyCbTWsAS9Rqt qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw - HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB - AQAfAXSQpsW7YSxd1csRtA/M4Zt0AMXFMd76GJ8Lgtg8G0+VFbdChRyDuDb0kPlW - h9QQX/YABfCW8vxmssbMGrP+VGBAn7BbdTcfTlgCWrvMX1uL5aRL74nA4urKXqdW - a0nP70K4958P3GffBdtE3KGkU5xstFnXGajxuBRnL66E15KU0BNehVxdG258bdPu - EKN6MqBPftFiev3tuwqDV11r2GquDpniYcT+Mi8/PgeAgVT/afBeVgbB3KaZeTRR - AhXhF6Wi2GTMezlj5jlI5XV7WsJUSwTp/YiVvcmT74ZaCRvexm6EnNhkrvJJ1Xeu - V+HB+LYYhXWitInO/eXxDrFB + HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB + AQCkkcHqAa6IKLYGl93rn78J3L+LnqyxaA059n4IGMHWN5bv9KBQnIjOrpLadtYZ + vhWkunWDKdfVapBEq5+T4HzqnsEXC3aCv6JEKJY6Zw7iSzl0M8hozuzRr+w46wvT + fV2yTN6QTVxqbMsJJyjosks4ZdQYov2zdvQpt1HsLi+Qmckmg8SPZsd+T8uiiBCf + b+1ORSM5eEfBQenPXy83LZcoQz8i6zVB4aAfTGGdhxjoMGUEmSZ6xpkOzmnGa9QK + m5x9IDiApM+vCELNwDXXGNFEnQBBK+wAe4Pek8o1V1TTOxL1kGPewVOitX1p3xoN + h7iEjga8iM1LbZUfiISZ+WrB -----END CERTIFICATE----- -date: 2018-02-14 00:00:00.000000000 Z +date: 2019-12-15 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' - - ">" - !ruby/object:Gem::Version version: 3.1.0 + - - "~>" + - !ruby/object:Gem::Version + version: '3.1' type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - - "~>" - - !ruby/object:Gem::Version - version: '3.1' - - ">" - !ruby/object:Gem::Version version: 3.1.0 + - - "~>" + - !ruby/object:Gem::Version + version: '3.1' - !ruby/object:Gem::Dependency name: path_expander requirement: !ruby/object:Gem::Requirement @@ -83,30 +83,36 @@ name: rdoc requirement: !ruby/object:Gem::Requirement requirements: - - - "~>" + - - ">=" - !ruby/object:Gem::Version version: '4.0' + - - "<" + - !ruby/object:Gem::Version + version: '7' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - - "~>" + - - ">=" - !ruby/object:Gem::Version version: '4.0' + - - "<" + - !ruby/object:Gem::Version + version: '7' - !ruby/object:Gem::Dependency name: hoe requirement: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: '3.16' + version: '3.20' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: '3.16' + version: '3.20' 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. @@ -135,7 +141,9 @@ homepage: http://ruby.sadi.st/ licenses: - MIT -metadata: {} +metadata: + homepage_uri: http://ruby.sadi.st/ + source_code_uri: https://github.com/seattlerb/flog post_install_message: rdoc_options: - "--main" @@ -153,8 +161,7 @@ - !ruby/object:Gem::Version version: '0' requirements: [] -rubyforge_project: -rubygems_version: 2.7.3 +rubygems_version: 3.0.3 signing_key: specification_version: 4 summary: Flog reports the most tortured code in an easy to read pain report Binary files old/metadata.gz.sig and new/metadata.gz.sig differ 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 2018-02-14 23:19:16.000000000 +0100 +++ new/test/test_flog.rb 2019-12-15 02:03:36.000000000 +0100 @@ -186,10 +186,31 @@ end def test_process_call - sexp = s(:call, nil, :a) + sexp = s(:call, nil, :a) # a assert_process sexp, 1.0, :a => 1.0 end + def test_process_call2 + sexp = s(:call, s(:call, nil, :a), :b) # a.b + assert_process sexp, 2.2, :a => 1.2, :b => 1.0 + end + + def test_process_call3 + sexp = s(:call, s(:call, s(:call, nil, :a), :b), :c) # a.b.c + assert_process sexp, 3.6, :a => 1.4, :b => 1.2, :c => 1.0 + end + + def test_process_safe_call2 + sexp = s(:safe_call, s(:call, nil, :a), :b) # a&.b + assert_process sexp, 2.3, :a => 1.3, :b => 1.0 + end + + def test_process_safe_call3 + sexp = s(:safe_call, s(:safe_call, s(:call, nil, :a), :b), :c) # a&.b&.c + + assert_process sexp, 3.9, :a => 1.6, :b => 1.3, :c => 1.0 + end + def test_process_case case :a when :a @@ -351,6 +372,19 @@ assert_process sexp, 2.3, :something => 1.0, :task => 1.0, :lit_fixnum => 0.3 end + def test_process_iter_dsl_hash_when_hash_empty + # task({}) do + # something + # end + + sexp = s(:iter, + s(:call, nil, :task, s(:hash)), + nil, + s(:call, nil, :something)) + + assert_process sexp, 2.326, :something => 1.1, :task => 1.0, :branch => 1 + end + def test_process_iter_dsl_namespaced # namespace :blah do # task :woot => 42 do