Closed jacobjiangwei closed 3 years ago
require 'cocoapods-downloader'
target_path = './Downloads/MyDownload' options = { :http => 'http://www.xxxx.com/webrtc/1.2.0/release/ios/webrtc.tar.bz2' } options = Pod::Downloader.preprocess_options(options) downloader = Pod::Downloader.for_target(target_path, options)
downloader.download
error is test.rb:7:in <main>': undefined methodcache_root=' for # (NoMethodError)
<main>': undefined method
require 'cocoapods-downloader'
target_path = './Downloads/MyDownload' options = { :http => 'http://www.xxxx.com/webrtc/1.2.0/release/ios/webrtc.tar.bz2' } options = Pod::Downloader.preprocess_options(options) downloader = Pod::Downloader.for_target(target_path, options)
downloader.cache_root = '~/Library/Caches/testRuby'
downloader.max_cache_size = 500
downloader.download
downloader.checkout_options #=> { :git => 'example.com', :commit => 'd7f410490dabf7a6bde665ba22da102c3acf1bd9' }
error is test.rb:7:in (NoMethodError)
<main>': undefined method
cache_root=' for #