LocalCopy
Keep local copies of remote files.
Installation
Add this line to your application's Gemfile:
gem 'local_copy'
And then execute:
bundle
Or install it yourself as:
gem install local_copy
Usage
# Fetch the remote file and return a local path. For now it just
# stores it in /tmp/local_copy_gem with the MD5 hash of the URL as a
# name. When called again it does not download the file again.
local_path = LocalCopy.fetch('http://example.com/some/file.xyz')
# Empty the local file directory.
LocalCopy.flush
Contributing
- Fork it ( https://github.com/ad2games/local_copy/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 a new Pull Request