jayniz-net-ssh 2.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. data/CHANGELOG.rdoc +161 -0
  2. data/Manifest +107 -0
  3. data/README.rdoc +140 -0
  4. data/Rakefile +79 -0
  5. data/Rudyfile +110 -0
  6. data/THANKS.rdoc +16 -0
  7. data/lib/net/ssh/authentication/agent.rb +176 -0
  8. data/lib/net/ssh/authentication/constants.rb +18 -0
  9. data/lib/net/ssh/authentication/key_manager.rb +193 -0
  10. data/lib/net/ssh/authentication/methods/abstract.rb +60 -0
  11. data/lib/net/ssh/authentication/methods/hostbased.rb +71 -0
  12. data/lib/net/ssh/authentication/methods/keyboard_interactive.rb +66 -0
  13. data/lib/net/ssh/authentication/methods/password.rb +39 -0
  14. data/lib/net/ssh/authentication/methods/publickey.rb +92 -0
  15. data/lib/net/ssh/authentication/pageant.rb +183 -0
  16. data/lib/net/ssh/authentication/session.rb +134 -0
  17. data/lib/net/ssh/buffer.rb +340 -0
  18. data/lib/net/ssh/buffered_io.rb +150 -0
  19. data/lib/net/ssh/config.rb +185 -0
  20. data/lib/net/ssh/connection/channel.rb +625 -0
  21. data/lib/net/ssh/connection/constants.rb +33 -0
  22. data/lib/net/ssh/connection/session.rb +597 -0
  23. data/lib/net/ssh/connection/term.rb +178 -0
  24. data/lib/net/ssh/errors.rb +85 -0
  25. data/lib/net/ssh/key_factory.rb +102 -0
  26. data/lib/net/ssh/known_hosts.rb +129 -0
  27. data/lib/net/ssh/loggable.rb +61 -0
  28. data/lib/net/ssh/packet.rb +102 -0
  29. data/lib/net/ssh/prompt.rb +93 -0
  30. data/lib/net/ssh/proxy/errors.rb +14 -0
  31. data/lib/net/ssh/proxy/http.rb +94 -0
  32. data/lib/net/ssh/proxy/socks4.rb +70 -0
  33. data/lib/net/ssh/proxy/socks5.rb +142 -0
  34. data/lib/net/ssh/ruby_compat.rb +43 -0
  35. data/lib/net/ssh/service/forward.rb +267 -0
  36. data/lib/net/ssh/test/channel.rb +129 -0
  37. data/lib/net/ssh/test/extensions.rb +152 -0
  38. data/lib/net/ssh/test/kex.rb +44 -0
  39. data/lib/net/ssh/test/local_packet.rb +51 -0
  40. data/lib/net/ssh/test/packet.rb +81 -0
  41. data/lib/net/ssh/test/remote_packet.rb +38 -0
  42. data/lib/net/ssh/test/script.rb +157 -0
  43. data/lib/net/ssh/test/socket.rb +59 -0
  44. data/lib/net/ssh/test.rb +89 -0
  45. data/lib/net/ssh/transport/algorithms.rb +384 -0
  46. data/lib/net/ssh/transport/cipher_factory.rb +97 -0
  47. data/lib/net/ssh/transport/constants.rb +30 -0
  48. data/lib/net/ssh/transport/hmac/abstract.rb +79 -0
  49. data/lib/net/ssh/transport/hmac/md5.rb +12 -0
  50. data/lib/net/ssh/transport/hmac/md5_96.rb +11 -0
  51. data/lib/net/ssh/transport/hmac/none.rb +15 -0
  52. data/lib/net/ssh/transport/hmac/sha1.rb +13 -0
  53. data/lib/net/ssh/transport/hmac/sha1_96.rb +11 -0
  54. data/lib/net/ssh/transport/hmac.rb +31 -0
  55. data/lib/net/ssh/transport/identity_cipher.rb +55 -0
  56. data/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb +208 -0
  57. data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb +77 -0
  58. data/lib/net/ssh/transport/kex.rb +13 -0
  59. data/lib/net/ssh/transport/openssl.rb +128 -0
  60. data/lib/net/ssh/transport/packet_stream.rb +232 -0
  61. data/lib/net/ssh/transport/server_version.rb +70 -0
  62. data/lib/net/ssh/transport/session.rb +276 -0
  63. data/lib/net/ssh/transport/state.rb +206 -0
  64. data/lib/net/ssh/verifiers/lenient.rb +30 -0
  65. data/lib/net/ssh/verifiers/null.rb +12 -0
  66. data/lib/net/ssh/verifiers/strict.rb +53 -0
  67. data/lib/net/ssh/version.rb +62 -0
  68. data/lib/net/ssh.rb +215 -0
  69. data/net-ssh.gemspec +131 -0
  70. data/setup.rb +1585 -0
  71. data/support/arcfour_check.rb +20 -0
  72. data/test/authentication/methods/common.rb +28 -0
  73. data/test/authentication/methods/test_abstract.rb +51 -0
  74. data/test/authentication/methods/test_hostbased.rb +114 -0
  75. data/test/authentication/methods/test_keyboard_interactive.rb +98 -0
  76. data/test/authentication/methods/test_password.rb +50 -0
  77. data/test/authentication/methods/test_publickey.rb +127 -0
  78. data/test/authentication/test_agent.rb +205 -0
  79. data/test/authentication/test_key_manager.rb +105 -0
  80. data/test/authentication/test_session.rb +93 -0
  81. data/test/common.rb +107 -0
  82. data/test/configs/eqsign +3 -0
  83. data/test/configs/exact_match +8 -0
  84. data/test/configs/multihost +4 -0
  85. data/test/configs/wild_cards +14 -0
  86. data/test/connection/test_channel.rb +452 -0
  87. data/test/connection/test_session.rb +488 -0
  88. data/test/test_all.rb +8 -0
  89. data/test/test_buffer.rb +336 -0
  90. data/test/test_buffered_io.rb +63 -0
  91. data/test/test_config.rb +99 -0
  92. data/test/test_key_factory.rb +67 -0
  93. data/test/transport/hmac/test_md5.rb +39 -0
  94. data/test/transport/hmac/test_md5_96.rb +25 -0
  95. data/test/transport/hmac/test_none.rb +34 -0
  96. data/test/transport/hmac/test_sha1.rb +34 -0
  97. data/test/transport/hmac/test_sha1_96.rb +25 -0
  98. data/test/transport/kex/test_diffie_hellman_group1_sha1.rb +146 -0
  99. data/test/transport/kex/test_diffie_hellman_group_exchange_sha1.rb +92 -0
  100. data/test/transport/test_algorithms.rb +302 -0
  101. data/test/transport/test_cipher_factory.rb +213 -0
  102. data/test/transport/test_hmac.rb +34 -0
  103. data/test/transport/test_identity_cipher.rb +40 -0
  104. data/test/transport/test_packet_stream.rb +441 -0
  105. data/test/transport/test_server_version.rb +68 -0
  106. data/test/transport/test_session.rb +315 -0
  107. data/test/transport/test_state.rb +173 -0
  108. metadata +168 -0
data/CHANGELOG.rdoc ADDED
@@ -0,0 +1,161 @@
1
+
2
+
3
+ === 2.0.15 / 03 Sep 2009
4
+
5
+ * Scale back IO#select patch so it mutexes only zero-timeout calls [Daniel Azuma, Will Bryant]
6
+
7
+
8
+ === 2.0.14 / 28 Aug 2009
9
+
10
+ * Fix for IO#select threading bug in Ruby 1.8 (LH-1) [Daniel Azuma]
11
+
12
+ * Fix for "uninitialized constant OpenSSL::Digest::MD5" exception in Net::SFTP [DL Redden]
13
+
14
+
15
+ === 2.0.13 / 17 Aug 2009
16
+
17
+ * Added fix for hanging in ServerVersion#negotiate! when using SOCKS5 proxy (GH-9) [Gerald Talton]
18
+
19
+ * Added support for specifying a list of hosts in .ssh/config, with tests (GH-6) [ckoehler, Delano Mandelbaum]
20
+
21
+ * Added tests for arcfour128/256/512 lengths, encryption, and decryption [Delano Mandelbaum]
22
+
23
+ * Skip packet stream tests for arcfour128/256/512 [Delano Mandelbaum]
24
+
25
+ * Fix for OpenSSL cipher key length because it always returns 16, even when 32 byte keys are required, e.g. for arcfour256 and arcfour512 ciphers [Karl Varga]
26
+
27
+
28
+ === 2.0.12 / 08 Jun 2009
29
+
30
+ * Applied patch for arcfour128 and arcfour256 support [Denis Bernard]
31
+
32
+ * Use unbuffered reads when negotiating the protocol version [Steven Hazel]
33
+
34
+
35
+ === 2.0.11 / 24 Feb 2009
36
+
37
+ * Add :key_data option for specifying raw private keys in PEM format [Alex Holems, Andrew Babkin]
38
+
39
+
40
+ === 2.0.10 / 4 Feb 2009
41
+
42
+ * Added Net::SSH.configuration_for to make it easier to query the SSH configuration file(s) [Jamis Buck]
43
+
44
+
45
+ === 2.0.9 / 1 Feb 2009
46
+
47
+ * Specifying non-nil user argument overrides user in .ssh/config [Jamis Buck]
48
+
49
+ * Ignore requests for non-existent channels (workaround ssh server bug) [Jamis Buck]
50
+
51
+ * Add terminate! method for hard shutdown scenarios [Jamis Buck]
52
+
53
+ * Revert to pre-2.0.7 key-loading behavior by default, but load private-key if public-key doesn't exist [Jamis Buck]
54
+
55
+ * Make sure :passphrase option gets passed to key manager [Bob Cotton]
56
+
57
+
58
+ === 2.0.8 / 29 December 2008
59
+
60
+ * Fix private key change from 2.0.7 so that keys are loaded just-in-time, avoiding unecessary prompts from encrypted keys. [Jamis Buck]
61
+
62
+
63
+ === 2.0.7 / 29 December 2008
64
+
65
+ * Make key manager use private keys instead of requiring public key to exist [arilerner@mac.com]
66
+
67
+ * Fix failing tests [arilerner@mac.com]
68
+
69
+ * Don't include pageant when running under JRuby [Angel N. Sciortino]
70
+
71
+
72
+ === 2.0.6 / 6 December 2008
73
+
74
+ * Update the Manifest file so that the gem includes all necessary files [Jamis Buck]
75
+
76
+
77
+ === 2.0.5 / 6 December 2008
78
+
79
+ * Make the Pageant interface comply with more of the Socket interface to avoid related errors [Jamis Buck]
80
+
81
+ * Don't busy-wait on session close for remaining channels to close [Will Bryant]
82
+
83
+ * Ruby 1.9 compatibility [Jamis Buck]
84
+
85
+ * Fix Cipher#final to correctly flag a need for a cipher reset [Jamis Buck]
86
+
87
+
88
+ === 2.0.4 / 27 Aug 2008
89
+
90
+ * Added Connection::Session#closed? and Transport::Session#closed? [Jamis Buck]
91
+
92
+ * Numeric host names in .ssh/config are now parsed correct [Yanko Ivanov]
93
+
94
+ * Make sure the error raised when a public key file is malformed is more informative than a MethodMissing error [Jamis Buck]
95
+
96
+ * Cipher#reset is now called after Cipher#final, with the last n bytes used as the next initialization vector [Jamis Buck]
97
+
98
+
99
+ === 2.0.3 / 27 Jun 2008
100
+
101
+ * Make Net::SSH::Version comparable [Brian Candler]
102
+
103
+ * Fix errors in port forwarding when a channel could not be opened due to a typo in the exception name [Matthew Todd]
104
+
105
+ * Use #chomp instead of #strip when cleaning the version string reported by the remote host, so that trailing whitespace is preserved (this is to play nice with servers like Mocana SSH) [Timo Gatsonides]
106
+
107
+ * Correctly parse ssh_config entries with eq-sign delimiters [Jamis Buck]
108
+
109
+ * Ignore malformed ssh_config entries [Jamis Buck]
110
+
111
+ === 2.0.2 / 29 May 2008
112
+
113
+ * Make sure the agent client understands both RSA "identities answers" [Jamis Buck]
114
+
115
+ * Fixed key truncation bug that caused hmacs other than SHA1 to fail with "corrupt hmac" errors [Jamis Buck]
116
+
117
+ * Fix detection and loading of public keys when the keys don't actually exist [David Dollar]
118
+
119
+
120
+ === 2.0.1 / 5 May 2008
121
+
122
+ * Teach Net::SSH about a handful of default key names [Jamis Buck]
123
+
124
+
125
+ === 2.0.0 / 1 May 2008
126
+
127
+ * Allow the :verbose argument to accept symbols (:debug, etc.) as well as Logger level constants (Logger::DEBUG, etc.) [Jamis Buck]
128
+
129
+
130
+ === 2.0 Preview Release 4 (1.99.3) / 19 Apr 2008
131
+
132
+ * Make sure HOME is set to something sane, even on OS's that don't set it by default [Jamis Buck]
133
+
134
+ * Add a :passphrase option to specify the passphrase to use with private keys [Francis Sullivan]
135
+
136
+ * Open a new auth agent connection for every auth-agent channel request [Jamis Buck]
137
+
138
+
139
+ === 2.0 Preview Release 3 (1.99.2) / 10 Apr 2008
140
+
141
+ * Session properties [Jamis Buck]
142
+
143
+ * Make channel open failure work with a callback so that failures can be handled similarly to successes [Jamis Buck]
144
+
145
+
146
+ === 2.0 Preview Release 2 (1.99.1) / 22 Mar 2008
147
+
148
+ * Partial support for ~/.ssh/config (and related) SSH configuration files [Daniel J. Berger, Jamis Buck]
149
+
150
+ * Added Net::SSH::Test to facilitate testing complex SSH state machines [Jamis Buck]
151
+
152
+ * Reworked Net::SSH::Prompt to use conditionally-selected modules [Jamis Buck, suggested by James Rosen]
153
+
154
+ * Added Channel#eof? and Channel#eof! [Jamis Buck]
155
+
156
+ * Fixed bug in strict host key verifier on cache miss [Mike Timm]
157
+
158
+
159
+ === 2.0 Preview Release 1 (1.99.0) / 21 Aug 2007
160
+
161
+ * First preview release of Net::SSH v2
data/Manifest ADDED
@@ -0,0 +1,107 @@
1
+ CHANGELOG.rdoc
2
+ Manifest
3
+ README.rdoc
4
+ Rakefile
5
+ Rudyfile
6
+ THANKS.rdoc
7
+ lib/net/ssh.rb
8
+ lib/net/ssh/authentication/agent.rb
9
+ lib/net/ssh/authentication/constants.rb
10
+ lib/net/ssh/authentication/key_manager.rb
11
+ lib/net/ssh/authentication/methods/abstract.rb
12
+ lib/net/ssh/authentication/methods/hostbased.rb
13
+ lib/net/ssh/authentication/methods/keyboard_interactive.rb
14
+ lib/net/ssh/authentication/methods/password.rb
15
+ lib/net/ssh/authentication/methods/publickey.rb
16
+ lib/net/ssh/authentication/pageant.rb
17
+ lib/net/ssh/authentication/session.rb
18
+ lib/net/ssh/buffer.rb
19
+ lib/net/ssh/buffered_io.rb
20
+ lib/net/ssh/config.rb
21
+ lib/net/ssh/connection/channel.rb
22
+ lib/net/ssh/connection/constants.rb
23
+ lib/net/ssh/connection/session.rb
24
+ lib/net/ssh/connection/term.rb
25
+ lib/net/ssh/errors.rb
26
+ lib/net/ssh/key_factory.rb
27
+ lib/net/ssh/known_hosts.rb
28
+ lib/net/ssh/loggable.rb
29
+ lib/net/ssh/packet.rb
30
+ lib/net/ssh/prompt.rb
31
+ lib/net/ssh/proxy/errors.rb
32
+ lib/net/ssh/proxy/http.rb
33
+ lib/net/ssh/proxy/socks4.rb
34
+ lib/net/ssh/proxy/socks5.rb
35
+ lib/net/ssh/ruby_compat.rb
36
+ lib/net/ssh/service/forward.rb
37
+ lib/net/ssh/test.rb
38
+ lib/net/ssh/test/channel.rb
39
+ lib/net/ssh/test/extensions.rb
40
+ lib/net/ssh/test/kex.rb
41
+ lib/net/ssh/test/local_packet.rb
42
+ lib/net/ssh/test/packet.rb
43
+ lib/net/ssh/test/remote_packet.rb
44
+ lib/net/ssh/test/script.rb
45
+ lib/net/ssh/test/socket.rb
46
+ lib/net/ssh/transport/algorithms.rb
47
+ lib/net/ssh/transport/cipher_factory.rb
48
+ lib/net/ssh/transport/constants.rb
49
+ lib/net/ssh/transport/hmac.rb
50
+ lib/net/ssh/transport/hmac/abstract.rb
51
+ lib/net/ssh/transport/hmac/md5.rb
52
+ lib/net/ssh/transport/hmac/md5_96.rb
53
+ lib/net/ssh/transport/hmac/none.rb
54
+ lib/net/ssh/transport/hmac/sha1.rb
55
+ lib/net/ssh/transport/hmac/sha1_96.rb
56
+ lib/net/ssh/transport/identity_cipher.rb
57
+ lib/net/ssh/transport/kex.rb
58
+ lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb
59
+ lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb
60
+ lib/net/ssh/transport/openssl.rb
61
+ lib/net/ssh/transport/packet_stream.rb
62
+ lib/net/ssh/transport/server_version.rb
63
+ lib/net/ssh/transport/session.rb
64
+ lib/net/ssh/transport/state.rb
65
+ lib/net/ssh/verifiers/lenient.rb
66
+ lib/net/ssh/verifiers/null.rb
67
+ lib/net/ssh/verifiers/strict.rb
68
+ lib/net/ssh/version.rb
69
+ net-ssh.gemspec
70
+ setup.rb
71
+ support/arcfour_check.rb
72
+ test/authentication/methods/common.rb
73
+ test/authentication/methods/test_abstract.rb
74
+ test/authentication/methods/test_hostbased.rb
75
+ test/authentication/methods/test_keyboard_interactive.rb
76
+ test/authentication/methods/test_password.rb
77
+ test/authentication/methods/test_publickey.rb
78
+ test/authentication/test_agent.rb
79
+ test/authentication/test_key_manager.rb
80
+ test/authentication/test_session.rb
81
+ test/common.rb
82
+ test/configs/eqsign
83
+ test/configs/exact_match
84
+ test/configs/multihost
85
+ test/configs/wild_cards
86
+ test/connection/test_channel.rb
87
+ test/connection/test_session.rb
88
+ test/test_all.rb
89
+ test/test_buffer.rb
90
+ test/test_buffered_io.rb
91
+ test/test_config.rb
92
+ test/test_key_factory.rb
93
+ test/transport/hmac/test_md5.rb
94
+ test/transport/hmac/test_md5_96.rb
95
+ test/transport/hmac/test_none.rb
96
+ test/transport/hmac/test_sha1.rb
97
+ test/transport/hmac/test_sha1_96.rb
98
+ test/transport/kex/test_diffie_hellman_group1_sha1.rb
99
+ test/transport/kex/test_diffie_hellman_group_exchange_sha1.rb
100
+ test/transport/test_algorithms.rb
101
+ test/transport/test_cipher_factory.rb
102
+ test/transport/test_hmac.rb
103
+ test/transport/test_identity_cipher.rb
104
+ test/transport/test_packet_stream.rb
105
+ test/transport/test_server_version.rb
106
+ test/transport/test_session.rb
107
+ test/transport/test_state.rb
data/README.rdoc ADDED
@@ -0,0 +1,140 @@
1
+ = Net::SSH
2
+
3
+ * http://net-ssh.rubyforge.org/ssh
4
+
5
+ == DESCRIPTION:
6
+
7
+ Net::SSH is a pure-Ruby implementation of the SSH2 client protocol. It allows you to write programs that invoke and interact with processes on remote servers, via SSH2.
8
+
9
+ == FEATURES:
10
+
11
+ * Execute processes on remote servers and capture their output
12
+ * Run multiple processes in parallel over a single SSH connection
13
+ * Support for SSH subsystems
14
+ * Forward local and remote ports via an SSH connection
15
+
16
+ == SYNOPSIS:
17
+
18
+ In a nutshell:
19
+
20
+ require 'net/ssh'
21
+
22
+ Net::SSH.start('host', 'user', :password => "password") do |ssh|
23
+ # capture all stderr and stdout output from a remote process
24
+ output = ssh.exec!("hostname")
25
+
26
+ # capture only stdout matching a particular pattern
27
+ stdout = ""
28
+ ssh.exec!("ls -l /home/jamis") do |channel, stream, data|
29
+ stdout << data if stream == :stdout
30
+ end
31
+ puts stdout
32
+
33
+ # run multiple processes in parallel to completion
34
+ ssh.exec "sed ..."
35
+ ssh.exec "awk ..."
36
+ ssh.exec "rm -rf ..."
37
+ ssh.loop
38
+
39
+ # open a new channel and configure a minimal set of callbacks, then run
40
+ # the event loop until the channel finishes (closes)
41
+ channel = ssh.open_channel do |ch|
42
+ ch.exec "/usr/local/bin/ruby /path/to/file.rb" do |ch, success|
43
+ raise "could not execute command" unless success
44
+
45
+ # "on_data" is called when the process writes something to stdout
46
+ ch.on_data do |c, data|
47
+ $STDOUT.print data
48
+ end
49
+
50
+ # "on_extended_data" is called when the process writes something to stderr
51
+ ch.on_extended_data do |c, type, data|
52
+ $STDERR.print data
53
+ end
54
+
55
+ ch.on_close { puts "done!" }
56
+ end
57
+ end
58
+
59
+ channel.wait
60
+
61
+ # forward connections on local port 1234 to port 80 of www.capify.org
62
+ ssh.forward.local(1234, "www.capify.org", 80)
63
+ ssh.loop { true }
64
+ end
65
+
66
+ See Net::SSH for more documentation, and links to further information.
67
+
68
+ == REQUIREMENTS:
69
+
70
+ The only requirement you might be missing is the OpenSSL bindings for Ruby. These are built by default on most platforms, but you can verify that they're built and installed on your system by running the following command line:
71
+
72
+ ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION'
73
+
74
+ If that spits out something like "OpenSSL 0.9.8g 19 Oct 2007", then you're set. If you get an error, then you'll need to see about rebuilding ruby with OpenSSL support, or (if your platform supports it) installing the OpenSSL bindings separately.
75
+
76
+ Additionally: if you are going to be having Net::SSH prompt you for things like passwords or certificate passphrases, you'll want to have either the Highline (recommended) or Termios (unix systems only) gem installed, so that the passwords don't echo in clear text.
77
+
78
+ Lastly, if you want to run the tests or use any of the Rake tasks, you'll need:
79
+
80
+ * Echoe (for the Rakefile)
81
+ * Mocha (for the tests)
82
+
83
+
84
+ == INSTALL:
85
+
86
+ * gem install net-ssh (might need sudo privileges)
87
+
88
+
89
+ == ARCFOUR SUPPORT:
90
+
91
+ from Karl Varga:
92
+
93
+ Ruby's OpenSSL bindings always return a key length of 16 for RC4 ciphers, which means that when we try to use ARCFOUR256 or higher, Net::SSH generates keys which are consistently too short - 16 bytes as opposed to 32 bytes - resulting in the following error:
94
+
95
+ OpenSSL::CipherError: key length too short
96
+
97
+ My patch simply instructs Net::SSH to build keys of the the proper length, regardless of the required key length reported by OpenSSL.
98
+
99
+ You should also be aware that your OpenSSL C libraries may also contain this bug. I've updated to 0.9.8k, but according to this thread[https://bugzilla.mindrot.org/show_bug.cgi?id=1291], the bug existed as recently as 0.9.8e! I've manually taken a look at my header files and they look ok, which is what makes me think it's a bug in the Ruby implementation.
100
+
101
+ To see your OpenSSL version:
102
+
103
+ $ openssl version
104
+ OpenSSL 0.9.8k 25 Mar 2009
105
+
106
+ After installing this gem, verify that Net::SSH is generating keys of the correct length by running the script <tt>support/arcfour_check.rb</tt>:
107
+
108
+ $ ruby arcfour_support.rb
109
+
110
+ which should produce the following:
111
+
112
+ arcfour128: [16, 8] OpenSSL::Cipher::Cipher
113
+ arcfour256: [32, 8] OpenSSL::Cipher::Cipher
114
+ arcfour512: [64, 8] OpenSSL::Cipher::Cipher
115
+
116
+
117
+ == LICENSE:
118
+
119
+ (The MIT License)
120
+
121
+ Copyright (c) 2008 Jamis Buck <jamis@37signals.com>
122
+
123
+ Permission is hereby granted, free of charge, to any person obtaining
124
+ a copy of this software and associated documentation files (the
125
+ 'Software'), to deal in the Software without restriction, including
126
+ without limitation the rights to use, copy, modify, merge, publish,
127
+ distribute, sublicense, and/or sell copies of the Software, and to
128
+ permit persons to whom the Software is furnished to do so, subject to
129
+ the following conditions:
130
+
131
+ The above copyright notice and this permission notice shall be
132
+ included in all copies or substantial portions of the Software.
133
+
134
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
135
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
136
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
137
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
138
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
139
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
140
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,79 @@
1
+ require 'rubygems'
2
+ require 'rake/clean'
3
+ require 'rake/gempackagetask'
4
+ require 'hanna/rdoctask'
5
+ require 'fileutils'
6
+ include FileUtils
7
+
8
+ task :default => :package
9
+
10
+ # CONFIG =============================================================
11
+
12
+ # Change the following according to your needs
13
+ README = "README.rdoc"
14
+ CHANGES = "CHANGELOG.rdoc"
15
+ THANKS = 'THANKS.rdoc'
16
+
17
+ # Files and directories to be deleted when you run "rake clean"
18
+ CLEAN.include [ 'pkg', '*.gem', '.config', 'doc']
19
+
20
+ # Virginia assumes your project and gemspec have the same name
21
+ name = 'net-ssh'
22
+ load "#{name}.gemspec"
23
+ version = @spec.version
24
+
25
+ # That's it! The following defaults should allow you to get started
26
+ # on other things.
27
+
28
+
29
+ # TESTS/SPECS =========================================================
30
+
31
+
32
+
33
+ # INSTALL =============================================================
34
+
35
+ Rake::GemPackageTask.new(@spec) do |p|
36
+ p.need_tar = true if RUBY_PLATFORM !~ /mswin/
37
+ end
38
+
39
+ task :release => [ :rdoc, :package ]
40
+ task :install => [ :rdoc, :package ] do
41
+ sh %{sudo gem install pkg/#{name}-#{version}.gem}
42
+ end
43
+ task :uninstall => [ :clean ] do
44
+ sh %{sudo gem uninstall #{name}}
45
+ end
46
+
47
+
48
+ # RUBYFORGE RELEASE / PUBLISH TASKS ==================================
49
+
50
+ if @spec.rubyforge_project
51
+ desc 'Publish website to rubyforge'
52
+ task 'publish:rdoc' => 'doc/index.html' do
53
+ sh "scp -rp doc/* rubyforge.org:/var/www/gforge-projects/#{name}/ssh/v2/api/"
54
+ end
55
+
56
+ desc 'Public release to rubyforge'
57
+ task 'publish:gem' => [:package] do |t|
58
+ sh <<-end
59
+ rubyforge add_release -o Any -a #{CHANGES} -f -n #{README} #{name} #{name} #{@spec.version} pkg/#{name}-#{@spec.version}.gem &&
60
+ rubyforge add_file -o Any -a #{CHANGES} -f -n #{README} #{name} #{name} #{@spec.version} pkg/#{name}-#{@spec.version}.tgz
61
+ end
62
+ end
63
+ end
64
+
65
+
66
+
67
+ # RUBY DOCS TASK ==================================
68
+
69
+ Rake::RDocTask.new do |t|
70
+ t.rdoc_dir = 'doc'
71
+ t.title = @spec.summary
72
+ t.options << '--line-numbers' << '-A cattr_accessor=object'
73
+ t.options << '--charset' << 'utf-8'
74
+ t.rdoc_files.include(README)
75
+ t.rdoc_files.include(CHANGES)
76
+ t.rdoc_files.include(THANKS)
77
+ t.rdoc_files.include('lib/**/*.rb')
78
+ end
79
+