net-sftp 1.1.1 → 2.0.0
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 +23 -0
- data/Manifest +55 -0
- data/README.rdoc +96 -0
- data/Rakefile +30 -0
- data/lib/net/sftp.rb +53 -38
- data/lib/net/sftp/constants.rb +187 -0
- data/lib/net/sftp/errors.rb +34 -20
- data/lib/net/sftp/operations/dir.rb +93 -0
- data/lib/net/sftp/operations/download.rb +364 -0
- data/lib/net/sftp/operations/file.rb +176 -0
- data/lib/net/sftp/operations/file_factory.rb +60 -0
- data/lib/net/sftp/operations/upload.rb +387 -0
- data/lib/net/sftp/packet.rb +21 -0
- data/lib/net/sftp/protocol.rb +32 -0
- data/lib/net/sftp/protocol/01/attributes.rb +265 -96
- data/lib/net/sftp/protocol/01/base.rb +268 -0
- data/lib/net/sftp/protocol/01/name.rb +43 -0
- data/lib/net/sftp/protocol/02/base.rb +31 -0
- data/lib/net/sftp/protocol/03/base.rb +35 -0
- data/lib/net/sftp/protocol/04/attributes.rb +120 -195
- data/lib/net/sftp/protocol/04/base.rb +94 -0
- data/lib/net/sftp/protocol/04/name.rb +67 -0
- data/lib/net/sftp/protocol/05/base.rb +66 -0
- data/lib/net/sftp/protocol/06/attributes.rb +107 -0
- data/lib/net/sftp/protocol/06/base.rb +63 -0
- data/lib/net/sftp/protocol/base.rb +50 -0
- data/lib/net/sftp/request.rb +91 -0
- data/lib/net/sftp/response.rb +76 -0
- data/lib/net/sftp/session.rb +914 -238
- data/lib/net/sftp/version.rb +14 -21
- data/net-sftp.gemspec +60 -0
- data/setup.rb +1331 -0
- data/test/common.rb +173 -0
- data/test/protocol/01/test_attributes.rb +97 -0
- data/test/protocol/01/test_base.rb +210 -0
- data/test/protocol/01/test_name.rb +27 -0
- data/test/protocol/02/test_base.rb +26 -0
- data/test/protocol/03/test_base.rb +27 -0
- data/test/protocol/04/test_attributes.rb +148 -0
- data/test/protocol/04/test_base.rb +74 -0
- data/test/protocol/04/test_name.rb +49 -0
- data/test/protocol/05/test_base.rb +62 -0
- data/test/protocol/06/test_attributes.rb +124 -0
- data/test/protocol/06/test_base.rb +51 -0
- data/test/protocol/test_base.rb +42 -0
- data/test/test_all.rb +3 -0
- data/test/test_dir.rb +47 -0
- data/test/test_download.rb +252 -0
- data/test/test_file.rb +159 -0
- data/test/test_file_factory.rb +48 -0
- data/test/test_packet.rb +9 -0
- data/test/test_protocol.rb +17 -0
- data/test/test_request.rb +71 -0
- data/test/test_response.rb +53 -0
- data/test/test_session.rb +741 -0
- data/test/test_upload.rb +219 -0
- metadata +59 -111
- data/doc/LICENSE-BSD +0 -27
- data/doc/LICENSE-GPL +0 -280
- data/doc/LICENSE-RUBY +0 -56
- data/doc/faq/faq.html +0 -298
- data/doc/faq/faq.rb +0 -154
- data/doc/faq/faq.yml +0 -183
- data/examples/asynchronous.rb +0 -57
- data/examples/get-put.rb +0 -45
- data/examples/sftp-open-uri.rb +0 -30
- data/examples/ssh-service.rb +0 -30
- data/examples/synchronous.rb +0 -131
- data/lib/net/sftp/operations/abstract.rb +0 -108
- data/lib/net/sftp/operations/close.rb +0 -31
- data/lib/net/sftp/operations/errors.rb +0 -76
- data/lib/net/sftp/operations/fsetstat.rb +0 -36
- data/lib/net/sftp/operations/fstat.rb +0 -32
- data/lib/net/sftp/operations/lstat.rb +0 -31
- data/lib/net/sftp/operations/mkdir.rb +0 -33
- data/lib/net/sftp/operations/open.rb +0 -32
- data/lib/net/sftp/operations/opendir.rb +0 -32
- data/lib/net/sftp/operations/read.rb +0 -88
- data/lib/net/sftp/operations/readdir.rb +0 -55
- data/lib/net/sftp/operations/realpath.rb +0 -37
- data/lib/net/sftp/operations/remove.rb +0 -31
- data/lib/net/sftp/operations/rename.rb +0 -32
- data/lib/net/sftp/operations/rmdir.rb +0 -31
- data/lib/net/sftp/operations/services.rb +0 -42
- data/lib/net/sftp/operations/setstat.rb +0 -33
- data/lib/net/sftp/operations/stat.rb +0 -31
- data/lib/net/sftp/operations/write.rb +0 -63
- data/lib/net/sftp/protocol/01/impl.rb +0 -251
- data/lib/net/sftp/protocol/01/packet-assistant.rb +0 -82
- data/lib/net/sftp/protocol/01/services.rb +0 -47
- data/lib/net/sftp/protocol/02/impl.rb +0 -39
- data/lib/net/sftp/protocol/02/packet-assistant.rb +0 -32
- data/lib/net/sftp/protocol/02/services.rb +0 -44
- data/lib/net/sftp/protocol/03/impl.rb +0 -42
- data/lib/net/sftp/protocol/03/packet-assistant.rb +0 -35
- data/lib/net/sftp/protocol/03/services.rb +0 -44
- data/lib/net/sftp/protocol/04/impl.rb +0 -86
- data/lib/net/sftp/protocol/04/packet-assistant.rb +0 -45
- data/lib/net/sftp/protocol/04/services.rb +0 -44
- data/lib/net/sftp/protocol/05/impl.rb +0 -90
- data/lib/net/sftp/protocol/05/packet-assistant.rb +0 -34
- data/lib/net/sftp/protocol/05/services.rb +0 -44
- data/lib/net/sftp/protocol/constants.rb +0 -60
- data/lib/net/sftp/protocol/driver.rb +0 -235
- data/lib/net/sftp/protocol/packet-assistant.rb +0 -84
- data/lib/net/sftp/protocol/services.rb +0 -55
- data/lib/uri/open-sftp.rb +0 -54
- data/lib/uri/sftp.rb +0 -42
- data/test/ALL-TESTS.rb +0 -23
- data/test/operations/tc_abstract.rb +0 -124
- data/test/operations/tc_close.rb +0 -40
- data/test/operations/tc_fsetstat.rb +0 -48
- data/test/operations/tc_fstat.rb +0 -40
- data/test/operations/tc_lstat.rb +0 -40
- data/test/operations/tc_mkdir.rb +0 -48
- data/test/operations/tc_open.rb +0 -42
- data/test/operations/tc_opendir.rb +0 -40
- data/test/operations/tc_read.rb +0 -103
- data/test/operations/tc_readdir.rb +0 -88
- data/test/operations/tc_realpath.rb +0 -54
- data/test/operations/tc_remove.rb +0 -40
- data/test/operations/tc_rmdir.rb +0 -40
- data/test/operations/tc_setstat.rb +0 -48
- data/test/operations/tc_stat.rb +0 -40
- data/test/operations/tc_write.rb +0 -91
- data/test/protocol/01/tc_attributes.rb +0 -138
- data/test/protocol/01/tc_impl.rb +0 -294
- data/test/protocol/01/tc_packet_assistant.rb +0 -81
- data/test/protocol/02/tc_impl.rb +0 -41
- data/test/protocol/02/tc_packet_assistant.rb +0 -31
- data/test/protocol/03/tc_impl.rb +0 -48
- data/test/protocol/03/tc_packet_assistant.rb +0 -34
- data/test/protocol/04/tc_attributes.rb +0 -174
- data/test/protocol/04/tc_impl.rb +0 -91
- data/test/protocol/04/tc_packet_assistant.rb +0 -38
- data/test/protocol/05/tc_impl.rb +0 -61
- data/test/protocol/05/tc_packet_assistant.rb +0 -32
- data/test/protocol/tc_driver.rb +0 -219
data/test/test_upload.rb
ADDED
@@ -0,0 +1,219 @@
|
|
1
|
+
require "common"
|
2
|
+
|
3
|
+
class UploadTest < Net::SFTP::TestCase
|
4
|
+
def setup
|
5
|
+
prepare_progress!
|
6
|
+
end
|
7
|
+
|
8
|
+
def test_upload_file_should_send_file_contents
|
9
|
+
expect_file_transfer("/path/to/local", "/path/to/remote", "here are the contents")
|
10
|
+
assert_scripted_command { sftp.upload("/path/to/local", "/path/to/remote") }
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_upload_file_with_progress_should_report_progress
|
14
|
+
expect_file_transfer("/path/to/local", "/path/to/remote", "here are the contents")
|
15
|
+
|
16
|
+
assert_scripted_command do
|
17
|
+
sftp.upload("/path/to/local", "/path/to/remote") { |*args| record_progress(args) }
|
18
|
+
end
|
19
|
+
|
20
|
+
assert_progress_reported_open(:remote => "/path/to/remote")
|
21
|
+
assert_progress_reported_put(0, "here are the contents", :remote => "/path/to/remote")
|
22
|
+
assert_progress_reported_close(:remote => "/path/to/remote")
|
23
|
+
assert_progress_reported_finish
|
24
|
+
assert_no_more_reported_events
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_upload_file_with_progress_handler_should_report_progress
|
28
|
+
expect_file_transfer("/path/to/local", "/path/to/remote", "here are the contents")
|
29
|
+
|
30
|
+
assert_scripted_command do
|
31
|
+
sftp.upload("/path/to/local", "/path/to/remote", :progress => ProgressHandler.new(@progress))
|
32
|
+
end
|
33
|
+
|
34
|
+
assert_progress_reported_open(:remote => "/path/to/remote")
|
35
|
+
assert_progress_reported_put(0, "here are the contents", :remote => "/path/to/remote")
|
36
|
+
assert_progress_reported_close(:remote => "/path/to/remote")
|
37
|
+
assert_progress_reported_finish
|
38
|
+
assert_no_more_reported_events
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_upload_file_should_read_chunks_of_size(requested_size=nil)
|
42
|
+
size = requested_size || Net::SFTP::Operations::Upload::DEFAULT_READ_SIZE
|
43
|
+
expect_sftp_session :server_version => 3 do |channel|
|
44
|
+
channel.sends_packet(FXP_OPEN, :long, 0, :string, "/path/to/remote", :long, 0x1A, :long, 0)
|
45
|
+
channel.gets_packet(FXP_HANDLE, :long, 0, :string, "handle")
|
46
|
+
channel.sends_packet(FXP_WRITE, :long, 1, :string, "handle", :int64, 0, :string, "a" * size)
|
47
|
+
channel.sends_packet(FXP_WRITE, :long, 2, :string, "handle", :int64, size, :string, "b" * size)
|
48
|
+
channel.sends_packet(FXP_WRITE, :long, 3, :string, "handle", :int64, size*2, :string, "c" * size)
|
49
|
+
channel.gets_packet(FXP_STATUS, :long, 1, :long, 0)
|
50
|
+
channel.sends_packet(FXP_WRITE, :long, 4, :string, "handle", :int64, size*3, :string, "d" * size)
|
51
|
+
channel.gets_packet(FXP_STATUS, :long, 2, :long, 0)
|
52
|
+
channel.sends_packet(FXP_CLOSE, :long, 5, :string, "handle")
|
53
|
+
channel.gets_packet(FXP_STATUS, :long, 3, :long, 0)
|
54
|
+
channel.gets_packet(FXP_STATUS, :long, 4, :long, 0)
|
55
|
+
channel.gets_packet(FXP_STATUS, :long, 5, :long, 0)
|
56
|
+
end
|
57
|
+
|
58
|
+
expect_file("/path/to/local", "a" * size + "b" * size + "c" * size + "d" * size)
|
59
|
+
|
60
|
+
assert_scripted_command do
|
61
|
+
opts = {}
|
62
|
+
opts[:read_size] = size if requested_size
|
63
|
+
sftp.upload("/path/to/local", "/path/to/remote", opts)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def test_upload_file_with_custom_read_size_should_read_chunks_of_that_size
|
68
|
+
test_upload_file_should_read_chunks_of_size(100)
|
69
|
+
end
|
70
|
+
|
71
|
+
def test_upload_file_with_custom_requests_should_start_that_many_writes
|
72
|
+
size = Net::SFTP::Operations::Upload::DEFAULT_READ_SIZE
|
73
|
+
expect_sftp_session :server_version => 3 do |channel|
|
74
|
+
channel.sends_packet(FXP_OPEN, :long, 0, :string, "/path/to/remote", :long, 0x1A, :long, 0)
|
75
|
+
channel.gets_packet(FXP_HANDLE, :long, 0, :string, "handle")
|
76
|
+
channel.sends_packet(FXP_WRITE, :long, 1, :string, "handle", :int64, 0, :string, "a" * size)
|
77
|
+
channel.sends_packet(FXP_WRITE, :long, 2, :string, "handle", :int64, size, :string, "b" * size)
|
78
|
+
channel.sends_packet(FXP_WRITE, :long, 3, :string, "handle", :int64, size*2, :string, "c" * size)
|
79
|
+
channel.sends_packet(FXP_WRITE, :long, 4, :string, "handle", :int64, size*3, :string, "d" * size)
|
80
|
+
channel.gets_packet(FXP_STATUS, :long, 1, :long, 0)
|
81
|
+
channel.sends_packet(FXP_CLOSE, :long, 5, :string, "handle")
|
82
|
+
channel.gets_packet(FXP_STATUS, :long, 2, :long, 0)
|
83
|
+
channel.gets_packet(FXP_STATUS, :long, 3, :long, 0)
|
84
|
+
channel.gets_packet(FXP_STATUS, :long, 4, :long, 0)
|
85
|
+
channel.gets_packet(FXP_STATUS, :long, 5, :long, 0)
|
86
|
+
end
|
87
|
+
|
88
|
+
expect_file("/path/to/local", "a" * size + "b" * size + "c" * size + "d" * size)
|
89
|
+
|
90
|
+
assert_scripted_command do
|
91
|
+
sftp.upload("/path/to/local", "/path/to/remote", :requests => 3)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
def test_upload_directory_should_mirror_directory_structure_remotely
|
96
|
+
prepare_directory
|
97
|
+
|
98
|
+
assert_scripted_command do
|
99
|
+
sftp.upload("/path/to/local", "/path/to/remote")
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
def test_upload_directory_with_handler_should_report_progress
|
104
|
+
prepare_directory
|
105
|
+
|
106
|
+
assert_scripted_command do
|
107
|
+
sftp.upload("/path/to/local", "/path/to/remote") { |*args| record_progress(args) }
|
108
|
+
end
|
109
|
+
|
110
|
+
assert_progress_reported_open(:remote => "/path/to/remote/file1")
|
111
|
+
assert_progress_reported_open(:remote => "/path/to/remote/file2")
|
112
|
+
assert_progress_reported_open(:remote => "/path/to/remote/file3")
|
113
|
+
assert_progress_reported_mkdir("/path/to/remote/subdir")
|
114
|
+
assert_progress_reported_open(:remote => "/path/to/remote/subdir/other1")
|
115
|
+
assert_progress_reported_open(:remote => "/path/to/remote/subdir/other2")
|
116
|
+
assert_progress_reported_put(0, "contents of file1", :remote => "/path/to/remote/file1")
|
117
|
+
assert_progress_reported_put(0, "contents of file2", :remote => "/path/to/remote/file2")
|
118
|
+
assert_progress_reported_put(0, "contents of file3", :remote => "/path/to/remote/file3")
|
119
|
+
assert_progress_reported_close(:remote => "/path/to/remote/file1")
|
120
|
+
assert_progress_reported_put(0, "contents of other1", :remote => "/path/to/remote/subdir/other1")
|
121
|
+
assert_progress_reported_put(0, "contents of other2", :remote => "/path/to/remote/subdir/other2")
|
122
|
+
assert_progress_reported_close(:remote => "/path/to/remote/file2")
|
123
|
+
assert_progress_reported_close(:remote => "/path/to/remote/file3")
|
124
|
+
assert_progress_reported_close(:remote => "/path/to/remote/subdir/other1")
|
125
|
+
assert_progress_reported_close(:remote => "/path/to/remote/subdir/other2")
|
126
|
+
assert_progress_reported_finish
|
127
|
+
assert_no_more_reported_events
|
128
|
+
end
|
129
|
+
|
130
|
+
def test_upload_io_should_send_io_as_file
|
131
|
+
expect_sftp_session :server_version => 3 do |channel|
|
132
|
+
channel.sends_packet(FXP_OPEN, :long, 0, :string, "/path/to/remote", :long, 0x1A, :long, 0)
|
133
|
+
channel.gets_packet(FXP_HANDLE, :long, 0, :string, "handle")
|
134
|
+
channel.sends_packet(FXP_WRITE, :long, 1, :string, "handle", :int64, 0, :string, "this is some text")
|
135
|
+
channel.sends_packet(FXP_CLOSE, :long, 2, :string, "handle")
|
136
|
+
channel.gets_packet(FXP_STATUS, :long, 1, :long, 0)
|
137
|
+
channel.gets_packet(FXP_STATUS, :long, 2, :long, 0)
|
138
|
+
end
|
139
|
+
|
140
|
+
assert_scripted_command do
|
141
|
+
sftp.upload(StringIO.new("this is some text"), "/path/to/remote")
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
private
|
146
|
+
|
147
|
+
def prepare_directory
|
148
|
+
expect_directory("/path/to/local", %w(. .. file1 file2 file3 subdir))
|
149
|
+
expect_directory("/path/to/local/subdir", %w(. .. other1 other2))
|
150
|
+
expect_file("/path/to/local/file1", "contents of file1")
|
151
|
+
expect_file("/path/to/local/file2", "contents of file2")
|
152
|
+
expect_file("/path/to/local/file3", "contents of file3")
|
153
|
+
expect_file("/path/to/local/subdir/other1", "contents of other1")
|
154
|
+
expect_file("/path/to/local/subdir/other2", "contents of other2")
|
155
|
+
|
156
|
+
expect_sftp_session :server_version => 3 do |ch|
|
157
|
+
ch.sends_packet(FXP_MKDIR, :long, 0, :string, "/path/to/remote", :long, 0)
|
158
|
+
ch.gets_packet(FXP_STATUS, :long, 0, :long, 0)
|
159
|
+
ch.sends_packet(FXP_OPEN, :long, 1, :string, "/path/to/remote/file1", :long, 0x1A, :long, 0)
|
160
|
+
ch.sends_packet(FXP_OPEN, :long, 2, :string, "/path/to/remote/file2", :long, 0x1A, :long, 0)
|
161
|
+
ch.sends_packet(FXP_OPEN, :long, 3, :string, "/path/to/remote/file3", :long, 0x1A, :long, 0)
|
162
|
+
ch.sends_packet(FXP_MKDIR, :long, 4, :string, "/path/to/remote/subdir", :long, 0)
|
163
|
+
ch.sends_packet(FXP_OPEN, :long, 5, :string, "/path/to/remote/subdir/other1", :long, 0x1A, :long, 0)
|
164
|
+
ch.sends_packet(FXP_OPEN, :long, 6, :string, "/path/to/remote/subdir/other2", :long, 0x1A, :long, 0)
|
165
|
+
ch.gets_packet(FXP_HANDLE, :long, 1, :string, "hfile1")
|
166
|
+
ch.sends_packet(FXP_WRITE, :long, 7, :string, "hfile1", :int64, 0, :string, "contents of file1")
|
167
|
+
ch.gets_packet(FXP_HANDLE, :long, 2, :string, "hfile2")
|
168
|
+
ch.sends_packet(FXP_WRITE, :long, 8, :string, "hfile2", :int64, 0, :string, "contents of file2")
|
169
|
+
ch.gets_packet(FXP_HANDLE, :long, 3, :string, "hfile3")
|
170
|
+
ch.sends_packet(FXP_WRITE, :long, 9, :string, "hfile3", :int64, 0, :string, "contents of file3")
|
171
|
+
ch.gets_packet(FXP_STATUS, :long, 4, :long, 0)
|
172
|
+
ch.gets_packet(FXP_HANDLE, :long, 5, :string, "hother1")
|
173
|
+
ch.sends_packet(FXP_CLOSE, :long, 10, :string, "hfile1")
|
174
|
+
ch.sends_packet(FXP_WRITE, :long, 11, :string, "hother1", :int64, 0, :string, "contents of other1")
|
175
|
+
ch.gets_packet(FXP_HANDLE, :long, 6, :string, "hother2")
|
176
|
+
ch.sends_packet(FXP_WRITE, :long, 12, :string, "hother2", :int64, 0, :string, "contents of other2")
|
177
|
+
ch.gets_packet(FXP_STATUS, :long, 7, :long, 0)
|
178
|
+
ch.sends_packet(FXP_CLOSE, :long, 13, :string, "hfile2")
|
179
|
+
ch.gets_packet(FXP_STATUS, :long, 8, :long, 0)
|
180
|
+
ch.sends_packet(FXP_CLOSE, :long, 14, :string, "hfile3")
|
181
|
+
ch.gets_packet(FXP_STATUS, :long, 9, :long, 0)
|
182
|
+
ch.sends_packet(FXP_CLOSE, :long, 15, :string, "hother1")
|
183
|
+
ch.gets_packet(FXP_STATUS, :long, 10, :long, 0)
|
184
|
+
ch.sends_packet(FXP_CLOSE, :long, 16, :string, "hother2")
|
185
|
+
ch.gets_packet(FXP_STATUS, :long, 11, :long, 0)
|
186
|
+
ch.gets_packet(FXP_STATUS, :long, 12, :long, 0)
|
187
|
+
ch.gets_packet(FXP_STATUS, :long, 13, :long, 0)
|
188
|
+
ch.gets_packet(FXP_STATUS, :long, 14, :long, 0)
|
189
|
+
ch.gets_packet(FXP_STATUS, :long, 15, :long, 0)
|
190
|
+
ch.gets_packet(FXP_STATUS, :long, 16, :long, 0)
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
def expect_file(path, data)
|
195
|
+
File.stubs(:directory?).with(path).returns(false)
|
196
|
+
File.stubs(:exists?).with(path).returns(true)
|
197
|
+
file = StringIO.new(data)
|
198
|
+
file.stubs(:stat).returns(stub("stat", :size => data.length))
|
199
|
+
File.stubs(:open).with(path).returns(file)
|
200
|
+
end
|
201
|
+
|
202
|
+
def expect_directory(path, entries)
|
203
|
+
Dir.stubs(:entries).with(path).returns(entries)
|
204
|
+
File.stubs(:directory?).with(path).returns(true)
|
205
|
+
end
|
206
|
+
|
207
|
+
def expect_file_transfer(local, remote, data)
|
208
|
+
expect_sftp_session :server_version => 3 do |channel|
|
209
|
+
channel.sends_packet(FXP_OPEN, :long, 0, :string, remote, :long, 0x1A, :long, 0)
|
210
|
+
channel.gets_packet(FXP_HANDLE, :long, 0, :string, "handle")
|
211
|
+
channel.sends_packet(FXP_WRITE, :long, 1, :string, "handle", :int64, 0, :string, data)
|
212
|
+
channel.sends_packet(FXP_CLOSE, :long, 2, :string, "handle")
|
213
|
+
channel.gets_packet(FXP_STATUS, :long, 1, :long, 0)
|
214
|
+
channel.gets_packet(FXP_STATUS, :long, 2, :long, 0)
|
215
|
+
end
|
216
|
+
|
217
|
+
expect_file(local, data)
|
218
|
+
end
|
219
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-sftp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamis Buck
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-05-01 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -19,12 +19,9 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 1.
|
23
|
-
- - <
|
24
|
-
- !ruby/object:Gem::Version
|
25
|
-
version: 1.99.0
|
22
|
+
version: 1.99.1
|
26
23
|
version:
|
27
|
-
description:
|
24
|
+
description: A pure Ruby implementation of the SFTP client protocol
|
28
25
|
email: jamis@jamisbuck.org
|
29
26
|
executables: []
|
30
27
|
|
@@ -33,111 +30,62 @@ extensions: []
|
|
33
30
|
extra_rdoc_files: []
|
34
31
|
|
35
32
|
files:
|
36
|
-
-
|
37
|
-
-
|
38
|
-
- doc/faq/faq.rb
|
39
|
-
- doc/faq/faq.yml
|
40
|
-
- doc/LICENSE-BSD
|
41
|
-
- doc/LICENSE-GPL
|
42
|
-
- doc/LICENSE-RUBY
|
43
|
-
- lib/net
|
44
|
-
- lib/net/sftp
|
33
|
+
- CHANGELOG.rdoc
|
34
|
+
- lib/net/sftp/constants.rb
|
45
35
|
- lib/net/sftp/errors.rb
|
46
|
-
- lib/net/sftp/operations
|
47
|
-
- lib/net/sftp/operations/
|
48
|
-
- lib/net/sftp/operations/
|
49
|
-
- lib/net/sftp/operations/
|
50
|
-
- lib/net/sftp/operations/
|
51
|
-
- lib/net/sftp/
|
52
|
-
- lib/net/sftp/operations/lstat.rb
|
53
|
-
- lib/net/sftp/operations/mkdir.rb
|
54
|
-
- lib/net/sftp/operations/open.rb
|
55
|
-
- lib/net/sftp/operations/opendir.rb
|
56
|
-
- lib/net/sftp/operations/read.rb
|
57
|
-
- lib/net/sftp/operations/readdir.rb
|
58
|
-
- lib/net/sftp/operations/realpath.rb
|
59
|
-
- lib/net/sftp/operations/remove.rb
|
60
|
-
- lib/net/sftp/operations/rename.rb
|
61
|
-
- lib/net/sftp/operations/rmdir.rb
|
62
|
-
- lib/net/sftp/operations/services.rb
|
63
|
-
- lib/net/sftp/operations/setstat.rb
|
64
|
-
- lib/net/sftp/operations/stat.rb
|
65
|
-
- lib/net/sftp/operations/write.rb
|
66
|
-
- lib/net/sftp/protocol
|
67
|
-
- lib/net/sftp/protocol/01
|
36
|
+
- lib/net/sftp/operations/dir.rb
|
37
|
+
- lib/net/sftp/operations/download.rb
|
38
|
+
- lib/net/sftp/operations/file.rb
|
39
|
+
- lib/net/sftp/operations/file_factory.rb
|
40
|
+
- lib/net/sftp/operations/upload.rb
|
41
|
+
- lib/net/sftp/packet.rb
|
68
42
|
- lib/net/sftp/protocol/01/attributes.rb
|
69
|
-
- lib/net/sftp/protocol/01/
|
70
|
-
- lib/net/sftp/protocol/01/
|
71
|
-
- lib/net/sftp/protocol/
|
72
|
-
- lib/net/sftp/protocol/
|
73
|
-
- lib/net/sftp/protocol/02/impl.rb
|
74
|
-
- lib/net/sftp/protocol/02/packet-assistant.rb
|
75
|
-
- lib/net/sftp/protocol/02/services.rb
|
76
|
-
- lib/net/sftp/protocol/03
|
77
|
-
- lib/net/sftp/protocol/03/impl.rb
|
78
|
-
- lib/net/sftp/protocol/03/packet-assistant.rb
|
79
|
-
- lib/net/sftp/protocol/03/services.rb
|
80
|
-
- lib/net/sftp/protocol/04
|
43
|
+
- lib/net/sftp/protocol/01/base.rb
|
44
|
+
- lib/net/sftp/protocol/01/name.rb
|
45
|
+
- lib/net/sftp/protocol/02/base.rb
|
46
|
+
- lib/net/sftp/protocol/03/base.rb
|
81
47
|
- lib/net/sftp/protocol/04/attributes.rb
|
82
|
-
- lib/net/sftp/protocol/04/
|
83
|
-
- lib/net/sftp/protocol/04/
|
84
|
-
- lib/net/sftp/protocol/
|
85
|
-
- lib/net/sftp/protocol/
|
86
|
-
- lib/net/sftp/protocol/
|
87
|
-
- lib/net/sftp/protocol/
|
88
|
-
- lib/net/sftp/protocol
|
89
|
-
- lib/net/sftp/
|
90
|
-
- lib/net/sftp/
|
91
|
-
- lib/net/sftp/protocol/packet-assistant.rb
|
92
|
-
- lib/net/sftp/protocol/services.rb
|
48
|
+
- lib/net/sftp/protocol/04/base.rb
|
49
|
+
- lib/net/sftp/protocol/04/name.rb
|
50
|
+
- lib/net/sftp/protocol/05/base.rb
|
51
|
+
- lib/net/sftp/protocol/06/attributes.rb
|
52
|
+
- lib/net/sftp/protocol/06/base.rb
|
53
|
+
- lib/net/sftp/protocol/base.rb
|
54
|
+
- lib/net/sftp/protocol.rb
|
55
|
+
- lib/net/sftp/request.rb
|
56
|
+
- lib/net/sftp/response.rb
|
93
57
|
- lib/net/sftp/session.rb
|
94
58
|
- lib/net/sftp/version.rb
|
95
59
|
- lib/net/sftp.rb
|
96
|
-
-
|
97
|
-
-
|
98
|
-
-
|
99
|
-
-
|
100
|
-
-
|
101
|
-
-
|
102
|
-
-
|
103
|
-
-
|
104
|
-
- test/
|
105
|
-
- test/
|
106
|
-
- test/
|
107
|
-
- test/
|
108
|
-
- test/
|
109
|
-
- test/
|
110
|
-
- test/
|
111
|
-
- test/
|
112
|
-
- test/
|
113
|
-
- test/
|
114
|
-
- test/
|
115
|
-
- test/
|
116
|
-
- test/
|
117
|
-
- test/
|
118
|
-
- test/
|
119
|
-
- test/
|
120
|
-
- test/
|
121
|
-
- test/
|
122
|
-
- test/
|
123
|
-
-
|
124
|
-
-
|
125
|
-
- test/protocol/01/tc_impl.rb
|
126
|
-
- test/protocol/01/tc_packet_assistant.rb
|
127
|
-
- test/protocol/02
|
128
|
-
- test/protocol/02/tc_impl.rb
|
129
|
-
- test/protocol/02/tc_packet_assistant.rb
|
130
|
-
- test/protocol/03
|
131
|
-
- test/protocol/03/tc_impl.rb
|
132
|
-
- test/protocol/03/tc_packet_assistant.rb
|
133
|
-
- test/protocol/04
|
134
|
-
- test/protocol/04/tc_attributes.rb
|
135
|
-
- test/protocol/04/tc_impl.rb
|
136
|
-
- test/protocol/04/tc_packet_assistant.rb
|
137
|
-
- test/protocol/05
|
138
|
-
- test/protocol/05/tc_impl.rb
|
139
|
-
- test/protocol/05/tc_packet_assistant.rb
|
140
|
-
- test/protocol/tc_driver.rb
|
60
|
+
- Rakefile
|
61
|
+
- README.rdoc
|
62
|
+
- setup.rb
|
63
|
+
- test/common.rb
|
64
|
+
- test/protocol/01/test_attributes.rb
|
65
|
+
- test/protocol/01/test_base.rb
|
66
|
+
- test/protocol/01/test_name.rb
|
67
|
+
- test/protocol/02/test_base.rb
|
68
|
+
- test/protocol/03/test_base.rb
|
69
|
+
- test/protocol/04/test_attributes.rb
|
70
|
+
- test/protocol/04/test_base.rb
|
71
|
+
- test/protocol/04/test_name.rb
|
72
|
+
- test/protocol/05/test_base.rb
|
73
|
+
- test/protocol/06/test_attributes.rb
|
74
|
+
- test/protocol/06/test_base.rb
|
75
|
+
- test/protocol/test_base.rb
|
76
|
+
- test/test_all.rb
|
77
|
+
- test/test_dir.rb
|
78
|
+
- test/test_download.rb
|
79
|
+
- test/test_file.rb
|
80
|
+
- test/test_file_factory.rb
|
81
|
+
- test/test_packet.rb
|
82
|
+
- test/test_protocol.rb
|
83
|
+
- test/test_request.rb
|
84
|
+
- test/test_response.rb
|
85
|
+
- test/test_session.rb
|
86
|
+
- test/test_upload.rb
|
87
|
+
- Manifest
|
88
|
+
- net-sftp.gemspec
|
141
89
|
has_rdoc: true
|
142
90
|
homepage: http://net-ssh.rubyforge.org/sftp
|
143
91
|
post_install_message:
|
@@ -159,10 +107,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
107
|
version:
|
160
108
|
requirements: []
|
161
109
|
|
162
|
-
rubyforge_project:
|
163
|
-
rubygems_version: 1.
|
110
|
+
rubyforge_project: net-ssh
|
111
|
+
rubygems_version: 1.1.1
|
164
112
|
signing_key:
|
165
113
|
specification_version: 2
|
166
|
-
summary:
|
114
|
+
summary: A pure Ruby implementation of the SFTP client protocol
|
167
115
|
test_files:
|
168
|
-
- test/
|
116
|
+
- test/test_all.rb
|
data/doc/LICENSE-BSD
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
Copyright (c) 2004, Jamis Buck (jamis@37signals.com)
|
2
|
-
All rights reserved.
|
3
|
-
|
4
|
-
Redistribution and use in source and binary forms, with or without
|
5
|
-
modification, are permitted provided that the following conditions are met:
|
6
|
-
|
7
|
-
* Redistributions of source code must retain the above copyright notice,
|
8
|
-
this list of conditions and the following disclaimer.
|
9
|
-
|
10
|
-
* Redistributions in binary form must reproduce the above copyright
|
11
|
-
notice, this list of conditions and the following disclaimer in the
|
12
|
-
documentation and/or other materials provided with the distribution.
|
13
|
-
|
14
|
-
* The names of its contributors may not be used to endorse or promote
|
15
|
-
products derived from this software without specific prior written
|
16
|
-
permission.
|
17
|
-
|
18
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
19
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
20
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
21
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
22
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
23
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
24
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
25
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
26
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
27
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|