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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf986decbad0ed49addbd9bd7b4803672ef2c20f3294241cc41b9d4fea16b134
4
- data.tar.gz: 067a550adab2380e1647ff685a888b3140c129604f8673ce20ff68a0fe5e235a
3
+ metadata.gz: ae6378c7f5db42e1cd44826b1cc78e17425380f39394ebf967e4f56082e454c6
4
+ data.tar.gz: fa41563d27bfc3283aa9b41651ae8126b52d578462a54d73d24c2d6db07c3941
5
5
  SHA512:
6
- metadata.gz: 37c3d384f42d7119c41eef5464171e8d0edf00c331d21aa46eedaa19cce88bb1e70fc5140c8ff519ead685ebe1db29eee92d62bc66524b40de55fadbe09cb578
7
- data.tar.gz: 604cd0e1e17f128dc1724e2943454687c09c93dff02cd50eae8b14a917fc054b7af1773f40a44faab060d8fd9009817a02f8b132d5d39bb7481fe994ec6b1c2e
6
+ metadata.gz: bc56cacc9f9a079a8bab8e052912fbcb21da8c1249991968fbaf2b9762242ec08e1753d651794798e01dac0a7eb4ef590b703966c96f1767c974bafa1dcf21f3
7
+ data.tar.gz: '084644add8986c6b4188f96f95526a93a42b4ab857a5a83b0354928e0366fd55a12146cde095d269e1a95d66fb1e06cebd4b625e97a262230bfdf0d748084611'
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- itools (0.4.4)
4
+ itools (0.4.5)
5
5
  bundler (~> 1.17)
6
6
  gli (~> 2.17)
7
7
  rake (~> 10.0)
data/bin/itools CHANGED
@@ -62,7 +62,7 @@ desc "count lines of code"
62
62
  arg 'file name or folder'
63
63
  command :count_code_line do |c|
64
64
  c.action do |global_options, options, args|
65
- Itools::CodeCouner.counter(args)
65
+ Itools::CodeCouner.count_line(args)
66
66
  end
67
67
  end
68
68
  exit run(ARGV)
@@ -15,7 +15,7 @@ module Itools
15
15
  @line_number = @line_number + 1
16
16
  end
17
17
  end
18
- puts "\033[32m统计#{counter.file_path}结束,共#{counter.line_number}行\033[0m"
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.counter(args)
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
@@ -1,3 +1,3 @@
1
1
  module Itools
2
- VERSION = "0.4.4"
2
+ VERSION = "0.4.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - zhanggui