cocoapods-downloader icon indicating copy to clipboard operation
cocoapods-downloader copied to clipboard

Usage example not working: undefined method 'cache_root'

Open MaximeLM opened this issue 7 years ago • 1 comments

cocoapods-downloader 1.1.3 cocoapods 1.2.1 ruby 2.2.1p85

I created a new ruby file with the usage example from the README:

require 'cocoapods-downloader'

target_path = './Downloads/MyDownload'
options = { :git => 'example.com' }
options = Pod::Downloader.preprocess_options(options)
downloader = Pod::Downloader.for_target(target_path, options)
downloader.cache_root = '~/Library/Caches/APPNAME'
downloader.max_cache_size = 500
downloader.download
downloader.checkout_options #=> { :git => 'example.com', :commit => 'd7f410490dabf7a6bde665ba22da102c3acf1bd9' }

When I execute the file, i get the error:

download.rb:7:in `<main>': undefined method `cache_root=' for #<Pod::Downloader::Git:0x007fd8c41fadc0> (NoMethodError)

MaximeLM avatar Apr 27 '17 12:04 MaximeLM

me too, max_cache_size also undefined undefined method `max_cache_size=' for #Pod::Downloader::Http:0x007f954129ab48 (NoMethodError)

suyimo avatar Jul 23 '19 06:07 suyimo