fukuzatsu 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fukuzatsu/formatters/text.rb +7 -2
- data/lib/fukuzatsu/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6805feb83ef4136fe20602e02e1bde30b48f6422
|
4
|
+
data.tar.gz: eb8ed00b17515760b7df4d02778d719079c0aec6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80dd25576ef53baa0cd49698edb9a2b91bfbb6875f47392c5f71fe3bb454dd01023a8243708934ab0cbdca855cad0431d2d9c4fae42535728be5e8cd4d3ab1a8
|
7
|
+
data.tar.gz: 91b91e48fde13609ccf11c2d5652c1390926b2bc7c0c24def9592192e3122bd28792fd52acbd14c02e8e232dd0aec217ba179dcca9311250443f24cfc39aafa5
|
@@ -32,7 +32,7 @@ module Formatters
|
|
32
32
|
title: file.path_to_file.color(:white),
|
33
33
|
headings: header,
|
34
34
|
rows: rows,
|
35
|
-
style: {width:
|
35
|
+
style: {width: 90}
|
36
36
|
)
|
37
37
|
table.align_column(3, :right)
|
38
38
|
puts table
|
@@ -41,10 +41,15 @@ module Formatters
|
|
41
41
|
def rows
|
42
42
|
file.methods.map do |method|
|
43
43
|
color = color_for(method)
|
44
|
-
["#{file.class_name}".color(color), "#{method.name}".color(color), "#{method.complexity}".color(color)]
|
44
|
+
[wrap("#{file.class_name}").color(color), wrap("#{method.name}".color(color)), "#{method.complexity}".color(color)]
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
+
def wrap(string)
|
49
|
+
return string if string.length < 25
|
50
|
+
string[0..24] << "..."
|
51
|
+
end
|
52
|
+
|
48
53
|
end
|
49
54
|
|
50
55
|
end
|
data/lib/fukuzatsu/version.rb
CHANGED