Module: Fig::Protocol
- Defined in:
- lib/fig/protocol.rb,
lib/fig/protocol/ftp.rb,
lib/fig/protocol/file.rb,
lib/fig/protocol/http.rb,
lib/fig/protocol/sftp.rb,
lib/fig/protocol/netrc_enabled.rb
Overview
File transfers.
Defined Under Namespace
Modules: NetRCEnabled Classes: FTP, File, HTTP, SFTP
Instance Method Summary collapse
-
#download(uri, path) ⇒ Object
Returns whether the file was not downloaded because the file already exists and is already up-to-date.
- #download_list(uri) ⇒ Object
-
#path_up_to_date?(uri, path) ⇒ Boolean
Determine whether we need to update something.
- #upload(local_file, uri) ⇒ Object
Instance Method Details
#download(uri, path) ⇒ Object
Returns whether the file was not downloaded because the file already exists and is already up-to-date.
21 22 23 24 |
# File 'lib/fig/protocol.rb', line 21 def download(uri, path) Fig::Logging.fatal "Protocol not supported: #{uri}" raise Fig::NetworkError.new "Protocol not supported: #{uri}" end |
#download_list(uri) ⇒ Object
8 9 10 11 |
# File 'lib/fig/protocol.rb', line 8 def download_list(uri) Fig::Logging.fatal "Protocol not supported: #{uri}" raise Fig::NetworkError.new "Protocol not supported: #{uri}" end |
#path_up_to_date?(uri, path) ⇒ Boolean
Determine whether we need to update something. Returns nil to indicate “don’t know”.
15 16 17 |
# File 'lib/fig/protocol.rb', line 15 def path_up_to_date?(uri, path) return nil # Not implemented end |
#upload(local_file, uri) ⇒ Object
26 27 28 29 |
# File 'lib/fig/protocol.rb', line 26 def upload(local_file, uri) Fig::Logging.fatal "Protocol not supported: #{uri}" raise Fig::NetworkError.new "Protocol not supported: #{uri}" end |