Class: Stool::Command::WorkSpace
- Inherits:
-
Stool::Command
- Object
- CLAide::Command
- Stool::Command
- Stool::Command::WorkSpace
- Defined in:
- lib/stool/Command/WorkSpace.rb,
lib/stool/Command/WorkSpace/list.rb,
lib/stool/Command/WorkSpace/update.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#info ⇒ Object
查询结果workspace信息.
-
#tag ⇒ Object
要查询的workspace的唯一标识.
Instance Method Summary collapse
-
#cleanAllCache ⇒ Object
清理所有pod缓存(除master repo的pod).
- #existAtConfig? ⇒ Boolean
-
#getAllRepos ⇒ Object
获取task用的所有repos.
-
#hasPodfile?(path) ⇒ Boolean
def run.
-
#initialize(argv) ⇒ WorkSpace
constructor
A new instance of WorkSpace.
- #pathForTaskInfo_last_pod_update ⇒ Object
- #validate! ⇒ Object
Methods inherited from Stool::Command
#checkConfigFile, options, #pp, #run
Constructor Details
#initialize(argv) ⇒ WorkSpace
Returns a new instance of WorkSpace.
22 23 24 |
# File 'lib/stool/Command/WorkSpace.rb', line 22 def initialize(argv) super end |
Instance Attribute Details
#info ⇒ Object
查询结果workspace信息
20 21 22 |
# File 'lib/stool/Command/WorkSpace.rb', line 20 def info @info end |
#tag ⇒ Object
要查询的workspace的唯一标识
18 19 20 |
# File 'lib/stool/Command/WorkSpace.rb', line 18 def tag @tag end |
Instance Method Details
#cleanAllCache ⇒ Object
清理所有pod缓存(除master repo的pod)
71 72 73 |
# File 'lib/stool/Command/WorkSpace.rb', line 71 def cleanAllCache Repo::cacheCleanAll end |
#existAtConfig? ⇒ Boolean
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/stool/Command/WorkSpace.rb', line 41 def existAtConfig? #在本地配置中中查找workspace arrayTasks = WorkSpace::List::tasks_from_config arrayTasks.each {|task| if @tag.eql?(task.tag) @info = task end } @info end |
#getAllRepos ⇒ Object
获取task用的所有repos
53 54 55 56 57 58 59 60 61 |
# File 'lib/stool/Command/WorkSpace.rb', line 53 def getAllRepos arr = [] if @info.repos.count == 0 arr = Repo::getAllRepos else arr = @info.repos end arr end |
#hasPodfile?(path) ⇒ Boolean
def run
end
36 37 38 39 |
# File 'lib/stool/Command/WorkSpace.rb', line 36 def hasPodfile?(path) arr = Dir.glob(File.join(path,'Podfile')) arr[0] end |
#pathForTaskInfo_last_pod_update ⇒ Object
63 64 65 66 67 68 |
# File 'lib/stool/Command/WorkSpace.rb', line 63 def pathForTaskInfo_last_pod_update unless Dir.exist?(Config::logsDirPath) Dir.mkdir(Config::logsDirPath) end File.join(Config::logsDirPath, 'TaskInfo_lastUpdate.yaml') end |
#validate! ⇒ Object
28 29 30 |
# File 'lib/stool/Command/WorkSpace.rb', line 28 def validate! super end |