fun_sftp 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 67b220be2614c7b34c153b584f02238f0174b74f
4
- data.tar.gz: 22115d2401251baea5304935624f743d9916c245
3
+ metadata.gz: f542665943daf0252b5c909c866daeaa3b2e4ef8
4
+ data.tar.gz: d5a17ecb648aa1f190cfe00ee574017f305751e8
5
5
  SHA512:
6
- metadata.gz: 8f888a31d041721867705096b1854a40eb3927a000bf0e7f4581628ae314762b18dd220790960f4723c9a20b4538f294684006554c64a2c7a5842c251d014f20
7
- data.tar.gz: 99611e5cb32b7f67c38136418eef4100e31a37919092f1ae5dd4e24b05ab51124915987ee937f1a7ed5514486294da93042a1252844576d244eb01925e205966
6
+ metadata.gz: bc0f0059a666a57f1801e574cb72d3dc4dee43b1ef8a037a488e7fa2facf483a2eb6a7ca91a472c234d6393a82675c1664212a2d583739ddf4248b09cb7b6d58
7
+ data.tar.gz: 4d4a4d1ac18f020de9b111d3415460dfdbecb29440a0b349d9bdbb5d942c60a2c47ab3bc6326f6cb518b6bda7704d1a184cdabc463f9325ace97d9bf5f4aa581
data/README.md CHANGED
@@ -24,6 +24,8 @@ Setup the connection and specify a `source` directory if desired:
24
24
  ```ruby
25
25
  include FunSftp
26
26
  conn = SFTPClient.new(server, username, password)
27
+ # For authentication via keys
28
+ conn = SFTPClient.new(server, username, password, keys: [/path/to/key], host_key: 'ssh-rsa')
27
29
  conn.source = 'projects/awesome_project' #optional
28
30
  ```
29
31
 
@@ -186,7 +188,7 @@ Contribute
186
188
  License
187
189
  -------
188
190
 
189
- Copyright (c) 2014 George Diaz
191
+ Copyright (c) 2016 George Diaz
190
192
 
191
193
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
192
194
 
@@ -16,18 +16,22 @@ module FunSftp
16
16
 
17
17
  attr_accessor :source
18
18
 
19
- attr_reader :server, :user, :password, :client
19
+ attr_reader :server, :user, :password, :client, :options
20
20
 
21
21
  alias_method :pwd, :source
22
22
 
23
- def initialize(server, user, password)
24
- @server, @user, @password = server, user, password
23
+ def initialize(server, user, password, options = {})
24
+ @server, @user, @password, @options= server, user, password, options
25
25
  self.source = '.'
26
26
  @client = setup_login
27
27
  end
28
28
 
29
29
  def setup_login
30
- Net::SFTP.start(server, user, password: password)
30
+ unless options.none?
31
+ Net::SFTP.start(server, user, options)
32
+ else
33
+ Net::SFTP.start(server, user, password: password)
34
+ end
31
35
  end
32
36
 
33
37
  def upload!(src, target) #send to remote
@@ -1,3 +1,3 @@
1
1
  module FunSftp
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fun_sftp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - George Diaz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-02 00:00:00.000000000 Z
11
+ date: 2016-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-sftp