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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0aef564596d34a0e5ade54a1d465e0672278b760ccf02f9502c9184432d1cfc8
4
- data.tar.gz: 1c1264bb6c7675660b172d35498c9cb4890a2c4353ecfda5df6f1790cd0953aa
3
+ metadata.gz: 07f0785dca25ddad2f0a4221999d29dee6338ff91c30941fac0926e9687c2373
4
+ data.tar.gz: 5ce3a5d68789b6d6b4053d6f9229baff3d22616f08626d90beb456f241e042a0
5
5
  SHA512:
6
- metadata.gz: 208b621a0d96418236bf4f98620d8466015de7fad0fb75a576581c56f8654fe977b567788d261c14b4c77e2f15878fe194299aab9ebca0d873fe80da7d240214
7
- data.tar.gz: a4d568f721d44dfba4bc0cab99f20cf49d78f065371fdc9794c0fd2d3043b4a3b952d029dd6b0fd9060615c86bee22f385fe29dfff83ac617881549fa135875d
6
+ metadata.gz: '09930f8fa17991979256bd3c4b8fc797ec68e1d1024052780154e7fa6e6be2c6c10ed0e9276569be5d8f26c18ed7fbf91ebabdbb0e945cd12e82c97f0c893c2a'
7
+ data.tar.gz: 45ba6ac72b1089103b4423e1b559d3aae00c6002022ac848d85962a46c17ecdfda513314c289f88469f08d83e4c911897f819c383a6736782505505904506567
data/Gemfile CHANGED
@@ -6,8 +6,4 @@ gemspec
6
6
  group :development do
7
7
  gem 'cocoapods', '1.10.0'
8
8
 
9
- gem 'mocha'
10
- gem 'bacon'
11
- gem 'mocha-on-bacon'
12
- gem 'prettybacon'
13
9
  end
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-vbbuildsource (0.0.3)
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
- framework_file_path = pod_target.all_files.first
55
-
56
- framework_file_path = Pathname.new(framework_file_path) if framework_file_path.is_a? String
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 pod_target.all_files.count == 1 and framework_file_path.extname.end_with? 'framework'
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
- first_head_file = find_first_head_file_in_framework framework_file_path
86
- 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
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 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)
128
134
  framework_file_path.children.collect do |child|
129
- if child.file? && child.extname.end_with?(end_name)
130
- 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
131
138
  elsif child.directory?
132
- filePath = find_first_head_file_in_framework child
133
- 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
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
@@ -1,3 +1,3 @@
1
1
  module CocoapodsVbbuildsource
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.8"
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.3
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-10 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