public
Description: Pure Ruby implementation of the SCP protocol
Homepage: http://rubyforge.org/projects/net-ssh
Clone URL: git://github.com/jamis/net-scp.git
Search Repo:
prefer echoe over hoe
jamis (author)
Sat Mar 22 21:17:59 -0700 2008
commit  e30711038f03359ad6f011c7dd9971c06c91b48b
tree    3ccc05d385d298be9947c363ddbd62e91756306d
parent  8bd1f12e736cdc6dbfa681d7bc15e400ee0887c3
...
 
 
 
...
1
2
3
0
@@ -1 +1,4 @@
0
+=== 1.0 Preview Release 1 (0.99.0) / 22 Mar 2008
0
+
0
+* Birthday!
...
1
2
3
4
5
...
 
 
 
 
 
0
@@ -1,6 +1 @@
0
-=== (unreleased)
0
-
0
-* 1 major enhancement
0
-
0
- * Birthday!
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
0
@@ -1 +1,18 @@
0
+CHANGELOG.rdoc
0
+lib/net/scp/download.rb
0
+lib/net/scp/errors.rb
0
+lib/net/scp/upload.rb
0
+lib/net/scp/version.rb
0
+lib/net/scp.rb
0
+lib/uri/open-scp.rb
0
+lib/uri/scp.rb
0
+Rakefile
0
+README.rdoc
0
+setup.rb
0
+test/common.rb
0
+test/test_all.rb
0
+test/test_download.rb
0
+test/test_scp.rb
0
+test/test_upload.rb
0
+Manifest
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -1,18 +1 @@
0
-lib/net/scp/download.rb
0
-lib/net/scp/errors.rb
0
-lib/net/scp/upload.rb
0
-lib/net/scp/version.rb
0
-lib/net/scp.rb
0
-lib/uri/open-scp.rb
0
-lib/uri/scp.rb
0
-test/common.rb
0
-test/test_all.rb
0
-test/test_download.rb
0
-test/test_scp.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
97
98
0
@@ -1 +1,99 @@
0
+= Net::SCP
0
+
0
+* http://net-ssh.rubyforge.org/scp
0
+
0
+== DESCRIPTION:
0
+
0
+Net::SCP is a pure-Ruby implementation of the SCP protocol. This operates over SSH (and requires the Net::SSH library), and allows files and directory trees to copied to and from a remote server.
0
+
0
+== FEATURES/PROBLEMS:
0
+
0
+* Transfer files or entire directory trees to or from a remote host via SCP
0
+* Can preserve file attributes across transfers
0
+* Can download files in-memory, or direct-to-disk
0
+* Support for SCP URI's, and OpenURI
0
+
0
+== SYNOPSIS:
0
+
0
+In a nutshell:
0
+
0
+ require 'net/scp'
0
+
0
+ # upload a file to a remote server
0
+ Net::SCP.upload!("remote.host.com", "username",
0
+ "/local/path", "/remote/path",
0
+ :password => "password")
0
+
0
+ # download a file from a remote server
0
+ Net::SCP.download!("remote.host.com", "username",
0
+ "/remote/path", "/local/path",
0
+ :password => password)
0
+
0
+ # download a file to an in-memory buffer
0
+ data = Net::SCP::download!("remote.host.com", "username", "/remote/path")
0
+
0
+ # use a persistent connection to transfer files
0
+ Net::SCP.start("remote.host.com", "username", :password => "password") do |scp|
0
+ # upload a file to a remote server
0
+ scp.upload! "/local/path", "/remote/path"
0
+
0
+ # upload from an in-memory buffer
0
+ scp.upload! StringIO.new("some data to upload"), "/remote/path"
0
+
0
+ # run multiple downloads in parallel
0
+ d1 = scp.download("/remote/path", "/local/path")
0
+ d2 = scp.download("/remote/path2", "/local/path2")
0
+ [d1, d2].each { |d| d.wait }
0
+ end
0
+
0
+ # You can also use open-uri to grab data via scp:
0
+ require 'uri/open-scp'
0
+ data = open("scp://user@host/path/to/file.txt").read
0
+
0
+For more information, see Net::SCP.
0
+
0
+== REQUIREMENTS:
0
+
0
+* Net::SSH 2
0
+
0
+If you wish to run the tests, you'll also need:
0
+
0
+* Echoe (for Rakefile use)
0
+* Mocha (for tests)
0
+
0
+== INSTALL:
0
+
0
+* gem install net-scp (might need sudo privileges)
0
+
0
+Or, you can do it the hard way (without Rubygems):
0
+
0
+* tar xzf net-scp-*.tgz
0
+* cd net-scp-*
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
97
98
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -1,99 +1 @@
0
-= Net::SCP
0
-
0
-* http://net-ssh.rubyforge.org/scp
0
-
0
-== DESCRIPTION:
0
-
0
-Net::SCP is a pure-Ruby implementation of the SCP protocol. This operates over SSH (and requires the Net::SSH library), and allows files and directory trees to copied to and from a remote server.
0
-
0
-== FEATURES/PROBLEMS:
0
-
0
-* Transfer files or entire directory trees to or from a remote host via SCP
0
-* Can preserve file attributes across transfers
0
-* Can download files in-memory, or direct-to-disk
0
-* Support for SCP URI's, and OpenURI
0
-
0
-== SYNOPSIS:
0
-
0
-In a nutshell:
0
-
0
- require 'net/scp'
0
-
0
- # upload a file to a remote server
0
- Net::SCP.upload!("remote.host.com", "username",
0
- "/local/path", "/remote/path",
0
- :password => "password")
0
-
0
- # download a file from a remote server
0
- Net::SCP.download!("remote.host.com", "username",
0
- "/remote/path", "/local/path",
0
- :password => password)
0
-
0
- # download a file to an in-memory buffer
0
- data = Net::SCP::download!("remote.host.com", "username", "/remote/path")
0
-
0
- # use a persistent connection to transfer files
0
- Net::SCP.start("remote.host.com", "username", :password => "password") do |scp|
0
- # upload a file to a remote server
0
- scp.upload! "/local/path", "/remote/path"
0
-
0
- # upload from an in-memory buffer
0
- scp.upload! StringIO.new("some data to upload"), "/remote/path"
0
-
0
- # run multiple downloads in parallel
0
- d1 = scp.download("/remote/path", "/local/path")
0
- d2 = scp.download("/remote/path2", "/local/path2")
0
- [d1, d2].each { |d| d.wait }
0
- end
0
-
0
- # You can also use open-uri to grab data via scp:
0
- require 'uri/open-scp'
0
- data = open("scp://user@host/path/to/file.txt").read
0
-
0
-For more information, see Net::SCP.
0
-
0
-== REQUIREMENTS:
0
-
0
-* Net::SSH 2
0
-
0
-If you wish to run the tests, you'll also need:
0
-
0
-* Hoe
0
-* Mocha
0
-
0
-== INSTALL:
0
-
0
-* gem install net-scp (might need sudo privileges)
0
-
0
-Or, you can do it the hard way (without Rubygems):
0
-
0
-* tar xzf net-scp-*.tgz
0
-* cd net-scp-*
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/scp/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::SCP's Rakefile"
0
+end
0
 
0
 version = Net::SCP::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-scp', version) do |p|
0
- p.author = "Jamis Buck"
0
- p.email = "jamis@jamisbuck.org"
0
- p.summary = "A pure Ruby implementation of the SCP client protocol"
0
- p.url = "http://net-ssh.rubyforge.org/scp"
0
- p.extra_deps = [["net-ssh", ">= 1.99.1"]]
0
- p.need_zip = true
0
- p.rubyforge_name = "net-ssh"
0
+Echoe.new('net-scp', 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 SCP client protocol"
0
+ p.url = "http://net-ssh.rubyforge.org/scp"
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.