cocoapods-vbbuildsource 0.0.2 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -4
- data/Gemfile.lock +1 -11
- data/lib/cocoapods-vbbuildsource/command/vbbuildsource.rb +20 -12
- data/lib/cocoapods-vbbuildsource/gem_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: e5148b5ba82eb4674ec9a26d3dc0b5d74ef179cfc6b49741af742da358cac735
|
4
|
+
data.tar.gz: a394049f02b7ed4268fb5f38034e5903d44376ff625c712cc2fe6baa4e5fce7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 394956b24d2e83003e10baf78ab4786e03d34e5c85497737d4865bffda0dff04b979dd7cd84010cd6e42a2b31b3986d008f08a3984b014a42ff33359563a7ea9
|
7
|
+
data.tar.gz: 87bb12ac43058f8aea96d5b77725e5fcc2f589f15b13b94b8794eae3883826a426d6126dc5972c7fb5a91a826e32694f5035adb8ab8f71126efa854baf3e4077
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cocoapods-vbbuildsource (0.0.
|
4
|
+
cocoapods-vbbuildsource (0.0.7)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -18,7 +18,6 @@ GEM
|
|
18
18
|
httpclient (~> 2.8, >= 2.8.3)
|
19
19
|
json (>= 1.5.1)
|
20
20
|
atomos (0.1.3)
|
21
|
-
bacon (1.2.0)
|
22
21
|
claide (1.0.3)
|
23
22
|
cocoapods (1.10.0)
|
24
23
|
addressable (~> 2.6)
|
@@ -71,15 +70,10 @@ GEM
|
|
71
70
|
concurrent-ruby (~> 1.0)
|
72
71
|
json (2.5.1)
|
73
72
|
minitest (5.14.4)
|
74
|
-
mocha (1.13.0)
|
75
|
-
mocha-on-bacon (0.2.3)
|
76
|
-
mocha (>= 0.13.0)
|
77
73
|
molinillo (0.6.6)
|
78
74
|
nanaimo (0.3.0)
|
79
75
|
nap (1.1.0)
|
80
76
|
netrc (0.11.0)
|
81
|
-
prettybacon (0.0.2)
|
82
|
-
bacon (~> 1.2)
|
83
77
|
public_suffix (4.0.6)
|
84
78
|
rake (13.0.6)
|
85
79
|
rexml (3.2.5)
|
@@ -101,13 +95,9 @@ PLATFORMS
|
|
101
95
|
ruby
|
102
96
|
|
103
97
|
DEPENDENCIES
|
104
|
-
bacon
|
105
98
|
bundler (~> 1.3)
|
106
99
|
cocoapods (= 1.10.0)
|
107
100
|
cocoapods-vbbuildsource!
|
108
|
-
mocha
|
109
|
-
mocha-on-bacon
|
110
|
-
prettybacon
|
111
101
|
rake
|
112
102
|
|
113
103
|
BUNDLED WITH
|
@@ -51,11 +51,17 @@ module Pod
|
|
51
51
|
|
52
52
|
help! "该pod库 #{@module_name} 未找到" unless pod_target
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
54
|
+
file_list = Array.new(pod_target.all_files.count) { |index|
|
55
|
+
file = pod_target.all_files[index]
|
56
|
+
if file.is_a? String
|
57
|
+
Pathname.new(file)
|
58
|
+
else
|
59
|
+
file
|
60
|
+
end
|
61
|
+
}
|
62
|
+
framework_file_path = file_list.detect {|each| each.extname.end_with? 'framework'}
|
57
63
|
|
58
|
-
help! "该pod库 #{@module_name} 不是一个framework" unless
|
64
|
+
help! "该pod库 #{@module_name} 不是一个framework" unless framework_file_path
|
59
65
|
|
60
66
|
binary_build_path = find_binary_build_path framework_file_path
|
61
67
|
|
@@ -82,8 +88,8 @@ module Pod
|
|
82
88
|
binary_file_path = find_binary_file_in_framework framework_file_path
|
83
89
|
help! "未找到库 #{@module_name} 的二进制文件" unless binary_file_path
|
84
90
|
# 找到framework里面的某一个.h头文件的 DW_AT_decl_file 字段
|
85
|
-
|
86
|
-
|
91
|
+
binary_build_path_string = find_file_path_string_in_binary(framework_file_path,binary_file_path)
|
92
|
+
help! "未找到库 #{@module_name} 的二进制path路径" unless binary_build_path_string
|
87
93
|
binary_build_path_list = binary_build_path_string.split('DW_AT_decl_file').delete_if(&:empty?).uniq
|
88
94
|
# 删掉所有的括号引号
|
89
95
|
binary_build_path_list = binary_build_path_list.each { |item| item.gsub!('("','').gsub!('")', '') }
|
@@ -124,13 +130,14 @@ module Pod
|
|
124
130
|
return Pathname.new("#{framework_file_path.to_path}/#{framework_file_path.basename.to_path.gsub!('.framework', '')}")
|
125
131
|
end
|
126
132
|
|
127
|
-
def
|
133
|
+
def find_file_path_string_in_binary(framework_file_path, binary_file_path)
|
128
134
|
framework_file_path.children.collect do |child|
|
129
|
-
if child.file? && child.extname.end_with?(
|
130
|
-
|
135
|
+
if child.file? && child.extname.end_with?('.h')
|
136
|
+
binary_build_path_string = `dwarfdump #{binary_file_path.to_path} | grep #{File.basename(child)} | grep 'DW_AT_decl_file'`.gsub!(/\s/, '')
|
137
|
+
return binary_build_path_string if binary_build_path_string
|
131
138
|
elsif child.directory?
|
132
|
-
|
133
|
-
return
|
139
|
+
binary_build_path_string = find_file_path_string_in_binary(child, binary_file_path)
|
140
|
+
return binary_build_path_string if binary_build_path_string
|
134
141
|
end
|
135
142
|
end
|
136
143
|
return nil
|
@@ -147,7 +154,8 @@ module Pod
|
|
147
154
|
end
|
148
155
|
def find_spec_source_file_path specification
|
149
156
|
source_path = specification.specification.attributes_hash['source_files']
|
150
|
-
source_path = specification.specification.subspecs.first.attributes_hash['source_files']
|
157
|
+
source_path = specification.specification.subspecs.first.attributes_hash['source_files'] unless source_path
|
158
|
+
source_path = specification.specification.subspecs.first.attributes_hash['ios']['source_files'] unless source_path
|
151
159
|
help! "该库 #{@module_name} 的spec文件没填 source_file,暂不支持" unless source_path
|
152
160
|
dir_list = source_path.split('/')
|
153
161
|
help! "源码路径错误 #{source_path}" unless dir_list.count >= 2
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-vbbuildsource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- faliu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|