CocoaPods / cocoapods-downloader

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

Usage example not working: undefined method 'cache_root' #68

Open MaximeLM opened 7 years ago

MaximeLM commented 7 years ago

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)
suyimo commented 5 years ago

me too, max_cache_size also undefined undefined method `max_cache_size=' for # (NoMethodError)