net-sftp 3.0.0.rc1 → 4.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.github/workflows/ci.yml +35 -0
- data/.gitignore +1 -0
- data/CHANGES.txt +4 -0
- data/README.rdoc +3 -3
- data/lib/net/sftp/operations/download.rb +1 -1
- data/lib/net/sftp/operations/file.rb +2 -2
- data/lib/net/sftp/operations/upload.rb +2 -2
- data/lib/net/sftp/session.rb +1 -1
- data/lib/net/sftp/version.rb +1 -1
- data/lib/net/sftp.rb +11 -3
- data/net-sftp-public_cert.pem +8 -8
- data/net-sftp.gemspec +3 -3
- data.tar.gz.sig +0 -0
- metadata +14 -14
- metadata.gz.sig +0 -0
- data/.travis.yml +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c208f351ce9e023de21fa61fffaf6cddf7368d089038c86903dfdfded4a22306
|
4
|
+
data.tar.gz: 2866977faf029bf8cbdd1427a995798147514f20ed83a6279179143cb0d71d5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12a498bebbe46993beb04fdea1989a57c26d7f48b69d3f34625ff063530221233220129f1e7c08cb7ee0f38b2ae7344de7da9d29ae2e638969efaa9b9c7e31c6
|
7
|
+
data.tar.gz: c8f73e75418e3153a4185ec18f407d6654d0c904b6de2bb9f79343062bac4bb653f6706346e40029822773bd7ed1845af401acb99ee69d2e99b8140531ae8df0
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -0,0 +1,35 @@
|
|
1
|
+
name: CI
|
2
|
+
on: [push, pull_request]
|
3
|
+
jobs:
|
4
|
+
test:
|
5
|
+
runs-on: ubuntu-18.04
|
6
|
+
continue-on-error: ${{ matrix.flaky }}
|
7
|
+
strategy:
|
8
|
+
matrix:
|
9
|
+
ruby-version: ["2.5", "2.6", "2.7", "3.0", "3.1", "truffleruby-22", "truffleruby-21"]
|
10
|
+
flaky: [false]
|
11
|
+
include:
|
12
|
+
- ruby-version: "ruby-head"
|
13
|
+
flaky: true
|
14
|
+
- ruby-version: "jruby-9.2"
|
15
|
+
flaky: true
|
16
|
+
- ruby-version: "jruby-9.3"
|
17
|
+
flaky: true
|
18
|
+
- ruby-version: "jruby-head"
|
19
|
+
flaky: true
|
20
|
+
- ruby-version: "truffleruby-head"
|
21
|
+
flaky: true
|
22
|
+
steps:
|
23
|
+
- uses: actions/checkout@v1
|
24
|
+
|
25
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
26
|
+
uses: ruby/setup-ruby@v1
|
27
|
+
with:
|
28
|
+
ruby-version: ${{ matrix.ruby-version }}
|
29
|
+
|
30
|
+
- name: Bundle install
|
31
|
+
run: |
|
32
|
+
gem install bundler
|
33
|
+
bundle install
|
34
|
+
- name: Run Tests
|
35
|
+
run: bundle exec rake test
|
data/.gitignore
CHANGED
data/CHANGES.txt
CHANGED
data/README.rdoc
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
<em><b>Please note: this project is in maintenance mode. It is not under active development but pull requests are very much welcome. Just be sure to include tests! -- delano</b></em>
|
4
4
|
|
5
5
|
|
6
|
-
* Docs: http://net-ssh.github.
|
6
|
+
* Docs: http://net-ssh.github.io/net-sftp
|
7
7
|
* Issues: https://github.com/net-ssh/net-sftp/issues
|
8
8
|
* Codes: https://github.com/net-ssh/net-sftp
|
9
9
|
* Email: net-ssh@solutious.com
|
@@ -76,8 +76,8 @@ However, in order to be sure the code you're installing hasn't been tampered wit
|
|
76
76
|
|
77
77
|
# Add the public key as a trusted certificate
|
78
78
|
# (You only need to do this once)
|
79
|
-
$ curl -O https://raw.
|
80
|
-
$ gem cert --add
|
79
|
+
$ curl -O https://raw.githubusercontent.com/net-ssh/net-sftp/master/net-sftp-public_cert.pem
|
80
|
+
$ gem cert --add net-sftp-public_cert.pem
|
81
81
|
|
82
82
|
Then, when install the gem, do so with high security:
|
83
83
|
|
@@ -27,7 +27,7 @@ module Net; module SFTP; module Operations
|
|
27
27
|
#
|
28
28
|
# sftp.download!("/path/to/remotedir", "/path/to/local", :recursive => true)
|
29
29
|
#
|
30
|
-
# This will download "/path/to/remotedir",
|
30
|
+
# This will download "/path/to/remotedir", its contents, its subdirectories,
|
31
31
|
# and their contents, recursively, to "/path/to/local" on the local host.
|
32
32
|
# (If you specify :recursive => true and the source is not a directory,
|
33
33
|
# you'll get an error!)
|
@@ -132,9 +132,9 @@ module Net; module SFTP; module Operations
|
|
132
132
|
def write(data)
|
133
133
|
data = data.to_s
|
134
134
|
sftp.write!(handle, @real_pos, data)
|
135
|
-
@real_pos += data.length
|
135
|
+
@real_pos += data.bytes.length
|
136
136
|
@pos = @real_pos
|
137
|
-
data.length
|
137
|
+
data.bytes.length
|
138
138
|
end
|
139
139
|
|
140
140
|
# Writes each argument to the stream. If +$\+ is set, it will be written
|
@@ -27,14 +27,14 @@ module Net; module SFTP; module Operations
|
|
27
27
|
#
|
28
28
|
# sftp.upload!("/path/to/directory", "/path/to/remote")
|
29
29
|
#
|
30
|
-
# This will upload "/path/to/directory",
|
30
|
+
# This will upload "/path/to/directory", its contents, its subdirectories,
|
31
31
|
# and their contents, recursively, to "/path/to/remote" on the remote server.
|
32
32
|
#
|
33
33
|
# For uploading a directory without creating it, do
|
34
34
|
# sftp.upload!("/path/to/directory", "/path/to/remote", :mkdir => false)
|
35
35
|
#
|
36
36
|
# If you want to send data to a file on the remote server, but the data is
|
37
|
-
# in memory, you can pass an IO object and upload
|
37
|
+
# in memory, you can pass an IO object and upload its contents:
|
38
38
|
#
|
39
39
|
# require 'stringio'
|
40
40
|
# io = StringIO.new(data)
|
data/lib/net/sftp/session.rb
CHANGED
@@ -419,7 +419,7 @@ module Net; module SFTP
|
|
419
419
|
|
420
420
|
# :call-seq:
|
421
421
|
# readdir(handle) -> request
|
422
|
-
#
|
422
|
+
# readdir(handle) { |response| ... } -> request
|
423
423
|
#
|
424
424
|
# Reads a set of entries from the given directory handle (which must
|
425
425
|
# have been obtained via #opendir). If the response is EOF, then there
|
data/lib/net/sftp/version.rb
CHANGED
data/lib/net/sftp.rb
CHANGED
@@ -27,9 +27,17 @@ module Net
|
|
27
27
|
# Net::SFTP.start("localhost", "user") do |sftp|
|
28
28
|
# sftp.upload! "/local/file.tgz", "/remote/file.tgz"
|
29
29
|
# end
|
30
|
-
|
31
|
-
|
32
|
-
|
30
|
+
#
|
31
|
+
# Extra parameters can be passed:
|
32
|
+
# - The Net::SSH connection options (see Net::SSH for more information)
|
33
|
+
# - The Net::SFTP connection options (only :version is supported, to let you
|
34
|
+
# set the SFTP protocol version to be used)
|
35
|
+
def self.start(host, user, ssh_options={}, sftp_options={}, &block)
|
36
|
+
session = Net::SSH.start(host, user, ssh_options)
|
37
|
+
# We only use a single option here, but this leaves room for more later
|
38
|
+
# without breaking the external API.
|
39
|
+
version = sftp_options.fetch(:version, nil)
|
40
|
+
sftp = Net::SFTP::Session.new(session, version, &block).connect!
|
33
41
|
|
34
42
|
if block_given?
|
35
43
|
sftp.loop
|
data/net-sftp-public_cert.pem
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
2
2
|
MIIDQDCCAiigAwIBAgIBATANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpuZXRz
|
3
|
-
|
4
|
-
|
3
|
+
c2gvREM9c29sdXRpb3VzL0RDPWNvbTAeFw0yMjA5MjIxMTUwMDJaFw0yMzA5MjIx
|
4
|
+
MTUwMDJaMCUxIzAhBgNVBAMMGm5ldHNzaC9EQz1zb2x1dGlvdXMvREM9Y29tMIIB
|
5
5
|
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxieE22fR/qmdPKUHyYTyUx2g
|
6
6
|
wskLwrCkxay+Tvc97ZZUOwf85LDDDPqhQaTWLvRwnIOMgQE2nBPzwalVclK6a+pW
|
7
7
|
x/18KDeZY15vm3Qn5p42b0wi9hUxOqPm3J2hdCLCcgtENgdX21nVzejn39WVqFJO
|
@@ -11,10 +11,10 @@ fBbmDnsMLAtAtauMOxORrbx3EOY7sHku/kSrMg3FXFay7jc6BkbbUij+MjJ/k82l
|
|
11
11
|
AQABo3sweTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUBfKiwO2e
|
12
12
|
M4NEiRrVG793qEPLYyMwHwYDVR0RBBgwFoEUbmV0c3NoQHNvbHV0aW91cy5jb20w
|
13
13
|
HwYDVR0SBBgwFoEUbmV0c3NoQHNvbHV0aW91cy5jb20wDQYJKoZIhvcNAQELBQAD
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
14
|
+
ggEBABI2ORK5kzUL7uOF0EHI4ECMWxQMiN+pURyGp9u7DU0H8eSdZN52jbUGHzSB
|
15
|
+
j7bB6GpqElEWjOe0IbH3vR52IVXq2bOF4P4vFchGAb4OuzJD8aJmrC/SPLHbWBuV
|
16
|
+
2GpbRQRJyYPWN6Rt/4EHOxoFnhXOBEB6CGIy0dt7YezycVbzqtHoiI2Qf/bIFJQZ
|
17
|
+
mpJAAUBkRiWksE7zrsE5DGK8kL2GVos7f8kdM71zT8p7VBwkMdY277T29TG2xD0D
|
18
|
+
66Oev0C3/x89NXqCHkl1JElSzEFbOoxan16z7xNEf2MKcBKGhsYfzWVNyEtJm785
|
19
|
+
g+97rn/AuO6dcxJnW2qBGYQa7pQ=
|
20
20
|
-----END CERTIFICATE-----
|
data/net-sftp.gemspec
CHANGED
@@ -31,16 +31,16 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.specification_version = 3
|
32
32
|
|
33
33
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
34
|
-
spec.add_runtime_dependency(%q<net-ssh>, [">= 5.0.0", "<
|
34
|
+
spec.add_runtime_dependency(%q<net-ssh>, [">= 5.0.0", "< 8.0.0"])
|
35
35
|
spec.add_development_dependency(%q<minitest>, [">= 5"])
|
36
36
|
spec.add_development_dependency(%q<mocha>, [">= 0"])
|
37
37
|
else
|
38
|
-
spec.add_dependency(%q<net-ssh>, [">= 5.0.0", "<
|
38
|
+
spec.add_dependency(%q<net-ssh>, [">= 5.0.0", "< 8.0.0"])
|
39
39
|
spec.add_dependency(%q<minitest>, [">= 5"])
|
40
40
|
spec.add_dependency(%q<mocha>, [">= 0"])
|
41
41
|
end
|
42
42
|
else
|
43
|
-
spec.add_dependency(%q<net-ssh>, [">= 5.0.0", "<
|
43
|
+
spec.add_dependency(%q<net-ssh>, [">= 5.0.0", "< 8.0.0"])
|
44
44
|
spec.add_dependency(%q<minitest>, [">= 5"])
|
45
45
|
spec.add_dependency(%q<test-unit>, [">= 0"])
|
46
46
|
spec.add_dependency(%q<mocha>, [">= 0"])
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-sftp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamis Buck
|
@@ -13,8 +13,8 @@ cert_chain:
|
|
13
13
|
- |
|
14
14
|
-----BEGIN CERTIFICATE-----
|
15
15
|
MIIDQDCCAiigAwIBAgIBATANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpuZXRz
|
16
|
-
|
17
|
-
|
16
|
+
c2gvREM9c29sdXRpb3VzL0RDPWNvbTAeFw0yMjA5MjIxMTUwMDJaFw0yMzA5MjIx
|
17
|
+
MTUwMDJaMCUxIzAhBgNVBAMMGm5ldHNzaC9EQz1zb2x1dGlvdXMvREM9Y29tMIIB
|
18
18
|
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxieE22fR/qmdPKUHyYTyUx2g
|
19
19
|
wskLwrCkxay+Tvc97ZZUOwf85LDDDPqhQaTWLvRwnIOMgQE2nBPzwalVclK6a+pW
|
20
20
|
x/18KDeZY15vm3Qn5p42b0wi9hUxOqPm3J2hdCLCcgtENgdX21nVzejn39WVqFJO
|
@@ -24,14 +24,14 @@ cert_chain:
|
|
24
24
|
AQABo3sweTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUBfKiwO2e
|
25
25
|
M4NEiRrVG793qEPLYyMwHwYDVR0RBBgwFoEUbmV0c3NoQHNvbHV0aW91cy5jb20w
|
26
26
|
HwYDVR0SBBgwFoEUbmV0c3NoQHNvbHV0aW91cy5jb20wDQYJKoZIhvcNAQELBQAD
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
27
|
+
ggEBABI2ORK5kzUL7uOF0EHI4ECMWxQMiN+pURyGp9u7DU0H8eSdZN52jbUGHzSB
|
28
|
+
j7bB6GpqElEWjOe0IbH3vR52IVXq2bOF4P4vFchGAb4OuzJD8aJmrC/SPLHbWBuV
|
29
|
+
2GpbRQRJyYPWN6Rt/4EHOxoFnhXOBEB6CGIy0dt7YezycVbzqtHoiI2Qf/bIFJQZ
|
30
|
+
mpJAAUBkRiWksE7zrsE5DGK8kL2GVos7f8kdM71zT8p7VBwkMdY277T29TG2xD0D
|
31
|
+
66Oev0C3/x89NXqCHkl1JElSzEFbOoxan16z7xNEf2MKcBKGhsYfzWVNyEtJm785
|
32
|
+
g+97rn/AuO6dcxJnW2qBGYQa7pQ=
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2022-09-22 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: net-ssh
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
version: 5.0.0
|
43
43
|
- - "<"
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
45
|
+
version: 8.0.0
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
48
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
version: 5.0.0
|
53
53
|
- - "<"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
55
|
+
version: 8.0.0
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: minitest
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,8 +90,8 @@ extra_rdoc_files:
|
|
90
90
|
- LICENSE.txt
|
91
91
|
- README.rdoc
|
92
92
|
files:
|
93
|
+
- ".github/workflows/ci.yml"
|
93
94
|
- ".gitignore"
|
94
|
-
- ".travis.yml"
|
95
95
|
- CHANGES.txt
|
96
96
|
- Gemfile
|
97
97
|
- LICENSE.txt
|
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
- !ruby/object:Gem::Version
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|
149
|
-
rubygems_version: 3.
|
149
|
+
rubygems_version: 3.1.6
|
150
150
|
signing_key:
|
151
151
|
specification_version: 3
|
152
152
|
summary: A pure Ruby implementation of the SFTP client protocol.
|
metadata.gz.sig
CHANGED
Binary file
|
data/.travis.yml
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
sudo: false
|
3
|
-
rvm:
|
4
|
-
- 2.3.7
|
5
|
-
- 2.4.5
|
6
|
-
- 2.5.3
|
7
|
-
- 2.6.5
|
8
|
-
- 2.7.1
|
9
|
-
- ruby-head
|
10
|
-
- jruby-head
|
11
|
-
- rbx-3.107
|
12
|
-
|
13
|
-
install: gem install net-ssh test-unit mocha
|
14
|
-
|
15
|
-
script: rake test
|
16
|
-
|
17
|
-
matrix:
|
18
|
-
allow_failures:
|
19
|
-
- rvm: jruby-head
|
20
|
-
- rvm: rbx-3.107
|