net-sftp 1.1.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. data/CHANGELOG.rdoc +23 -0
  2. data/Manifest +55 -0
  3. data/README.rdoc +96 -0
  4. data/Rakefile +30 -0
  5. data/lib/net/sftp.rb +53 -38
  6. data/lib/net/sftp/constants.rb +187 -0
  7. data/lib/net/sftp/errors.rb +34 -20
  8. data/lib/net/sftp/operations/dir.rb +93 -0
  9. data/lib/net/sftp/operations/download.rb +364 -0
  10. data/lib/net/sftp/operations/file.rb +176 -0
  11. data/lib/net/sftp/operations/file_factory.rb +60 -0
  12. data/lib/net/sftp/operations/upload.rb +387 -0
  13. data/lib/net/sftp/packet.rb +21 -0
  14. data/lib/net/sftp/protocol.rb +32 -0
  15. data/lib/net/sftp/protocol/01/attributes.rb +265 -96
  16. data/lib/net/sftp/protocol/01/base.rb +268 -0
  17. data/lib/net/sftp/protocol/01/name.rb +43 -0
  18. data/lib/net/sftp/protocol/02/base.rb +31 -0
  19. data/lib/net/sftp/protocol/03/base.rb +35 -0
  20. data/lib/net/sftp/protocol/04/attributes.rb +120 -195
  21. data/lib/net/sftp/protocol/04/base.rb +94 -0
  22. data/lib/net/sftp/protocol/04/name.rb +67 -0
  23. data/lib/net/sftp/protocol/05/base.rb +66 -0
  24. data/lib/net/sftp/protocol/06/attributes.rb +107 -0
  25. data/lib/net/sftp/protocol/06/base.rb +63 -0
  26. data/lib/net/sftp/protocol/base.rb +50 -0
  27. data/lib/net/sftp/request.rb +91 -0
  28. data/lib/net/sftp/response.rb +76 -0
  29. data/lib/net/sftp/session.rb +914 -238
  30. data/lib/net/sftp/version.rb +14 -21
  31. data/net-sftp.gemspec +60 -0
  32. data/setup.rb +1331 -0
  33. data/test/common.rb +173 -0
  34. data/test/protocol/01/test_attributes.rb +97 -0
  35. data/test/protocol/01/test_base.rb +210 -0
  36. data/test/protocol/01/test_name.rb +27 -0
  37. data/test/protocol/02/test_base.rb +26 -0
  38. data/test/protocol/03/test_base.rb +27 -0
  39. data/test/protocol/04/test_attributes.rb +148 -0
  40. data/test/protocol/04/test_base.rb +74 -0
  41. data/test/protocol/04/test_name.rb +49 -0
  42. data/test/protocol/05/test_base.rb +62 -0
  43. data/test/protocol/06/test_attributes.rb +124 -0
  44. data/test/protocol/06/test_base.rb +51 -0
  45. data/test/protocol/test_base.rb +42 -0
  46. data/test/test_all.rb +3 -0
  47. data/test/test_dir.rb +47 -0
  48. data/test/test_download.rb +252 -0
  49. data/test/test_file.rb +159 -0
  50. data/test/test_file_factory.rb +48 -0
  51. data/test/test_packet.rb +9 -0
  52. data/test/test_protocol.rb +17 -0
  53. data/test/test_request.rb +71 -0
  54. data/test/test_response.rb +53 -0
  55. data/test/test_session.rb +741 -0
  56. data/test/test_upload.rb +219 -0
  57. metadata +59 -111
  58. data/doc/LICENSE-BSD +0 -27
  59. data/doc/LICENSE-GPL +0 -280
  60. data/doc/LICENSE-RUBY +0 -56
  61. data/doc/faq/faq.html +0 -298
  62. data/doc/faq/faq.rb +0 -154
  63. data/doc/faq/faq.yml +0 -183
  64. data/examples/asynchronous.rb +0 -57
  65. data/examples/get-put.rb +0 -45
  66. data/examples/sftp-open-uri.rb +0 -30
  67. data/examples/ssh-service.rb +0 -30
  68. data/examples/synchronous.rb +0 -131
  69. data/lib/net/sftp/operations/abstract.rb +0 -108
  70. data/lib/net/sftp/operations/close.rb +0 -31
  71. data/lib/net/sftp/operations/errors.rb +0 -76
  72. data/lib/net/sftp/operations/fsetstat.rb +0 -36
  73. data/lib/net/sftp/operations/fstat.rb +0 -32
  74. data/lib/net/sftp/operations/lstat.rb +0 -31
  75. data/lib/net/sftp/operations/mkdir.rb +0 -33
  76. data/lib/net/sftp/operations/open.rb +0 -32
  77. data/lib/net/sftp/operations/opendir.rb +0 -32
  78. data/lib/net/sftp/operations/read.rb +0 -88
  79. data/lib/net/sftp/operations/readdir.rb +0 -55
  80. data/lib/net/sftp/operations/realpath.rb +0 -37
  81. data/lib/net/sftp/operations/remove.rb +0 -31
  82. data/lib/net/sftp/operations/rename.rb +0 -32
  83. data/lib/net/sftp/operations/rmdir.rb +0 -31
  84. data/lib/net/sftp/operations/services.rb +0 -42
  85. data/lib/net/sftp/operations/setstat.rb +0 -33
  86. data/lib/net/sftp/operations/stat.rb +0 -31
  87. data/lib/net/sftp/operations/write.rb +0 -63
  88. data/lib/net/sftp/protocol/01/impl.rb +0 -251
  89. data/lib/net/sftp/protocol/01/packet-assistant.rb +0 -82
  90. data/lib/net/sftp/protocol/01/services.rb +0 -47
  91. data/lib/net/sftp/protocol/02/impl.rb +0 -39
  92. data/lib/net/sftp/protocol/02/packet-assistant.rb +0 -32
  93. data/lib/net/sftp/protocol/02/services.rb +0 -44
  94. data/lib/net/sftp/protocol/03/impl.rb +0 -42
  95. data/lib/net/sftp/protocol/03/packet-assistant.rb +0 -35
  96. data/lib/net/sftp/protocol/03/services.rb +0 -44
  97. data/lib/net/sftp/protocol/04/impl.rb +0 -86
  98. data/lib/net/sftp/protocol/04/packet-assistant.rb +0 -45
  99. data/lib/net/sftp/protocol/04/services.rb +0 -44
  100. data/lib/net/sftp/protocol/05/impl.rb +0 -90
  101. data/lib/net/sftp/protocol/05/packet-assistant.rb +0 -34
  102. data/lib/net/sftp/protocol/05/services.rb +0 -44
  103. data/lib/net/sftp/protocol/constants.rb +0 -60
  104. data/lib/net/sftp/protocol/driver.rb +0 -235
  105. data/lib/net/sftp/protocol/packet-assistant.rb +0 -84
  106. data/lib/net/sftp/protocol/services.rb +0 -55
  107. data/lib/uri/open-sftp.rb +0 -54
  108. data/lib/uri/sftp.rb +0 -42
  109. data/test/ALL-TESTS.rb +0 -23
  110. data/test/operations/tc_abstract.rb +0 -124
  111. data/test/operations/tc_close.rb +0 -40
  112. data/test/operations/tc_fsetstat.rb +0 -48
  113. data/test/operations/tc_fstat.rb +0 -40
  114. data/test/operations/tc_lstat.rb +0 -40
  115. data/test/operations/tc_mkdir.rb +0 -48
  116. data/test/operations/tc_open.rb +0 -42
  117. data/test/operations/tc_opendir.rb +0 -40
  118. data/test/operations/tc_read.rb +0 -103
  119. data/test/operations/tc_readdir.rb +0 -88
  120. data/test/operations/tc_realpath.rb +0 -54
  121. data/test/operations/tc_remove.rb +0 -40
  122. data/test/operations/tc_rmdir.rb +0 -40
  123. data/test/operations/tc_setstat.rb +0 -48
  124. data/test/operations/tc_stat.rb +0 -40
  125. data/test/operations/tc_write.rb +0 -91
  126. data/test/protocol/01/tc_attributes.rb +0 -138
  127. data/test/protocol/01/tc_impl.rb +0 -294
  128. data/test/protocol/01/tc_packet_assistant.rb +0 -81
  129. data/test/protocol/02/tc_impl.rb +0 -41
  130. data/test/protocol/02/tc_packet_assistant.rb +0 -31
  131. data/test/protocol/03/tc_impl.rb +0 -48
  132. data/test/protocol/03/tc_packet_assistant.rb +0 -34
  133. data/test/protocol/04/tc_attributes.rb +0 -174
  134. data/test/protocol/04/tc_impl.rb +0 -91
  135. data/test/protocol/04/tc_packet_assistant.rb +0 -38
  136. data/test/protocol/05/tc_impl.rb +0 -61
  137. data/test/protocol/05/tc_packet_assistant.rb +0 -32
  138. data/test/protocol/tc_driver.rb +0 -219
@@ -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: 1.1.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
8
- autorequire: net/sftp
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-02-25 00:00:00 -07:00
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.0.0
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
- - doc/faq
37
- - doc/faq/faq.html
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/abstract.rb
48
- - lib/net/sftp/operations/close.rb
49
- - lib/net/sftp/operations/errors.rb
50
- - lib/net/sftp/operations/fsetstat.rb
51
- - lib/net/sftp/operations/fstat.rb
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/impl.rb
70
- - lib/net/sftp/protocol/01/packet-assistant.rb
71
- - lib/net/sftp/protocol/01/services.rb
72
- - lib/net/sftp/protocol/02
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/impl.rb
83
- - lib/net/sftp/protocol/04/packet-assistant.rb
84
- - lib/net/sftp/protocol/04/services.rb
85
- - lib/net/sftp/protocol/05
86
- - lib/net/sftp/protocol/05/impl.rb
87
- - lib/net/sftp/protocol/05/packet-assistant.rb
88
- - lib/net/sftp/protocol/05/services.rb
89
- - lib/net/sftp/protocol/constants.rb
90
- - lib/net/sftp/protocol/driver.rb
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
- - lib/uri
97
- - lib/uri/open-sftp.rb
98
- - lib/uri/sftp.rb
99
- - examples/asynchronous.rb
100
- - examples/get-put.rb
101
- - examples/sftp-open-uri.rb
102
- - examples/ssh-service.rb
103
- - examples/synchronous.rb
104
- - test/ALL-TESTS.rb
105
- - test/operations
106
- - test/operations/tc_abstract.rb
107
- - test/operations/tc_close.rb
108
- - test/operations/tc_fsetstat.rb
109
- - test/operations/tc_fstat.rb
110
- - test/operations/tc_lstat.rb
111
- - test/operations/tc_mkdir.rb
112
- - test/operations/tc_open.rb
113
- - test/operations/tc_opendir.rb
114
- - test/operations/tc_read.rb
115
- - test/operations/tc_readdir.rb
116
- - test/operations/tc_realpath.rb
117
- - test/operations/tc_remove.rb
118
- - test/operations/tc_rmdir.rb
119
- - test/operations/tc_setstat.rb
120
- - test/operations/tc_stat.rb
121
- - test/operations/tc_write.rb
122
- - test/protocol
123
- - test/protocol/01
124
- - test/protocol/01/tc_attributes.rb
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.0.0
110
+ rubyforge_project: net-ssh
111
+ rubygems_version: 1.1.1
164
112
  signing_key:
165
113
  specification_version: 2
166
- summary: Net::SFTP is a pure-Ruby implementation of the SFTP client protocol.
114
+ summary: A pure Ruby implementation of the SFTP client protocol
167
115
  test_files:
168
- - test/ALL-TESTS.rb
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.