CocoaPods / cocoapods-downloader

A small library that provides downloaders for various source types (HTTP/SVN/Git/Mercurial)
MIT License
84 stars 71 forks source link

cache root is not working #70

Closed jacobjiangwei closed 3 years ago

jacobjiangwei commented 6 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.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 <main>': undefined methodcache_root=' for # (NoMethodError)