Class: BB::StableManager
- Inherits:
-
Object
- Object
- BB::StableManager
- Defined in:
- lib/cocoapods-bb-PodAssistant/helpers/stable_manager_helper.rb
Class Method Summary collapse
-
.updateBusinessStableLock(businessSpecName, pod_targets) ⇒ Object
podfile 更新配置文件使用(业务线).
-
.updateCommonStableLock(pod_targets) ⇒ Object
更新通用lock.
-
.updateProductStableLock(pod_targets) ⇒ Object
更新产品lock.
Instance Method Summary collapse
-
#business_stable_yaml(businessSpecName) ⇒ Object
业务源路径(远端).
-
#cachePath ⇒ Object
仓库缓存目录.
-
#initialize ⇒ StableManager
constructor
A new instance of StableManager.
-
#local_stable_yaml ⇒ Object
本地源路径.
-
#public_stable_yaml ⇒ Object
公共源路径(远端).
-
#update_business_stable_lock(businessSpecName, pod_targets) ⇒ Object
podfile 更新配置文件使用(业务线).
-
#update_common_stable_lock(pod_targets) ⇒ Object
podfile 更新配置文件使用(通用).
-
#update_product_stable_lock(pod_targets) ⇒ Object
podfile 更新配置文件使用(项目).
Constructor Details
#initialize ⇒ StableManager
Returns a new instance of StableManager.
6 7 |
# File 'lib/cocoapods-bb-PodAssistant/helpers/stable_manager_helper.rb', line 6 def initialize() end |
Class Method Details
.updateBusinessStableLock(businessSpecName, pod_targets) ⇒ Object
podfile 更新配置文件使用(业务线)
68 69 70 71 |
# File 'lib/cocoapods-bb-PodAssistant/helpers/stable_manager_helper.rb', line 68 def self.updateBusinessStableLock(businessSpecName, pod_targets) stableMgr = StableManager.new() stableMgr.update_stable_lock(businessSpecName, pod_targets) end |
.updateCommonStableLock(pod_targets) ⇒ Object
更新通用lock
63 64 65 66 |
# File 'lib/cocoapods-bb-PodAssistant/helpers/stable_manager_helper.rb', line 63 def self.updateCommonStableLock(pod_targets) stableMgr = StableManager.new() stableMgr.update_common_stable_lock(pod_targets) end |
.updateProductStableLock(pod_targets) ⇒ Object
更新产品lock
73 74 75 76 |
# File 'lib/cocoapods-bb-PodAssistant/helpers/stable_manager_helper.rb', line 73 def self.updateProductStableLock(pod_targets) stableMgr = StableManager.new() stableMgr.update_product_stable_lock(pod_targets) end |
Instance Method Details
#business_stable_yaml(businessSpecName) ⇒ Object
业务源路径(远端)
36 37 38 39 40 41 |
# File 'lib/cocoapods-bb-PodAssistant/helpers/stable_manager_helper.rb', line 36 def business_stable_yaml(businessSpecName) if businessSpecName return File.join(cachePath, "#{businessSpecName}.yml") #名称由各自业务线约定 end return nil end |
#cachePath ⇒ Object
仓库缓存目录
23 24 25 26 27 28 |
# File 'lib/cocoapods-bb-PodAssistant/helpers/stable_manager_helper.rb', line 23 def cachePath if @cache.nil? @cache = BB::Cache.new() end return @cache.cachePath end |
#local_stable_yaml ⇒ Object
本地源路径
44 45 46 |
# File 'lib/cocoapods-bb-PodAssistant/helpers/stable_manager_helper.rb', line 44 def local_stable_yaml return File.join(Pathname.pwd, "stable_specs_lock.yml") #名称固定 end |
#public_stable_yaml ⇒ Object
公共源路径(远端)
31 32 33 |
# File 'lib/cocoapods-bb-PodAssistant/helpers/stable_manager_helper.rb', line 31 def public_stable_yaml return File.join(cachePath, "stable_specs.yml") #名称固定 end |
#update_business_stable_lock(businessSpecName, pod_targets) ⇒ Object
podfile 更新配置文件使用(业务线)
14 15 16 |
# File 'lib/cocoapods-bb-PodAssistant/helpers/stable_manager_helper.rb', line 14 def update_business_stable_lock(businessSpecName, pod_targets) update_stable_lock(business_stable_yaml(businessSpecName), pod_targets) end |
#update_common_stable_lock(pod_targets) ⇒ Object
podfile 更新配置文件使用(通用)
10 11 12 |
# File 'lib/cocoapods-bb-PodAssistant/helpers/stable_manager_helper.rb', line 10 def update_common_stable_lock(pod_targets) update_stable_lock(public_stable_yaml, pod_targets) end |
#update_product_stable_lock(pod_targets) ⇒ Object
podfile 更新配置文件使用(项目)
18 19 20 |
# File 'lib/cocoapods-bb-PodAssistant/helpers/stable_manager_helper.rb', line 18 def update_product_stable_lock(pod_targets) update_local_stable_lock(local_stable_yaml, pod_targets) end |