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

  1. Fork it ( https://github.com/ad2games/local_copy/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request