public
Description: Pure Ruby implementation of an SFTP (protocols 1-6) client
Homepage: http://rubyforge.org/projects/net-ssh
Clone URL: git://github.com/jamis/net-sftp.git
Search Repo:
prefer echoe to hoe
jamis (author)
Sat Mar 22 21:12:32 -0700 2008
commit  4a82c10b47b3502f44f2704f81f1759ce8a24615
tree    ebc432f1ee252c53168d3bec4fcd5010814c9d6e
parent  13fa00758c7caa9bbad39e49efae7718724deeea
...
 
 
 
...
1
2
3
0
@@ -1 +1,4 @@
0
+=== 2.0 Preview Release 1 (1.99.0) / 22 Mar 2008
0
+
0
+* Rewritten! (Never, ever, do this at home.) New and improved API.
...
1
2
3
4
5
...
 
 
 
 
 
0
@@ -1,6 +1 @@
0
-=== (unreleased)
0
-
0
-* 1 major enhancement
0
-
0
- * Rewritten! (Never, ever, do this at home.) New and improved API.
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -1,56 +1 @@
0
-lib/net/sftp/constants.rb
0
-lib/net/sftp/errors.rb
0
-lib/net/sftp/operations/dir.rb
0
-lib/net/sftp/operations/download.rb
0
-lib/net/sftp/operations/file.rb
0
-lib/net/sftp/operations/file_factory.rb
0
-lib/net/sftp/operations/upload.rb
0
-lib/net/sftp/packet.rb
0
-lib/net/sftp/protocol/01/attributes.rb
0
-lib/net/sftp/protocol/01/base.rb
0
-lib/net/sftp/protocol/01/name.rb
0
-lib/net/sftp/protocol/02/base.rb
0
-lib/net/sftp/protocol/03/base.rb
0
-lib/net/sftp/protocol/04/attributes.rb
0
-lib/net/sftp/protocol/04/base.rb
0
-lib/net/sftp/protocol/04/name.rb
0
-lib/net/sftp/protocol/05/base.rb
0
-lib/net/sftp/protocol/06/attributes.rb
0
-lib/net/sftp/protocol/06/base.rb
0
-lib/net/sftp/protocol/base.rb
0
-lib/net/sftp/protocol.rb
0
-lib/net/sftp/request.rb
0
-lib/net/sftp/response.rb
0
-lib/net/sftp/session.rb
0
-lib/net/sftp/version.rb
0
-lib/net/sftp.rb
0
-test/common.rb
0
-test/protocol/01/test_attributes.rb
0
-test/protocol/01/test_base.rb
0
-test/protocol/01/test_name.rb
0
-test/protocol/02/test_base.rb
0
-test/protocol/03/test_base.rb
0
-test/protocol/04/test_attributes.rb
0
-test/protocol/04/test_base.rb
0
-test/protocol/04/test_name.rb
0
-test/protocol/05/test_base.rb
0
-test/protocol/06/test_attributes.rb
0
-test/protocol/06/test_base.rb
0
-test/protocol/test_base.rb
0
-test/test_all.rb
0
-test/test_dir.rb
0
-test/test_download.rb
0
-test/test_file.rb
0
-test/test_file_factory.rb
0
-test/test_packet.rb
0
-test/test_protocol.rb
0
-test/test_request.rb
0
-test/test_response.rb
0
-test/test_session.rb
0
-test/test_upload.rb
0
-History.txt
0
-Manifest.txt
0
-README.txt
0
-Rakefile
0
-setup.rb
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
0
@@ -1 +1,97 @@
0
+= Net::SFTP
0
+
0
+* http://net-ssh.rubyforge.org/sftp
0
+
0
+== DESCRIPTION:
0
+
0
+Net::SFTP is a pure-Ruby implementation of the SFTP protocol (specifically, versions 1 through 6 of the SFTP protocol). Note that this is the "Secure File Transfer Protocol", typically run over an SSH connection, and has nothing to do with the FTP protocol.
0
+
0
+== FEATURES/PROBLEMS:
0
+
0
+* Transfer files or even entire directory trees to or from a remote host via SFTP
0
+* Completely supports all six protocol versions
0
+* Asynchronous and synchronous operation
0
+* Read and write files using an IO-like interface
0
+
0
+== SYNOPSIS:
0
+
0
+In a nutshell:
0
+
0
+ require 'net/sftp'
0
+
0
+ Net::SFTP.start('host', 'username', :password => 'password') do |sftp|
0
+ # upload a file or directory to the remote host
0
+ sftp.upload!("/path/to/local", "/path/to/remote")
0
+
0
+ # download a file or directory from the remote host
0
+ sftp.download!("/path/to/remote", "/path/to/local")
0
+
0
+ # grab data off the remote host directly to a buffer
0
+ data = sftp.download!("/path/to/remote")
0
+
0
+ # open and write to a pseudo-IO for a remote file
0
+ sftp.file.open("/path/to/remote", "w") do |f|
0
+ f.puts "Hello, world!\n"
0
+ end
0
+
0
+ # open and read from a pseudo-IO for a remote file
0
+ sftp.file.open("/path/to/remote", "r") do |f|
0
+ puts f.gets
0
+ end
0
+
0
+ # create a directory
0
+ sftp.mkdir! "/path/to/directory"
0
+
0
+ # list the entries in a directory
0
+ sftp.dir.foreach("/path/to/directory") do |entry|
0
+ puts entry.longname
0
+ end
0
+ end
0
+
0
+For the full documentation, start with Net::SFTP::Session. Also see Net::SFTP::Operations::Upload, Net::SFTP::Operations::Download, Net::SFTP::Operations::FileFactory, Net::SFTP::Operations::File, and Net::SFTP::Operations::Dir.
0
+
0
+== REQUIREMENTS:
0
+
0
+* Net::SSH 2
0
+
0
+If you wish to run the tests, you'll need:
0
+
0
+* Echoe (if you want to use the Rakefile)
0
+* Mocha
0
+
0
+== INSTALL:
0
+
0
+* gem install net-sftp (might need sudo privileges)
0
+
0
+Or, if you prefer to do it the hard way (sans Rubygems):
0
+
0
+* tar xzf net-ssh-*.tgz
0
+* cd net-ssh-*
0
+* ruby setup.rb config
0
+* ruby setup.rb install (might need sudo privileges)
0
+
0
+== LICENSE:
0
+
0
+(The MIT License)
0
+
0
+Copyright (c) 2008 Jamis Buck <jamis@37signals.com>
0
+
0
+Permission is hereby granted, free of charge, to any person obtaining
0
+a copy of this software and associated documentation files (the
0
+'Software'), to deal in the Software without restriction, including
0
+without limitation the rights to use, copy, modify, merge, publish,
0
+distribute, sublicense, and/or sell copies of the Software, and to
0
+permit persons to whom the Software is furnished to do so, subject to
0
+the following conditions:
0
+
0
+The above copyright notice and this permission notice shall be
0
+included in all copies or substantial portions of the Software.
0
+
0
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
0
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
0
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
0
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
0
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
0
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
0
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -1,97 +1 @@
0
-= Net::SFTP
0
-
0
-* http://net-ssh.rubyforge.org/sftp
0
-
0
-== DESCRIPTION:
0
-
0
-Net::SFTP is a pure-Ruby implementation of the SFTP protocol (specifically, versions 1 through 6 of the SFTP protocol). Note that this is the "Secure File Transfer Protocol", typically run over an SSH connection, and has nothing to do with the FTP protocol.
0
-
0
-== FEATURES/PROBLEMS:
0
-
0
-* Transfer files or even entire directory trees to or from a remote host via SFTP
0
-* Completely supports all six protocol versions
0
-* Asynchronous and synchronous operation
0
-* Read and write files using an IO-like interface
0
-
0
-== SYNOPSIS:
0
-
0
-In a nutshell:
0
-
0
- require 'net/sftp'
0
-
0
- Net::SFTP.start('host', 'username', :password => 'password') do |sftp|
0
- # upload a file or directory to the remote host
0
- sftp.upload!("/path/to/local", "/path/to/remote")
0
-
0
- # download a file or directory from the remote host
0
- sftp.download!("/path/to/remote", "/path/to/local")
0
-
0
- # grab data off the remote host directly to a buffer
0
- data = sftp.download!("/path/to/remote")
0
-
0
- # open and write to a pseudo-IO for a remote file
0
- sftp.file.open("/path/to/remote", "w") do |f|
0
- f.puts "Hello, world!\n"
0
- end
0
-
0
- # open and read from a pseudo-IO for a remote file
0
- sftp.file.open("/path/to/remote", "r") do |f|
0
- puts f.gets
0
- end
0
-
0
- # create a directory
0
- sftp.mkdir! "/path/to/directory"
0
-
0
- # list the entries in a directory
0
- sftp.dir.foreach("/path/to/directory") do |entry|
0
- puts entry.longname
0
- end
0
- end
0
-
0
-For the full documentation, start with Net::SFTP::Session. Also see Net::SFTP::Operations::Upload, Net::SFTP::Operations::Download, Net::SFTP::Operations::FileFactory, Net::SFTP::Operations::File, and Net::SFTP::Operations::Dir.
0
-
0
-== REQUIREMENTS:
0
-
0
-* Net::SSH 2
0
-
0
-If you wish to run the tests, you'll need:
0
-
0
-* Hoe
0
-* Mocha
0
-
0
-== INSTALL:
0
-
0
-* gem install net-sftp (might need sudo privileges)
0
-
0
-Or, if you prefer to do it the hard way (sans Rubygems):
0
-
0
-* tar xzf net-ssh-*.tgz
0
-* cd net-ssh-*
0
-* ruby setup.rb config
0
-* ruby setup.rb install (might need sudo privileges)
0
-
0
-== LICENSE:
0
-
0
-(The MIT License)
0
-
0
-Copyright (c) 2008 Jamis Buck <jamis@37signals.com>
0
-
0
-Permission is hereby granted, free of charge, to any person obtaining
0
-a copy of this software and associated documentation files (the
0
-'Software'), to deal in the Software without restriction, including
0
-without limitation the rights to use, copy, modify, merge, publish,
0
-distribute, sublicense, and/or sell copies of the Software, and to
0
-permit persons to whom the Software is furnished to do so, subject to
0
-the following conditions:
0
-
0
-The above copyright notice and this permission notice shall be
0
-included in all copies or substantial portions of the Software.
0
-
0
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
0
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
0
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
0
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
0
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
0
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
0
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
 
 
 
 
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
 
4
5
6
7
8
9
10
11
12
13
14
 
 
 
 
 
 
 
 
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
0
@@ -1,38 +1,31 @@
0
-if ENV['REBUILD_MANIFEST']
0
- source_files = FileList.new do |fl|
0
- [ "lib", "test" ].each do |dir|
0
- fl.include "#{dir}/**/*"
0
- end
0
-
0
- fl.include "History.txt", "Manifest.txt", "README.txt"
0
- fl.include "Rakefile", "setup.rb"
0
- end
0
-
0
- File.open("Manifest.txt", "w") do |f|
0
- source_files.each do |file|
0
- next if File.directory?(file)
0
- f.puts(file)
0
- end
0
- end
0
-end
0
-
0
 $LOAD_PATH.unshift "../net-ssh/lib"
0
 require './lib/net/sftp/version'
0
 
0
-require 'hoe'
0
+begin
0
+ require 'echoe'
0
+rescue LoadError
0
+ abort "You'll need to have `echoe' installed to use Net::SFTP's Rakefile"
0
+end
0
 
0
 version = Net::SFTP::Version::STRING.dup
0
 if ENV['SNAPSHOT'].to_i == 1
0
   version << "." << Time.now.utc.strftime("%Y%m%d%H%M%S")
0
 end
0
 
0
-Hoe.new('net-sftp', version) do |p|
0
- p.author = "Jamis Buck"
0
- p.email = "jamis@jamisbuck.org"
0
- p.summary = "A pure Ruby implementation of the SFTP client protocol"
0
- p.url = "http://net-ssh.rubyforge.org/sftp"
0
- p.extra_deps << [["net-ssh", ">= 1.99.1"]]
0
- p.need_zip = true
0
- p.rubyforge_name = "net-ssh"
0
+Echoe.new('net-sftp', version) do |p|
0
+ p.project = "net-ssh"
0
+ p.changelog = "CHANGELOG.rdoc"
0
+
0
+ p.author = "Jamis Buck"
0
+ p.email = "jamis@jamisbuck.org"
0
+ p.summary = "A pure Ruby implementation of the SFTP client protocol"
0
+ p.url = "http://net-ssh.rubyforge.org/sftp"
0
+
0
+ p.dependencies = ["net-ssh >=1.99.1"]
0
+
0
+ p.need_zip = true
0
+ p.include_rakefile = true
0
+
0
+ p.rdoc_pattern = /^(lib|README.rdoc|CHANGELOG.rdoc)/
0
 end

Comments

    No one has commented yet.