cocoapods-vbbuildsource 0.0.3 → 0.0.8
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 +0 -4
- data/Gemfile.lock +1 -11
- data/lib/cocoapods-vbbuildsource/command/vbbuildsource.rb +19 -11
- 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: 07f0785dca25ddad2f0a4221999d29dee6338ff91c30941fac0926e9687c2373
|
4
|
+
data.tar.gz: 5ce3a5d68789b6d6b4053d6f9229baff3d22616f08626d90beb456f241e042a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09930f8fa17991979256bd3c4b8fc797ec68e1d1024052780154e7fa6e6be2c6c10ed0e9276569be5d8f26c18ed7fbf91ebabdbb0e945cd12e82c97f0c893c2a'
|
7
|
+
data.tar.gz: 45ba6ac72b1089103b4423e1b559d3aae00c6002022ac848d85962a46c17ecdfda513314c289f88469f08d83e4c911897f819c383a6736782505505904506567
|
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
|
@@ -148,6 +155,7 @@ module Pod
|
|
148
155
|
def find_spec_source_file_path specification
|
149
156
|
source_path = specification.specification.attributes_hash['source_files']
|
150
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.8
|
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
|