lhj-tools 0.2.82 → 0.2.83
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/lib/lhj/helper/ios_api_available_check_helper.rb +6 -1
- data/lib/lhj/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e5d002932699d20e17f85d6c37b38bb6450b3ddbc1cbf7611d8e01fb28035465
|
|
4
|
+
data.tar.gz: 04c53c4bdd4d245538c1e0f347153aa15a20d5a0497248c89acfc9040d550c56
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e31cccdb1e468653c14cd2e4fc370a6c445fbb22ed6f1c79c610821f8d04c5c2b7368ea0c2ebcefa0f049fff9c9480515ff303799637881a223076b64fb08443
|
|
7
|
+
data.tar.gz: b72cae20a8095402304f1b3b62edfd042a6b330a7903986c52634671dc17285dedd9c221feaa5e96f66bffde9de7e25ac06023b7373ae77ef926a5561d4f9905
|
|
@@ -40,6 +40,7 @@ module Lhj
|
|
|
40
40
|
block_lines = []
|
|
41
41
|
File.open(file, 'r') do |f|
|
|
42
42
|
multi_comment = false
|
|
43
|
+
strong_key = false
|
|
43
44
|
available_idx = 0
|
|
44
45
|
block_idx = 0
|
|
45
46
|
f.readlines.each_with_index do |line, idx|
|
|
@@ -60,10 +61,13 @@ module Lhj
|
|
|
60
61
|
# 此行包含^符号,且不是方法声明,且不是主线程方法
|
|
61
62
|
if (line =~ BLOCK_KEY_BEGIN_REGEX && line !~ /^\s*[+-]/ && line !~ /dispatch_get_main_queue/) || block_idx.positive?
|
|
62
63
|
line_position = block_idx.zero? ? :start : :process
|
|
64
|
+
strong_key = false if block_idx.zero?
|
|
65
|
+
strong_key = true if line =~ /@strongify/
|
|
63
66
|
block_idx += 1 if line =~ /\{/
|
|
64
67
|
block_idx -= 1 if line =~ /\}/
|
|
65
68
|
line_position = :end if block_idx.zero?
|
|
66
|
-
|
|
69
|
+
strong_key = false if block_idx.zero?
|
|
70
|
+
block_lines << { idx: idx, line: line, position: line_position, strong: strong_key }
|
|
67
71
|
end
|
|
68
72
|
end
|
|
69
73
|
end
|
|
@@ -73,6 +77,7 @@ module Lhj
|
|
|
73
77
|
def self.handle_block_notify(file_name, wrapper_lines)
|
|
74
78
|
arr = wrapper_lines.filter { |l| l[:position] != :start }
|
|
75
79
|
arr.filter! { |l| l[:position] != :end }
|
|
80
|
+
arr.filter! { |l| !l[:strong] }
|
|
76
81
|
arr.filter! { |l| l[:line] =~ /\W+self\W+/ || l[:line] =~ /\W+_/ }
|
|
77
82
|
arr.filter! { |l| l[:line] !~ /\^/ }
|
|
78
83
|
arr.filter! { |l| l[:line] !~ /__weak/ }
|
data/lib/lhj/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.2.83
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- lihaijian
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-03-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: xcodeproj
|