yax 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.
- data/yax-0.1/docs/classes/IO.html +251 -0
- data/yax-0.1/docs/classes/IO.src/M000003.html +46 -0
- data/yax-0.1/docs/classes/IO.src/M000004.html +27 -0
- data/yax-0.1/docs/classes/Module.html +156 -0
- data/yax-0.1/docs/classes/Module.src/M000002.html +23 -0
- data/yax-0.1/docs/classes/MultiIO.html +217 -0
- data/yax-0.1/docs/classes/MultiIO.src/M000006.html +18 -0
- data/yax-0.1/docs/classes/MultiIO.src/M000007.html +19 -0
- data/yax-0.1/docs/classes/MultiIO.src/M000008.html +20 -0
- data/yax-0.1/docs/classes/Numeric.html +155 -0
- data/yax-0.1/docs/classes/Numeric.src/M000005.html +16 -0
- data/yax-0.1/docs/classes/Regexp.html +153 -0
- data/yax-0.1/docs/classes/Regexp.src/M000001.html +16 -0
- data/yax-0.1/docs/classes/String.html +270 -0
- data/yax-0.1/docs/classes/String.src/M000009.html +18 -0
- data/yax-0.1/docs/classes/String.src/M000010.html +16 -0
- data/yax-0.1/docs/classes/String.src/M000011.html +22 -0
- data/yax-0.1/docs/classes/String.src/M000012.html +27 -0
- data/yax-0.1/docs/classes/String.src/M000013.html +21 -0
- data/yax-0.1/docs/classes/String.src/M000014.html +20 -0
- data/yax-0.1/docs/classes/Yax.html +256 -0
- data/yax-0.1/docs/classes/Yax.src/M000015.html +20 -0
- data/yax-0.1/docs/classes/Yax/Session.html +1661 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000016.html +20 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000017.html +18 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000018.html +19 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000019.html +19 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000020.html +19 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000021.html +46 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000022.html +19 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000023.html +18 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000024.html +20 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000025.html +18 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000026.html +19 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000027.html +20 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000028.html +18 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000029.html +18 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000030.html +19 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000031.html +25 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000032.html +18 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000033.html +36 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000034.html +34 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000035.html +23 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000036.html +20 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000037.html +32 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000038.html +20 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000042.html +18 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000043.html +18 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000044.html +20 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000046.html +37 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000047.html +29 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000048.html +29 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000049.html +30 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000050.html +22 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000051.html +20 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000052.html +20 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000053.html +19 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000054.html +28 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000055.html +21 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000056.html +27 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000057.html +20 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000058.html +22 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000059.html +21 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000060.html +21 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000061.html +20 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000062.html +21 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000063.html +20 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000064.html +21 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000065.html +26 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000066.html +25 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000067.html +29 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000068.html +26 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000069.html +19 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000070.html +31 -0
- data/yax-0.1/docs/classes/Yax/Session.src/M000071.html +25 -0
- data/yax-0.1/docs/created.rid +1 -0
- data/yax-0.1/docs/dot/f_0.dot +14 -0
- data/yax-0.1/docs/dot/f_0.png +0 -0
- data/yax-0.1/docs/dot/f_1.dot +14 -0
- data/yax-0.1/docs/dot/f_1.png +0 -0
- data/yax-0.1/docs/dot/f_2.dot +14 -0
- data/yax-0.1/docs/dot/f_2.png +0 -0
- data/yax-0.1/docs/dot/f_3.dot +93 -0
- data/yax-0.1/docs/dot/f_3.png +0 -0
- data/yax-0.1/docs/dot/m_3_0.dot +39 -0
- data/yax-0.1/docs/dot/m_3_0.png +0 -0
- data/yax-0.1/docs/files/License_txt.html +124 -0
- data/yax-0.1/docs/files/ReadMe_Amber_txt.html +489 -0
- data/yax-0.1/docs/files/ReadMe_txt.html +444 -0
- data/yax-0.1/docs/files/nist/yax_rb.html +138 -0
- data/yax-0.1/docs/fr_class_index.html +34 -0
- data/yax-0.1/docs/fr_file_index.html +30 -0
- data/yax-0.1/docs/fr_method_index.html +97 -0
- data/yax-0.1/docs/index.html +24 -0
- data/yax-0.1/docs/rdoc-style.css +208 -0
- data/yax-0.1/lib/nist/yax.rb +1367 -0
- data/yax-0.1/tests/test_yax.rb +190 -0
- metadata +195 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>spawn (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 421</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">spawn</span>(<span class="ruby-identifier">program</span>)
|
|
15
|
+
<span class="ruby-identifier">inst</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span>
|
|
16
|
+
<span class="ruby-identifier">inst</span>.<span class="ruby-identifier">spawn</span>(<span class="ruby-identifier">program</span>)
|
|
17
|
+
<span class="ruby-identifier">inst</span>
|
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>phb_available (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 430</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">phb_available</span>
|
|
15
|
+
<span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">PHB</span>) <span class="ruby-operator">&&</span> <span class="ruby-constant">PHB</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">:projectName</span>)
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>default_time_log_path (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 435</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default_time_log_path</span>
|
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-value str">'timeLog.txt'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">phb_available</span>
|
|
16
|
+
<span class="ruby-constant">PHB</span>.<span class="ruby-identifier">int</span>(<span class="ruby-identifier">:test_results</span>, <span class="ruby-value str">'timeLog.txt'</span>)
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>default_error_log_path (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 441</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default_error_log_path</span>
|
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-value str">'errorLog.txt'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">phb_available</span>
|
|
16
|
+
<span class="ruby-constant">PHB</span>.<span class="ruby-identifier">int</span>(<span class="ruby-identifier">:test_results</span>, <span class="ruby-value str">'errorLog.txt'</span>)
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>default_exit_status_path (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 447</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default_exit_status_path</span>
|
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-value str">'exitStatus.txt'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">phb_available</span>
|
|
16
|
+
<span class="ruby-constant">PHB</span>.<span class="ruby-identifier">int</span>(<span class="ruby-identifier">:test_results</span>, <span class="ruby-value str">'exitStatus.txt'</span>)
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>new (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 454</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
|
15
|
+
<span class="ruby-keyword kw">super</span>
|
|
16
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">default_maxSeconds</span> = <span class="ruby-value">60</span>
|
|
17
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">prompt</span>=<span class="ruby-identifier">default_prompt</span>
|
|
18
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">transcript</span> = <span class="ruby-constant">MultiIO</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">STDOUT</span>)
|
|
19
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">password_prompt</span> = <span class="ruby-value str">'Password:'</span>
|
|
20
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">time_log_path</span> = <span class="ruby-identifier">default_time_log_path</span>
|
|
21
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">error_log_path</span> = <span class="ruby-identifier">default_error_log_path</span>
|
|
22
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">exit_status_path</span> = <span class="ruby-identifier">default_exit_status_path</span>
|
|
23
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">current_command_num</span> = <span class="ruby-value">0</span>
|
|
24
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">sentinal_name</span> = <span class="ruby-value str">'SENTINAL'</span>
|
|
25
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">sentinal_value</span> = <span class="ruby-value str">'Snark'</span> <span class="ruby-comment cmt"># It doesn't matter what you use.</span>
|
|
26
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dir_hash</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
|
27
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">pty_workaround</span> = <span class="ruby-keyword kw">true</span>
|
|
28
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">give_finishing_notice</span> = <span class="ruby-keyword kw">false</span>
|
|
29
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">log_prompt</span> = <span class="ruby-keyword kw">false</span>
|
|
30
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">previous_directory</span> = <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">pwd</span>
|
|
31
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">url_hash</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
|
32
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dir_overide</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
|
33
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">cd_max_seconds</span> = <span class="ruby-value">60</span> <span class="ruby-operator">*</span> <span class="ruby-value">3</span>
|
|
34
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">pattern_hash_class</span> = <span class="ruby-constant">SequentialHash</span>
|
|
35
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">timeout_multiplier</span> = <span class="ruby-value">1.25</span>
|
|
36
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">timeout_offset</span> = <span class="ruby-value">60</span>
|
|
37
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">time_log_reset</span> = <span class="ruby-keyword kw">false</span>
|
|
38
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">time_stamp_banners</span>=<span class="ruby-keyword kw">true</span>
|
|
39
|
+
<span class="ruby-comment cmt"># You can install a nil prefix to supress a given type of entry.</span>
|
|
40
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">prefixes</span> = { <span class="ruby-identifier">:command</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"\nc> "</span>, <span class="ruby-identifier">:expect</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'x> '</span>, <span class="ruby-identifier">:respond</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'i> '</span>,
|
|
41
|
+
<span class="ruby-identifier">:out</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'o> '</span>, <span class="ruby-identifier">:note</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'n> '</span>, <span class="ruby-identifier">:match</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'m> '</span>, <span class="ruby-identifier">:error</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'e> '</span>,
|
|
42
|
+
<span class="ruby-identifier">:dir</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'d> '</span>, <span class="ruby-identifier">:missingKey</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'?> '</span>, <span class="ruby-identifier">:file_op</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'f> '</span>,
|
|
43
|
+
<span class="ruby-identifier">:spawn</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"\ns> "</span>}
|
|
44
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
45
|
+
</body>
|
|
46
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>default_prompt (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 494</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">default_prompt</span>
|
|
15
|
+
<span class="ruby-identifier">source</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'USER'</span>]<span class="ruby-operator">+</span><span class="ruby-value str">'[$#] '</span>
|
|
16
|
+
<span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">source</span>)
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>default_prompt (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 500</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default_prompt</span>
|
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">default_prompt</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>normalize_paths (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 506</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">normalize_paths</span>
|
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">error_log_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">error_log_path</span>)
|
|
16
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">exit_status_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">exit_status_path</span>)
|
|
17
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">time_log_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">time_log_path</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">time_log_path</span>
|
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>build_default_dir_hash (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 513</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build_default_dir_hash</span>
|
|
15
|
+
<span class="ruby-identifier">url_hash</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">|</span> <span class="ruby-identifier">dir_hash</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">dirName</span>(<span class="ruby-identifier">url</span>, <span class="ruby-keyword kw">true</span>)) }
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>truncate_time_log (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 518</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">truncate_time_log</span>
|
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">time_log_path</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">time_log_reset</span>
|
|
16
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">time_log_path</span>, <span class="ruby-value str">'w'</span>) {}
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>get_password (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 543</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_password</span>
|
|
15
|
+
<span class="ruby-identifier">print</span> <span class="ruby-value str">"\n"</span><span class="ruby-operator">+</span><span class="ruby-identifier">password_prompt</span>
|
|
16
|
+
<span class="ruby-constant">STDOUT</span>.<span class="ruby-identifier">flush</span>
|
|
17
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">password</span> = <span class="ruby-constant">STDIN</span>.<span class="ruby-identifier">gets</span>.<span class="ruby-identifier">chop</span>
|
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>scaled_seconds (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 550</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scaled_seconds</span>(<span class="ruby-identifier">limit</span>)
|
|
15
|
+
<span class="ruby-identifier">timeout_multiplier</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">limit</span>.<span class="ruby-identifier">to_seconds</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">timeout_offset</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>inverse_scaled_seconds (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 555</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inverse_scaled_seconds</span>(<span class="ruby-identifier">limit</span>)
|
|
15
|
+
(<span class="ruby-identifier">limit</span>.<span class="ruby-identifier">to_seconds</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">timeout_offset</span>) <span class="ruby-operator">/</span> <span class="ruby-identifier">timeout_multiplier</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>limit (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 560</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">limit</span>(<span class="ruby-identifier">measuredSeconds</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
15
|
+
<span class="ruby-identifier">t</span> = <span class="ruby-identifier">scaled_seconds</span>(<span class="ruby-identifier">measuredSeconds</span>)
|
|
16
|
+
<span class="ruby-constant">Timeout</span><span class="ruby-operator">::</span><span class="ruby-identifier">timeout</span>(<span class="ruby-identifier">t</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>log_time (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 568</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_time</span>(<span class="ruby-identifier">description</span>, <span class="ruby-identifier">doLog</span>=<span class="ruby-keyword kw">true</span>)
|
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">time_log_path</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">doLog</span>
|
|
16
|
+
<span class="ruby-identifier">start</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
|
17
|
+
<span class="ruby-identifier">answer</span> = <span class="ruby-keyword kw">yield</span>
|
|
18
|
+
<span class="ruby-identifier">delta</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">start</span>
|
|
19
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">time_log_path</span>, <span class="ruby-value str">'a'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">timeLog</span><span class="ruby-operator">|</span>
|
|
20
|
+
<span class="ruby-identifier">timeLog</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">String</span>.<span class="ruby-identifier">from_seconds</span>(<span class="ruby-identifier">delta</span>) <span class="ruby-operator"><<</span> <span class="ruby-value str">"\t"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">description</span>
|
|
21
|
+
}
|
|
22
|
+
<span class="ruby-identifier">answer</span>
|
|
23
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
24
|
+
</body>
|
|
25
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>note (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 581</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">note</span>(<span class="ruby-identifier">string</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
|
15
|
+
<span class="ruby-identifier">log</span>( <span class="ruby-identifier">:note</span>, <span class="ruby-identifier">string</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>log (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 588</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">string</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">transcript</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">string</span>
|
|
16
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pty_workaround</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">string</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">'2>'</span>)
|
|
17
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">log_prompt</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">prompt</span>.<span class="ruby-identifier">to_regexp</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">string</span>)
|
|
18
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">transcript</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">prefixes</span>[<span class="ruby-identifier">:missingKey</span>] <span class="ruby-operator"><<</span> <span class="ruby-node">"Unknown log entry type: #{type.inspect}"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">prefixes</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">type</span>
|
|
19
|
+
<span class="ruby-identifier">prefix</span> = <span class="ruby-identifier">prefixes</span>[<span class="ruby-identifier">type</span>]
|
|
20
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">prefix</span> <span class="ruby-comment cmt"># Don't log types with nil prefix</span>
|
|
21
|
+
<span class="ruby-identifier">string</span> = <span class="ruby-identifier">string</span>.<span class="ruby-identifier">strip</span>
|
|
22
|
+
<span class="ruby-identifier">string</span> = <span class="ruby-identifier">string</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">args</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span>
|
|
23
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">most_recent_input</span> = <span class="ruby-identifier">string</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pty_workaround</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">type</span><span class="ruby-operator">==</span><span class="ruby-identifier">:respond</span>
|
|
24
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pty_workaround</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">type</span><span class="ruby-operator">==</span><span class="ruby-identifier">:out</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">most_recent_input</span><span class="ruby-operator">==</span><span class="ruby-identifier">string</span>
|
|
25
|
+
<span class="ruby-comment cmt"># Do not expect string to have internal delimiters.</span>
|
|
26
|
+
<span class="ruby-identifier">array</span> = <span class="ruby-identifier">string</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">"\n"</span>)
|
|
27
|
+
<span class="ruby-identifier">string</span> = <span class="ruby-identifier">array</span>.<span class="ruby-identifier">shift</span>
|
|
28
|
+
<span class="ruby-identifier">transcript</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">prefix</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">string</span>.<span class="ruby-identifier">dump</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">string</span>
|
|
29
|
+
<span class="ruby-comment cmt"># print the followup lines (after internal delimiters), indented</span>
|
|
30
|
+
<span class="ruby-identifier">array</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">more</span><span class="ruby-operator">|</span>
|
|
31
|
+
<span class="ruby-identifier">transcript</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" "</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">prefix</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">more</span>.<span class="ruby-identifier">dump</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">more</span>
|
|
32
|
+
}
|
|
33
|
+
<span class="ruby-identifier">transcript</span>.<span class="ruby-identifier">flush</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">transcript</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:flush</span>)
|
|
34
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
35
|
+
</body>
|
|
36
|
+
</html>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>spawn (Yax::Session)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File nist/yax.rb, line 614</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">spawn</span>(<span class="ruby-identifier">program</span>=<span class="ruby-value str">'bash'</span>)
|
|
15
|
+
<span class="ruby-keyword kw">case</span> <span class="ruby-ivar">@@spawn_method</span>
|
|
16
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:spawn</span>
|
|
17
|
+
<span class="ruby-identifier">log</span>(<span class="ruby-identifier">:spawn</span>, <span class="ruby-value str">'spawn '</span><span class="ruby-operator">+</span><span class="ruby-identifier">program</span>.<span class="ruby-identifier">inspect</span>)
|
|
18
|
+
<span class="ruby-ivar">@stdout</span>, <span class="ruby-ivar">@stdin</span>, <span class="ruby-ivar">@pid</span> = <span class="ruby-constant">PTY</span>.<span class="ruby-identifier">spawn</span>(<span class="ruby-identifier">program</span>)
|
|
19
|
+
<span class="ruby-identifier">stdin</span>.<span class="ruby-identifier">sync</span>=<span class="ruby-keyword kw">true</span>
|
|
20
|
+
<span class="ruby-identifier">stdout</span>.<span class="ruby-identifier">sync</span>=<span class="ruby-keyword kw">true</span>
|
|
21
|
+
<span class="ruby-identifier">log</span>(<span class="ruby-identifier">:spawn</span>, <span class="ruby-node">"pid is: #{pid.inspect}"</span>)
|
|
22
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:popen3</span>
|
|
23
|
+
<span class="ruby-identifier">log</span>(<span class="ruby-identifier">:spawn</span>, <span class="ruby-value str">'popen3 '</span><span class="ruby-operator">+</span><span class="ruby-identifier">program</span>.<span class="ruby-identifier">inspect</span>)
|
|
24
|
+
<span class="ruby-ivar">@stdin</span>, <span class="ruby-ivar">@stdout</span>, <span class="ruby-ivar">@stderr</span> = <span class="ruby-constant">Open3</span>.<span class="ruby-identifier">popen3</span>(<span class="ruby-identifier">program</span>)
|
|
25
|
+
<span class="ruby-identifier">stdout</span>.<span class="ruby-identifier">sync</span>=<span class="ruby-keyword kw">true</span>
|
|
26
|
+
<span class="ruby-identifier">stderr</span>.<span class="ruby-identifier">sync</span>=<span class="ruby-keyword kw">true</span>
|
|
27
|
+
<span class="ruby-identifier">s</span> = [<span class="ruby-identifier">stdin</span>.<span class="ruby-identifier">sync</span>, <span class="ruby-identifier">stdout</span>.<span class="ruby-identifier">sync</span>, <span class="ruby-identifier">stderr</span>.<span class="ruby-identifier">sync</span>]
|
|
28
|
+
<span class="ruby-identifier">p</span> = [<span class="ruby-identifier">stdin</span>.<span class="ruby-identifier">pid</span>, <span class="ruby-identifier">stdout</span>.<span class="ruby-identifier">pid</span>, <span class="ruby-identifier">stderr</span>.<span class="ruby-identifier">pid</span>]
|
|
29
|
+
<span class="ruby-identifier">log</span>(<span class="ruby-identifier">:spawn</span>, <span class="ruby-node">"stdout is a #{stdout.class.name} syncs are: #{s.inspect} pids are: #{p.inspect}"</span>)
|
|
30
|
+
<span class="ruby-keyword kw">end</span>
|
|
31
|
+
<span class="ruby-identifier">prepare</span>
|
|
32
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
33
|
+
</body>
|
|
34
|
+
</html>
|