flog 2.5.2 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data.tar.gz.sig +0 -0
- data/History.txt +10 -0
- data/lib/flog.rb +19 -12
- metadata +11 -11
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
=== 2.5.3 / 2011-09-21
|
2
|
+
|
3
|
+
* 1 minor enhancement:
|
4
|
+
|
5
|
+
* class_stack now always pushes on symbols or strings for class names.
|
6
|
+
|
7
|
+
* 1 bug fix:
|
8
|
+
|
9
|
+
* Fixed klass_name returning an ugly mix of sexps and strings.
|
10
|
+
|
1
11
|
=== 2.5.2 / 2011-08-11
|
2
12
|
|
3
13
|
* 1 minor enhancement:
|
data/lib/flog.rb
CHANGED
@@ -4,7 +4,7 @@ require 'ruby_parser'
|
|
4
4
|
require 'optparse'
|
5
5
|
|
6
6
|
class Flog < SexpProcessor
|
7
|
-
VERSION = '2.5.
|
7
|
+
VERSION = '2.5.3'
|
8
8
|
|
9
9
|
THRESHOLD = 0.60
|
10
10
|
SCORES = Hash.new 1
|
@@ -263,6 +263,20 @@ class Flog < SexpProcessor
|
|
263
263
|
# Adds name to the class stack, for the duration of the block
|
264
264
|
|
265
265
|
def in_klass name
|
266
|
+
if Sexp === name then
|
267
|
+
name = case name.first
|
268
|
+
when :colon2 then
|
269
|
+
name = name.flatten
|
270
|
+
name.delete :const
|
271
|
+
name.delete :colon2
|
272
|
+
name.join("::")
|
273
|
+
when :colon3 then
|
274
|
+
name.last.to_s
|
275
|
+
else
|
276
|
+
raise "unknown type #{name.inspect}"
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
266
280
|
@class_stack.unshift name
|
267
281
|
yield
|
268
282
|
@class_stack.shift
|
@@ -297,18 +311,9 @@ class Flog < SexpProcessor
|
|
297
311
|
|
298
312
|
def klass_name
|
299
313
|
name = @class_stack.first
|
314
|
+
|
300
315
|
if Sexp === name then
|
301
|
-
|
302
|
-
when :colon2 then
|
303
|
-
name = name.flatten
|
304
|
-
name.delete :const
|
305
|
-
name.delete :colon2
|
306
|
-
name.join("::")
|
307
|
-
when :colon3 then
|
308
|
-
name.last.to_s
|
309
|
-
else
|
310
|
-
name
|
311
|
-
end
|
316
|
+
raise "you shouldn't see me"
|
312
317
|
elsif @class_stack.any?
|
313
318
|
@class_stack.reverse.join("::")
|
314
319
|
else
|
@@ -334,6 +339,7 @@ class Flog < SexpProcessor
|
|
334
339
|
|
335
340
|
each_by_score max do |class_method, score, call_list|
|
336
341
|
return 0 if option[:methods] and class_method =~ /##{@@no_method}/
|
342
|
+
|
337
343
|
self.print_score io, class_method, score
|
338
344
|
|
339
345
|
if option[:details] then
|
@@ -365,6 +371,7 @@ class Flog < SexpProcessor
|
|
365
371
|
io.puts
|
366
372
|
|
367
373
|
io.puts "%8.1f: %s" % [total, "#{klass} total"]
|
374
|
+
|
368
375
|
methods[klass].each do |name, score|
|
369
376
|
self.print_score io, name, score
|
370
377
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 2.5.
|
9
|
+
- 3
|
10
|
+
version: 2.5.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Davis
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
FBHgymkyj/AOSqKRIpXPhjC6
|
37
37
|
-----END CERTIFICATE-----
|
38
38
|
|
39
|
-
date: 2011-
|
39
|
+
date: 2011-09-21 00:00:00 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: sexp_processor
|
@@ -76,11 +76,11 @@ dependencies:
|
|
76
76
|
requirements:
|
77
77
|
- - ~>
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
hash:
|
79
|
+
hash: 15
|
80
80
|
segments:
|
81
81
|
- 2
|
82
|
-
-
|
83
|
-
version: "2.
|
82
|
+
- 6
|
83
|
+
version: "2.6"
|
84
84
|
type: :development
|
85
85
|
version_requirements: *id003
|
86
86
|
- !ruby/object:Gem::Dependency
|
@@ -91,11 +91,11 @@ dependencies:
|
|
91
91
|
requirements:
|
92
92
|
- - ~>
|
93
93
|
- !ruby/object:Gem::Version
|
94
|
-
hash:
|
94
|
+
hash: 27
|
95
95
|
segments:
|
96
96
|
- 2
|
97
|
-
-
|
98
|
-
version: "2.
|
97
|
+
- 12
|
98
|
+
version: "2.12"
|
99
99
|
type: :development
|
100
100
|
version_requirements: *id004
|
101
101
|
description: |-
|
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
153
|
requirements: []
|
154
154
|
|
155
155
|
rubyforge_project: seattlerb
|
156
|
-
rubygems_version: 1.8.
|
156
|
+
rubygems_version: 1.8.10
|
157
157
|
signing_key:
|
158
158
|
specification_version: 3
|
159
159
|
summary: Flog reports the most tortured code in an easy to read pain report
|
metadata.gz.sig
CHANGED
Binary file
|