cocoapods-bb-PodAssistant 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +22 -0
- data/README.md +48 -0
- data/lib/cocoapods-bb-PodAssistant/babybus/business/babybus_install_environment.rb +129 -0
- data/lib/cocoapods-bb-PodAssistant/babybus/helpers/babybus_info_plist_helper.rb +92 -0
- data/lib/cocoapods-bb-PodAssistant/babybus/installer/post_install_hooks.rb +111 -0
- data/lib/cocoapods-bb-PodAssistant/command/PodAssistant.rb +44 -0
- data/lib/cocoapods-bb-PodAssistant/command/linkline/linkline.rb +68 -0
- data/lib/cocoapods-bb-PodAssistant/command/linkline/target-linkline.rb +9 -0
- data/lib/cocoapods-bb-PodAssistant/command/linkline/targetValidator-linkline.rb +25 -0
- data/lib/cocoapods-bb-PodAssistant/command/linkline/targetdefinition-linkline.rb +37 -0
- data/lib/cocoapods-bb-PodAssistant/command/stable/podfile-linkline.rb +9 -0
- data/lib/cocoapods-bb-PodAssistant/command/stable/stable.rb +168 -0
- data/lib/cocoapods-bb-PodAssistant/command.rb +9 -0
- data/lib/cocoapods-bb-PodAssistant/config/cache_path.rb +16 -0
- data/lib/cocoapods-bb-PodAssistant/config/source_manager.rb +389 -0
- data/lib/cocoapods-bb-PodAssistant/config/stable_source.rb +7 -0
- data/lib/cocoapods-bb-PodAssistant/config/stable_specs.rb +27 -0
- data/lib/cocoapods-bb-PodAssistant/gem_version.rb +3 -0
- data/lib/cocoapods-bb-PodAssistant/helpers/git_cmd_helper.rb +73 -0
- data/lib/cocoapods-bb-PodAssistant/helpers/pod_module_helper.rb +246 -0
- data/lib/cocoapods-bb-PodAssistant/helpers/pod_utils.rb +128 -0
- data/lib/cocoapods-bb-PodAssistant/helpers/stable_env_helper.rb +36 -0
- data/lib/cocoapods-bb-PodAssistant/helpers/stable_manager_helper.rb +85 -0
- data/lib/cocoapods-bb-PodAssistant/helpers/yaml_files_helper.rb +72 -0
- data/lib/cocoapods-bb-PodAssistant/helpers.rb +6 -0
- data/lib/cocoapods-bb-PodAssistant/podfile.rb +392 -0
- data/lib/cocoapods-bb-PodAssistant/source_provider_hook.rb +335 -0
- data/lib/cocoapods-bb-PodAssistant.rb +1 -0
- data/lib/cocoapods_plugin.rb +9 -0
- data/spec/command/PodAssistant_spec.rb +12 -0
- data/spec/spec_helper.rb +50 -0
- metadata +132 -0
@@ -0,0 +1,335 @@
|
|
1
|
+
require 'cocoapods-bb-PodAssistant/command'
|
2
|
+
require 'csv'
|
3
|
+
require 'xcodeproj'
|
4
|
+
|
5
|
+
class Dir
|
6
|
+
def self.size(dir)
|
7
|
+
sum = 0
|
8
|
+
Dir.foreach(dir) do |entry|
|
9
|
+
begin
|
10
|
+
next if entry =~ /^\./ && entry != '.git'
|
11
|
+
next if entry == "lfs" # 不统计在lfs文件夹下的资源,git clone下载的是lfs内的资源,之后copy到真正目录下,导致大小统计了两次,所以这里不统计lfs目录下的资源
|
12
|
+
path = File.join(dir, entry)
|
13
|
+
FileTest.directory?(path) ? sum += Dir.size(path) : sum += File.size(path)
|
14
|
+
rescue => exception
|
15
|
+
# puts "[PodAssistant] Dir.size error(已捕获): #{exception}"
|
16
|
+
next
|
17
|
+
retry
|
18
|
+
end
|
19
|
+
end
|
20
|
+
sum
|
21
|
+
end
|
22
|
+
end
|
23
|
+
$pluginIsVerbose = false
|
24
|
+
$pluginCurrentTarget = ""
|
25
|
+
$pluginCurrentPodName = ""
|
26
|
+
$pluginCurrentZipSize = 0
|
27
|
+
$pluginCurrentZipAllSize = 0
|
28
|
+
$gitSize = 0
|
29
|
+
$gitAllSize = 0
|
30
|
+
$cloneTime = 0
|
31
|
+
$cloneAllTime = 0
|
32
|
+
$downloadTime = 0
|
33
|
+
$downloadAllTime = 0
|
34
|
+
$cdnDownloadTime = 0
|
35
|
+
$cdnDownloadAllTime = 0
|
36
|
+
$cdnUnZipTime = 0
|
37
|
+
$cdnUnZipAllTime = 0
|
38
|
+
if ARGV.include?("--verbose")
|
39
|
+
$pluginIsVerbose = true
|
40
|
+
end
|
41
|
+
|
42
|
+
$podStartTime = 0
|
43
|
+
$podEndTime = 0
|
44
|
+
|
45
|
+
module BB
|
46
|
+
|
47
|
+
Pod::HooksManager.register("cocoapods-bb-PodAssistant", :pre_install) do |installer|
|
48
|
+
begin
|
49
|
+
$podStartTime = Time.new
|
50
|
+
puts "[PodAssistant] plugin hook pre_install".yellow
|
51
|
+
env = BB::StableEnv.new()
|
52
|
+
env.loadDeveloperEnv
|
53
|
+
if $pluginIsVerbose == true
|
54
|
+
# home路径下是否存在.AllPodsTimeAndSize.csv的隐藏文件
|
55
|
+
if File.exist?("#{Dir.home}/.AllPodsTimeAndSize.csv")
|
56
|
+
# 如果存在则先删除,每次都生成新的csv文件
|
57
|
+
File.delete("#{Dir.home}/.AllPodsTimeAndSize.csv")
|
58
|
+
end
|
59
|
+
# 统计到csv中
|
60
|
+
CSV.open("#{Dir.home}/.AllPodsTimeAndSize.csv", "ab:utf-8") do |csv|
|
61
|
+
csv << ["\xEF\xBB\xBF名称", "下载耗时(S)", "下载文件大小(M)", "cache文件大小(M)", "大小差值(Git专用)", "CDN/Git", "CDN下载耗时", "CDN解压耗时"]
|
62
|
+
end
|
63
|
+
end
|
64
|
+
rescue => exception
|
65
|
+
|
66
|
+
end
|
67
|
+
end
|
68
|
+
Pod::HooksManager.register("cocoapods-bb-PodAssistant", :post_install) do |installer|
|
69
|
+
begin
|
70
|
+
$podEndTime = Time.new
|
71
|
+
puts "[PodAssistant] plugin hook post_install".yellow
|
72
|
+
puts "[PodAssistant] pod库下载耗时 GitCloneAllSize: #{$gitAllSize} M GitCloneAllTime: #{$cloneAllTime} S CDNDownloadAllSize: #{$pluginCurrentZipAllSize} M CDNAllTime: #{$downloadAllTime} S CDNDownloadAllTime: #{$cdnDownloadAllTime} S CDNUnzipAllTime: #{$cdnUnZipAllTime} S"
|
73
|
+
# 如果是--verbose模式且$gitAllSize与$cloneAllTime(不为0表示有下载pod)
|
74
|
+
if $pluginIsVerbose == true && $gitAllSize != 0 && $cloneAllTime != 0 && $pluginCurrentZipAllSize != 0 && $downloadAllTime != 0
|
75
|
+
File.rename "#{Dir.home}/.AllPodsTimeAndSize.csv", "#{installer.sandbox_root}/AllPodsTimeAndSize.csv"
|
76
|
+
puts "具体的统计数据请在#{installer.sandbox_root}/AllPodsTimeAndSize.csv中查看"
|
77
|
+
end
|
78
|
+
# 获取时间差
|
79
|
+
time = $podEndTime - $podStartTime
|
80
|
+
puts "[PodAssistant] pod操作总耗时【#{time.to_s.send(:red)}秒】start:#{$podStartTime} end:#{$podEndTime}".green
|
81
|
+
rescue => exception
|
82
|
+
# 如果没有下载则#{Dir.home}/.AllPodsTimeAndSize.csv文件不会生成,产生异常
|
83
|
+
puts "[PodAssistant] post_install error(已捕获): #{exception}".red
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
class Pod::Downloader::Cache
|
88
|
+
# 使用方法别名hook copy_and_clean方法
|
89
|
+
alias :origin_copy_and_clean :copy_and_clean
|
90
|
+
def copy_and_clean(source, destination, spec)
|
91
|
+
# 执行之前的拷贝到cache并且清除git clone临时目录的方法
|
92
|
+
origin_copy_and_clean(source, destination, spec)
|
93
|
+
# 如果是--verbose,则输出详细信息,生成csv
|
94
|
+
if $pluginIsVerbose == true
|
95
|
+
verboseCopy_and_clean(source, destination, spec)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
# --verbose输出详细信息,生成在home路径下.AllPodsTimeAndSize.csv的隐藏文件
|
100
|
+
def verboseCopy_and_clean(source, destination, spec)
|
101
|
+
begin
|
102
|
+
# 计算拷贝到的目录下所有文件总大小,单位为M
|
103
|
+
dirSum = Dir.size(destination.to_s)/1000.0/1000.0
|
104
|
+
# 标红输出cache文件大小,单位为M
|
105
|
+
puts "[PodAssistant] cachesize #{spec.name}: "+"#{dirSum}"+" M"
|
106
|
+
# 如果相等则为CDN的下载方式
|
107
|
+
if $gitSize == 0
|
108
|
+
# CDN的下载方式
|
109
|
+
CSV.open("#{Dir.home}/.AllPodsTimeAndSize.csv", "a+") do |csv|
|
110
|
+
csv << [spec.name, $downloadTime, $pluginCurrentZipSize, dirSum, "CDN不统计此项", "CDN", $cdnDownloadTime, $cdnUnZipTime]
|
111
|
+
end
|
112
|
+
else
|
113
|
+
# git的下载方式
|
114
|
+
# 计算git clone大小和cache文件大小的差值,如果差值过大,则有优化空间
|
115
|
+
diffSize = $gitSize - dirSum
|
116
|
+
# 标红输出差值
|
117
|
+
puts "[PodAssistant] diffSize = #{diffSize}"+"M "
|
118
|
+
CSV.open("#{Dir.home}/.AllPodsTimeAndSize.csv", "a+") do |csv|
|
119
|
+
csv << [spec.name, $cloneTime, $gitSize, dirSum, diffSize, "Git", "Git不统计此项", "Git不统计此项"]
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
# 换行
|
124
|
+
puts
|
125
|
+
|
126
|
+
rescue => exception
|
127
|
+
# 输出拷贝清除方法异常
|
128
|
+
puts "[PodAssistant] verboseCopy_and_clean error(已捕获): #{exception}".red
|
129
|
+
end
|
130
|
+
$gitSize = 0
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
|
135
|
+
class Pod::Downloader::Cache
|
136
|
+
|
137
|
+
alias :origin_download :download
|
138
|
+
|
139
|
+
def download(request, target)
|
140
|
+
# 获取downloader下载的文件路径
|
141
|
+
source = target.to_s
|
142
|
+
# 赋值当前正在下载的文件路径给全局变量,为了解压zip的时候做判断
|
143
|
+
$pluginCurrentTarget = source
|
144
|
+
# 赋值当前正在下载的pod名称给全局变量,为了解压zip的时候做输出
|
145
|
+
$pluginCurrentPodName = request.name.to_s
|
146
|
+
# 获取clone执行前时间点
|
147
|
+
time1 = Time.new
|
148
|
+
# 执行之前的download_source方法,接收该方法的返回值
|
149
|
+
result, podspecs = origin_download(request, target)
|
150
|
+
|
151
|
+
# 如果不是--verbose,只输出总耗时,总下载大小
|
152
|
+
# 捕获一下异常,不会因为plugin的原因导致pod失败
|
153
|
+
begin
|
154
|
+
# 获取clone执行后时间点
|
155
|
+
time2 = Time.new
|
156
|
+
# 获取时间差
|
157
|
+
time = time2 - time1
|
158
|
+
if request.params["git".to_sym]
|
159
|
+
# 说明是git方式
|
160
|
+
# 赋值一个给全局变量,之后时间统计要用到
|
161
|
+
$cloneTime = time
|
162
|
+
# 赋值一个给全局变量,之后时间统计要用到
|
163
|
+
$cloneAllTime = $cloneAllTime + time
|
164
|
+
# 计算downloader下载的文件大小,单位为M
|
165
|
+
dirSum = Dir.size(source)/1000.0/1000.0
|
166
|
+
# 赋值给一个全局变量,之后输出会用到
|
167
|
+
$gitAllSize = $gitAllSize + dirSum
|
168
|
+
else
|
169
|
+
# 说明是CDN方式
|
170
|
+
# 赋值一个给全局变量,之后时间统计要用到
|
171
|
+
$downloadTime = time
|
172
|
+
# 赋值一个给全局变量,之后时间统计要用到
|
173
|
+
$downloadAllTime = $downloadAllTime + time
|
174
|
+
# 赋值给一个全局变量,之后输出会用到
|
175
|
+
$cdnDownloadAllTime = $cdnDownloadAllTime + $cdnDownloadTime
|
176
|
+
# 赋值给一个全局变量,之后输出会用到
|
177
|
+
$cdnUnZipAllTime = $cdnUnZipAllTime + $cdnUnZipTime
|
178
|
+
# 赋值给一个全局变量,之后输出会用到
|
179
|
+
$pluginCurrentZipAllSize = $pluginCurrentZipAllSize + $pluginCurrentZipSize
|
180
|
+
end
|
181
|
+
|
182
|
+
# 如果是--verbose,则输出详细信息,生成csv
|
183
|
+
if $pluginIsVerbose == true
|
184
|
+
verboseDownload(request, time, dirSum)
|
185
|
+
end
|
186
|
+
# 返回值
|
187
|
+
[result, podspecs]
|
188
|
+
rescue => exception
|
189
|
+
# 标红输出git clone hook异常
|
190
|
+
puts "[PodAssistant] download error(已捕获): #{exception}"
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
def verboseDownload(request, time, dirSum)
|
195
|
+
if request.params["git".to_sym]
|
196
|
+
# 说明是git方式
|
197
|
+
# 标红输出git clone耗时
|
198
|
+
puts "[PodAssistant] #{request.name.to_s} clone time: #{time}"+" S"
|
199
|
+
# 赋值给一个全局变量,之后输出会用到
|
200
|
+
$gitSize = dirSum
|
201
|
+
# 标红输出git clone下载文件大小
|
202
|
+
puts "[PodAssistant] #{request.name.to_s} clone allsize: "+"#{dirSum}"+" M"
|
203
|
+
else
|
204
|
+
# 说明是CDN方式
|
205
|
+
# 标红输出CDN 下载耗时
|
206
|
+
puts "[PodAssistant] #{request.name.to_s} CDN download time: #{$cdnDownloadTime}"+" S"
|
207
|
+
# 标红输出CDN 解压耗时
|
208
|
+
puts "[PodAssistant] #{request.name.to_s} CDN unzip time: #{$cdnUnZipTime}"+" S"
|
209
|
+
# 标红输出CDN 总耗时
|
210
|
+
puts "[PodAssistant] #{request.name.to_s} CDN All time: #{$downloadTime}"+" S"
|
211
|
+
# 标红输出CDN clone下载文件大小
|
212
|
+
puts "[PodAssistant] #{request.name.to_s} CDN zipSize: "+"#{$pluginCurrentZipSize}"+" M"
|
213
|
+
end
|
214
|
+
|
215
|
+
end
|
216
|
+
|
217
|
+
end
|
218
|
+
|
219
|
+
class Pod::Downloader::Http
|
220
|
+
# 使用方法别名hook解压方法,获取解压之前的文件大小
|
221
|
+
alias :origin_download_file :download_file
|
222
|
+
alias :origin_extract_with_type :extract_with_type
|
223
|
+
|
224
|
+
def download_file(_full_filename)
|
225
|
+
# 捕获一下异常,不会因为plugin的原因导致pod失败
|
226
|
+
begin
|
227
|
+
if _full_filename.to_s.include?($pluginCurrentTarget)
|
228
|
+
# 说明是之前被赋值的开始下载了
|
229
|
+
|
230
|
+
# 获取CDN下载执行前时间点
|
231
|
+
time1 = Time.new
|
232
|
+
# 执行原来的CDN下载方法
|
233
|
+
origin_download_file(_full_filename)
|
234
|
+
# 获取CDN下载执行后时间点
|
235
|
+
time2 = Time.new
|
236
|
+
# 赋值CDN下载耗时给全局变量,用于之后输出以及写在csv中
|
237
|
+
$cdnDownloadTime = time2 - time1
|
238
|
+
else
|
239
|
+
# 说明不是之前被赋值的开始下载了,输出一下,然后清空
|
240
|
+
puts "[PodAssistant] unzip warning: #{$pluginCurrentTarget} target error"
|
241
|
+
puts "[PodAssistant] unzip warning: #{$pluginCurrentPodName} name error"
|
242
|
+
$pluginCurrentTarget = ""
|
243
|
+
$pluginCurrentPodName = ""
|
244
|
+
end
|
245
|
+
rescue => exception
|
246
|
+
# 输出CDM下载方法异常
|
247
|
+
puts "[PodAssistant] download_file error(已捕获): #{exception}"
|
248
|
+
end
|
249
|
+
|
250
|
+
end
|
251
|
+
|
252
|
+
def extract_with_type(full_filename, type = :zip)
|
253
|
+
# 捕获一下异常,不会因为plugin的原因导致pod失败
|
254
|
+
begin
|
255
|
+
if full_filename.to_s.include?($pluginCurrentTarget)
|
256
|
+
# 说明是之前被赋值的下载完成了,开始进行解压了
|
257
|
+
|
258
|
+
# 计算拷贝到的目录下所有文件总大小,单位为M
|
259
|
+
dirSum = File.size(full_filename.to_s)/1000.0/1000.0
|
260
|
+
# 赋值给当前正在解压的zip大小,之后输出到csv要用
|
261
|
+
$pluginCurrentZipSize = dirSum
|
262
|
+
else
|
263
|
+
# 说明不是之前被赋值的下载完成了,输出一下,然后清空
|
264
|
+
puts "[PodAssistant] unzip warning: #{$pluginCurrentTarget} target error"
|
265
|
+
puts "[PodAssistant] unzip warning: #{$pluginCurrentPodName} name error"
|
266
|
+
$pluginCurrentTarget = ""
|
267
|
+
$pluginCurrentPodName = ""
|
268
|
+
end
|
269
|
+
rescue => exception
|
270
|
+
# 输出CDN解压方法异常
|
271
|
+
puts "[PodAssistant] extract_with_type error(已捕获): #{exception}"
|
272
|
+
end
|
273
|
+
# 获取CDN解压前时间点
|
274
|
+
time1 = Time.new
|
275
|
+
# 执行之前的解压方法
|
276
|
+
origin_extract_with_type(full_filename, type)
|
277
|
+
# 获取CDN解压后时间点
|
278
|
+
time2 = Time.new
|
279
|
+
# 赋值CDN解压耗时给全局变量,用于之后输出以及写在csv中
|
280
|
+
$cdnUnZipTime = time2 - time1
|
281
|
+
end
|
282
|
+
end
|
283
|
+
|
284
|
+
# class Pod::Downloader::Git
|
285
|
+
# # 使用方法别名hook clone方法
|
286
|
+
# alias :origin_clone :clone
|
287
|
+
# def clone(force_head = false, shallow_clone = true)
|
288
|
+
# # 获取clone执行前时间点
|
289
|
+
# time1 = Time.new
|
290
|
+
# # 执行之前的clone方法
|
291
|
+
# origin_clone(force_head, shallow_clone)
|
292
|
+
|
293
|
+
# # 如果不是--verbose,只输出总耗时,总下载大小
|
294
|
+
# # 捕获一下异常,不会因为plugin的原因导致pod失败
|
295
|
+
# begin
|
296
|
+
# # 获取clone执行后时间点
|
297
|
+
# time2 = Time.new
|
298
|
+
# # 获取时间差
|
299
|
+
# time = time2 - time1
|
300
|
+
# # 赋值一个给全局变量,之后时间统计要用到
|
301
|
+
# $cloneTime = time
|
302
|
+
# # 赋值一个给全局变量,之后时间统计要用到
|
303
|
+
# $cloneAllTime = $cloneAllTime + time
|
304
|
+
# # 获取git clone下载的文件路径
|
305
|
+
# source = target_path.to_s
|
306
|
+
# # 计算git clone下载的文件大小,单位为M
|
307
|
+
# dirSum = Dir.size(source)/1000.0/1000.0
|
308
|
+
# # 赋值给一个全局变量,之后输出会用到
|
309
|
+
# $gitAllSize = $gitAllSize + dirSum
|
310
|
+
# # 如果是--verbose,则输出详细信息,生成csv
|
311
|
+
# if $pluginIsVerbose == true
|
312
|
+
# verboseClone(force_head, shallow_clone, time, dirSum)
|
313
|
+
# end
|
314
|
+
# rescue => exception
|
315
|
+
# # 标红输出git clone hook异常
|
316
|
+
# puts "[PodAssistant] clone error(已捕获): #{exception}"
|
317
|
+
# end
|
318
|
+
|
319
|
+
# end
|
320
|
+
|
321
|
+
# # --verbose输出每个库的下载耗时
|
322
|
+
# def verboseClone(force_head, shallow_clone, time, dirSum)
|
323
|
+
# # 这里只能根据url获取到pod名称的开始index
|
324
|
+
# start = url.rindex("/") + 1
|
325
|
+
# # 获取pod名称
|
326
|
+
# podName = url[start, url.length]
|
327
|
+
# # 标红输出git clone耗时
|
328
|
+
# puts "[PodAssistant] #{podName} clone time: #{time}"
|
329
|
+
# # 赋值给一个全局变量,之后输出会用到
|
330
|
+
# $gitSize = dirSum
|
331
|
+
# # 标红输出git clone下载文件大小
|
332
|
+
# puts "[PodAssistant] #{podName} clone allsize: "+"#{dirSum}"+"M"
|
333
|
+
# end
|
334
|
+
# end
|
335
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'cocoapods-bb-PodAssistant/gem_version'
|
@@ -0,0 +1,9 @@
|
|
1
|
+
require 'cocoapods-bb-PodAssistant/helpers'
|
2
|
+
require 'cocoapods-bb-PodAssistant/podfile'
|
3
|
+
require 'cocoapods-bb-PodAssistant/source_provider_hook'
|
4
|
+
|
5
|
+
require 'cocoapods-bb-PodAssistant/babybus/helpers/babybus_info_plist_helper'
|
6
|
+
require 'cocoapods-bb-PodAssistant/babybus/business/babybus_install_environment'
|
7
|
+
require 'cocoapods-bb-PodAssistant/babybus/installer/post_install_hooks'
|
8
|
+
|
9
|
+
require 'cocoapods-bb-PodAssistant/command'
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require File.expand_path('../../spec_helper', __FILE__)
|
2
|
+
|
3
|
+
module Pod
|
4
|
+
describe Command::Podassistant do
|
5
|
+
describe 'CLAide' do
|
6
|
+
it 'registers it self' do
|
7
|
+
Command.parse(%w{ PodAssistant }).should.be.instance_of Command::Podassistant
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
ROOT = Pathname.new(File.expand_path('../../', __FILE__))
|
3
|
+
$:.unshift((ROOT + 'lib').to_s)
|
4
|
+
$:.unshift((ROOT + 'spec').to_s)
|
5
|
+
|
6
|
+
require 'bundler/setup'
|
7
|
+
require 'bacon'
|
8
|
+
require 'mocha-on-bacon'
|
9
|
+
require 'pretty_bacon'
|
10
|
+
require 'pathname'
|
11
|
+
require 'cocoapods'
|
12
|
+
|
13
|
+
Mocha::Configuration.prevent(:stubbing_non_existent_method)
|
14
|
+
|
15
|
+
require 'cocoapods_plugin'
|
16
|
+
|
17
|
+
#-----------------------------------------------------------------------------#
|
18
|
+
|
19
|
+
module Pod
|
20
|
+
|
21
|
+
# Disable the wrapping so the output is deterministic in the tests.
|
22
|
+
#
|
23
|
+
UI.disable_wrap = true
|
24
|
+
|
25
|
+
# Redirects the messages to an internal store.
|
26
|
+
#
|
27
|
+
module UI
|
28
|
+
@output = ''
|
29
|
+
@warnings = ''
|
30
|
+
|
31
|
+
class << self
|
32
|
+
attr_accessor :output
|
33
|
+
attr_accessor :warnings
|
34
|
+
|
35
|
+
def puts(message = '')
|
36
|
+
@output << "#{message}\n"
|
37
|
+
end
|
38
|
+
|
39
|
+
def warn(message = '', actions = [])
|
40
|
+
@warnings << "#{message}\n"
|
41
|
+
end
|
42
|
+
|
43
|
+
def print(message)
|
44
|
+
@output << message
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
#-----------------------------------------------------------------------------#
|
metadata
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cocoapods-bb-PodAssistant
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.5
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- humin
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-10-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: cocoapods-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: cocoapods
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.10.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.10.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.3'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: A short description of cocoapods-bb-PodAssistant.
|
70
|
+
email:
|
71
|
+
- humin1102@126.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- LICENSE.txt
|
77
|
+
- README.md
|
78
|
+
- lib/cocoapods-bb-PodAssistant.rb
|
79
|
+
- lib/cocoapods-bb-PodAssistant/babybus/business/babybus_install_environment.rb
|
80
|
+
- lib/cocoapods-bb-PodAssistant/babybus/helpers/babybus_info_plist_helper.rb
|
81
|
+
- lib/cocoapods-bb-PodAssistant/babybus/installer/post_install_hooks.rb
|
82
|
+
- lib/cocoapods-bb-PodAssistant/command.rb
|
83
|
+
- lib/cocoapods-bb-PodAssistant/command/PodAssistant.rb
|
84
|
+
- lib/cocoapods-bb-PodAssistant/command/linkline/linkline.rb
|
85
|
+
- lib/cocoapods-bb-PodAssistant/command/linkline/target-linkline.rb
|
86
|
+
- lib/cocoapods-bb-PodAssistant/command/linkline/targetValidator-linkline.rb
|
87
|
+
- lib/cocoapods-bb-PodAssistant/command/linkline/targetdefinition-linkline.rb
|
88
|
+
- lib/cocoapods-bb-PodAssistant/command/stable/podfile-linkline.rb
|
89
|
+
- lib/cocoapods-bb-PodAssistant/command/stable/stable.rb
|
90
|
+
- lib/cocoapods-bb-PodAssistant/config/cache_path.rb
|
91
|
+
- lib/cocoapods-bb-PodAssistant/config/source_manager.rb
|
92
|
+
- lib/cocoapods-bb-PodAssistant/config/stable_source.rb
|
93
|
+
- lib/cocoapods-bb-PodAssistant/config/stable_specs.rb
|
94
|
+
- lib/cocoapods-bb-PodAssistant/gem_version.rb
|
95
|
+
- lib/cocoapods-bb-PodAssistant/helpers.rb
|
96
|
+
- lib/cocoapods-bb-PodAssistant/helpers/git_cmd_helper.rb
|
97
|
+
- lib/cocoapods-bb-PodAssistant/helpers/pod_module_helper.rb
|
98
|
+
- lib/cocoapods-bb-PodAssistant/helpers/pod_utils.rb
|
99
|
+
- lib/cocoapods-bb-PodAssistant/helpers/stable_env_helper.rb
|
100
|
+
- lib/cocoapods-bb-PodAssistant/helpers/stable_manager_helper.rb
|
101
|
+
- lib/cocoapods-bb-PodAssistant/helpers/yaml_files_helper.rb
|
102
|
+
- lib/cocoapods-bb-PodAssistant/podfile.rb
|
103
|
+
- lib/cocoapods-bb-PodAssistant/source_provider_hook.rb
|
104
|
+
- lib/cocoapods_plugin.rb
|
105
|
+
- spec/command/PodAssistant_spec.rb
|
106
|
+
- spec/spec_helper.rb
|
107
|
+
homepage: https://github.com/BMPaaS/cocoapods-bb-PodAssistant
|
108
|
+
licenses:
|
109
|
+
- MIT
|
110
|
+
metadata: {}
|
111
|
+
post_install_message:
|
112
|
+
rdoc_options: []
|
113
|
+
require_paths:
|
114
|
+
- lib
|
115
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
requirements: []
|
126
|
+
rubygems_version: 3.4.20
|
127
|
+
signing_key:
|
128
|
+
specification_version: 4
|
129
|
+
summary: A longer description of cocoapods-bb-PodAssistant.
|
130
|
+
test_files:
|
131
|
+
- spec/command/PodAssistant_spec.rb
|
132
|
+
- spec/spec_helper.rb
|