lhj-tools 0.2.36 → 0.2.38

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: b9a0b24ce8dd1eeb13324c7f45ef7f2a550fe5708dee25de1ec359c5b14814c8
4
- data.tar.gz: 77f5d7b3ce5ca29e820d487bba15a2766d4f06b6f38014e0e84c239e1a7002e7
3
+ metadata.gz: b8aaa3a0b58e7e78dd752c9e5d9d27d3c7ffc88d3dfad5a5f4c270f3e765ce9c
4
+ data.tar.gz: 8ffc2071525bb33e6a87922740bfe085409dd2b8c54e5d3de4191e89f832473b
5
5
  SHA512:
6
- metadata.gz: e65b3ee57d4050d77cc34faf7ca36be07f7783f1824a073b324215a0ea1e38cf6816a7b6c83ae8db01cd453f92ee4e70035d7865f43263383b80649adca8baad
7
- data.tar.gz: 9257435334260aa8ee1f4ce3a9ce8bc2b88ad7e07231ad355fea41de7a278770c8e21a104b53ea305627b132718174bb068b6f73cad998e7c6d5195b476d24c1
6
+ metadata.gz: a656e493205961905b8cfa69121ccea33cd883f0c90464c2efefb152751010e1602cadb955c115aaae52384c87fbcf53b87e411705c1d08c5bc1313cfed1f551
7
+ data.tar.gz: e85ecc2201a677d68cbad63b0b29f5b37406aef9ffd75a4bb08d62c8f83260324aebd9be337c022e4fdc4bf079d27318f34ee6b6c74811ec60063df3d8405304
@@ -15,6 +15,10 @@ module Lhj
15
15
  @yaml ||= YAML.load_file(config_file)
16
16
  end
17
17
 
18
+ def self.clean
19
+ @yaml = nil
20
+ end
21
+
18
22
  def self.api_key(idx)
19
23
  i = idx % config.length
20
24
  config[i]['api_key']
@@ -15,6 +15,10 @@ module Lhj
15
15
  @yaml ||= YAML.load_file(config_file)
16
16
  end
17
17
 
18
+ def self.clean
19
+ @yaml = nil
20
+ end
21
+
18
22
  def self.agent_id
19
23
  config['agent_id']
20
24
  end
@@ -13,6 +13,10 @@ module Lhj
13
13
  @yaml ||= YAML.load_file(config_file)
14
14
  end
15
15
 
16
+ def self.clean
17
+ @yaml = nil
18
+ end
19
+
16
20
  def self.oss_endpoint
17
21
  config['oss_endpoint']
18
22
  end
@@ -18,7 +18,7 @@ module Lhj
18
18
 
19
19
  result[File.basename(f)] = infos
20
20
  end
21
- result.keys.each_slice(10) { |a| notify(result.slice(*a)) }
21
+ # result.keys.each_slice(10) { |a| notify(result.slice(*a)) }
22
22
  end
23
23
 
24
24
  def self.show_result(result)
@@ -35,10 +35,14 @@ module Lhj
35
35
  def self.handle_file(file)
36
36
  result = []
37
37
  File.open(file, 'r') do |f|
38
+ multi_comment = false
38
39
  f.readlines.each_with_index do |line, idx|
39
- next if line =~ %r{//}
40
- next if line =~ /#/
41
- next if line.strip =~ /^\*/
40
+ multi_comment = true if line =~ %r{/\*} && line !~ %r{\*/} && !multi_comment
41
+ multi_comment = false if line !~ %r{/\*} && line =~ %r{\*/} && multi_comment
42
+
43
+ next if multi_comment
44
+ next if line =~ %r{//} && line.gsub(%r{//.*}, '') !~ /[\u4e00-\u9fa5]/
45
+ next if line =~ /#pragma/
42
46
  next if line =~ /log|Log|LOG/
43
47
  next unless line =~ /[\u4e00-\u9fa5]/
44
48
  next unless Lhj::Trans::Helper.instance.contain_zh_hk(line)
@@ -15,6 +15,10 @@ module Lhj
15
15
  @yaml ||= YAML.load_file(config_file)
16
16
  end
17
17
 
18
+ def self.clean
19
+ @yaml = nil
20
+ end
21
+
18
22
  def self.base_url
19
23
  config['base_url']
20
24
  end
data/lib/lhj/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lhj
4
- VERSION = '0.2.36'
4
+ VERSION = '0.2.38'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lhj-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.36
4
+ version: 0.2.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - lihaijian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-28 00:00:00.000000000 Z
11
+ date: 2023-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcodeproj