TODO: Write a gem description
Add this line to your application's Gemfile:
gem 'rhcf-utils'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rhcf-utils (not yet)
require 'rhcf/utils/download_cache'
cache = Rhcf::Utils::DownloadCache.new('a_cache_id', ttl=30)
cache.get("http://example.com/a_image.png") # -> "/tmp/.../a_image.png"
If you try to download in less then 30 seconds, you will hit the cache
- Fork it ( http://github.com/romeuhcf/rhcf-utils/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request