Sha256: 16762871c417137b821258ce01a4e5716057f92a810765599c0d10ca347eadb2
Contents?: true
Size: 796 Bytes
Versions: 5
Compression:
Stored size: 796 Bytes
Contents
module FilesystemTestHelper @@cache_path = File.dirname(__FILE__) + "/cache/" protected def get_valid_caching_options #configure Amazon library for filesystem caching AmazonAssociate::Request.configure do |options| options[:caching_strategy] = :filesystem options[:caching_options] = {:cache_path => @@cache_path} options[:disk_quota] = 200 end end def destroy_caching_options #reset caching to off AmazonAssociate::Request.configure do |options| options[:caching_strategy] = nil options[:caching_options] = nil end end def get_cache_directory #make the caching directory FileUtils.makedirs(@@cache_path) end def destroy_cache_directory #remove all the cache files FileUtils.rm_rf(@@cache_path) end end
Version data entries
5 entries across 5 versions & 2 rubygems