cocoapods-vbbuildsource 0.0.4 → 0.0.6

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: aa03f420636e55b7ef86a630b852eb412c481824d9ee86067ec1e3b05e64ccca
4
- data.tar.gz: 67d427802db66e035f29e1ab4ae36e4701c4c80c2a6ee113e04593dab967906e
3
+ metadata.gz: 9f5697037deb821c9fb00801c9da7f8deaa9af0ded40945ce5e1b217d9f80047
4
+ data.tar.gz: e34810ace7739921845288e968cb74aa35bcc86e4ebac9f1f1f077762c622d30
5
5
  SHA512:
6
- metadata.gz: ab43c5e1a635bde0f39d0b87c910a05da207becbece6bb20d69c3f55c89150ab5c0b758876de9b78ddf0926da9670a2856cc6912a031d1aaa161fa67e561a84a
7
- data.tar.gz: 6a6acf5f7462fc633cfddaafc42669ff38a54af516ee22dc996d2eccf0a16e994cb00074482e160ebeda9d93ec500576d9bae649432681cef8535984b608e63f
6
+ metadata.gz: f2a2ee54c27a53f2691c2d0984ae41f70443b1d7ede8d48ba2587b37a4073c0265d3d6a752547effaf76d40bfe0e7b161cbbd5bb7b538c1d6f63ce6fce13fd2e
7
+ data.tar.gz: 0b07c1b2561a009de21a100faeb79c1495c1cd04923f54d1488a6e477ded49805043f972ca0d6ff47dacac61bc7900da6734cb66dee4c187c33b6abb23edb369
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-vbbuildsource (0.0.4)
4
+ cocoapods-vbbuildsource (0.0.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -88,8 +88,8 @@ module Pod
88
88
  binary_file_path = find_binary_file_in_framework framework_file_path
89
89
  help! "未找到库 #{@module_name} 的二进制文件" unless binary_file_path
90
90
  # 找到framework里面的某一个.h头文件的 DW_AT_decl_file 字段
91
- first_head_file = find_first_head_file_in_framework framework_file_path
92
- binary_build_path_string = `dwarfdump #{binary_file_path.to_path} | grep #{File.basename(first_head_file)} | grep 'DW_AT_decl_file'`.gsub!(/\s/, '')
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
93
93
  binary_build_path_list = binary_build_path_string.split('DW_AT_decl_file').delete_if(&:empty?).uniq
94
94
  # 删掉所有的括号引号
95
95
  binary_build_path_list = binary_build_path_list.each { |item| item.gsub!('("','').gsub!('")', '') }
@@ -130,13 +130,14 @@ module Pod
130
130
  return Pathname.new("#{framework_file_path.to_path}/#{framework_file_path.basename.to_path.gsub!('.framework', '')}")
131
131
  end
132
132
 
133
- def find_first_head_file_in_framework(framework_file_path, end_name='.h')
133
+ def find_file_path_string_in_binary(framework_file_path, binary_file_path)
134
134
  framework_file_path.children.collect do |child|
135
- if child.file? && child.extname.end_with?(end_name)
136
- return child
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
137
138
  elsif child.directory?
138
- filePath = find_first_head_file_in_framework child
139
- return filePath if filePath
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
140
141
  end
141
142
  end
142
143
  return nil
@@ -154,6 +155,7 @@ module Pod
154
155
  def find_spec_source_file_path specification
155
156
  source_path = specification.specification.attributes_hash['source_files']
156
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
157
159
  help! "该库 #{@module_name} 的spec文件没填 source_file,暂不支持" unless source_path
158
160
  dir_list = source_path.split('/')
159
161
  help! "源码路径错误 #{source_path}" unless dir_list.count >= 2
@@ -1,3 +1,3 @@
1
1
  module CocoapodsVbbuildsource
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.6"
3
3
  end
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
4
+ version: 0.0.6
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-17 00:00:00.000000000 Z
11
+ date: 2021-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -51,7 +51,6 @@ files:
51
51
  - LICENSE.txt
52
52
  - README.md
53
53
  - Rakefile
54
- - cocoapods-vbbuildsource-0.0.3.gem
55
54
  - cocoapods-vbbuildsource.gemspec
56
55
  - image/filepath.png
57
56
  - image/image.gif
Binary file