net-ssh-simple 1.7.2 → 1.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/coverage/.resultset.json +43 -43
- data/coverage/index.html +87 -87
- data/doc/Net.html +38 -38
- data/doc/Net/SSH.html +38 -38
- data/doc/Net/SSH/Simple.html +115 -115
- data/doc/Net/SSH/Simple/Error.html +54 -53
- data/doc/Net/SSH/Simple/Result.html +79 -78
- data/doc/_index.html +28 -31
- data/doc/class_list.html +24 -31
- data/doc/css/full_list.css +32 -31
- data/doc/css/style.css +251 -91
- data/doc/file.README.html +34 -37
- data/doc/file_list.html +26 -30
- data/doc/frames.html +7 -16
- data/doc/index.html +34 -37
- data/doc/js/app.js +106 -77
- data/doc/js/full_list.js +170 -135
- data/doc/method_list.html +188 -128
- data/doc/top-level-namespace.html +34 -36
- data/lib/net/ssh/simple/version.rb +1 -1
- data/net-ssh-simple.gemspec +1 -1
- metadata +4 -5
data/doc/Net.html
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
<!DOCTYPE html
|
2
|
-
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
4
3
|
<head>
|
5
|
-
<meta
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
6
|
<title>
|
7
7
|
Module: Net
|
8
8
|
|
9
|
-
— Documentation by YARD 0.
|
9
|
+
— Documentation by YARD 0.9.12
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -15,9 +15,8 @@
|
|
15
15
|
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
-
|
18
|
+
pathId = "Net";
|
19
19
|
relpath = '';
|
20
|
-
framesUrl = "frames.html#!Net.html";
|
21
20
|
</script>
|
22
21
|
|
23
22
|
|
@@ -28,63 +27,63 @@
|
|
28
27
|
|
29
28
|
</head>
|
30
29
|
<body>
|
31
|
-
<div
|
32
|
-
<
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
33
38
|
|
34
39
|
<a href="_index.html">Index (N)</a> »
|
35
40
|
|
36
41
|
|
37
42
|
<span class="title">Net</span>
|
38
43
|
|
39
|
-
|
40
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
44
|
</div>
|
42
45
|
|
43
|
-
|
46
|
+
<div id="search">
|
44
47
|
|
45
48
|
<a class="full_list_link" id="class_list_link"
|
46
49
|
href="class_list.html">
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
</a>
|
54
|
-
|
55
|
-
<a class="full_list_link" id="file_list_link"
|
56
|
-
href="file_list.html">
|
57
|
-
File List
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
58
56
|
</a>
|
59
57
|
|
60
58
|
</div>
|
61
|
-
|
62
|
-
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
63
61
|
|
64
|
-
|
65
|
-
|
66
|
-
<div id="content"><h1>Module: Net
|
62
|
+
<div id="content"><h1>Module: Net
|
67
63
|
|
68
64
|
|
69
65
|
|
70
66
|
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
71
69
|
|
72
|
-
<dl class="box">
|
73
70
|
|
74
71
|
|
75
|
-
|
76
72
|
|
77
|
-
|
78
73
|
|
79
74
|
|
75
|
+
|
80
76
|
|
81
|
-
|
82
|
-
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/net/ssh/simple.rb<span class="defines">,<br />
|
83
82
|
lib/net/ssh/simple.rb,<br /> lib/net/ssh/simple/version.rb</span>
|
84
83
|
</dd>
|
84
|
+
</dl>
|
85
85
|
|
86
|
-
</
|
87
|
-
<div class="clear"></div>
|
86
|
+
</div>
|
88
87
|
|
89
88
|
<h2>Defined Under Namespace</h2>
|
90
89
|
<p class="children">
|
@@ -107,11 +106,12 @@
|
|
107
106
|
|
108
107
|
</div>
|
109
108
|
|
110
|
-
|
111
|
-
Generated on
|
109
|
+
<div id="footer">
|
110
|
+
Generated on Thu Dec 21 01:55:38 2017 by
|
112
111
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
113
|
-
0.
|
112
|
+
0.9.12 (ruby-2.4.0).
|
114
113
|
</div>
|
115
114
|
|
115
|
+
</div>
|
116
116
|
</body>
|
117
117
|
</html>
|
data/doc/Net/SSH.html
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
<!DOCTYPE html
|
2
|
-
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
4
3
|
<head>
|
5
|
-
<meta
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
6
|
<title>
|
7
7
|
Module: Net::SSH
|
8
8
|
|
9
|
-
— Documentation by YARD 0.
|
9
|
+
— Documentation by YARD 0.9.12
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -15,9 +15,8 @@
|
|
15
15
|
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
-
|
18
|
+
pathId = "Net::SSH";
|
19
19
|
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!Net/SSH.html";
|
21
20
|
</script>
|
22
21
|
|
23
22
|
|
@@ -28,63 +27,63 @@
|
|
28
27
|
|
29
28
|
</head>
|
30
29
|
<body>
|
31
|
-
<div
|
32
|
-
<
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
33
38
|
|
34
39
|
<a href="../_index.html">Index (S)</a> »
|
35
40
|
<span class='title'><span class='object_link'><a href="../Net.html" title="Net (module)">Net</a></span></span>
|
36
41
|
»
|
37
42
|
<span class="title">SSH</span>
|
38
43
|
|
39
|
-
|
40
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
44
|
</div>
|
42
45
|
|
43
|
-
|
46
|
+
<div id="search">
|
44
47
|
|
45
48
|
<a class="full_list_link" id="class_list_link"
|
46
49
|
href="../class_list.html">
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
</a>
|
54
|
-
|
55
|
-
<a class="full_list_link" id="file_list_link"
|
56
|
-
href="../file_list.html">
|
57
|
-
File List
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
58
56
|
</a>
|
59
57
|
|
60
58
|
</div>
|
61
|
-
|
62
|
-
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
63
61
|
|
64
|
-
|
65
|
-
|
66
|
-
<div id="content"><h1>Module: Net::SSH
|
62
|
+
<div id="content"><h1>Module: Net::SSH
|
67
63
|
|
68
64
|
|
69
65
|
|
70
66
|
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
71
69
|
|
72
|
-
<dl class="box">
|
73
70
|
|
74
71
|
|
75
|
-
|
76
72
|
|
77
|
-
|
78
73
|
|
79
74
|
|
75
|
+
|
80
76
|
|
81
|
-
|
82
|
-
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/net/ssh/simple.rb<span class="defines">,<br />
|
83
82
|
lib/net/ssh/simple.rb,<br /> lib/net/ssh/simple/version.rb</span>
|
84
83
|
</dd>
|
84
|
+
</dl>
|
85
85
|
|
86
|
-
</
|
87
|
-
<div class="clear"></div>
|
86
|
+
</div>
|
88
87
|
|
89
88
|
<h2>Defined Under Namespace</h2>
|
90
89
|
<p class="children">
|
@@ -107,11 +106,12 @@
|
|
107
106
|
|
108
107
|
</div>
|
109
108
|
|
110
|
-
|
111
|
-
Generated on
|
109
|
+
<div id="footer">
|
110
|
+
Generated on Thu Dec 21 01:55:38 2017 by
|
112
111
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
113
|
-
0.
|
112
|
+
0.9.12 (ruby-2.4.0).
|
114
113
|
</div>
|
115
114
|
|
115
|
+
</div>
|
116
116
|
</body>
|
117
117
|
</html>
|
data/doc/Net/SSH/Simple.html
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
<!DOCTYPE html
|
2
|
-
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
4
3
|
<head>
|
5
|
-
<meta
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
6
|
<title>
|
7
7
|
Class: Net::SSH::Simple
|
8
8
|
|
9
|
-
— Documentation by YARD 0.
|
9
|
+
— Documentation by YARD 0.9.12
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -15,9 +15,8 @@
|
|
15
15
|
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
-
|
18
|
+
pathId = "Net::SSH::Simple";
|
19
19
|
relpath = '../../';
|
20
|
-
framesUrl = "../../frames.html#!Net/SSH/Simple.html";
|
21
20
|
</script>
|
22
21
|
|
23
22
|
|
@@ -28,51 +27,48 @@
|
|
28
27
|
|
29
28
|
</head>
|
30
29
|
<body>
|
31
|
-
<div
|
32
|
-
<
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
33
38
|
|
34
39
|
<a href="../../_index.html">Index (S)</a> »
|
35
40
|
<span class='title'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span> » <span class='title'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span>
|
36
41
|
»
|
37
42
|
<span class="title">Simple</span>
|
38
43
|
|
39
|
-
|
40
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
44
|
</div>
|
42
45
|
|
43
|
-
|
46
|
+
<div id="search">
|
44
47
|
|
45
48
|
<a class="full_list_link" id="class_list_link"
|
46
49
|
href="../../class_list.html">
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
</a>
|
54
|
-
|
55
|
-
<a class="full_list_link" id="file_list_link"
|
56
|
-
href="../../file_list.html">
|
57
|
-
File List
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
58
56
|
</a>
|
59
57
|
|
60
58
|
</div>
|
61
|
-
|
62
|
-
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
63
61
|
|
64
|
-
|
65
|
-
|
66
|
-
<div id="content"><h1>Class: Net::SSH::Simple
|
62
|
+
<div id="content"><h1>Class: Net::SSH::Simple
|
67
63
|
|
68
64
|
|
69
65
|
|
70
66
|
</h1>
|
71
|
-
|
72
|
-
<dl class="box">
|
67
|
+
<div class="box_info">
|
73
68
|
|
74
|
-
|
75
|
-
<
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
76
72
|
<span class="inheritName">Object</span>
|
77
73
|
|
78
74
|
<ul class="fullTree">
|
@@ -83,27 +79,32 @@
|
|
83
79
|
</ul>
|
84
80
|
<a href="#" class="inheritanceTree">show all</a>
|
85
81
|
|
86
|
-
|
87
|
-
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
88
86
|
|
89
87
|
|
90
|
-
|
91
88
|
|
92
|
-
|
93
|
-
<dt class="r2">Includes:</dt>
|
94
|
-
<dd class="r2">Blockenspiel::DSL</dd>
|
95
|
-
|
96
|
-
|
97
89
|
|
90
|
+
<dl>
|
91
|
+
<dt>Includes:</dt>
|
92
|
+
<dd>Blockenspiel::DSL</dd>
|
93
|
+
</dl>
|
98
94
|
|
99
95
|
|
100
|
-
|
101
|
-
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<dl>
|
101
|
+
<dt>Defined in:</dt>
|
102
|
+
<dd>lib/net/ssh/simple.rb<span class="defines">,<br />
|
102
103
|
lib/net/ssh/simple.rb,<br /> lib/net/ssh/simple/version.rb</span>
|
103
104
|
</dd>
|
105
|
+
</dl>
|
104
106
|
|
105
|
-
</
|
106
|
-
<div class="clear"></div>
|
107
|
+
</div>
|
107
108
|
|
108
109
|
<h2>Overview</h2><div class="docstring">
|
109
110
|
<div class="discussion">
|
@@ -120,7 +121,7 @@
|
|
120
121
|
|
121
122
|
|
122
123
|
<pre class="example code"><code><span class='comment'># Block Syntax (synchronous)
|
123
|
-
</span><span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_sync'>sync</span> <span class='kw'>do</span>
|
124
|
+
</span><span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_sync'><span class='object_link'><a href="#sync-class_method" title="Net::SSH::Simple.sync (method)">sync</a></span></span> <span class='kw'>do</span>
|
124
125
|
<span class='id identifier rubyid_r'>r</span> <span class='op'>=</span> <span class='id identifier rubyid_ssh'>ssh</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example1.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>echo "Hello World."</span><span class='tstring_end'>'</span></span>
|
125
126
|
<span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_stdout'>stdout</span> <span class='comment'>#=> "Hello World."
|
126
127
|
</span> <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_exit_code'>exit_code</span> <span class='comment'>#=> 0
|
@@ -131,11 +132,11 @@
|
|
131
132
|
|
132
133
|
|
133
134
|
<pre class="example code"><code><span class='comment'># Block Syntax (asynchronous)
|
134
|
-
</span><span class='id identifier rubyid_t1'>t1</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_async'>async</span> <span class='kw'>do</span>
|
135
|
+
</span><span class='id identifier rubyid_t1'>t1</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_async'><span class='object_link'><a href="#async-class_method" title="Net::SSH::Simple.async (method)">async</a></span></span> <span class='kw'>do</span>
|
135
136
|
<span class='id identifier rubyid_scp_put'>scp_put</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example1.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_bar</span><span class='tstring_end'>'</span></span>
|
136
137
|
<span class='id identifier rubyid_ssh'>ssh</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example3.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>echo "Hello World A."</span><span class='tstring_end'>'</span></span>
|
137
138
|
<span class='kw'>end</span>
|
138
|
-
<span class='id identifier rubyid_t2'>t2</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_async'>async</span> <span class='kw'>do</span>
|
139
|
+
<span class='id identifier rubyid_t2'>t2</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_async'><span class='object_link'><a href="#async-class_method" title="Net::SSH::Simple.async (method)">async</a></span></span> <span class='kw'>do</span>
|
139
140
|
<span class='id identifier rubyid_scp_get'>scp_get</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example6.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_bar</span><span class='tstring_end'>'</span></span>
|
140
141
|
<span class='id identifier rubyid_ssh'>ssh</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example7.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>echo "Hello World B."</span><span class='tstring_end'>'</span></span>
|
141
142
|
<span class='kw'>end</span>
|
@@ -147,7 +148,7 @@
|
|
147
148
|
|
148
149
|
|
149
150
|
<pre class="example code"><code><span class='comment'># Using an instance
|
150
|
-
</span><span class='id identifier rubyid_s'>s</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
151
|
+
</span><span class='id identifier rubyid_s'>s</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Net::SSH::Simple#initialize (method)">new</a></span></span>
|
151
152
|
<span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_ssh'>ssh</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example1.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>echo "Hello World."</span><span class='tstring_end'>'</span></span>
|
152
153
|
<span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_scp_put'>scp_put</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example2.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_bar</span><span class='tstring_end'>'</span></span>
|
153
154
|
<span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_scp_get'>scp_get</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example3.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_bar</span><span class='tstring_end'>'</span></span>
|
@@ -157,14 +158,14 @@
|
|
157
158
|
<pre class="example code"><code><span class='comment'># Using no instance
|
158
159
|
</span><span class='comment'># Note: This will create a new connection for each operation!
|
159
160
|
</span><span class='comment'># Use instance- or block-syntax for better performance.
|
160
|
-
</span><span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_ssh'>ssh</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example1.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>echo "Hello World."</span><span class='tstring_end'>'</span></span>
|
161
|
-
<span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_scp_put'>scp_put</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example2.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_bar</span><span class='tstring_end'>'</span></span>
|
162
|
-
<span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_scp_get'>scp_get</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example3.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_bar</span><span class='tstring_end'>'</span></span></code></pre>
|
161
|
+
</span><span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_ssh'><span class='object_link'><a href="#ssh-class_method" title="Net::SSH::Simple.ssh (method)">ssh</a></span></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example1.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>echo "Hello World."</span><span class='tstring_end'>'</span></span>
|
162
|
+
<span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_scp_put'><span class='object_link'><a href="#scp_put-class_method" title="Net::SSH::Simple.scp_put (method)">scp_put</a></span></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example2.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_bar</span><span class='tstring_end'>'</span></span>
|
163
|
+
<span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_scp_get'><span class='object_link'><a href="#scp_get-class_method" title="Net::SSH::Simple.scp_get (method)">scp_get</a></span></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example3.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_bar</span><span class='tstring_end'>'</span></span></code></pre>
|
163
164
|
|
164
165
|
|
165
166
|
<pre class="example code"><code><span class='comment'># Error Handling with Block Syntax (synchronous)
|
166
167
|
</span><span class='kw'>begin</span>
|
167
|
-
<span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_sync'>sync</span> <span class='kw'>do</span>
|
168
|
+
<span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_sync'><span class='object_link'><a href="#sync-class_method" title="Net::SSH::Simple.sync (method)">sync</a></span></span> <span class='kw'>do</span>
|
168
169
|
<span class='id identifier rubyid_r'>r</span> <span class='op'>=</span> <span class='id identifier rubyid_ssh'>ssh</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example1.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>echo "Hello World."</span><span class='tstring_end'>'</span></span>
|
169
170
|
<span class='kw'>if</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_success'>success</span> <span class='kw'>and</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_stdout'>stdout</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Hello World.</span><span class='tstring_end'>'</span></span>
|
170
171
|
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Success! I Helloed World.</span><span class='tstring_end'>"</span></span>
|
@@ -180,7 +181,7 @@
|
|
180
181
|
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Success! Downloaded </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_sent'>sent</span><span class='embexpr_end'>}</span><span class='tstring_content'> of </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_total'>total</span><span class='embexpr_end'>}</span><span class='tstring_content'> bytes.</span><span class='tstring_end'>"</span></span>
|
181
182
|
<span class='kw'>end</span>
|
182
183
|
<span class='kw'>end</span>
|
183
|
-
<span class='kw'>rescue</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='op'>::</span><span class='const'>Error</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
184
|
+
<span class='kw'>rescue</span> <span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'>Simple</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Simple/Error.html" title="Net::SSH::Simple::Error (class)">Error</a></span></span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
184
185
|
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Something bad happened!</span><span class='tstring_end'>"</span></span>
|
185
186
|
<span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_e'>e</span> <span class='comment'># Human readable error
|
186
187
|
</span> <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_wrapped'>wrapped</span> <span class='comment'># Original Exception
|
@@ -193,26 +194,26 @@
|
|
193
194
|
</span><span class='comment'># Exceptions are raised inside your thread.
|
194
195
|
</span><span class='comment'># You are free to handle them or pass them outwards.
|
195
196
|
</span>
|
196
|
-
<span class='id identifier rubyid_a'>a</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_async'>async</span> <span class='kw'>do</span>
|
197
|
+
<span class='id identifier rubyid_a'>a</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_async'><span class='object_link'><a href="#async-class_method" title="Net::SSH::Simple.async (method)">async</a></span></span> <span class='kw'>do</span>
|
197
198
|
<span class='kw'>begin</span>
|
198
199
|
<span class='id identifier rubyid_ssh'>ssh</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example1.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>echo "Hello World."</span><span class='tstring_end'>'</span></span>
|
199
200
|
<span class='id identifier rubyid_scp_put'>scp_put</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example2.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_bar</span><span class='tstring_end'>'</span></span>
|
200
201
|
<span class='id identifier rubyid_scp_get'>scp_get</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example3.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_bar</span><span class='tstring_end'>'</span></span>
|
201
|
-
<span class='kw'>rescue</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='op'>::</span><span class='const'>Error</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
202
|
+
<span class='kw'>rescue</span> <span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'>Simple</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Simple/Error.html" title="Net::SSH::Simple::Error (class)">Error</a></span></span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
202
203
|
<span class='comment'># return our exception to the parent thread
|
203
204
|
</span> <span class='id identifier rubyid_e'>e</span>
|
204
205
|
<span class='kw'>end</span>
|
205
206
|
<span class='kw'>end</span>
|
206
207
|
<span class='id identifier rubyid_r'>r</span> <span class='op'>=</span> <span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> <span class='comment'># Wait for thread to finish and capture result
|
207
208
|
</span>
|
208
|
-
<span class='kw'>unless</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='op'>::</span><span class='const'>Result</span>
|
209
|
+
<span class='kw'>unless</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'>Simple</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Simple/Result.html" title="Net::SSH::Simple::Result (class)">Result</a></span></span>
|
209
210
|
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Something bad happened!</span><span class='tstring_end'>"</span></span>
|
210
211
|
<span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_r'>r</span>
|
211
212
|
<span class='kw'>end</span></code></pre>
|
212
213
|
|
213
214
|
|
214
215
|
<pre class="example code"><code><span class='comment'># Error Handling with an instance
|
215
|
-
</span><span class='id identifier rubyid_s'>s</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
216
|
+
</span><span class='id identifier rubyid_s'>s</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Net::SSH::Simple#initialize (method)">new</a></span></span>
|
216
217
|
<span class='kw'>begin</span>
|
217
218
|
<span class='id identifier rubyid_r'>r</span> <span class='op'>=</span> <span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_ssh'>ssh</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example1.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>echo "Hello World."</span><span class='tstring_end'>'</span></span>
|
218
219
|
<span class='kw'>if</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_success'>success</span> <span class='kw'>and</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_stdout'>stdout</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Hello World.</span><span class='tstring_end'>'</span></span>
|
@@ -228,7 +229,7 @@
|
|
228
229
|
<span class='kw'>if</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_success'>success</span> <span class='kw'>and</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_sent'>sent</span> <span class='op'>==</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_total'>total</span>
|
229
230
|
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Success! Downloaded </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_sent'>sent</span><span class='embexpr_end'>}</span><span class='tstring_content'> of </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_total'>total</span><span class='embexpr_end'>}</span><span class='tstring_content'> bytes.</span><span class='tstring_end'>"</span></span>
|
230
231
|
<span class='kw'>end</span>
|
231
|
-
<span class='kw'>rescue</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='op'>::</span><span class='const'>Error</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
232
|
+
<span class='kw'>rescue</span> <span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'>Simple</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Simple/Error.html" title="Net::SSH::Simple::Error (class)">Error</a></span></span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
232
233
|
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Something bad happened!</span><span class='tstring_end'>"</span></span>
|
233
234
|
<span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_e'>e</span> <span class='comment'># Human readable error
|
234
235
|
</span> <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_wrapped'>wrapped</span> <span class='comment'># Original Exception
|
@@ -239,13 +240,13 @@
|
|
239
240
|
|
240
241
|
|
241
242
|
<pre class="example code"><code><span class='comment'># Parameters
|
242
|
-
</span><span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_sync'>sync</span> <span class='kw'>do</span>
|
243
|
+
</span><span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_sync'><span class='object_link'><a href="#sync-class_method" title="Net::SSH::Simple.sync (method)">sync</a></span></span> <span class='kw'>do</span>
|
243
244
|
<span class='id identifier rubyid_ssh'>ssh</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example1.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>echo "Hello World."</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
244
245
|
<span class='lbrace'>{</span><span class='symbol'>:user</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>tom</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:password</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>jerry</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:port</span> <span class='op'>=></span> <span class='int'>1234</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
245
246
|
<span class='kw'>end</span>
|
246
247
|
|
247
248
|
<span class='comment'># Parameter inheritance
|
248
|
-
</span><span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_sync'>sync</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='symbol'>:user</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>tom</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:port</span> <span class='op'>=></span> <span class='int'>1234</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
249
|
+
</span><span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_sync'><span class='object_link'><a href="#sync-class_method" title="Net::SSH::Simple.sync (method)">sync</a></span></span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='symbol'>:user</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>tom</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:port</span> <span class='op'>=></span> <span class='int'>1234</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
249
250
|
<span class='comment'># Both commands will inherit :user and :port
|
250
251
|
</span> <span class='id identifier rubyid_ssh'>ssh</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example1.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>echo "Hello World."</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='symbol'>:password</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>jerry</span><span class='tstring_end'>'</span></span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
251
252
|
<span class='id identifier rubyid_scp_put'>scp_put</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example2.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/a</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/a</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='symbol'>:password</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>s3cr3t</span><span class='tstring_end'>'</span></span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
@@ -253,7 +254,7 @@
|
|
253
254
|
|
254
255
|
|
255
256
|
<pre class="example code"><code><span class='comment'># Using the SCP progress callback
|
256
|
-
</span><span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_sync'>sync</span> <span class='kw'>do</span>
|
257
|
+
</span><span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_sync'><span class='object_link'><a href="#sync-class_method" title="Net::SSH::Simple.sync (method)">sync</a></span></span> <span class='kw'>do</span>
|
257
258
|
<span class='id identifier rubyid_scp_put'>scp_put</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>example1.com</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_bar</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_sent'>sent</span><span class='comma'>,</span> <span class='id identifier rubyid_total'>total</span><span class='op'>|</span>
|
258
259
|
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bytes uploaded: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_sent'>sent</span><span class='embexpr_end'>}</span><span class='tstring_content'> of </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_total'>total</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
259
260
|
<span class='kw'>end</span>
|
@@ -263,7 +264,7 @@
|
|
263
264
|
<pre class="example code"><code><span class='comment'>#
|
264
265
|
</span><span class='comment'># Here be dragons: Using the event-API for a stdin->stdout pipeline
|
265
266
|
</span><span class='comment'>#
|
266
|
-
</span><span class='id identifier rubyid_r'>r</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_sync'>sync</span> <span class='kw'>do</span>
|
267
|
+
</span><span class='id identifier rubyid_r'>r</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_sync'><span class='object_link'><a href="#sync-class_method" title="Net::SSH::Simple.sync (method)">sync</a></span></span> <span class='kw'>do</span>
|
267
268
|
<span class='comment'># open a shell
|
268
269
|
</span> <span class='id identifier rubyid_ssh'>ssh</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>localhost</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/bin/sh</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_e'>e</span><span class='comma'>,</span><span class='id identifier rubyid_c'>c</span><span class='comma'>,</span><span class='id identifier rubyid_d'>d</span><span class='op'>|</span>
|
269
270
|
<span class='comment'># e = :start, :stdout, :stderr, :exit_code, :exit_signal or :finish
|
@@ -358,32 +359,30 @@
|
|
358
359
|
</p>
|
359
360
|
|
360
361
|
<h2>Constant Summary</h2>
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
</dl>
|
375
|
-
|
362
|
+
<dl class="constants">
|
363
|
+
|
364
|
+
<dt id="MAX_TIMEOUT-constant" class="">MAX_TIMEOUT =
|
365
|
+
|
366
|
+
</dt>
|
367
|
+
<dd><pre class="code"><span class='id identifier rubyid_is_64bit_platform'>is_64bit_platform</span> <span class='op'>?</span> <span class='int'>2</span><span class='op'>**</span><span class='int'>32</span> <span class='op'>:</span> <span class='int'>2</span><span class='op'>**</span><span class='int'>16</span></pre></dd>
|
368
|
+
|
369
|
+
<dt id="VERSION-constant" class="">VERSION =
|
370
|
+
|
371
|
+
</dt>
|
372
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>1.7.3</span><span class='tstring_end'>"</span></span></pre></dd>
|
373
|
+
|
374
|
+
</dl>
|
376
375
|
|
377
376
|
|
378
377
|
|
379
378
|
|
380
|
-
<h2>Instance Attribute Summary <small
|
379
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
381
380
|
<ul class="summary">
|
382
381
|
|
383
382
|
<li class="public ">
|
384
383
|
<span class="summary_signature">
|
385
384
|
|
386
|
-
<a href="#result-instance_method" title="#result (instance method)"
|
385
|
+
<a href="#result-instance_method" title="#result (instance method)">#<strong>result</strong> ⇒ Net::SSH::Simple::Result </a>
|
387
386
|
|
388
387
|
|
389
388
|
|
@@ -417,7 +416,7 @@
|
|
417
416
|
|
418
417
|
<h2>
|
419
418
|
Class Method Summary
|
420
|
-
<small
|
419
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
421
420
|
</h2>
|
422
421
|
|
423
422
|
<ul class="summary">
|
@@ -425,7 +424,7 @@
|
|
425
424
|
<li class="public ">
|
426
425
|
<span class="summary_signature">
|
427
426
|
|
428
|
-
<a href="#async-class_method" title="async (class method)"
|
427
|
+
<a href="#async-class_method" title="async (class method)">.<strong>async</strong>(opts = {}, &block) ⇒ Thread </a>
|
429
428
|
|
430
429
|
|
431
430
|
|
@@ -449,7 +448,7 @@
|
|
449
448
|
<li class="public ">
|
450
449
|
<span class="summary_signature">
|
451
450
|
|
452
|
-
<a href="#scp_get-class_method" title="scp_get (class method)"
|
451
|
+
<a href="#scp_get-class_method" title="scp_get (class method)">.<strong>scp_get</strong>(*args, &block) ⇒ Net::SSH::Simple::Result </a>
|
453
452
|
|
454
453
|
|
455
454
|
|
@@ -473,7 +472,7 @@
|
|
473
472
|
<li class="public ">
|
474
473
|
<span class="summary_signature">
|
475
474
|
|
476
|
-
<a href="#scp_put-class_method" title="scp_put (class method)"
|
475
|
+
<a href="#scp_put-class_method" title="scp_put (class method)">.<strong>scp_put</strong>(*args, &block) ⇒ Net::SSH::Simple::Result </a>
|
477
476
|
|
478
477
|
|
479
478
|
|
@@ -497,7 +496,7 @@
|
|
497
496
|
<li class="public ">
|
498
497
|
<span class="summary_signature">
|
499
498
|
|
500
|
-
<a href="#ssh-class_method" title="ssh (class method)"
|
499
|
+
<a href="#ssh-class_method" title="ssh (class method)">.<strong>ssh</strong>(*args, &block) ⇒ Net::SSH::Simple::Result </a>
|
501
500
|
|
502
501
|
|
503
502
|
|
@@ -521,7 +520,7 @@
|
|
521
520
|
<li class="public ">
|
522
521
|
<span class="summary_signature">
|
523
522
|
|
524
|
-
<a href="#sync-class_method" title="sync (class method)"
|
523
|
+
<a href="#sync-class_method" title="sync (class method)">.<strong>sync</strong>(opts = {}, &block) ⇒ Net::SSH::Simple::Result </a>
|
525
524
|
|
526
525
|
|
527
526
|
|
@@ -546,7 +545,7 @@
|
|
546
545
|
|
547
546
|
<h2>
|
548
547
|
Instance Method Summary
|
549
|
-
<small
|
548
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
550
549
|
</h2>
|
551
550
|
|
552
551
|
<ul class="summary">
|
@@ -554,7 +553,7 @@
|
|
554
553
|
<li class="public ">
|
555
554
|
<span class="summary_signature">
|
556
555
|
|
557
|
-
<a href="#async-instance_method" title="#async (instance method)"
|
556
|
+
<a href="#async-instance_method" title="#async (instance method)">#<strong>async</strong>(opts = {}, &block) ⇒ Thread </a>
|
558
557
|
|
559
558
|
|
560
559
|
|
@@ -578,7 +577,7 @@
|
|
578
577
|
<li class="public ">
|
579
578
|
<span class="summary_signature">
|
580
579
|
|
581
|
-
<a href="#close-instance_method" title="#close (instance method)"
|
580
|
+
<a href="#close-instance_method" title="#close (instance method)">#<strong>close</strong> ⇒ Net::SSH::Simple::Result </a>
|
582
581
|
|
583
582
|
|
584
583
|
|
@@ -602,7 +601,7 @@
|
|
602
601
|
<li class="public ">
|
603
602
|
<span class="summary_signature">
|
604
603
|
|
605
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)"
|
604
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(opts = {}) ⇒ Simple </a>
|
606
605
|
|
607
606
|
|
608
607
|
|
@@ -628,7 +627,7 @@
|
|
628
627
|
<li class="public ">
|
629
628
|
<span class="summary_signature">
|
630
629
|
|
631
|
-
<a href="#scp_get-instance_method" title="#scp_get (instance method)"
|
630
|
+
<a href="#scp_get-instance_method" title="#scp_get (instance method)">#<strong>scp_get</strong>(host, src, dst, opts = {}, &block) ⇒ Net::SSH::Simple::Result </a>
|
632
631
|
|
633
632
|
|
634
633
|
|
@@ -652,7 +651,7 @@
|
|
652
651
|
<li class="public ">
|
653
652
|
<span class="summary_signature">
|
654
653
|
|
655
|
-
<a href="#scp_put-instance_method" title="#scp_put (instance method)"
|
654
|
+
<a href="#scp_put-instance_method" title="#scp_put (instance method)">#<strong>scp_put</strong>(host, src, dst, opts = {}, &block) ⇒ Net::SSH::Simple::Result </a>
|
656
655
|
|
657
656
|
|
658
657
|
|
@@ -676,7 +675,7 @@
|
|
676
675
|
<li class="public ">
|
677
676
|
<span class="summary_signature">
|
678
677
|
|
679
|
-
<a href="#ssh-instance_method" title="#ssh (instance method)"
|
678
|
+
<a href="#ssh-instance_method" title="#ssh (instance method)">#<strong>ssh</strong>(host, cmd, opts = {}, &block) ⇒ Net::SSH::Simple::Result </a>
|
680
679
|
|
681
680
|
|
682
681
|
|
@@ -707,7 +706,7 @@
|
|
707
706
|
<div class="method_details first">
|
708
707
|
<h3 class="signature first" id="initialize-instance_method">
|
709
708
|
|
710
|
-
|
709
|
+
#<strong>initialize</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="" title="Net::SSH::Simple (class)">Simple</a></span></tt>
|
711
710
|
|
712
711
|
|
713
712
|
|
@@ -742,7 +741,7 @@
|
|
742
741
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
743
742
|
<span class='ivar'>@opts</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span>
|
744
743
|
<span class='const'>Thread</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span><span class='lbracket'>[</span><span class='symbol'>:ssh_simple_sessions</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
745
|
-
<span class='ivar'>@result</span> <span class='op'>=</span> <span class='const'>Result</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
744
|
+
<span class='ivar'>@result</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Simple/Result.html" title="Net::SSH::Simple::Result (class)">Result</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
746
745
|
<span class='kw'>end</span></pre>
|
747
746
|
</td>
|
748
747
|
</tr>
|
@@ -759,7 +758,7 @@
|
|
759
758
|
<div class="method_details first">
|
760
759
|
<h3 class="signature first" id="result-instance_method">
|
761
760
|
|
762
|
-
|
761
|
+
#<strong>result</strong> ⇒ <tt><span class='object_link'><a href="Simple/Result.html" title="Net::SSH::Simple::Result (class)">Net::SSH::Simple::Result</a></span></tt> <span class="extras">(readonly)</span>
|
763
762
|
|
764
763
|
|
765
764
|
|
@@ -825,7 +824,7 @@
|
|
825
824
|
<div class="method_details first">
|
826
825
|
<h3 class="signature first" id="async-class_method">
|
827
826
|
|
828
|
-
|
827
|
+
.<strong>async</strong>(opts = {}, &block) ⇒ <tt>Thread</tt>
|
829
828
|
|
830
829
|
|
831
830
|
|
@@ -921,7 +920,7 @@
|
|
921
920
|
<div class="method_details ">
|
922
921
|
<h3 class="signature " id="scp_get-class_method">
|
923
922
|
|
924
|
-
|
923
|
+
.<strong>scp_get</strong>(*args, &block) ⇒ <tt><span class='object_link'><a href="Simple/Result.html" title="Net::SSH::Simple::Result (class)">Net::SSH::Simple::Result</a></span></tt>
|
925
924
|
|
926
925
|
|
927
926
|
|
@@ -943,11 +942,11 @@ invocation.</p>
|
|
943
942
|
|
944
943
|
|
945
944
|
<pre class="example code"><code><span class='comment'># SCP Download
|
946
|
-
</span><span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_scp_get'>scp_get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>localhost</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_bar</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span></code></pre>
|
945
|
+
</span><span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Net::SSH::Simple (class)">Simple</a></span></span><span class='period'>.</span><span class='id identifier rubyid_scp_get'>scp_get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>localhost</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_bar</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span></code></pre>
|
947
946
|
|
948
947
|
|
949
948
|
<pre class="example code"><code><span class='comment'># Pass a block to monitor progress
|
950
|
-
</span><span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_scp_get'>scp_get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>localhost</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_bar</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_sent'>sent</span><span class='comma'>,</span> <span class='id identifier rubyid_total'>total</span><span class='op'>|</span>
|
949
|
+
</span><span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Net::SSH::Simple (class)">Simple</a></span></span><span class='period'>.</span><span class='id identifier rubyid_scp_get'>scp_get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>localhost</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_bar</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_sent'>sent</span><span class='comma'>,</span> <span class='id identifier rubyid_total'>total</span><span class='op'>|</span>
|
951
950
|
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bytes downloaded: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_sent'>sent</span><span class='embexpr_end'>}</span><span class='tstring_content'> of </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_total'>total</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
952
951
|
<span class='kw'>end</span></code></pre>
|
953
952
|
|
@@ -1099,7 +1098,7 @@ invocation.</p>
|
|
1099
1098
|
<div class="method_details ">
|
1100
1099
|
<h3 class="signature " id="scp_put-class_method">
|
1101
1100
|
|
1102
|
-
|
1101
|
+
.<strong>scp_put</strong>(*args, &block) ⇒ <tt><span class='object_link'><a href="Simple/Result.html" title="Net::SSH::Simple::Result (class)">Net::SSH::Simple::Result</a></span></tt>
|
1103
1102
|
|
1104
1103
|
|
1105
1104
|
|
@@ -1121,11 +1120,11 @@ invocation.</p>
|
|
1121
1120
|
|
1122
1121
|
|
1123
1122
|
<pre class="example code"><code><span class='comment'># SCP Upload
|
1124
|
-
</span><span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_scp_put'>scp_put</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>localhost</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_bar</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span></code></pre>
|
1123
|
+
</span><span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Net::SSH::Simple (class)">Simple</a></span></span><span class='period'>.</span><span class='id identifier rubyid_scp_put'>scp_put</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>localhost</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_bar</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span></code></pre>
|
1125
1124
|
|
1126
1125
|
|
1127
1126
|
<pre class="example code"><code><span class='comment'># Pass a block to monitor progress
|
1128
|
-
</span><span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_scp_put'>scp_put</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>localhost</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_bar</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_sent'>sent</span><span class='comma'>,</span> <span class='id identifier rubyid_total'>total</span><span class='op'>|</span>
|
1127
|
+
</span><span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Net::SSH::Simple (class)">Simple</a></span></span><span class='period'>.</span><span class='id identifier rubyid_scp_put'>scp_put</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>localhost</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/local_foo</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/tmp/remote_bar</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_sent'>sent</span><span class='comma'>,</span> <span class='id identifier rubyid_total'>total</span><span class='op'>|</span>
|
1129
1128
|
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bytes uploaded: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_sent'>sent</span><span class='embexpr_end'>}</span><span class='tstring_content'> of </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_total'>total</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
1130
1129
|
<span class='kw'>end</span></code></pre>
|
1131
1130
|
|
@@ -1277,7 +1276,7 @@ invocation.</p>
|
|
1277
1276
|
<div class="method_details ">
|
1278
1277
|
<h3 class="signature " id="ssh-class_method">
|
1279
1278
|
|
1280
|
-
|
1279
|
+
.<strong>ssh</strong>(*args, &block) ⇒ <tt><span class='object_link'><a href="Simple/Result.html" title="Net::SSH::Simple::Result (class)">Net::SSH::Simple::Result</a></span></tt>
|
1281
1280
|
|
1282
1281
|
|
1283
1282
|
|
@@ -1298,10 +1297,10 @@ create a new connection for each invocation.</p>
|
|
1298
1297
|
<p class="tag_title">Examples:</p>
|
1299
1298
|
|
1300
1299
|
|
1301
|
-
<pre class="example code"><code><span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_ssh'>ssh</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>localhost</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>echo Hello</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span> <span class='comment'>#=> Net::SSH::Simple::Result</span></code></pre>
|
1300
|
+
<pre class="example code"><code><span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Net::SSH::Simple (class)">Simple</a></span></span><span class='period'>.</span><span class='id identifier rubyid_ssh'>ssh</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>localhost</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>echo Hello</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span> <span class='comment'>#=> Net::SSH::Simple::Result</span></code></pre>
|
1302
1301
|
|
1303
1302
|
|
1304
|
-
<pre class="example code"><code><span class='const'>Net</span><span class='op'>::</span><span class='const'>SSH</span><span class='op'>::</span><span class='const'>Simple</span><span class='period'>.</span><span class='id identifier rubyid_ssh'>ssh</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>localhost</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>echo Hello</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_stdout'>stdout</span> <span class='comment'>#=> "Hello"</span></code></pre>
|
1303
|
+
<pre class="example code"><code><span class='const'><span class='object_link'><a href="../../Net.html" title="Net (module)">Net</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SSH.html" title="Net::SSH (module)">SSH</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Net::SSH::Simple (class)">Simple</a></span></span><span class='period'>.</span><span class='id identifier rubyid_ssh'>ssh</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>localhost</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>echo Hello</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_stdout'><span class='object_link'><a href="Simple/Result.html#stdout-instance_method" title="Net::SSH::Simple::Result#stdout (method)">stdout</a></span></span> <span class='comment'>#=> "Hello"</span></code></pre>
|
1305
1304
|
|
1306
1305
|
</div>
|
1307
1306
|
<p class="tag_title">Parameters:</p>
|
@@ -1435,7 +1434,7 @@ create a new connection for each invocation.</p>
|
|
1435
1434
|
<div class="method_details ">
|
1436
1435
|
<h3 class="signature " id="sync-class_method">
|
1437
1436
|
|
1438
|
-
|
1437
|
+
.<strong>sync</strong>(opts = {}, &block) ⇒ <tt><span class='object_link'><a href="Simple/Result.html" title="Net::SSH::Simple::Result (class)">Net::SSH::Simple::Result</a></span></tt>
|
1439
1438
|
|
1440
1439
|
|
1441
1440
|
|
@@ -1528,7 +1527,7 @@ create a new connection for each invocation.</p>
|
|
1528
1527
|
<div class="method_details first">
|
1529
1528
|
<h3 class="signature first" id="async-instance_method">
|
1530
1529
|
|
1531
|
-
|
1530
|
+
#<strong>async</strong>(opts = {}, &block) ⇒ <tt>Thread</tt>
|
1532
1531
|
|
1533
1532
|
|
1534
1533
|
|
@@ -1622,7 +1621,7 @@ create a new connection for each invocation.</p>
|
|
1622
1621
|
<div class="method_details ">
|
1623
1622
|
<h3 class="signature " id="close-instance_method">
|
1624
1623
|
|
1625
|
-
|
1624
|
+
#<strong>close</strong> ⇒ <tt><span class='object_link'><a href="Simple/Result.html" title="Net::SSH::Simple::Result (class)">Net::SSH::Simple::Result</a></span></tt>
|
1626
1625
|
|
1627
1626
|
|
1628
1627
|
|
@@ -1701,7 +1700,7 @@ create a new connection for each invocation.</p>
|
|
1701
1700
|
<div class="method_details ">
|
1702
1701
|
<h3 class="signature " id="scp_get-instance_method">
|
1703
1702
|
|
1704
|
-
|
1703
|
+
#<strong>scp_get</strong>(host, src, dst, opts = {}, &block) ⇒ <tt><span class='object_link'><a href="Simple/Result.html" title="Net::SSH::Simple::Result (class)">Net::SSH::Simple::Result</a></span></tt>
|
1705
1704
|
|
1706
1705
|
|
1707
1706
|
|
@@ -1856,7 +1855,7 @@ will re-use existing connections for optimal performance.</p>
|
|
1856
1855
|
<div class="method_details ">
|
1857
1856
|
<h3 class="signature " id="scp_put-instance_method">
|
1858
1857
|
|
1859
|
-
|
1858
|
+
#<strong>scp_put</strong>(host, src, dst, opts = {}, &block) ⇒ <tt><span class='object_link'><a href="Simple/Result.html" title="Net::SSH::Simple::Result (class)">Net::SSH::Simple::Result</a></span></tt>
|
1860
1859
|
|
1861
1860
|
|
1862
1861
|
|
@@ -2004,7 +2003,7 @@ re-use existing connections for optimal performance.</p>
|
|
2004
2003
|
<div class="method_details ">
|
2005
2004
|
<h3 class="signature " id="ssh-instance_method">
|
2006
2005
|
|
2007
|
-
|
2006
|
+
#<strong>ssh</strong>(host, cmd, opts = {}, &block) ⇒ <tt><span class='object_link'><a href="Simple/Result.html" title="Net::SSH::Simple::Result (class)">Net::SSH::Simple::Result</a></span></tt>
|
2008
2007
|
|
2009
2008
|
|
2010
2009
|
|
@@ -2654,7 +2653,7 @@ are translated to the corresponding Logger constant.</p>
|
|
2654
2653
|
<span class='kw'>def</span> <span class='id identifier rubyid_ssh'>ssh</span><span class='lparen'>(</span><span class='id identifier rubyid_host'>host</span><span class='comma'>,</span> <span class='id identifier rubyid_cmd'>cmd</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
2655
2654
|
<span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='ivar'>@opts</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
2656
2655
|
<span class='id identifier rubyid_with_session'>with_session</span><span class='lparen'>(</span><span class='id identifier rubyid_host'>host</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_session'>session</span><span class='op'>|</span>
|
2657
|
-
<span class='ivar'>@result</span> <span class='op'>=</span> <span class='const'>Result</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
|
2656
|
+
<span class='ivar'>@result</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Simple/Result.html" title="Net::SSH::Simple::Result (class)">Result</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Net::SSH::Simple#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
2658
2657
|
<span class='lbrace'>{</span> <span class='symbol'>:op</span> <span class='op'>=></span> <span class='symbol'>:ssh</span><span class='comma'>,</span> <span class='symbol'>:host</span> <span class='op'>=></span> <span class='id identifier rubyid_host'>host</span><span class='comma'>,</span> <span class='symbol'>:cmd</span> <span class='op'>=></span> <span class='id identifier rubyid_cmd'>cmd</span><span class='comma'>,</span> <span class='symbol'>:start_at</span> <span class='op'>=></span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span>
|
2659
2658
|
<span class='symbol'>:last_event_at</span> <span class='op'>=></span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span> <span class='symbol'>:opts</span> <span class='op'>=></span> <span class='id identifier rubyid_opts'>opts</span><span class='comma'>,</span> <span class='symbol'>:stdout</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:stderr</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
2660
2659
|
<span class='symbol'>:success</span> <span class='op'>=></span> <span class='kw'>nil</span>
|
@@ -2707,11 +2706,12 @@ are translated to the corresponding Logger constant.</p>
|
|
2707
2706
|
|
2708
2707
|
</div>
|
2709
2708
|
|
2710
|
-
|
2711
|
-
Generated on
|
2709
|
+
<div id="footer">
|
2710
|
+
Generated on Thu Dec 21 01:55:39 2017 by
|
2712
2711
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2713
|
-
0.
|
2712
|
+
0.9.12 (ruby-2.4.0).
|
2714
2713
|
</div>
|
2715
2714
|
|
2715
|
+
</div>
|
2716
2716
|
</body>
|
2717
2717
|
</html>
|