interagent / heroics

Ruby HTTP client for APIs represented with JSON schema

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow me to override the cache_path later

tmaier opened this issue · comments

Currently, the cache_path gets hard coded when generating the client with config.cache_path = '#{Dir.home}/.heroics/example'.

This means, I need to guess what kind of paths are supported to write at every possible scenario. e.g. some may not even have a home directory set up for their (technical) user...

So it would be great to have a self.cache_path within the client, which would allow the user to override this in an initializer for example.

Never mind. This is possible with :cache