class Pod::Command::Store::Pull
Public Class Methods
new(argv)
click to toggle source
Plugin Lifecycle
Calls superclass method
Pod::Command::Store::new
# File lib/cocoapods-store/command/store/pull.rb, line 18 def initialize(argv) super end
Public Instance Methods
pull_from_store()
click to toggle source
Run steps
# File lib/cocoapods-store/command/store/pull.rb, line 36 def pull_from_store zip_name = "#{cache_dir_name}.zip" s3 = load_s3_bucket obj = s3.bucket(@bucket).object(zip_name) if !obj.exists? UI.puts "Item does not exist in cache" exit end UI.puts "Downloading #{zip_name}" success = obj.get(response_target: zip_name) if !success UI.puts "An error occurred attempt to download the cache item" exit end end
replace_installation_data()
click to toggle source
# File lib/cocoapods-store/command/store/pull.rb, line 54 def replace_installation_data zip_name = "#{cache_dir_name}.zip" FileUtils.rm_rf "#{Dir.pwd}/Pods" FileUtils.rm_rf Dir.glob("#{Dir.pwd}/*.xcworkspace").first || "" FileUtils.rm_rf "#{Dir.pwd}/Podfile.lock" system "unzip #{zip_name} > /dev/null" end
run()
click to toggle source
# File lib/cocoapods-store/command/store/pull.rb, line 26 def run verify_podfile_exists! pull_from_store replace_installation_data end
validate!()
click to toggle source
Calls superclass method
Pod::Command::Store#validate!
# File lib/cocoapods-store/command/store/pull.rb, line 22 def validate! super end