cocoapods-dev-env 2.0.1 → 2.1.9

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: 3afe919528275cf8b10ba4dc9f641fb314d41973a20b3af3a04f4eb7d6b2490f
4
- data.tar.gz: 89636fb4ea8ac5450f61b682a1e472bfaa2265d3488240c674135baa2bbcf78b
3
+ metadata.gz: c1282e851ae9b54c7bd13e7e05fe72de11a5a56662e1ecdc3af66745eb752e1d
4
+ data.tar.gz: 30f1d0e013d4d56f9f4ff6ea165f6e60d0b8e2a5385a8df85695872e7935507b
5
5
  SHA512:
6
- metadata.gz: 88e9376cedc8fbee56febc9339c05f032bd7dba76793fba50145aa7f612af8f60331b8c523018c922d71c0083e5167e2220b6bf92b3f3c84b2c664343d591519
7
- data.tar.gz: d32ccb577e9f11f1d935f12009ba6c60db7f6c4aef447ffe730f310afb20ed82e63aa858fe6157d318bf9b8e3c96fad7655093fdf9207e583101a9a3bafaeda2
6
+ metadata.gz: 8f7628345e1abff5bddcd84d006a11e98e13d2b3cf8b03ab6c15f3e90760ea4087ecc12952544c89960ded37ddf76108133516b0f8097b4259325f0712a8889f
7
+ data.tar.gz: 7036a12b59e37c374a8377836a5968bf56424ad16b1e9f7d2adb4526b589ebd45c86da355fd8febdceac61f3459eb368425b22429d48c53917f94c412147cb9e
data/Gemfile.lock CHANGED
@@ -1,12 +1,113 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-dev-env (2.0.2)
4
+ cocoapods-dev-env (2.1.8)
5
+ luna-binary-uploader
5
6
 
6
7
  GEM
7
8
  remote: https://rubygems.org/
8
9
  specs:
10
+ CFPropertyList (3.0.5)
11
+ rexml
12
+ activesupport (6.1.4.6)
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ i18n (>= 1.6, < 2)
15
+ minitest (>= 5.1)
16
+ tzinfo (~> 2.0)
17
+ zeitwerk (~> 2.3)
18
+ addressable (2.8.0)
19
+ public_suffix (>= 2.0.2, < 5.0)
20
+ algoliasearch (1.27.5)
21
+ httpclient (~> 2.8, >= 2.8.3)
22
+ json (>= 1.5.1)
23
+ atomos (0.1.3)
24
+ claide (1.1.0)
25
+ cocoapods (1.11.2)
26
+ addressable (~> 2.8)
27
+ claide (>= 1.0.2, < 2.0)
28
+ cocoapods-core (= 1.11.2)
29
+ cocoapods-deintegrate (>= 1.0.3, < 2.0)
30
+ cocoapods-downloader (>= 1.4.0, < 2.0)
31
+ cocoapods-plugins (>= 1.0.0, < 2.0)
32
+ cocoapods-search (>= 1.0.0, < 2.0)
33
+ cocoapods-trunk (>= 1.4.0, < 2.0)
34
+ cocoapods-try (>= 1.1.0, < 2.0)
35
+ colored2 (~> 3.1)
36
+ escape (~> 0.0.4)
37
+ fourflusher (>= 2.3.0, < 3.0)
38
+ gh_inspector (~> 1.0)
39
+ molinillo (~> 0.8.0)
40
+ nap (~> 1.0)
41
+ ruby-macho (>= 1.0, < 3.0)
42
+ xcodeproj (>= 1.21.0, < 2.0)
43
+ cocoapods-core (1.11.2)
44
+ activesupport (>= 5.0, < 7)
45
+ addressable (~> 2.8)
46
+ algoliasearch (~> 1.0)
47
+ concurrent-ruby (~> 1.1)
48
+ fuzzy_match (~> 2.0.4)
49
+ nap (~> 1.0)
50
+ netrc (~> 0.11)
51
+ public_suffix (~> 4.0)
52
+ typhoeus (~> 1.0)
53
+ cocoapods-deintegrate (1.0.5)
54
+ cocoapods-disable-podfile-validations (0.1.1)
55
+ cocoapods-downloader (1.5.1)
56
+ cocoapods-generate (2.0.1)
57
+ cocoapods-disable-podfile-validations (~> 0.1.1)
58
+ cocoapods-imy-bin (0.3.1.3)
59
+ cocoapods
60
+ cocoapods-generate (~> 2.0.0)
61
+ parallel
62
+ cocoapods-plugins (1.0.0)
63
+ nap
64
+ cocoapods-search (1.0.1)
65
+ cocoapods-trunk (1.6.0)
66
+ nap (>= 0.8, < 2.0)
67
+ netrc (~> 0.11)
68
+ cocoapods-try (1.2.0)
69
+ colored2 (3.1.2)
70
+ concurrent-ruby (1.1.9)
71
+ escape (0.0.4)
72
+ ethon (0.14.0)
73
+ ffi (>= 1.15.0)
74
+ ffi (1.15.3)
75
+ fourflusher (2.3.1)
76
+ fuzzy_match (2.0.4)
77
+ gh_inspector (1.1.3)
78
+ gli (2.19.0)
79
+ httpclient (2.8.3)
80
+ i18n (1.9.1)
81
+ concurrent-ruby (~> 1.0)
82
+ json (2.5.1)
83
+ luna-binary-uploader (0.1.26)
84
+ cocoapods
85
+ cocoapods-generate (~> 2.0.1)
86
+ cocoapods-imy-bin (= 0.3.1.3)
87
+ gli (= 2.19.0)
88
+ parallel
89
+ minitest (5.15.0)
90
+ molinillo (0.8.0)
91
+ nanaimo (0.3.0)
92
+ nap (1.1.0)
93
+ netrc (0.11.0)
94
+ parallel (1.21.0)
95
+ public_suffix (4.0.6)
9
96
  rake (10.5.0)
97
+ rexml (3.2.5)
98
+ ruby-macho (2.5.1)
99
+ typhoeus (1.4.0)
100
+ ethon (>= 0.9.0)
101
+ tzinfo (2.0.4)
102
+ concurrent-ruby (~> 1.0)
103
+ xcodeproj (1.21.0)
104
+ CFPropertyList (>= 2.3.3, < 4.0)
105
+ atomos (~> 0.1.3)
106
+ claide (>= 1.0.2, < 2.0)
107
+ colored2 (~> 3.1)
108
+ nanaimo (~> 0.3.0)
109
+ rexml (~> 3.2.4)
110
+ zeitwerk (2.5.4)
10
111
 
11
112
  PLATFORMS
12
113
  ruby
@@ -17,4 +118,4 @@ DEPENDENCIES
17
118
  rake (~> 10.0)
18
119
 
19
120
  BUNDLED WITH
20
- 2.1.4
121
+ 2.2.20
data/README.md CHANGED
@@ -42,6 +42,14 @@ Finally the state clean submodule will be removed automatically.
42
42
  3. When you define "dev_env" to "release", and run ```pod install``` .
43
43
  We want to use the release version in cocoapods repo. And do many check for state, and help you to release the not released pod.
44
44
 
45
+ 新增功能: 支持读取宿主工程的Podfile.lock文件,来获取宿主工程中的依赖,无需在单独的库的example工程中引用对应的pod
46
+ 此功能默认开启, 等同于在顶部写入如下配置: use_parent_lock_info!
47
+ 关闭方法 use_parent_lock_info! false
48
+ 宿主工程路径默认为"../../../"(因为默认放到developing_pods子文件夹下,对应的库文件夹下的Example文件夹下,故需要回溯三层)
49
+ 配置宿主工程相对路径的方法 use_parent_lock_info! :path => '../'
50
+ 暂不支持配置绝对路径,未来也不建议配置绝对路径指向固定的位置
51
+
52
+
45
53
 
46
54
  ## Development
47
55
 
@@ -0,0 +1,21 @@
1
+ {
2
+ "folders": [
3
+ {
4
+ "path": "."
5
+ }
6
+ ],
7
+ "settings": {
8
+ "ruby.useBundler": true, //run non-lint commands with bundle exec
9
+ "ruby.useLanguageServer": true, // use the internal language server (see below)
10
+ "ruby.lint": {
11
+ "rubocop": {
12
+ "useBundler": false // enable rubocop via bundler
13
+ }
14
+ },
15
+ "ruby.format": "rubocop",
16
+ "ruby.codeCompletion": "rcodetools",
17
+ "ruby.intellisense": "rubyLocate",
18
+ "editor.formatOnPaste": true,
19
+ "editor.formatOnSave": true, // use rubocop for formatting
20
+ }
21
+ }
@@ -1,7 +1,7 @@
1
1
  module Cocoapods
2
2
  module Dev
3
3
  module Env
4
- VERSION = "2.0.1"
4
+ VERSION = '2.1.9'
5
5
  end
6
6
  end
7
7
  end
@@ -1,446 +1,3 @@
1
- require "file_processer"
2
- require "luna-binary-uploader"
3
-
4
- Pod::HooksManager.register('cocoapods-dev-env', :pre_install) do |installer|
5
- podfile = installer.podfile
6
- #puts installer.instance_variables
7
- # forbidden submodule not cloned
8
- # 会引起submodule HEAD回滚,不靠谱,先注释掉
9
- # `
10
- # git submodule update --init --recursive
11
- # `
12
- end
13
-
14
- Pod::HooksManager.register('cocoapods-dev-env', :post_install) do |installer|
15
- #puts installer.instance_variables
16
- end
17
-
18
-
19
- $processedPodsState = Hash.new
20
- $processedPodsOptions = Hash.new
21
-
22
- module Pod
23
- class DevEnv
24
- def self.keyword
25
- :dev_env # 'dev'/'beta'/'release'
26
- end
27
- def self.binary_key
28
- :dev_env_use_binary # true / false
29
- end
30
- UI.message "🎉 plugin cocoapods-dev-env loaded 🎉".green
31
- end
32
- class Podfile
33
- class TargetDefinition
34
- attr_reader :binary_repo_url
35
-
36
- def searchAndOpenLocalExample(path)
37
- _currentDir = Dir.pwd
38
- Dir.chdir(path)
39
- Dir.chdir("Example")
40
- `pod install`
41
- projPaths = Dir::glob("*.xcworkspace")
42
- if projPaths.count > 0
43
- `open -a Terminal ./`
44
- `open #{projPaths[0]}`
45
- end
46
- Dir.chdir(_currentDir)
47
- end
48
-
49
- def checkAndRemoveSubmodule(path)
50
- _currentDir = Dir.pwd
51
- Dir.chdir(path)
52
- output = `git status -s`
53
- puts output
54
- if output.length == 0
55
- output = `git status`
56
- if output.include?("push")
57
- raise "submodule #{path} 移除失败,有推送的修改"
58
- end
59
- else
60
- raise "submodule #{path} 移除失败,有未提交的修改"
61
- end
62
- Dir.chdir(_currentDir)
63
- `
64
- git submodule deinit #{path}
65
- rm -rf #{path}
66
- git rm #{path}
67
- `
68
- end
69
-
70
- def checkTagIsEqualToHead(tag, path)
71
- _currentDir = Dir.pwd
72
- Dir.chdir(path)
73
- result = `git describe --abbrev=4 HEAD`
74
- Dir.chdir(_currentDir)
75
- if result.include?(tag)
76
- return true
77
- else
78
- return checkTagOrBranchIsEqalToHead(tag, path)
79
- end
80
- end
81
-
82
- # 这个函数有问题有时候拿不到相同的commit id
83
- def checkTagOrBranchIsEqalToHead(branchOrTag, path)
84
- _currentDir = Dir.pwd
85
- Dir.chdir(path)
86
- headCommitID = `git rev-parse HEAD`
87
- tagCommitID = `git rev-parse #{branchOrTag}`
88
- UI.puts "#{`pwd`} headCommitID:#{headCommitID} \n #{branchOrTag}ComitID:#{tagCommitID}"
89
- Dir.chdir(_currentDir)
90
- return (headCommitID.length > 0 && headCommitID == tagCommitID)
91
- end
92
-
93
- def checkGitStatusAndPush(pod_name)
94
- output = `git status -s`
95
- puts output
96
- if output.length == 0
97
- output = `git status`
98
- if output.include?("push")
99
- ret = system("git push")
100
- if ret != true
101
- raise "💔 #{pod_name.yellow} push 失败"
102
- end
103
- end
104
- else
105
- raise "💔 #{pod_name.yellow} 有未提交的数据"
106
- end
107
- end
108
-
109
- def checkRemoteTagExist(tag)
110
- `git push --tags`
111
- ret = system("git ls-remote --exit-code origin refs/tags/#{tag}")
112
- return ret
113
- end
114
-
115
- def addGitTagAndPush(tag, pod_name)
116
- ret = system("git tag #{tag}")
117
- if ret == true
118
- ret = system("git push origin #{tag}")
119
- if ret != true
120
- raise "💔 #{pod_name.yellow} push tag 失败"
121
- end
122
- end
123
- return ret
124
- end
125
-
126
- def inputNeedJumpForReson(str)
127
- if ARGV.include? '--silent'
128
- return false
129
- end
130
-
131
- puts str.green
132
- puts '是(Y), 任意其他输入或直接回车跳过'.green
133
- input = STDIN.gets
134
- if input[0,1] == "Y"
135
- return true
136
- else
137
- return false
138
- end
139
- end
140
-
141
- def getReposStrForLint()
142
- if podfile.sources.size == 0
143
- return ""
144
- end
145
- str = " --sources="
146
- podfile.sources.each do |source|
147
- str += source
148
- str += ","
149
- end
150
- UI.puts str
151
- return str
152
- end
153
-
154
- def getUserRepoAddress()
155
- if podfile.sources.size == 0
156
- raise "💔 发布release必须配置仓库的地址, e.g.: source 'https://github.com/CocoaPods/Specs.git'"
157
- end
158
- index = nil
159
- begin
160
- UI.puts "\n\n⌨️ 请输入要发布到的cocoapods仓库序号, 按回车确认: ".yellow
161
- num = 1
162
- podfile.sources.each do |source|
163
- UI.puts "#{num.to_s.yellow}. #{source.green}"
164
- num += 1
165
- end
166
- index = STDIN.gets.to_i - 1
167
- end until (index >= 0 && index < podfile.sources.size)
168
- source = podfile.sources[index]
169
- UI.puts "#{"选择了发布到: ".yellow}. #{source.green}(#{index + 1})"
170
- return source
171
- end
172
-
173
- def changeVersionInCocoapods(name, newVersion)
174
- if (newVersion == nil)
175
- UI.puts "💔 切换版本号的版本现在为空,无法设置版本号".yellow
176
- return
177
- end
178
- specName = name + ".podspec"
179
- FileProcesserManager.new(specName,
180
- [
181
- FileProcesser.new(-> (fileContent) {
182
- return fileContent.gsub(/(\.version *= *')(.*')/, "\\1" + newVersion + "'")
183
- })
184
- ]).process()
185
- `git add #{specName}
186
- git commit -m "Mod: 修改版本号为:#{newVersion} by cocoapods_dev_env plugin"`
187
- end
188
-
189
- ## --- option for setting using prebuild framework ---
190
-
191
- def parse_pod_dev_env(name, requirements)
192
- options = requirements.last
193
- pod_name = Specification.root_name(name)
194
- last_options = $processedPodsOptions[pod_name]
195
-
196
- if (last_options != nil)
197
- UI.message "#{name.green} use last_options: #{last_options.to_s.green}"
198
- if options != nil && options.is_a?(Hash)
199
- requirements[requirements.length - 1] = last_options
200
- else
201
- requirements.push(last_options)
202
- end
203
- elsif options.is_a?(Hash)
204
- use_binary = options.delete(Pod::DevEnv::binary_key)
205
- dev_env = options.delete(Pod::DevEnv::keyword)
206
-
207
- deal_dev_env_with_options(dev_env, options, pod_name, name, requirements)
208
- if dev_env != 'dev'
209
- useBinary(dev_env, pod_name, use_binary, options, requirements)
210
- end
211
-
212
-
213
- if dev_env || use_binary
214
- $processedPodsOptions[pod_name] = options.clone
215
- requirements.pop if options.empty?
216
- end
217
- end
218
- end
219
-
220
- def deal_dev_env_with_options(dev_env, options, pod_name, name, requirements)
221
- if dev_env == nil
222
- return
223
- end
224
- UI.message "pod #{name.green} dev-env: #{dev_env.green}"
225
- git = options.delete(:git)
226
- branch = options.delete(:branch)
227
- tag = options.delete(:tag)
228
- path = options.delete(:path)
229
- if path == nil
230
- path = "./developing_pods/#{pod_name}"
231
- end
232
- if git == nil || git.length == 0
233
- raise "💔 #{pod_name.yellow} 未定义:git => 'xxx'库地址"
234
- end
235
- if branch == nil || branch.length == 0
236
- raise "💔 #{pod_name.yellow} 未定义:branch => 'xxx'"
237
- end
238
- if tag == nil || tag.length == 0
239
- raise "💔 #{pod_name.yellow} 未定义:tag => 'xxx', tag 将会作为 dev模式下载最新代码检查的依据,beta模式引用的tag 以及 release模式引用的版本号"
240
- end
241
-
242
- if dev_env == 'subtree'
243
- if !File.directory?(path)
244
- _toplevelDir = `git rev-parse --show-toplevel`
245
- _currentDir = `pwd`
246
- _subtreeDir = path
247
- if _currentDir != _toplevelDir
248
- Dir.chdir(_toplevelDir)
249
- _end = path
250
- if _end[0,2] == './'
251
- _end = _end[1, _end.length - 1]
252
- else
253
- _end = '/' + _end
254
- end
255
- _subtreeDir = './' + _currentDir[_toplevelDir.length, _currentDir.length - _toplevelDir.length] + path
256
- end
257
- _cmd = "git subtree add --prefix #{_subtreeDir} #{git} #{branch} --squash"
258
- UI.puts _cmd
259
- system(_cmd)
260
- Dir.chdir(_currentDir)
261
- end
262
- options[:path] = path
263
- if requirements.length >= 2
264
- requirements.delete_at(0)
265
- end
266
- UI.message "pod #{pod_name.green} enabled #{"subtree".green}-mode 🍺"
267
- elsif dev_env == 'dev'
268
- # 开发模式,使用path方式引用本地的submodule git库
269
- if !File.directory?(path)
270
- UI.puts "add submodule for #{pod_name.green}".yellow
271
- _cmd = "git submodule add --force -b #{branch} #{git} #{path}"
272
- UI.puts _cmd
273
- system(_cmd)
274
-
275
- _currentDir = Dir.pwd
276
- Dir.chdir(path)
277
-
278
- curGitRemoteUrl = `git remote get-url origin`.rstrip()
279
- if curGitRemoteUrl == git
280
- _cmd = "git reset --hard"
281
- UI.puts _cmd
282
- system(_cmd)
283
- end
284
- Dir.chdir(_currentDir)
285
-
286
- # if inputNeedJumpForReson("本地库#{pod_name} 开发模式加载完成,是否自动打开Example工程")
287
- # searchAndOpenLocalExample(path)
288
- # end
289
- if !checkTagIsEqualToHead(tag, path) && !checkTagIsEqualToHead("#{tag}_beta", path)
290
- raise "💔 #{pod_name.yellow} branch:#{branch.yellow} 与 tag:#{tag.yellow}[_beta] 内容不同步,请自行确认所用分支和tag后重新执行 pod install"
291
- end
292
- else
293
- # if inputNeedJumpForReson("本地库#{pod_name} 处于开发模式,是否自动打开Example工程")
294
- # searchAndOpenLocalExample(path)
295
- # end
296
- end
297
- options[:path] = path
298
- if requirements.length >= 2
299
- requirements.delete_at(0)
300
- end
301
- UI.message "pod #{pod_name.green} enabled #{"dev".green}-mode 🍺"
302
- elsif dev_env == 'beta'
303
- # Beta模式,使用tag引用远端git库的代码
304
- originTag = tag
305
- tag = "#{tag}_beta"
306
- if File.directory?(path)
307
- # 从Dev模式刚刚切换过来,需要打tag并且push
308
- UI.puts "release beta-version for #{pod_name.green}".yellow
309
- _currentDir = Dir.pwd
310
- Dir.chdir(path)
311
- # 已经进入到podspec的文件夹中了
312
- checkGitStatusAndPush(pod_name) # push一下
313
- ret = checkRemoteTagExist(tag)
314
- if ret == true
315
- # tag已经存在,要么没改动,要么已经手动打过tag,要么是需要引用老版本tag的代码
316
- if checkTagOrBranchIsEqalToHead(tag, "./")
317
- UI.puts "#{pod_name.green} 检测到未做任何调整,或已手动打过Tag"
318
- else
319
- if !inputNeedJumpForReson("是否跳过beta发布并删除本地submodule(直接引用远端库)")
320
- raise "💔 #{pod_name.yellow} tag:#{tag.yellow} 已存在, 且与当前Commit不对应. 请确认拉到本地之后已经在podfile中手动修改tag版本号"
321
- end
322
- end
323
- else
324
- # tag不存在,
325
- changeVersionInCocoapods(pod_name, originTag)
326
- checkGitStatusAndPush(pod_name) # 再push一下
327
- addGitTagAndPush(tag, pod_name)
328
- end
329
- Dir.chdir(_currentDir)
330
- checkAndRemoveSubmodule(path)
331
- end
332
- options[:git] = git
333
- options[:tag] = tag
334
- if requirements.length >= 2
335
- requirements.delete_at(0)
336
- end
337
- UI.message "enabled #{"beta".green}-mode for #{pod_name.green}"
338
- elsif dev_env == 'release'
339
- # Release模式,直接使用远端对应的版本
340
- if File.directory?(path)
341
- UI.puts "release release-version for #{pod_name.green}".yellow
342
- _currentDir = Dir.pwd
343
- Dir.chdir(path)
344
- verboseParamStr = ""
345
- if Config.instance.verbose
346
- verboseParamStr = " --verbose"
347
- end
348
- ret = system("pod lib lint --skip-import-validation --fail-fast --allow-warnings#{getReposStrForLint()}#{verboseParamStr}")
349
- if ret != true
350
- raise "💔 #{pod_name.yellow} lint 失败"
351
- end
352
- checkGitStatusAndPush(pod_name)
353
- changeVersionInCocoapods(pod_name, tag)
354
- checkGitStatusAndPush(pod_name)
355
- ret = addGitTagAndPush(tag, pod_name)
356
- if ret == false
357
- if checkTagOrBranchIsEqalToHead(tag, "./")
358
- UI.puts "#{pod_name.green} 已经打过tag".yellow
359
- else
360
- raise "💔 #{pod_name.yellow} tag:#{tag.yellow} 已存在, 请确认已经手动修改tag版本号"
361
- end
362
- end
363
- ## TODO:: 发布到的目标库名称需要用变量设置
364
- repoAddrs = getUserRepoAddress()
365
- cmd = "pod repo push #{repoAddrs} #{pod_name}.podspec --skip-import-validation --allow-warnings --use-modular-headers#{getReposStrForLint()}#{verboseParamStr}"
366
- UI.puts cmd.green
367
- ret = system(cmd)
368
- if ret != true
369
- raise "💔 #{pod_name.yellow} 发布失败"
370
- end
371
- ## 到最后统一执行,判断如果当次release过
372
- `pod repo update`
373
- Dir.chdir(_currentDir)
374
- checkAndRemoveSubmodule(path)
375
- end
376
- if requirements.length < 2
377
- requirements.insert(0, "#{tag}")
378
- end
379
- UI.message "enabled #{"release".green}-mode for #{pod_name.green}"
380
- else
381
- raise "💔 :dev_env 必须要设置成 dev/beta/release之一,不接受其他值"
382
- end
383
- end
384
-
385
- def useBinary(dev_env, pod_name, use_binary, options, requirements)
386
- if use_binary && use_binary == true
387
- options.delete(:git)
388
- options.delete(:tag)
389
- options.delete(:path)
390
- options[:source] = binary_repo_url
391
- else
392
- if options[:source] == nil
393
- begin
394
- sources = find_pod_repos(pod_name).sources.select{|item| item.url.downcase != binary_repo_url.downcase } if options.empty?
395
- if sources != nil
396
- if sources.length >= 2
397
- p "#{pod_name} 有多个source #{sources}"
398
- source_url = sources.detect{|item| item.url.downcase != Pod::TrunkSource::TRUNK_REPO_URL.downcase && item.url.downcase != "https://github.com/CocoaPods/Specs.git".downcase}.url
399
- else
400
- source_url = sources.first.url
401
- end
402
- end
403
- options[:source] = source_url if source_url != nil
404
- UI.puts "#{pod_name} :source=> #{options[:source]} by cocoapods-dev-env".yellow if options[:source] != nil
405
-
406
- rescue => exception
407
- UI.puts "#{pod_name} exception:#{exception}".red
408
- else
409
-
410
- end
411
- end
412
- end
413
- end
414
-
415
- def binary_repo_url
416
- if @binary_repo_url == nil
417
- @binary_repo_url = Luna::Binary::Common.instance.binary_repo_url #从luna-binary-uploader里获取binary_repo_url
418
- end
419
- return @binary_repo_url
420
- end
421
-
422
- def find_pod_repos(pod_name) #等同pod search
423
- sets = Pod::Config.instance.sources_manager.search_by_name(pod_name)
424
- if sets.count == 1
425
- set = sets.first
426
- elsif sets.map(&:name).include?(pod_name)
427
- set = sets.find { |s| s.name == pod_name }
428
- else
429
- names = sets.map(&:name) * ', '
430
- raise Informative, "More than one spec found for '#{pod_name}':\n#{names}"
431
- end
432
- return set
433
- end
434
-
435
- # ---- patch method ----
436
- # We want modify `store_pod` method, but it's hard to insert a line in the
437
- # implementation. So we patch a method called in `store_pod`.
438
- old_method = instance_method(:parse_inhibit_warnings)
439
-
440
- define_method(:parse_inhibit_warnings) do |name, requirements|
441
- parse_pod_dev_env(name, requirements)
442
- old_method.bind(self).(name, requirements)
443
- end
444
- end
445
- end
446
- end
1
+ require 'dev_env_entry'
2
+ require 'resolver_binary'
3
+ require 'resolver_universal_dependency'