Class: Pod::Command::Stable

Inherits:
Pod::Command show all
Extended by:
Executable
Defined in:
lib/cocoapods-bb-PodAssistant/command/stable/stable.rb

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Stable

Returns a new instance of Stable.



30
31
32
33
# File 'lib/cocoapods-bb-PodAssistant/command/stable/stable.rb', line 30

def initialize(argv)
  @help = argv.flag?('help')
  super
end

Instance Method Details

#runObject

Main ########################################



56
57
58
59
60
61
62
63
64
65
66
# File 'lib/cocoapods-bb-PodAssistant/command/stable/stable.rb', line 56

def run
  #1、first load source and origin lock name from podfile
  ll_load_stable
  #2、clone origin lock spec to cache dir 
  ll_cloneStable
  #3、fetch newest code
  ll_fetch_stale_git
  
  # 4、数据合并
  @source_manager.merge_stable_data
end

#stable!(source, options = {}) ⇒ Object

help load podfile option



40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/cocoapods-bb-PodAssistant/command/stable/stable.rb', line 40

def stable!(source, options = {})
  @ll_stable_source = source
  if options.has_key?(:specs) 
    @businessSpec = options[:specs]
    puts "业务源:#{@businessSpec}"
  end
  @ll_stable_tag = options[:tag] if options.has_key?(:tag) 
  @ll_stable_branch = options[:branch] if options.has_key?(:branch)

  @cache = BB::Cache.new(source)
  @source_manager = BB::SourceManager.new(@cache, @businessSpec)
  configGitPath(@cache.cachePath)
end

#validate!Object



34
35
36
37
# File 'lib/cocoapods-bb-PodAssistant/command/stable/stable.rb', line 34

def validate!
  super
  banner! if @help
end