net-ssh 2.9.4 → 3.0.1
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.travis.yml +12 -4
- data/CHANGES.txt +43 -5
- data/README.rdoc +8 -50
- data/Rakefile +13 -5
- data/lib/net/ssh/authentication/key_manager.rb +28 -19
- data/lib/net/ssh/authentication/methods/keyboard_interactive.rb +11 -4
- data/lib/net/ssh/authentication/methods/password.rb +3 -1
- data/lib/net/ssh/authentication/pageant.rb +42 -22
- data/lib/net/ssh/connection/channel.rb +7 -26
- data/lib/net/ssh/connection/session.rb +7 -14
- data/lib/net/ssh/known_hosts.rb +20 -1
- data/lib/net/ssh/proxy/command.rb +14 -3
- data/lib/net/ssh/proxy/http.rb +3 -2
- data/lib/net/ssh/proxy/socks4.rb +2 -1
- data/lib/net/ssh/proxy/socks5.rb +3 -2
- data/lib/net/ssh/ruby_compat.rb +0 -5
- data/lib/net/ssh/transport/algorithms.rb +3 -4
- data/lib/net/ssh/transport/cipher_factory.rb +0 -1
- data/lib/net/ssh/transport/server_version.rb +9 -3
- data/lib/net/ssh/transport/session.rb +11 -9
- data/lib/net/ssh/version.rb +4 -4
- data/lib/net/ssh.rb +17 -2
- data/net-ssh-public_cert.pem +15 -15
- data/net-ssh.gemspec +11 -4
- data/setup.rb +1 -1
- data/test/README.txt +6 -13
- data/test/authentication/methods/test_keyboard_interactive.rb +21 -0
- data/test/authentication/test_key_manager.rb +14 -1
- data/test/configs/proxy_remote_user +2 -0
- data/test/connection/test_channel.rb +0 -3
- data/test/connection/test_session.rb +15 -21
- data/test/integration/README.txt +19 -0
- data/test/integration/Vagrantfile +12 -0
- data/test/integration/common.rb +57 -0
- data/test/integration/playbook.yml +48 -0
- data/test/integration/test_id_rsa_keys.rb +84 -0
- data/test/known_hosts/github_hash +1 -0
- data/test/start/test_options.rb +15 -1
- data/test/test_all.rb +1 -0
- data/test/test_config.rb +6 -0
- data/test/test_known_hosts.rb +11 -3
- data/test/transport/kex/test_diffie_hellman_group1_sha1.rb +5 -1
- data/test/transport/kex/test_diffie_hellman_group_exchange_sha1.rb +5 -1
- data/test/transport/kex/test_diffie_hellman_group_exchange_sha256.rb +2 -17
- data/test/transport/test_algorithms.rb +21 -17
- data/test/transport/test_packet_stream.rb +1 -0
- data/test/transport/test_session.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +25 -19
- metadata.gz.sig +0 -0
- data/Rudyfile +0 -96
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../lib"
|
|
2
|
+
gem "test-unit" # http://rubyforge.org/pipermail/test-unit-tracker/2009-July/000075.html
|
|
3
|
+
gem 'mocha'
|
|
4
|
+
require 'test/unit'
|
|
5
|
+
require 'mocha/setup'
|
|
6
|
+
require 'pty'
|
|
7
|
+
require 'expect'
|
|
8
|
+
|
|
9
|
+
module IntegrationTestHelpers
|
|
10
|
+
def sh command
|
|
11
|
+
puts "$ #{command}"
|
|
12
|
+
res = system(command)
|
|
13
|
+
status = $?
|
|
14
|
+
raise "Command: #{command} failed:#{status.exitstatus}" unless res
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def set_authorized_key(user,pubkey)
|
|
18
|
+
authorized_key = "/home/#{user}/.ssh/authorized_keys"
|
|
19
|
+
sh "sudo cp #{pubkey} #{authorized_key}"
|
|
20
|
+
sh "sudo chown #{user} #{authorized_key}"
|
|
21
|
+
sh "sudo chmod 0744 #{authorized_key}"
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def with_agent(&block)
|
|
25
|
+
puts "/usr/bin/ssh-agent -c"
|
|
26
|
+
agent_out = `/usr/bin/ssh-agent -c`
|
|
27
|
+
agent_out.split("\n").each do |line|
|
|
28
|
+
if line =~ /setenv (\S+) (\S+);/
|
|
29
|
+
ENV[$1] = $2
|
|
30
|
+
puts "ENV[#{$1}]=#{$2}"
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
begin
|
|
34
|
+
yield
|
|
35
|
+
ensure
|
|
36
|
+
sh "/usr/bin/ssh-agent -k"
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def ssh_add(key,password)
|
|
41
|
+
command = "ssh-add #{key}"
|
|
42
|
+
status = nil
|
|
43
|
+
PTY.spawn(command) do |reader, writer, pid|
|
|
44
|
+
begin
|
|
45
|
+
reader.expect(/Enter passphrase for .*:/) { |data| puts data }
|
|
46
|
+
writer.puts(password)
|
|
47
|
+
until reader.eof? do
|
|
48
|
+
puts reader.readline
|
|
49
|
+
end
|
|
50
|
+
rescue Errno::EIO => e
|
|
51
|
+
end
|
|
52
|
+
pid, status = Process.wait2 pid
|
|
53
|
+
end
|
|
54
|
+
raise "Command: #{command} failed:#{status.exitstatus}" unless status
|
|
55
|
+
status.exitstatus
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
- hosts: all
|
|
3
|
+
sudo: yes
|
|
4
|
+
vars:
|
|
5
|
+
ruby_version: '2.0.0-p598'
|
|
6
|
+
rvm1_install_path: '/usr/local/rvm'
|
|
7
|
+
foopwd: "$6$mhOzf/yapZwS$3RwDl4GfWZ5VcfcsHrK9xNNTxyzLOJBsmMttDNaegIbXxMahV86.v/5HsNtit16MEl0EFf5CSW8Dz2yXV.8GB0"
|
|
8
|
+
foo2pwd: "$6$JiB7y7.M0yI$Abt.ZGIc4DwkRWeI6nKxzzPUZcux7hLRXSdpoKoZvswJz1SZyg5GRQWn9pGID0dgC6e4wFglfW6ev/qZoTqGk/"
|
|
9
|
+
pre_tasks:
|
|
10
|
+
- name: get currently installed ruby version
|
|
11
|
+
command: "{{rvm1_install_path}}/rubies/ruby-{{ruby_version}}/bin/ruby -e 'puts \"#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}\"'"
|
|
12
|
+
register: current_ruby_version
|
|
13
|
+
ignore_errors: True
|
|
14
|
+
roles:
|
|
15
|
+
- { role: rvm_io.rvm1-ruby,
|
|
16
|
+
tags: ruby, sudo: True,
|
|
17
|
+
rvm1_rubies: ["ruby-{{ruby_version}}"],
|
|
18
|
+
rvm1_install_path: "{{rvm1_install_path}}",
|
|
19
|
+
rvm1_gpg_key_server: pool.sks-keyservers.net,
|
|
20
|
+
when: "'{{current_ruby_version.stdout|default()}}' != '{{ruby_version}}'" }
|
|
21
|
+
tasks:
|
|
22
|
+
- user: name=net_ssh_1 password="{{foopwd}}" group=vagrant state=present
|
|
23
|
+
- user: name=net_ssh_2 password="{{foo2pwd}}" group=vagrant state=present
|
|
24
|
+
- file: dest=/home/net_ssh_1/.ssh/ state=directory mode=0740 owner=net_ssh_1
|
|
25
|
+
- file: dest=/home/net_ssh_2/.ssh/ state=directory mode=0740 owner=net_ssh_2
|
|
26
|
+
- lineinfile: dest=/etc/sudoers.d/net_ssh_1 mode=0440 state=present create=yes
|
|
27
|
+
line='net_ssh_1 ALL=(ALL) NOPASSWD:ALL' regexp=net_ssh_1
|
|
28
|
+
- lineinfile: dest=/etc/sudoers.d/net_ssh_1 mode=0440 state=present create=yes
|
|
29
|
+
line='net_ssh_2 ALL=(ALL) NOPASSWD:ALL' regexp=net_ssh_2
|
|
30
|
+
- command: ssh-keygen -A
|
|
31
|
+
args:
|
|
32
|
+
creates: /etc/ssh/ssh_host_ed25519_key
|
|
33
|
+
notify: restart sshd
|
|
34
|
+
- name: sshd debug
|
|
35
|
+
lineinfile: dest='/etc/ssh/sshd_config' line='LogLevel DEBUG' regexp=LogLevel
|
|
36
|
+
notify: restart sshd
|
|
37
|
+
- gem: name="{{item}}" state=present executable=/usr/local/rvm/rubies/ruby-{{ruby_version}}/bin/gem
|
|
38
|
+
with_items:
|
|
39
|
+
- byebug
|
|
40
|
+
- jeweler
|
|
41
|
+
- mocha
|
|
42
|
+
- rbnacl
|
|
43
|
+
- rbnacl-libsodium
|
|
44
|
+
- copy: content='echo "cd /net-ssh ; rake integration-test"' dest=/etc/update-motd.d/99-net-ssh-tests mode=0755
|
|
45
|
+
handlers:
|
|
46
|
+
- name: restart sshd
|
|
47
|
+
service: name=ssh state=restarted
|
|
48
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
require 'common'
|
|
2
|
+
require 'fileutils'
|
|
3
|
+
require 'tmpdir'
|
|
4
|
+
|
|
5
|
+
require 'net/ssh'
|
|
6
|
+
|
|
7
|
+
# see Vagrantfile,playbook for env.
|
|
8
|
+
# we're running as net_ssh_1 user password foo
|
|
9
|
+
# and usually connecting to net_ssh_2 user password foo2pwd
|
|
10
|
+
class TestIDRSAPKeys < Test::Unit::TestCase
|
|
11
|
+
include IntegrationTestHelpers
|
|
12
|
+
|
|
13
|
+
def tmpdir(&block)
|
|
14
|
+
Dir.mktmpdir do |dir|
|
|
15
|
+
yield(dir)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def test_in_file_no_password
|
|
20
|
+
tmpdir do |dir|
|
|
21
|
+
sh "rm -rf #{dir}/id_rsa #{dir}/id_rsa.pub"
|
|
22
|
+
sh "ssh-keygen -f #{dir}/id_rsa -t rsa -N ''"
|
|
23
|
+
set_authorized_key('net_ssh_1',"#{dir}/id_rsa.pub")
|
|
24
|
+
|
|
25
|
+
sshopts = '-vvvv -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
|
|
26
|
+
#sh "ssh -i #{dir}/id_rsa #{sshopts} net_ssh_1@localhost echo 'hello'"
|
|
27
|
+
|
|
28
|
+
ret = Net::SSH.start("localhost", "net_ssh_1", {keys: "#{dir}/id_rsa"}) do |ssh|
|
|
29
|
+
ssh.exec! 'echo "hello from:$USER"'
|
|
30
|
+
end
|
|
31
|
+
assert_equal "hello from:net_ssh_1\n", ret
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def test_ssh_agent
|
|
37
|
+
tmpdir do |dir|
|
|
38
|
+
with_agent do
|
|
39
|
+
sh "rm -rf #{dir}/id_rsa #{dir}/id_rsa.pub"
|
|
40
|
+
sh "ssh-keygen -f #{dir}/id_rsa -t rsa -N 'pwd123'"
|
|
41
|
+
set_authorized_key('net_ssh_1',"#{dir}/id_rsa.pub")
|
|
42
|
+
ssh_add("#{dir}/id_rsa","pwd123")
|
|
43
|
+
|
|
44
|
+
ret = Net::SSH.start("localhost", "net_ssh_1",verbose: :debug) do |ssh|
|
|
45
|
+
ssh.exec! 'echo "hello from:$USER"'
|
|
46
|
+
end
|
|
47
|
+
assert_equal "hello from:net_ssh_1\n", ret
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def test_ssh_agent_ignores_if_already_in_agent
|
|
53
|
+
tmpdir do |dir|
|
|
54
|
+
with_agent do
|
|
55
|
+
sh "rm -rf #{dir}/id_rsa #{dir}/id_rsa.pub"
|
|
56
|
+
sh "ssh-keygen -f #{dir}/id_rsa -t rsa -N 'pwd123'"
|
|
57
|
+
set_authorized_key('net_ssh_1',"#{dir}/id_rsa.pub")
|
|
58
|
+
ssh_add("#{dir}/id_rsa","pwd123")
|
|
59
|
+
|
|
60
|
+
ret = Net::SSH.start("localhost", "net_ssh_1",verbose: :debug, keys: ["#{dir}/id_rsa"]) do |ssh|
|
|
61
|
+
ssh.exec! 'echo "hello from:$USER"'
|
|
62
|
+
end
|
|
63
|
+
assert_equal "hello from:net_ssh_1\n", ret
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def test_in_file_with_password
|
|
69
|
+
tmpdir do |dir|
|
|
70
|
+
sh "rm -rf #{dir}/id_rsa #{dir}/id_rsa.pub"
|
|
71
|
+
sh "ssh-keygen -f #{dir}/id_rsa -t rsa -N 'pwd12'"
|
|
72
|
+
set_authorized_key('net_ssh_1',"#{dir}/id_rsa.pub")
|
|
73
|
+
|
|
74
|
+
sshopts = '-vvvv -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
|
|
75
|
+
#sh "ssh -i #{dir}/id_rsa #{sshopts} net_ssh_1@localhost echo 'hello'"
|
|
76
|
+
|
|
77
|
+
ret = Net::SSH.start("localhost", "net_ssh_1", {keys: "#{dir}/id_rsa",
|
|
78
|
+
passphrase: 'pwd12', verbose: :debug}) do |ssh|
|
|
79
|
+
ssh.exec! 'echo "hello from:$USER"'
|
|
80
|
+
end
|
|
81
|
+
assert_equal "hello from:net_ssh_1\n", ret
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|1|eKp+6E0rZ3lONgsIziurXEnaIik=|rcQB/rlJMUquUyFta64KugPjX4o= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
|
data/test/start/test_options.rb
CHANGED
|
@@ -32,12 +32,26 @@ module NetSSH
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
def
|
|
35
|
+
def test_start_should_accept_number_of_password_prompts_option
|
|
36
36
|
assert_nothing_raised do
|
|
37
37
|
options = { :number_of_password_prompts => 2 }
|
|
38
38
|
Net::SSH.start('localhost', 'testuser', options)
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
|
+
|
|
42
|
+
def test_start_should_accept_non_interactive_option
|
|
43
|
+
assert_nothing_raised do
|
|
44
|
+
options = { :non_interactive => true }
|
|
45
|
+
Net::SSH.start('localhost', 'testuser', options)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def test_start_should_accept_remote_user_option
|
|
50
|
+
assert_nothing_raised do
|
|
51
|
+
options = { :remote_user => 'foo' }
|
|
52
|
+
Net::SSH.start('localhost', 'testuser', options)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
41
55
|
end
|
|
42
56
|
end
|
|
43
57
|
|
data/test/test_all.rb
CHANGED
|
@@ -4,6 +4,7 @@ $: << '.'
|
|
|
4
4
|
# $ ruby -Ilib -Itest -rrubygems test/transport/test_server_version.rb
|
|
5
5
|
Dir.chdir(File.dirname(__FILE__)) do
|
|
6
6
|
test_files = Dir['**/test_*.rb']-['test_all.rb'] # prevent circular require
|
|
7
|
+
test_files -= Dir['integration/test_*.rb']
|
|
7
8
|
test_files = test_files.reject { |f| f =~ /^manual/ }
|
|
8
9
|
test_files = test_files.select { |f| f =~ Regexp.new(ENV['ONLY']) } if ENV['ONLY']
|
|
9
10
|
test_files = test_files.reject { |f| f =~ Regexp.new(ENV['EXCEPT']) } if ENV['EXCEPT']
|
data/test/test_config.rb
CHANGED
|
@@ -213,6 +213,12 @@ class TestConfig < Test::Unit::TestCase
|
|
|
213
213
|
assert_equal [/^GIT_.*$/, /^LANG$/, /^LC_.*$/], net_ssh[:send_env]
|
|
214
214
|
end
|
|
215
215
|
|
|
216
|
+
def test_load_with_remote_user
|
|
217
|
+
config = Net::SSH::Config.load(config(:proxy_remote_user), "behind-proxy")
|
|
218
|
+
net_ssh = Net::SSH::Config.translate(config)
|
|
219
|
+
assert net_ssh[:proxy]
|
|
220
|
+
end
|
|
221
|
+
|
|
216
222
|
private
|
|
217
223
|
|
|
218
224
|
def config(name)
|
data/test/test_known_hosts.rb
CHANGED
|
@@ -2,12 +2,20 @@ require 'common'
|
|
|
2
2
|
|
|
3
3
|
class TestKnownHosts < Test::Unit::TestCase
|
|
4
4
|
|
|
5
|
-
def
|
|
6
|
-
source = File.join(File.dirname(__FILE__),
|
|
5
|
+
def perform_test(hostfile)
|
|
6
|
+
source = File.join(File.dirname(__FILE__), hostfile)
|
|
7
7
|
kh = Net::SSH::KnownHosts.new(source)
|
|
8
8
|
keys = kh.keys_for("github.com")
|
|
9
9
|
assert_equal(1, keys.count)
|
|
10
10
|
assert_equal("ssh-rsa", keys[0].ssh_type)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
def test_key_for_when_all_hosts_are_recognized
|
|
14
|
+
perform_test("known_hosts/github")
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def test_key_for_when_an_host_hash_is_recognized
|
|
18
|
+
perform_test("known_hosts/github_hash")
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
end
|
|
@@ -12,12 +12,16 @@ module Transport; module Kex
|
|
|
12
12
|
@packet_data = @shared_secret = nil
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
+
def digest_type
|
|
16
|
+
OpenSSL::Digest::SHA1
|
|
17
|
+
end
|
|
18
|
+
|
|
15
19
|
def test_exchange_keys_should_return_expected_results_when_successful
|
|
16
20
|
result = exchange!
|
|
17
21
|
assert_equal session_id, result[:session_id]
|
|
18
22
|
assert_equal server_key.to_blob, result[:server_key].to_blob
|
|
19
23
|
assert_equal shared_secret, result[:shared_secret]
|
|
20
|
-
assert_equal
|
|
24
|
+
assert_equal digest_type, result[:hashing_algorithm]
|
|
21
25
|
end
|
|
22
26
|
|
|
23
27
|
def test_exchange_keys_with_unverifiable_host_should_raise_exception
|
|
@@ -69,6 +69,10 @@ module Transport; module Kex
|
|
|
69
69
|
Net::SSH::Transport::Kex::DiffieHellmanGroupExchangeSHA1
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
+
def digest_type
|
|
73
|
+
OpenSSL::Digest::SHA1
|
|
74
|
+
end
|
|
75
|
+
|
|
72
76
|
def session_id
|
|
73
77
|
@session_id ||= begin
|
|
74
78
|
buffer = Net::SSH::Buffer.from(:string, packet_data[:client_version_string],
|
|
@@ -84,7 +88,7 @@ module Transport; module Kex
|
|
|
84
88
|
:bignum, dh.dh.pub_key,
|
|
85
89
|
:bignum, server_dh_pubkey,
|
|
86
90
|
:bignum, shared_secret)
|
|
87
|
-
|
|
91
|
+
digest_type.digest(buffer.to_s)
|
|
88
92
|
end
|
|
89
93
|
end
|
|
90
94
|
end
|
|
@@ -11,23 +11,8 @@ module Transport; module Kex
|
|
|
11
11
|
Net::SSH::Transport::Kex::DiffieHellmanGroupExchangeSHA256
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def
|
|
15
|
-
|
|
16
|
-
buffer = Net::SSH::Buffer.from(:string, packet_data[:client_version_string],
|
|
17
|
-
:string, packet_data[:server_version_string],
|
|
18
|
-
:string, packet_data[:client_algorithm_packet],
|
|
19
|
-
:string, packet_data[:server_algorithm_packet],
|
|
20
|
-
:string, Net::SSH::Buffer.from(:key, server_key),
|
|
21
|
-
:long, 1024,
|
|
22
|
-
:long, 1024,
|
|
23
|
-
:long, 8192,
|
|
24
|
-
:bignum, dh.dh.p,
|
|
25
|
-
:bignum, dh.dh.g,
|
|
26
|
-
:bignum, dh.dh.pub_key,
|
|
27
|
-
:bignum, server_dh_pubkey,
|
|
28
|
-
:bignum, shared_secret)
|
|
29
|
-
OpenSSL::Digest::SHA256.digest(buffer.to_s)
|
|
30
|
-
end
|
|
14
|
+
def digest_type
|
|
15
|
+
OpenSSL::Digest::SHA256
|
|
31
16
|
end
|
|
32
17
|
end
|
|
33
18
|
|
|
@@ -36,7 +36,7 @@ module Transport
|
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
def test_constructor_with_preferred_host_key_type_should_put_preferred_host_key_type_first
|
|
39
|
-
assert_equal %w(ssh-dss ssh-rsa ssh-rsa-cert-v01@openssh.com ssh-rsa-cert-v00@openssh.com)+ec_host_keys, algorithms(:host_key => "ssh-dss")[:host_key]
|
|
39
|
+
assert_equal %w(ssh-dss ssh-rsa ssh-rsa-cert-v01@openssh.com ssh-rsa-cert-v00@openssh.com)+ec_host_keys, algorithms(:host_key => "ssh-dss", :append_all_supported_algorithms => true)[:host_key]
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
def test_constructor_with_known_hosts_reporting_known_host_key_should_use_that_host_key_type
|
|
@@ -53,7 +53,7 @@ module Transport
|
|
|
53
53
|
end
|
|
54
54
|
|
|
55
55
|
def test_constructor_with_unrecognized_host_key_type_should_return_whats_supported
|
|
56
|
-
assert_equal %w(ssh-rsa ssh-dss ssh-rsa-cert-v01@openssh.com ssh-rsa-cert-v00@openssh.com )+ec_host_keys, algorithms(:host_key => "bogus ssh-rsa")[:host_key]
|
|
56
|
+
assert_equal %w(ssh-rsa ssh-dss ssh-rsa-cert-v01@openssh.com ssh-rsa-cert-v00@openssh.com )+ec_host_keys, algorithms(:host_key => "bogus ssh-rsa",:append_all_supported_algorithms => true)[:host_key]
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
def ec_kex
|
|
@@ -65,52 +65,56 @@ module Transport
|
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
def test_constructor_with_preferred_kex_should_put_preferred_kex_first
|
|
68
|
-
assert_equal %w(diffie-hellman-group1-sha1 diffie-hellman-group-exchange-sha1 diffie-hellman-group14-sha1 diffie-hellman-group-exchange-sha256)+ec_kex, algorithms(:kex => "diffie-hellman-group1-sha1")[:kex]
|
|
68
|
+
assert_equal %w(diffie-hellman-group1-sha1 diffie-hellman-group-exchange-sha1 diffie-hellman-group14-sha1 diffie-hellman-group-exchange-sha256)+ec_kex, algorithms(:kex => "diffie-hellman-group1-sha1", :append_all_supported_algorithms => true)[:kex]
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
-
def
|
|
72
|
-
assert_equal %w(diffie-hellman-group1-sha1 diffie-hellman-group-exchange-sha1 diffie-hellman-group14-sha1 diffie-hellman-group-exchange-sha256)+ec_kex, algorithms(
|
|
71
|
+
def test_constructor_with_unrecognized_kex_should_not_raise_exception
|
|
72
|
+
assert_equal %w(diffie-hellman-group1-sha1 diffie-hellman-group-exchange-sha1 diffie-hellman-group14-sha1 diffie-hellman-group-exchange-sha256)+ec_kex, algorithms(
|
|
73
|
+
:kex => %w(bogus diffie-hellman-group1-sha1),:append_all_supported_algorithms => true)[:kex]
|
|
73
74
|
end
|
|
74
75
|
|
|
75
76
|
def test_constructor_with_preferred_encryption_should_put_preferred_encryption_first
|
|
76
|
-
assert_equal %w(aes256-cbc aes128-cbc 3des-cbc blowfish-cbc cast128-cbc aes192-cbc rijndael-cbc@lysator.liu.se idea-cbc none arcfour128 arcfour256 arcfour aes128-ctr aes192-ctr aes256-ctr camellia128-cbc camellia192-cbc camellia256-cbc camellia128-cbc@openssh.org camellia192-cbc@openssh.org camellia256-cbc@openssh.org camellia128-ctr camellia192-ctr camellia256-ctr camellia128-ctr@openssh.org camellia192-ctr@openssh.org camellia256-ctr@openssh.org cast128-ctr blowfish-ctr 3des-ctr), algorithms(:encryption => "aes256-cbc"
|
|
77
|
+
assert_equal %w(aes256-cbc aes128-cbc 3des-cbc blowfish-cbc cast128-cbc aes192-cbc rijndael-cbc@lysator.liu.se idea-cbc none arcfour128 arcfour256 arcfour aes128-ctr aes192-ctr aes256-ctr camellia128-cbc camellia192-cbc camellia256-cbc camellia128-cbc@openssh.org camellia192-cbc@openssh.org camellia256-cbc@openssh.org camellia128-ctr camellia192-ctr camellia256-ctr camellia128-ctr@openssh.org camellia192-ctr@openssh.org camellia256-ctr@openssh.org cast128-ctr blowfish-ctr 3des-ctr), algorithms(:encryption => "aes256-cbc",
|
|
78
|
+
:append_all_supported_algorithms => true)[:encryption]
|
|
77
79
|
end
|
|
78
80
|
|
|
79
81
|
def test_constructor_with_multiple_preferred_encryption_should_put_all_preferred_encryption_first
|
|
80
|
-
assert_equal %w(aes256-cbc 3des-cbc idea-cbc aes128-cbc blowfish-cbc cast128-cbc aes192-cbc rijndael-cbc@lysator.liu.se none arcfour128 arcfour256 arcfour aes128-ctr aes192-ctr aes256-ctr camellia128-cbc camellia192-cbc camellia256-cbc camellia128-cbc@openssh.org camellia192-cbc@openssh.org camellia256-cbc@openssh.org camellia128-ctr camellia192-ctr camellia256-ctr camellia128-ctr@openssh.org camellia192-ctr@openssh.org camellia256-ctr@openssh.org cast128-ctr blowfish-ctr 3des-ctr), algorithms(:encryption => %w(aes256-cbc 3des-cbc idea-cbc))[:encryption]
|
|
82
|
+
assert_equal %w(aes256-cbc 3des-cbc idea-cbc aes128-cbc blowfish-cbc cast128-cbc aes192-cbc rijndael-cbc@lysator.liu.se none arcfour128 arcfour256 arcfour aes128-ctr aes192-ctr aes256-ctr camellia128-cbc camellia192-cbc camellia256-cbc camellia128-cbc@openssh.org camellia192-cbc@openssh.org camellia256-cbc@openssh.org camellia128-ctr camellia192-ctr camellia256-ctr camellia128-ctr@openssh.org camellia192-ctr@openssh.org camellia256-ctr@openssh.org cast128-ctr blowfish-ctr 3des-ctr), algorithms(:encryption => %w(aes256-cbc 3des-cbc idea-cbc), :append_all_supported_algorithms => true)[:encryption]
|
|
81
83
|
end
|
|
82
84
|
|
|
83
85
|
def test_constructor_with_unrecognized_encryption_should_keep_whats_supported
|
|
84
|
-
assert_equal %w(aes256-cbc aes128-cbc 3des-cbc blowfish-cbc cast128-cbc aes192-cbc rijndael-cbc@lysator.liu.se idea-cbc none arcfour128 arcfour256 arcfour aes128-ctr aes192-ctr aes256-ctr camellia128-cbc camellia192-cbc camellia256-cbc camellia128-cbc@openssh.org camellia192-cbc@openssh.org camellia256-cbc@openssh.org camellia128-ctr camellia192-ctr camellia256-ctr camellia128-ctr@openssh.org camellia192-ctr@openssh.org camellia256-ctr@openssh.org cast128-ctr blowfish-ctr 3des-ctr), algorithms(:encryption => %w(bogus aes256-cbc))[:encryption]
|
|
86
|
+
assert_equal %w(aes256-cbc aes128-cbc 3des-cbc blowfish-cbc cast128-cbc aes192-cbc rijndael-cbc@lysator.liu.se idea-cbc none arcfour128 arcfour256 arcfour aes128-ctr aes192-ctr aes256-ctr camellia128-cbc camellia192-cbc camellia256-cbc camellia128-cbc@openssh.org camellia192-cbc@openssh.org camellia256-cbc@openssh.org camellia128-ctr camellia192-ctr camellia256-ctr camellia128-ctr@openssh.org camellia192-ctr@openssh.org camellia256-ctr@openssh.org cast128-ctr blowfish-ctr 3des-ctr), algorithms(:encryption => %w(bogus aes256-cbc), :append_all_supported_algorithms => true)[:encryption]
|
|
85
87
|
end
|
|
86
88
|
|
|
87
89
|
def test_constructor_with_preferred_hmac_should_put_preferred_hmac_first
|
|
88
|
-
assert_equal %w(hmac-md5-96 hmac-sha1 hmac-md5 hmac-sha1-96 hmac-ripemd160 hmac-ripemd160@openssh.com hmac-sha2-256 hmac-sha2-512 hmac-sha2-256-96 hmac-sha2-512-96 none), algorithms(:hmac => "hmac-md5-96")[:hmac]
|
|
90
|
+
assert_equal %w(hmac-md5-96 hmac-sha1 hmac-md5 hmac-sha1-96 hmac-ripemd160 hmac-ripemd160@openssh.com hmac-sha2-256 hmac-sha2-512 hmac-sha2-256-96 hmac-sha2-512-96 none), algorithms(:hmac => "hmac-md5-96", :append_all_supported_algorithms => true)[:hmac]
|
|
89
91
|
end
|
|
90
92
|
|
|
91
93
|
def test_constructor_with_multiple_preferred_hmac_should_put_all_preferred_hmac_first
|
|
92
|
-
assert_equal %w(hmac-md5-96 hmac-sha1-96 hmac-sha1 hmac-md5 hmac-ripemd160 hmac-ripemd160@openssh.com hmac-sha2-256 hmac-sha2-512 hmac-sha2-256-96 hmac-sha2-512-96 none), algorithms(:hmac => %w(hmac-md5-96 hmac-sha1-96))[:hmac]
|
|
94
|
+
assert_equal %w(hmac-md5-96 hmac-sha1-96 hmac-sha1 hmac-md5 hmac-ripemd160 hmac-ripemd160@openssh.com hmac-sha2-256 hmac-sha2-512 hmac-sha2-256-96 hmac-sha2-512-96 none), algorithms(:hmac => %w(hmac-md5-96 hmac-sha1-96), :append_all_supported_algorithms => true)[:hmac]
|
|
93
95
|
end
|
|
94
96
|
|
|
95
97
|
def test_constructor_with_unrecognized_hmac_should_ignore_those
|
|
96
98
|
assert_equal %w(hmac-md5-96 hmac-sha1 hmac-md5 hmac-sha1-96 hmac-ripemd160 hmac-ripemd160@openssh.com hmac-sha2-256 hmac-sha2-512 hmac-sha2-256-96 hmac-sha2-512-96 none),
|
|
97
|
-
algorithms(:hmac => "hmac-md5-96")[:hmac]
|
|
99
|
+
algorithms(:hmac => "hmac-md5-96", :append_all_supported_algorithms => true)[:hmac]
|
|
98
100
|
end
|
|
99
101
|
|
|
100
102
|
def test_constructor_with_preferred_compression_should_put_preferred_compression_first
|
|
101
|
-
assert_equal %w(zlib none zlib@openssh.com), algorithms(:compression => "zlib")[:compression]
|
|
103
|
+
assert_equal %w(zlib none zlib@openssh.com), algorithms(:compression => "zlib", :append_all_supported_algorithms => true)[:compression]
|
|
102
104
|
end
|
|
103
105
|
|
|
104
106
|
def test_constructor_with_multiple_preferred_compression_should_put_all_preferred_compression_first
|
|
105
|
-
assert_equal %w(zlib@openssh.com zlib none), algorithms(:compression => %w(zlib@openssh.com zlib)
|
|
107
|
+
assert_equal %w(zlib@openssh.com zlib none), algorithms(:compression => %w(zlib@openssh.com zlib),
|
|
108
|
+
:append_all_supported_algorithms => true)[:compression]
|
|
106
109
|
end
|
|
107
110
|
|
|
108
111
|
def test_constructor_with_general_preferred_compression_should_put_none_last
|
|
109
|
-
assert_equal %w(zlib@openssh.com zlib none), algorithms(
|
|
112
|
+
assert_equal %w(zlib@openssh.com zlib none), algorithms(
|
|
113
|
+
:compression => true, :append_all_supported_algorithms => true)[:compression]
|
|
110
114
|
end
|
|
111
115
|
|
|
112
116
|
def test_constructor_with_unrecognized_compression_should_return_whats_supported
|
|
113
|
-
assert_equal %w(none zlib zlib@openssh.com), algorithms(:compression => %w(bogus none zlib))[:compression]
|
|
117
|
+
assert_equal %w(none zlib zlib@openssh.com), algorithms(:compression => %w(bogus none zlib), :append_all_supported_algorithms => true)[:compression]
|
|
114
118
|
end
|
|
115
119
|
|
|
116
120
|
def test_initial_state_should_be_neither_pending_nor_initialized
|
|
@@ -185,7 +189,7 @@ module Transport
|
|
|
185
189
|
end
|
|
186
190
|
|
|
187
191
|
def test_exchange_with_zlib_compression_enabled_sets_compression_to_standard
|
|
188
|
-
algorithms :compression => "zlib"
|
|
192
|
+
algorithms :compression => "zlib", :append_all_supported_algorithms => true
|
|
189
193
|
|
|
190
194
|
transport.expect do |t, buffer|
|
|
191
195
|
assert_kexinit(buffer, :compression_client => "zlib,none,zlib@openssh.com", :compression_server => "zlib,none,zlib@openssh.com")
|
|
@@ -200,7 +204,7 @@ module Transport
|
|
|
200
204
|
end
|
|
201
205
|
|
|
202
206
|
def test_exchange_with_zlib_at_openssh_dot_com_compression_enabled_sets_compression_to_delayed
|
|
203
|
-
algorithms :compression => "zlib@openssh.com"
|
|
207
|
+
algorithms :compression => "zlib@openssh.com", :append_all_supported_algorithms => true
|
|
204
208
|
|
|
205
209
|
transport.expect do |t, buffer|
|
|
206
210
|
assert_kexinit(buffer, :compression_client => "zlib@openssh.com,none,zlib", :compression_server => "zlib@openssh.com,none,zlib")
|
|
@@ -315,7 +315,7 @@ module Transport
|
|
|
315
315
|
def session(options={})
|
|
316
316
|
@session ||= begin
|
|
317
317
|
host = options.delete(:host) || "net.ssh.test"
|
|
318
|
-
|
|
318
|
+
Socket.stubs(:tcp).with(host, options[:port] || 22, nil, nil, { connect_timeout: options[:timeout] }).returns(socket)
|
|
319
319
|
Net::SSH::Transport::ServerVersion.stubs(:new).returns(server_version)
|
|
320
320
|
Net::SSH::Transport::Algorithms.stubs(:new).returns(algorithms)
|
|
321
321
|
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: net-ssh
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 3.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jamis Buck
|
|
@@ -14,24 +14,24 @@ cert_chain:
|
|
|
14
14
|
-----BEGIN CERTIFICATE-----
|
|
15
15
|
MIIDODCCAiCgAwIBAgIBADANBgkqhkiG9w0BAQUFADBCMRAwDgYDVQQDDAduZXQt
|
|
16
16
|
c3NoMRkwFwYKCZImiZPyLGQBGRYJc29sdXRpb3VzMRMwEQYKCZImiZPyLGQBGRYD
|
|
17
|
-
|
|
17
|
+
Y29tMB4XDTE0MTIwMjE3MzkyMFoXDTE1MTIwMjE3MzkyMFowQjEQMA4GA1UEAwwH
|
|
18
18
|
bmV0LXNzaDEZMBcGCgmSJomT8ixkARkWCXNvbHV0aW91czETMBEGCgmSJomT8ixk
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
ARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0qnw4JV5JN
|
|
20
|
+
MWelqu7pnW2z6GZJ7+zLFYJQNETJyF0U5zo7aCRK08OeUxnpu/TCCXK8iQVkNLfz
|
|
21
|
+
9pVIhF+X8pMEIruAkYGwBt1aWfuSNeyodyMk0vpZdxBHbOTJ4qBRUc6qOtNOeOzv
|
|
22
|
+
8ObYUX52P/EMMaeXTRU+e7MGkB9pb6FvPPNx5akxwIaoRvtcMsc/hJnQuP5r96w6
|
|
23
|
+
t06MgKbXhWAX6gev0RVlrQqzxXst6iuvsrgZGjFqzob5wbTiX9M0+bFAB0EI7tJC
|
|
24
|
+
sv5keEbtNRaU7p3ZbMm4wTHHJLOtD+BpUCSzwv4ToNj9mZtJBMYw2Eeo7z1DklEG
|
|
25
|
+
mr95zbe+zNMCAwEAAaM5MDcwCQYDVR0TBAIwADAdBgNVHQ4EFgQU1bTfpzmitXwv
|
|
26
|
+
LmTXi0IO5vd8NGYwCwYDVR0PBAQDAgSwMA0GCSqGSIb3DQEBBQUAA4IBAQA0Aps8
|
|
27
|
+
UPINGa8XUUtrZtzrgX0/iyXNkKY1ld85g1N3WKEAVLfQI7TlGr0Qv2Ekx6RqlxbR
|
|
28
|
+
Vyq08pytSnghW2otR3bIGMGQzqxAeRLb25cjEwH7YIJ32n7ZC1fpMnBZOBDmueWA
|
|
29
|
+
B9EonmoO3ne7AJSgIvBbZzBPhzM4HrQGRW8LsPFsuj+dcJI43HOQwkmv2TRz0+t6
|
|
30
|
+
mGZldmqLcK0abv4JepLfB9XTue3kuyA29NGBibqyvRwlKckLpvKfHZX6Jxad8xxm
|
|
31
|
+
MbvRpzgROzyfw1qYi4dnIyMwTtXFFcZ0a2jpxHPkcTYFK6TzvFgDLAP0Y/u9jqUQ
|
|
32
|
+
eZ7/3CdSi/isZHEw
|
|
33
33
|
-----END CERTIFICATE-----
|
|
34
|
-
date:
|
|
34
|
+
date: 2015-09-25 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: test-unit
|
|
@@ -77,7 +77,6 @@ files:
|
|
|
77
77
|
- Manifest
|
|
78
78
|
- README.rdoc
|
|
79
79
|
- Rakefile
|
|
80
|
-
- Rudyfile
|
|
81
80
|
- THANKS.txt
|
|
82
81
|
- lib/net/ssh.rb
|
|
83
82
|
- lib/net/ssh/authentication/agent.rb
|
|
@@ -186,12 +185,19 @@ files:
|
|
|
186
185
|
- test/configs/negative_match
|
|
187
186
|
- test/configs/nohost
|
|
188
187
|
- test/configs/numeric_host
|
|
188
|
+
- test/configs/proxy_remote_user
|
|
189
189
|
- test/configs/send_env
|
|
190
190
|
- test/configs/substitutes
|
|
191
191
|
- test/configs/wild_cards
|
|
192
192
|
- test/connection/test_channel.rb
|
|
193
193
|
- test/connection/test_session.rb
|
|
194
|
+
- test/integration/README.txt
|
|
195
|
+
- test/integration/Vagrantfile
|
|
196
|
+
- test/integration/common.rb
|
|
197
|
+
- test/integration/playbook.yml
|
|
198
|
+
- test/integration/test_id_rsa_keys.rb
|
|
194
199
|
- test/known_hosts/github
|
|
200
|
+
- test/known_hosts/github_hash
|
|
195
201
|
- test/manual/test_forward.rb
|
|
196
202
|
- test/manual/test_pageant.rb
|
|
197
203
|
- test/start/test_connection.rb
|
|
@@ -240,7 +246,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
240
246
|
requirements:
|
|
241
247
|
- - ">="
|
|
242
248
|
- !ruby/object:Gem::Version
|
|
243
|
-
version: '0'
|
|
249
|
+
version: '2.0'
|
|
244
250
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
251
|
requirements:
|
|
246
252
|
- - ">="
|
metadata.gz.sig
CHANGED
|
Binary file
|
data/Rudyfile
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
# Rudyfile
|
|
2
|
-
#
|
|
3
|
-
# This configuration is used to test installing
|
|
4
|
-
# and running net-ssh on a clean machine.
|
|
5
|
-
#
|
|
6
|
-
# Usage:
|
|
7
|
-
#
|
|
8
|
-
# $ rudy -vv startup
|
|
9
|
-
# $ rudy -vv testsuite
|
|
10
|
-
# $ rudy -vv shutdown
|
|
11
|
-
#
|
|
12
|
-
# Requires: Rudy 0.9 (http://code.google.com/p/rudy/)
|
|
13
|
-
#
|
|
14
|
-
|
|
15
|
-
defaults do
|
|
16
|
-
color true
|
|
17
|
-
environment :test
|
|
18
|
-
role :netssh
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
machines do
|
|
22
|
-
region :'us-east-1' do
|
|
23
|
-
ami 'ami-e348af8a' # Alestic Debian 5.0, 32-bit (US)
|
|
24
|
-
end
|
|
25
|
-
env :test do
|
|
26
|
-
role :netssh do
|
|
27
|
-
user :root
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
commands do
|
|
33
|
-
allow :apt_get, "apt-get", :y, :q
|
|
34
|
-
allow :gem_install, "/usr/bin/gem", "install", :n, '/usr/bin', :y, :V, "--no-rdoc", "--no-ri"
|
|
35
|
-
allow :gem_sources, "/usr/bin/gem", "sources"
|
|
36
|
-
allow :gem_uninstall, "/usr/bin/gem", "uninstall", :V
|
|
37
|
-
allow :update_rubygems
|
|
38
|
-
allow :rm
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
routines do
|
|
42
|
-
|
|
43
|
-
testsuite do
|
|
44
|
-
before :sysupdate, :installdeps, :install_gem
|
|
45
|
-
|
|
46
|
-
remote :root do
|
|
47
|
-
directory_upload 'test', '/tmp/'
|
|
48
|
-
cd '/tmp'
|
|
49
|
-
ruby :I, 'lib/', :I, 'test/', :r, 'rubygems', 'test/test_all.rb'
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
after :install_rubyforge, :install_github
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
install_gem do
|
|
56
|
-
before :package_gem
|
|
57
|
-
remote :root do
|
|
58
|
-
disable_safe_mode
|
|
59
|
-
file_upload "pkg/net-ssh-*.gem", "/tmp/"
|
|
60
|
-
gem_install "/tmp/net-ssh-*.gem"
|
|
61
|
-
end
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
package_gem do
|
|
65
|
-
local do
|
|
66
|
-
rm :r, :f, 'pkg'
|
|
67
|
-
rake 'package'
|
|
68
|
-
end
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
remove do
|
|
72
|
-
remote :root do
|
|
73
|
-
gem_uninstall 'net-ssh'
|
|
74
|
-
end
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
installdeps do
|
|
78
|
-
remote :root do
|
|
79
|
-
gem_install "rye", "test-unit", "mocha"
|
|
80
|
-
rye 'authorize-local'
|
|
81
|
-
end
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
sysupdate do
|
|
85
|
-
remote :root do
|
|
86
|
-
apt_get "update"
|
|
87
|
-
apt_get "install", "build-essential", "git-core"
|
|
88
|
-
apt_get "install", "ruby1.8-dev", "rdoc", "libzlib-ruby", "rubygems"
|
|
89
|
-
mkdir :p, "/var/lib/gems/1.8/bin" # Doesn't get created, but causes Rubygems to fail
|
|
90
|
-
gem_install "builder", "session"
|
|
91
|
-
gem_install 'rubygems-update', "-v=1.3.4" # circular issue with 1.3.5 and hoe
|
|
92
|
-
update_rubygems
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
end
|
|
96
|
-
|