net-sftp 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.rdoc +5 -0
- data/lib/net/sftp/operations/download.rb +1 -1
- data/lib/net/sftp/operations/upload.rb +1 -1
- data/lib/net/sftp/version.rb +1 -1
- data/net-sftp.gemspec +5 -3
- data/test/test_download.rb +4 -4
- data/test/test_upload.rb +1 -1
- metadata +38 -6
data/CHANGELOG.rdoc
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
=== 2.0.1 / 29 May 2008
|
2
|
+
|
3
|
+
* Open files in binary mode to appease Windows [Jamis Buck]
|
4
|
+
|
5
|
+
|
1
6
|
=== 2.0.0 / 1 May 2008
|
2
7
|
|
3
8
|
* Make Net::SSH::Connection::Session#sftp accept an argument determining whether or not to block while the SFTP subsystem initializes (defaults to true) [Jamis Buck]
|
@@ -307,7 +307,7 @@ module Net; module SFTP; module Operations
|
|
307
307
|
raise "open #{entry.remote}: #{response}" unless response.ok?
|
308
308
|
|
309
309
|
entry.handle = response[:handle]
|
310
|
-
entry.sink = entry.local.respond_to?(:write) ? entry.local : ::File.open(entry.local, "
|
310
|
+
entry.sink = entry.local.respond_to?(:write) ? entry.local : ::File.open(entry.local, "wb")
|
311
311
|
entry.offset = 0
|
312
312
|
|
313
313
|
download_next_chunk(entry)
|
data/lib/net/sftp/version.rb
CHANGED
data/net-sftp.gemspec
CHANGED
@@ -1,21 +1,23 @@
|
|
1
1
|
|
2
|
-
# Gem::Specification for Net-sftp-2.0.
|
2
|
+
# Gem::Specification for Net-sftp-2.0.1
|
3
3
|
# Originally generated by Echoe
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = %q{net-sftp}
|
7
|
-
s.version = "2.0.
|
7
|
+
s.version = "2.0.1"
|
8
8
|
|
9
9
|
s.specification_version = 2 if s.respond_to? :specification_version=
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.authors = ["Jamis Buck"]
|
13
|
-
s.date = %q{2008-05-
|
13
|
+
s.date = %q{2008-05-29}
|
14
14
|
s.description = %q{A pure Ruby implementation of the SFTP client protocol}
|
15
15
|
s.email = %q{jamis@jamisbuck.org}
|
16
|
+
s.extra_rdoc_files = ["CHANGELOG.rdoc", "lib/net/sftp/constants.rb", "lib/net/sftp/errors.rb", "lib/net/sftp/operations/dir.rb", "lib/net/sftp/operations/download.rb", "lib/net/sftp/operations/file.rb", "lib/net/sftp/operations/file_factory.rb", "lib/net/sftp/operations/upload.rb", "lib/net/sftp/packet.rb", "lib/net/sftp/protocol/01/attributes.rb", "lib/net/sftp/protocol/01/base.rb", "lib/net/sftp/protocol/01/name.rb", "lib/net/sftp/protocol/02/base.rb", "lib/net/sftp/protocol/03/base.rb", "lib/net/sftp/protocol/04/attributes.rb", "lib/net/sftp/protocol/04/base.rb", "lib/net/sftp/protocol/04/name.rb", "lib/net/sftp/protocol/05/base.rb", "lib/net/sftp/protocol/06/attributes.rb", "lib/net/sftp/protocol/06/base.rb", "lib/net/sftp/protocol/base.rb", "lib/net/sftp/protocol.rb", "lib/net/sftp/request.rb", "lib/net/sftp/response.rb", "lib/net/sftp/session.rb", "lib/net/sftp/version.rb", "lib/net/sftp.rb", "README.rdoc"]
|
16
17
|
s.files = ["CHANGELOG.rdoc", "lib/net/sftp/constants.rb", "lib/net/sftp/errors.rb", "lib/net/sftp/operations/dir.rb", "lib/net/sftp/operations/download.rb", "lib/net/sftp/operations/file.rb", "lib/net/sftp/operations/file_factory.rb", "lib/net/sftp/operations/upload.rb", "lib/net/sftp/packet.rb", "lib/net/sftp/protocol/01/attributes.rb", "lib/net/sftp/protocol/01/base.rb", "lib/net/sftp/protocol/01/name.rb", "lib/net/sftp/protocol/02/base.rb", "lib/net/sftp/protocol/03/base.rb", "lib/net/sftp/protocol/04/attributes.rb", "lib/net/sftp/protocol/04/base.rb", "lib/net/sftp/protocol/04/name.rb", "lib/net/sftp/protocol/05/base.rb", "lib/net/sftp/protocol/06/attributes.rb", "lib/net/sftp/protocol/06/base.rb", "lib/net/sftp/protocol/base.rb", "lib/net/sftp/protocol.rb", "lib/net/sftp/request.rb", "lib/net/sftp/response.rb", "lib/net/sftp/session.rb", "lib/net/sftp/version.rb", "lib/net/sftp.rb", "Rakefile", "README.rdoc", "setup.rb", "test/common.rb", "test/protocol/01/test_attributes.rb", "test/protocol/01/test_base.rb", "test/protocol/01/test_name.rb", "test/protocol/02/test_base.rb", "test/protocol/03/test_base.rb", "test/protocol/04/test_attributes.rb", "test/protocol/04/test_base.rb", "test/protocol/04/test_name.rb", "test/protocol/05/test_base.rb", "test/protocol/06/test_attributes.rb", "test/protocol/06/test_base.rb", "test/protocol/test_base.rb", "test/test_all.rb", "test/test_dir.rb", "test/test_download.rb", "test/test_file.rb", "test/test_file_factory.rb", "test/test_packet.rb", "test/test_protocol.rb", "test/test_request.rb", "test/test_response.rb", "test/test_session.rb", "test/test_upload.rb", "Manifest", "net-sftp.gemspec"]
|
17
18
|
s.has_rdoc = true
|
18
19
|
s.homepage = %q{http://net-ssh.rubyforge.org/sftp}
|
20
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Net-sftp", "--main", "README.rdoc"]
|
19
21
|
s.require_paths = ["lib"]
|
20
22
|
s.rubyforge_project = %q{net-ssh}
|
21
23
|
s.rubygems_version = %q{1.1.1}
|
data/test/test_download.rb
CHANGED
@@ -13,7 +13,7 @@ class DownloadTest < Net::SFTP::TestCase
|
|
13
13
|
expect_file_transfer(remote, text)
|
14
14
|
|
15
15
|
file = StringIO.new
|
16
|
-
File.stubs(:open).with(local, "
|
16
|
+
File.stubs(:open).with(local, "wb").returns(file)
|
17
17
|
|
18
18
|
assert_scripted_command { sftp.download(remote, local) }
|
19
19
|
assert_equal text, file.string
|
@@ -143,7 +143,7 @@ class DownloadTest < Net::SFTP::TestCase
|
|
143
143
|
end
|
144
144
|
|
145
145
|
file = StringIO.new
|
146
|
-
File.stubs(:open).with(local, "
|
146
|
+
File.stubs(:open).with(local, "wb").returns(file)
|
147
147
|
|
148
148
|
return file
|
149
149
|
end
|
@@ -244,8 +244,8 @@ class DownloadTest < Net::SFTP::TestCase
|
|
244
244
|
|
245
245
|
file1 = StringIO.new
|
246
246
|
file2 = StringIO.new
|
247
|
-
File.expects(:open).with(File.join(local, "file1"), "
|
248
|
-
File.expects(:open).with(File.join(local, "subdir1", "file2"), "
|
247
|
+
File.expects(:open).with(File.join(local, "file1"), "wb").returns(file1)
|
248
|
+
File.expects(:open).with(File.join(local, "subdir1", "file2"), "wb").returns(file2)
|
249
249
|
|
250
250
|
[file1, file2]
|
251
251
|
end
|
data/test/test_upload.rb
CHANGED
@@ -196,7 +196,7 @@ class UploadTest < Net::SFTP::TestCase
|
|
196
196
|
File.stubs(:exists?).with(path).returns(true)
|
197
197
|
file = StringIO.new(data)
|
198
198
|
file.stubs(:stat).returns(stub("stat", :size => data.length))
|
199
|
-
File.stubs(:open).with(path).returns(file)
|
199
|
+
File.stubs(:open).with(path, "rb").returns(file)
|
200
200
|
end
|
201
201
|
|
202
202
|
def expect_directory(path, entries)
|
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: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamis Buck
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-05-
|
12
|
+
date: 2008-05-29 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -27,8 +27,35 @@ executables: []
|
|
27
27
|
|
28
28
|
extensions: []
|
29
29
|
|
30
|
-
extra_rdoc_files:
|
31
|
-
|
30
|
+
extra_rdoc_files:
|
31
|
+
- CHANGELOG.rdoc
|
32
|
+
- lib/net/sftp/constants.rb
|
33
|
+
- lib/net/sftp/errors.rb
|
34
|
+
- lib/net/sftp/operations/dir.rb
|
35
|
+
- lib/net/sftp/operations/download.rb
|
36
|
+
- lib/net/sftp/operations/file.rb
|
37
|
+
- lib/net/sftp/operations/file_factory.rb
|
38
|
+
- lib/net/sftp/operations/upload.rb
|
39
|
+
- lib/net/sftp/packet.rb
|
40
|
+
- lib/net/sftp/protocol/01/attributes.rb
|
41
|
+
- lib/net/sftp/protocol/01/base.rb
|
42
|
+
- lib/net/sftp/protocol/01/name.rb
|
43
|
+
- lib/net/sftp/protocol/02/base.rb
|
44
|
+
- lib/net/sftp/protocol/03/base.rb
|
45
|
+
- lib/net/sftp/protocol/04/attributes.rb
|
46
|
+
- lib/net/sftp/protocol/04/base.rb
|
47
|
+
- lib/net/sftp/protocol/04/name.rb
|
48
|
+
- lib/net/sftp/protocol/05/base.rb
|
49
|
+
- lib/net/sftp/protocol/06/attributes.rb
|
50
|
+
- lib/net/sftp/protocol/06/base.rb
|
51
|
+
- lib/net/sftp/protocol/base.rb
|
52
|
+
- lib/net/sftp/protocol.rb
|
53
|
+
- lib/net/sftp/request.rb
|
54
|
+
- lib/net/sftp/response.rb
|
55
|
+
- lib/net/sftp/session.rb
|
56
|
+
- lib/net/sftp/version.rb
|
57
|
+
- lib/net/sftp.rb
|
58
|
+
- README.rdoc
|
32
59
|
files:
|
33
60
|
- CHANGELOG.rdoc
|
34
61
|
- lib/net/sftp/constants.rb
|
@@ -89,8 +116,13 @@ files:
|
|
89
116
|
has_rdoc: true
|
90
117
|
homepage: http://net-ssh.rubyforge.org/sftp
|
91
118
|
post_install_message:
|
92
|
-
rdoc_options:
|
93
|
-
|
119
|
+
rdoc_options:
|
120
|
+
- --line-numbers
|
121
|
+
- --inline-source
|
122
|
+
- --title
|
123
|
+
- Net-sftp
|
124
|
+
- --main
|
125
|
+
- README.rdoc
|
94
126
|
require_paths:
|
95
127
|
- lib
|
96
128
|
required_ruby_version: !ruby/object:Gem::Requirement
|