Module: Pod
- Defined in:
- lib/helper/pod.rb,
lib/helper/podfile_options.rb,
lib/helper/podfile_warnings.rb,
lib/dongjia_branch_inspector.rb,
lib/helper/podfile_local_importer.rb,
lib/cocoapods-dongjia/command/dongjia.rb
Defined Under Namespace
Classes: Command, Installer, Podfile
Class Method Summary collapse
-
.inject_local_path(name, requirements) ⇒ Object
注入本地路径.
-
.inject_remote_git(name, requirements) ⇒ Object
注入远程仓库地址.
- .repo_name(name) ⇒ Object
Class Method Details
.inject_local_path(name, requirements) ⇒ Object
注入本地路径
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/helper/pod.rb', line 13 def self.inject_local_path(name, requirements) local_path = nil local_root = ENV['POD_LOCAL_ROOT'] if !local_root UI.warn '环境变量中未发现 POD_LOCAL_ROOT 定义' elsif local_root.length local_path = File.join(local_root, repo_name(name)) end if local_path requirements.pop requirements.push({:path => local_path}) end end |
.inject_remote_git(name, requirements) ⇒ Object
注入远程仓库地址
28 29 30 31 32 |
# File 'lib/helper/pod.rb', line 28 def self.inject_remote_git(name, requirements) = requirements.pop [:git] = "[email protected]:ios-team/components/#{name}.git" requirements.push() end |
.repo_name(name) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/helper/pod.rb', line 3 def self.repo_name(name) pos = name.index('/') ret = pos == nil ? name : name[0, pos] if ret == 'ProtocolBuffers' ret = 'protobuf-objc' end ret end |