Sha256: 288f0f8d39c34f3ad58bf520cc5f644f1e815b5bbe799058a900adf8eb9502b1
Contents?: true
Size: 632 Bytes
Versions: 3
Compression:
Stored size: 632 Bytes
Contents
module Geminabox module Proxy class Copier < FileHandler def self.copy(file_name) copier = new(file_name) copier.get_file copier end def get_file return true if proxy_file_exists? return copy_local if local_file_exists? get_remote end def copy_local FileUtils.cp local_path, proxy_path end def get_remote begin File.open(proxy_path, 'w'){|f| f.write(remote_content)} rescue File.unlink(proxy_path) if File.exists?(proxy_path) raise $! end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
geminabox-0.13.3 | lib/geminabox/proxy/copier.rb |
geminabox-0.13.2 | lib/geminabox/proxy/copier.rb |
geminabox-0.13.1 | lib/geminabox/proxy/copier.rb |