itools 0.4.4 → 0.4.5
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/itools +1 -1
- data/lib/itools/count_code_line.rb +3 -3
- data/lib/itools/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ae6378c7f5db42e1cd44826b1cc78e17425380f39394ebf967e4f56082e454c6
|
|
4
|
+
data.tar.gz: fa41563d27bfc3283aa9b41651ae8126b52d578462a54d73d24c2d6db07c3941
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bc56cacc9f9a079a8bab8e052912fbcb21da8c1249991968fbaf2b9762242ec08e1753d651794798e01dac0a7eb4ef590b703966c96f1767c974bafa1dcf21f3
|
|
7
|
+
data.tar.gz: '084644add8986c6b4188f96f95526a93a42b4ab857a5a83b0354928e0366fd55a12146cde095d269e1a95d66fb1e06cebd4b625e97a262230bfdf0d748084611'
|
data/Gemfile.lock
CHANGED
data/bin/itools
CHANGED
|
@@ -15,7 +15,7 @@ module Itools
|
|
|
15
15
|
@line_number = @line_number + 1
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
|
-
|
|
18
|
+
|
|
19
19
|
return
|
|
20
20
|
end
|
|
21
21
|
if File::directory?(@file_path)
|
|
@@ -30,13 +30,12 @@ module Itools
|
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
|
-
puts "\033[32m统计#{counter.file_path}结束,共#{counter.line_number}行\033[0m"
|
|
34
33
|
return
|
|
35
34
|
end
|
|
36
35
|
puts "\033[31m找不到指定路径的文件或者文件夹,请重新输入路径\033[0m"
|
|
37
36
|
end
|
|
38
37
|
|
|
39
|
-
def self.
|
|
38
|
+
def self.count_line(args)
|
|
40
39
|
file = args[0]
|
|
41
40
|
if file.nil?
|
|
42
41
|
puts "\033[31m参数异常,请传入一个参数(项目目录/要统计的文件目录/要统计的文件)\033[0m"
|
|
@@ -44,6 +43,7 @@ module Itools
|
|
|
44
43
|
end
|
|
45
44
|
counter = CodeCouner.new(file)
|
|
46
45
|
counter.calculate_line_number
|
|
46
|
+
puts "\033[32m统计#{counter.file_path}结束,共#{counter.line_number}行\033[0m"
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
49
|
end
|
data/lib/itools/version.rb
CHANGED