Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update README, bump version.

  • Loading branch information...
commit 003a418afb73c5bd5f9f839454eebb396cc7e44c 1 parent 7de4d53
@knewter knewter authored
Showing with 17 additions and 1 deletion.
  1. +16 −0 README
  2. +1 −1  lib/file_transfer_mixin/version.rb
View
16 README
@@ -2,8 +2,12 @@
FileTransferMixin is a module that you can include in a library. It will support various mechanisms long-term, but
for now is focused on SFTP servers.
+It provides the following methods for now:
+
- sftp_send(key, remote_location, local_file_path)
- sftp_fetch(key, remote_path, local_path)
+- sftp_move(key, original_remote_path, new_remote_path)
+- sftp_block(key)
- It expects an ENV variable named FILE_TRANSFER_MIXIN_CONFIG_PATH to be set.
- It expects a yml configuration file in FILE_TRANSFER_MIXIN_CONFIG_PATH that looks like the following:
@@ -32,6 +36,18 @@ class SomeClass
def fetch_method
sftp_fetch(:some_key, remote_path, local_path)
end
+
+ # Some method that moves a file
+ def move_method
+ sftp_move(:some_key, original_remote_path, new_remote_path)
+ end
+
+ # Some method that otherwise uses Net::SFTP commands but still uses our config block
+ def sftp_detailed_method
+ sftp_block(:some_key) do |ftp|
+ ftp.rename!('foo', 'bar')
+ end
+ end
end
== Motivation ==
View
2  lib/file_transfer_mixin/version.rb
@@ -1,3 +1,3 @@
module FileTransferMixin
- VERSION = "0.0.3"
+ VERSION = "0.0.4"
end
Please sign in to comment.
Something went wrong with that request. Please try again.