flog 4.6.4 → 4.6.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8f844d48c5a305a1d8faf442235c38c9a90c38fa75a877358f6b510aaab4283
4
- data.tar.gz: 88823e4811831f69f7b1a6d4b4a863a9e07c3646ceb2037329d6f367c85e3bce
3
+ metadata.gz: 57b6b9d470979f410d87a27dd593d85a9c3b526f65bc519d8795a5c0703a7b74
4
+ data.tar.gz: 3d0ad63ea53a0e69f3768ef311f981239fe3397d53b7c2514d97cc453f895d88
5
5
  SHA512:
6
- metadata.gz: aa7e986e752d38e6cb1f23752d777fdae88c9092c1c8068bc162ad1708a5bad54f394972fee904ce24faa1ed84bcb41104307546956742e444e7631c9115b2d0
7
- data.tar.gz: 329c9e9d94b6a7df410e40fd3f013a32f6e22908819f4c8c66ce22ed2b3c98699163d8d636290df2ec46ca9a345bdeeef97ef33cafcee81187df4dfb0edca81d
6
+ metadata.gz: 5615430b290aa01b6fd46b0154fdec668561ec0f0c044807ea09a0373a78b74984ad68504034fd99b75d307128bf4c21e187810aba5165cc257c582bf19b1e8d
7
+ data.tar.gz: 7b862060c2c4489cd4e43e38c5be5cdfbc79afc871feee741ada47d1a45d4bd590b2fcc01c0f3982d39ef305d2b76dc7417fbcd67c66bfcad758e6611523f7bb
checksums.yaml.gz.sig CHANGED
Binary file
data/History.rdoc CHANGED
@@ -1,3 +1,13 @@
1
+ === 4.6.5 / 2022-04-09
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Changed :iter scoring from branch to block_call (same score).
6
+
7
+ * 1 bug fix:
8
+
9
+ * Fixed support for ruby 3 (only affected block_pass / to_proc_normal).
10
+
1
11
  === 4.6.4 / 2019-12-14
2
12
 
3
13
  * 2 minor enhancements:
data/Rakefile CHANGED
@@ -7,12 +7,13 @@ Hoe.add_include_dirs("../../ruby_parser/dev/lib",
7
7
  "../../RubyInline/dev/lib",
8
8
  "../../sexp_processor/dev/lib",
9
9
  "../../ZenTest/dev/lib",
10
- "../../minitest/dev/lib",
11
10
  "../../path_expander/dev/lib",
12
11
  "lib")
13
12
 
14
13
  Hoe.plugin :seattlerb
14
+ Hoe.plugin :isolate
15
15
  Hoe.plugin :rdoc
16
+ Hoe.plugin :bundler
16
17
 
17
18
  Hoe.spec 'flog' do
18
19
  developer 'Ryan Davis', 'ryand-ruby@zenspider.com'
@@ -25,6 +26,8 @@ Hoe.spec 'flog' do
25
26
  dependency "sexp_processor", "~> 4.8"
26
27
  dependency "ruby_parser", ["~> 3.1", "> 3.1.0"]
27
28
  dependency "path_expander", "~> 1.0"
29
+
30
+ dependency "minitest", "~> 5.0", :dev
28
31
  end
29
32
 
30
33
  task :debug do
data/lib/flog.rb CHANGED
@@ -11,7 +11,7 @@ class File
11
11
  end
12
12
 
13
13
  class Flog < MethodBasedSexpProcessor
14
- VERSION = "4.6.4" # :nodoc:
14
+ VERSION = "4.6.5" # :nodoc:
15
15
 
16
16
  ##
17
17
  # Cut off point where the report should stop unless --all given.
@@ -38,6 +38,7 @@ class Flog < MethodBasedSexpProcessor
38
38
  :assignment => 1,
39
39
  :block => 1,
40
40
  :block_pass => 1,
41
+ :block_call => 1,
41
42
  :branch => 1,
42
43
  :lit_fixnum => 0.25,
43
44
  :sclass => 5,
@@ -49,10 +50,10 @@ class Flog < MethodBasedSexpProcessor
49
50
  2
50
51
  when /^1\.9/ then
51
52
  1.5
52
- when /^2\./ then
53
+ when /^[23]\./ then
53
54
  1
54
55
  else
55
- 5
56
+ raise "Unhandled version #{RUBY_VERSION}"
56
57
  end,
57
58
  :yield => 1,
58
59
  }
@@ -288,7 +289,7 @@ class Flog < MethodBasedSexpProcessor
288
289
  tally.each do |cat, score|
289
290
  case cat
290
291
  when :assignment then a += score
291
- when :branch then b += score
292
+ when :branch, :block_call then b += score
292
293
  else c += score
293
294
  end
294
295
  end
@@ -493,7 +494,7 @@ class Flog < MethodBasedSexpProcessor
493
494
  end
494
495
  end
495
496
 
496
- add_to_score :branch
497
+ add_to_score :block_call
497
498
 
498
499
  process exp.shift # no penalty for LHS
499
500
 
data/test/test_flog.rb CHANGED
@@ -135,7 +135,7 @@ class TestFlog < FlogTest
135
135
  bonus = case RUBY_VERSION
136
136
  when /^1\.8\.7/ then 0.4
137
137
  when /^1\.9/ then 0.3
138
- when /^2\./ then 0.2
138
+ when /^[23]\./ then 0.2
139
139
  else raise "Unhandled version #{RUBY_VERSION}"
140
140
  end
141
141
 
@@ -166,7 +166,7 @@ class TestFlog < FlogTest
166
166
  :lit_fixnum => 0.275,
167
167
  :block_pass => 1.0,
168
168
  :lambda => 1.0,
169
- :branch => 1.0,
169
+ :block_call => 1.0,
170
170
  :to_proc_icky! => 10.0)
171
171
  end
172
172
 
@@ -181,7 +181,7 @@ class TestFlog < FlogTest
181
181
  :block_pass => 1.0,
182
182
  :lambda => 1.0,
183
183
  :assignment => 1.0,
184
- :branch => 1.0,
184
+ :block_call => 1.0,
185
185
  :to_proc_lasgn => 15.0)
186
186
  end
187
187
 
@@ -324,7 +324,7 @@ class TestFlog < FlogTest
324
324
  s(:call, nil, :loop), nil,
325
325
  s(:if, s(:true), s(:break), nil))
326
326
 
327
- assert_process sexp, 2.326, :loop => 1.0, :branch => 2.1
327
+ assert_process sexp, 2.326, :loop => 1.0, :branch => 1.1, :block_call => 1
328
328
  end
329
329
 
330
330
  def test_process_iter_dsl
@@ -382,7 +382,7 @@ class TestFlog < FlogTest
382
382
  nil,
383
383
  s(:call, nil, :something))
384
384
 
385
- assert_process sexp, 2.326, :something => 1.1, :task => 1.0, :branch => 1
385
+ assert_process sexp, 2.326, :something => 1.1, :task => 1.0, :block_call => 1
386
386
  end
387
387
 
388
388
  def test_process_iter_dsl_namespaced
@@ -1,4 +1,4 @@
1
- require "test/test_flog"
1
+ require "test_flog"
2
2
  require "flog_cli"
3
3
 
4
4
  class FlogCLI
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flog
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.4
4
+ version: 4.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDPjCCAiagAwIBAgIBBDANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
13
+ MIIDPjCCAiagAwIBAgIBBjANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
14
14
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
15
- GRYDY29tMB4XDTE5MTIxMzAwMDIwNFoXDTIwMTIxMjAwMDIwNFowRTETMBEGA1UE
15
+ GRYDY29tMB4XDTIxMTIyMzIzMTkwNFoXDTIyMTIyMzIzMTkwNFowRTETMBEGA1UE
16
16
  AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
17
17
  JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
18
18
  b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
@@ -22,14 +22,14 @@ cert_chain:
22
22
  qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
23
23
  gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
24
24
  HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB
25
- AQCkkcHqAa6IKLYGl93rn78J3L+LnqyxaA059n4IGMHWN5bv9KBQnIjOrpLadtYZ
26
- vhWkunWDKdfVapBEq5+T4HzqnsEXC3aCv6JEKJY6Zw7iSzl0M8hozuzRr+w46wvT
27
- fV2yTN6QTVxqbMsJJyjosks4ZdQYov2zdvQpt1HsLi+Qmckmg8SPZsd+T8uiiBCf
28
- b+1ORSM5eEfBQenPXy83LZcoQz8i6zVB4aAfTGGdhxjoMGUEmSZ6xpkOzmnGa9QK
29
- m5x9IDiApM+vCELNwDXXGNFEnQBBK+wAe4Pek8o1V1TTOxL1kGPewVOitX1p3xoN
30
- h7iEjga8iM1LbZUfiISZ+WrB
25
+ AQCKB5jfsuSnKb+t/Wrh3UpdkmX7TrEsjVmERC0pPqzQ5GQJgmEXDD7oMgaKXaAq
26
+ x2m+KSZDrqk7c8uho5OX6YMqg4KdxehfSLqqTZGoeV78qwf/jpPQZKTf+W9gUSJh
27
+ zsWpo4K50MP+QtdSbKXZwjAafpQ8hK0MnnZ/aeCsW9ov5vdXpYbf3dpg6ADXRGE7
28
+ lQY2y1tJ5/chqu6h7dQmnm2ABUqx9O+JcN9hbCYoA5i/EeubUEtFIh2w3SpO6YfB
29
+ JFmxn4h9YO/pVdB962BdBNNDia0kgIjI3ENnkLq0dKpYU3+F3KhEuTksLO0L6X/V
30
+ YsuyUzsMz6GQA4khyaMgKNSD
31
31
  -----END CERTIFICATE-----
32
- date: 2019-12-15 00:00:00.000000000 Z
32
+ date: 2022-04-09 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: sexp_processor
@@ -49,22 +49,22 @@ dependencies:
49
49
  name: ruby_parser
50
50
  requirement: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">"
53
- - !ruby/object:Gem::Version
54
- version: 3.1.0
55
52
  - - "~>"
56
53
  - !ruby/object:Gem::Version
57
54
  version: '3.1'
55
+ - - ">"
56
+ - !ruby/object:Gem::Version
57
+ version: 3.1.0
58
58
  type: :runtime
59
59
  prerelease: false
60
60
  version_requirements: !ruby/object:Gem::Requirement
61
61
  requirements:
62
- - - ">"
63
- - !ruby/object:Gem::Version
64
- version: 3.1.0
65
62
  - - "~>"
66
63
  - !ruby/object:Gem::Version
67
64
  version: '3.1'
65
+ - - ">"
66
+ - !ruby/object:Gem::Version
67
+ version: 3.1.0
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: path_expander
70
70
  requirement: !ruby/object:Gem::Requirement
@@ -79,6 +79,20 @@ dependencies:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
81
  version: '1.0'
82
+ - !ruby/object:Gem::Dependency
83
+ name: minitest
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '5.0'
89
+ type: :development
90
+ prerelease: false
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '5.0'
82
96
  - !ruby/object:Gem::Dependency
83
97
  name: rdoc
84
98
  requirement: !ruby/object:Gem::Requirement
@@ -105,14 +119,14 @@ dependencies:
105
119
  requirements:
106
120
  - - "~>"
107
121
  - !ruby/object:Gem::Version
108
- version: '3.20'
122
+ version: '3.23'
109
123
  type: :development
110
124
  prerelease: false
111
125
  version_requirements: !ruby/object:Gem::Requirement
112
126
  requirements:
113
127
  - - "~>"
114
128
  - !ruby/object:Gem::Version
115
- version: '3.20'
129
+ version: '3.23'
116
130
  description: |-
117
131
  Flog reports the most tortured code in an easy to read pain
118
132
  report. The higher the score, the more pain the code is in.
@@ -144,7 +158,7 @@ licenses:
144
158
  metadata:
145
159
  homepage_uri: http://ruby.sadi.st/
146
160
  source_code_uri: https://github.com/seattlerb/flog
147
- post_install_message:
161
+ post_install_message:
148
162
  rdoc_options:
149
163
  - "--main"
150
164
  - README.rdoc
@@ -161,8 +175,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
175
  - !ruby/object:Gem::Version
162
176
  version: '0'
163
177
  requirements: []
164
- rubygems_version: 3.0.3
165
- signing_key:
178
+ rubygems_version: 3.3.3
179
+ signing_key:
166
180
  specification_version: 4
167
181
  summary: Flog reports the most tortured code in an easy to read pain report
168
182
  test_files: []
metadata.gz.sig CHANGED
Binary file