rcmd 1.5.7 → 1.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rspec_status +7 -7
- data/Gemfile.lock +17 -9
- data/README.md +18 -4
- data/doc/rdocs/OptionParser.html +44 -72
- data/doc/rdocs/README_md.html +117 -129
- data/doc/rdocs/Rcmd.html +69 -94
- data/doc/rdocs/created.rid +5 -5
- data/doc/rdocs/css/fonts.css +167 -0
- data/doc/rdocs/{rdoc.css → css/rdoc.css} +237 -242
- data/doc/rdocs/fonts/Lato-Light.ttf +0 -0
- data/doc/rdocs/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/rdocs/fonts/Lato-Regular.ttf +0 -0
- data/doc/rdocs/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/rdocs/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/rdocs/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/rdocs/index.html +107 -102
- data/doc/rdocs/js/darkfish.js +33 -27
- data/doc/rdocs/js/navigation.js.gz +0 -0
- data/doc/rdocs/js/search.js +20 -5
- data/doc/rdocs/js/search_index.js.gz +0 -0
- data/doc/rdocs/js/searcher.js +3 -2
- data/doc/rdocs/js/searcher.js.gz +0 -0
- data/doc/rdocs/table_of_contents.html +26 -25
- data/exe/rcmd +12 -4
- data/lib/rcmd/version.rb +1 -1
- data/rcmd.gemspec +1 -1
- metadata +51 -27
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/doc/rdocs/index.html
CHANGED
@@ -2,60 +2,69 @@
|
|
2
2
|
|
3
3
|
<html>
|
4
4
|
<head>
|
5
|
-
<meta
|
5
|
+
<meta charset="UTF-8">
|
6
6
|
|
7
7
|
<title>RDoc Documentation</title>
|
8
8
|
|
9
|
-
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
10
|
-
|
11
9
|
<script type="text/javascript">
|
12
10
|
var rdoc_rel_prefix = "./";
|
11
|
+
var index_rel_prefix = "./";
|
13
12
|
</script>
|
14
13
|
|
15
|
-
<script
|
16
|
-
<script
|
17
|
-
|
18
|
-
<
|
19
|
-
<
|
20
|
-
|
14
|
+
<script src="./js/jquery.js"></script>
|
15
|
+
<script src="./js/darkfish.js"></script>
|
16
|
+
|
17
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
18
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
19
|
+
|
21
20
|
|
22
21
|
|
23
|
-
<body>
|
24
|
-
<nav
|
25
|
-
<
|
26
|
-
|
27
|
-
|
22
|
+
<body id="top" role="document" class="file">
|
23
|
+
<nav role="navigation">
|
24
|
+
<div id="project-navigation">
|
25
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
26
|
+
<h2>
|
27
|
+
<a href="./index.html" rel="home">Home</a>
|
28
|
+
</h2>
|
29
|
+
|
30
|
+
<div id="table-of-contents-navigation">
|
31
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
28
32
|
<a href="./table_of_contents.html#classes">Classes</a>
|
29
33
|
<a href="./table_of_contents.html#methods">Methods</a>
|
30
|
-
</
|
31
|
-
</
|
34
|
+
</div>
|
35
|
+
</div>
|
32
36
|
|
33
37
|
|
34
|
-
|
38
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
35
39
|
<form action="#" method="get" accept-charset="utf-8">
|
36
|
-
<
|
37
|
-
<input
|
40
|
+
<div id="search-field-wrapper">
|
41
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
42
|
+
aria-autocomplete="list" aria-controls="search-results"
|
43
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
38
44
|
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
-
</
|
40
|
-
</form>
|
45
|
+
</div>
|
41
46
|
|
42
|
-
|
43
|
-
|
47
|
+
<ul id="search-results" aria-label="Search Results"
|
48
|
+
aria-busy="false" aria-expanded="false"
|
49
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
50
|
+
</form>
|
51
|
+
</div>
|
44
52
|
|
53
|
+
</div>
|
45
54
|
|
46
55
|
<div id="project-metadata">
|
47
|
-
<
|
48
|
-
<h3
|
56
|
+
<div id="fileindex-section" class="nav-section">
|
57
|
+
<h3>Pages</h3>
|
49
58
|
|
50
|
-
<ul>
|
59
|
+
<ul class="link-list">
|
51
60
|
|
52
|
-
<li
|
61
|
+
<li><a href="./README_md.html">README</a>
|
53
62
|
|
54
63
|
</ul>
|
55
|
-
</
|
64
|
+
</div>
|
56
65
|
|
57
|
-
<
|
58
|
-
<h3
|
66
|
+
<div id="classindex-section" class="nav-section">
|
67
|
+
<h3>Class and Module Index</h3>
|
59
68
|
|
60
69
|
<ul class="link-list">
|
61
70
|
|
@@ -64,23 +73,22 @@
|
|
64
73
|
<li><a href="./Rcmd.html">Rcmd</a>
|
65
74
|
|
66
75
|
</ul>
|
67
|
-
</
|
76
|
+
</div>
|
68
77
|
|
69
78
|
</div>
|
70
79
|
</nav>
|
71
80
|
|
72
|
-
<
|
81
|
+
<main role="main">
|
82
|
+
|
73
83
|
|
74
|
-
<h1 id="label-Description">Description<span><a href="#label-Description">¶</a> <a href="#
|
84
|
+
<h1 id="label-Description">Description<span><a href="#label-Description">¶</a> <a href="#top">↑</a></span></h1>
|
75
85
|
|
76
86
|
<p>rcmd (remote command) is a command line utility written in Ruby for
|
77
|
-
executing the same command on
|
78
|
-
|
79
|
-
assigning a host to a
|
80
|
-
thread and creating the ssh sessions in those
|
87
|
+
executing the same command on multiple systems through ssh. This is done by
|
88
|
+
assigning a host to a thread and creating the ssh sessions in those
|
81
89
|
threads.</p>
|
82
90
|
|
83
|
-
<h2 id="label-Features">Features<span><a href="#label-Features">¶</a> <a href="#
|
91
|
+
<h2 id="label-Features">Features<span><a href="#label-Features">¶</a> <a href="#top">↑</a></span></h2>
|
84
92
|
<ul><li>
|
85
93
|
<p>Command line switch for setting number of threads to be used at a time.
|
86
94
|
(Default is 4)</p>
|
@@ -96,70 +104,65 @@ the node list.</p>
|
|
96
104
|
<p>Stdout can be suppressed, only allowing for stderr to be shown</p>
|
97
105
|
</li></ul>
|
98
106
|
|
99
|
-
<h2 id="label-Installation">Installation<span><a href="#label-Installation">¶</a> <a href="#
|
107
|
+
<h2 id="label-Installation">Installation<span><a href="#label-Installation">¶</a> <a href="#top">↑</a></span></h2>
|
100
108
|
|
101
109
|
<p>rcmd is available as a gem and kan be installed with <code>gem install
|
102
110
|
rcmd</code></p>
|
103
111
|
|
104
|
-
<h1 id="label-Usage+Examples">Usage Examples<span><a href="#label-Usage+Examples">¶</a> <a href="#
|
112
|
+
<h1 id="label-Usage+Examples">Usage Examples<span><a href="#label-Usage+Examples">¶</a> <a href="#top">↑</a></span></h1>
|
105
113
|
|
106
|
-
<h2 id="label-Help+Screen">Help Screen<span><a href="#label-Help+Screen">¶</a> <a href="#
|
114
|
+
<h2 id="label-Help+Screen">Help Screen<span><a href="#label-Help+Screen">¶</a> <a href="#top">↑</a></span></h2>
|
107
115
|
|
108
|
-
<pre>
|
109
|
-
Usage: rcmd [options]
|
116
|
+
<pre>Usage: rcmd [options]
|
110
117
|
-u, --username username Username for SSH connections
|
111
118
|
-n, --nodes x,y,z Comma seperated list of nodes. use '-' for a space seperated list piped from another command
|
119
|
+
-r, --regexp regex Use Regex to build host list (ruby regexp)
|
112
120
|
-t, --threads threads Number of threads to run
|
113
121
|
-c, --command <command> Quoted string containing the command to be run
|
114
122
|
-q, --quiet Suppress stdout of commands. stderr will still be displayed
|
115
|
-
|
123
|
+
-v, --version Print what version of the command is in use
|
124
|
+
-D, --debug Print debug information</pre>
|
116
125
|
|
117
|
-
<h2 id="label-Specifying+nodes+manually">Specifying nodes manually<span><a href="#label-Specifying+nodes+manually">¶</a> <a href="#
|
126
|
+
<h2 id="label-Specifying+nodes+manually">Specifying nodes manually<span><a href="#label-Specifying+nodes+manually">¶</a> <a href="#top">↑</a></span></h2>
|
118
127
|
|
119
128
|
<p>Specifying a comma seperated list of hosts and timing the total execution
|
120
|
-
time.
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
ComputeNode release 6.8 (Santiago)
|
126
|
-
node1 :: Red Hat Enterprise Linux
|
127
|
-
ComputeNode release 6.8 (Santiago)
|
128
|
-
node4 :: Red Hat Enterprise Linux
|
129
|
-
ComputeNode release 6.9 (Santiago)
|
130
|
-
node3 :: Red Hat Enterprise Linux
|
129
|
+
time. “`bash daibhidh@darkstar:~/$ time rcmd -n node1,node2,node3,node4 -c
|
130
|
+
'cat /etc/redhat-release' node2 :: Red Hat Enterprise Linux
|
131
|
+
ComputeNode release 6.8 (Santiago) node1 :: Red Hat Enterprise Linux
|
132
|
+
ComputeNode release 6.8 (Santiago) node4 :: Red Hat Enterprise Linux
|
133
|
+
ComputeNode release 6.9 (Santiago) node3 :: Red Hat Enterprise Linux
|
131
134
|
ComputeNode release 6.9 (Santiago)</p>
|
132
135
|
|
133
|
-
<p>real 0m2.749s
|
134
|
-
user 0m0.272s
|
135
|
-
sys 0m0.050s
|
136
|
-
```</p>
|
136
|
+
<p>real 0m2.749s user 0m0.272s sys 0m0.050s “`</p>
|
137
137
|
|
138
|
-
<h2 id="label-Piping+list+of+nodes">Piping list of nodes<span><a href="#label-Piping+list+of+nodes">¶</a> <a href="#
|
138
|
+
<h2 id="label-Piping+list+of+nodes">Piping list of nodes<span><a href="#label-Piping+list+of+nodes">¶</a> <a href="#top">↑</a></span></h2>
|
139
139
|
|
140
140
|
<p>Using the hammer cli to get a list of hosts from a RedHat Satellite and
|
141
|
-
providing it to rcmd as the node
|
142
|
-
list
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
141
|
+
providing it to rcmd as the node list. <code>bash daibhidh@darkstar:~/$
|
142
|
+
hammer --output base host list --organization org | awk '/Name:/ {print
|
143
|
+
$2}' | rcmd -n - -c 'cat /etc/redhat-release' node1.example.com
|
144
|
+
:: Red Hat Enterprise Linux ComputeNode release 6.8 (Santiago)
|
145
|
+
node3.example.com :: Red Hat Enterprise Linux ComputeNode release 6.9
|
146
|
+
(Santiago) node2.example.com :: Red Hat Enterprise Linux ComputeNode
|
147
|
+
release 6.8 (Santiago) node4.example.com :: Red Hat Enterprise Linux
|
148
|
+
ComputeNode release 6.9 (Santiago) </code></p>
|
149
|
+
|
150
|
+
<h2 id="label-Using+regex+to+build+node+list">Using regex to build node list<span><a href="#label-Using+regex+to+build+node+list">¶</a> <a href="#top">↑</a></span></h2>
|
151
|
+
|
152
|
+
<pre>daibhidh@darkstar:~/$ rcmd -r 'node([1-9]|1[1-2])$' -c 'hostname -f'
|
153
|
+
node2 :: node2.example.com
|
154
|
+
node1 :: node1.example.com
|
155
|
+
node4 :: node4.example.com
|
156
|
+
node3 :: node3.example.com
|
157
|
+
node5 :: node5.example.com
|
158
|
+
node6 :: node6.example.com
|
159
|
+
node8 :: node8.example.com
|
160
|
+
node7 :: node7.example.com
|
161
|
+
node11 :: CONNECT ERROR :: Unable to connect to host!
|
162
|
+
node9 :: node9.example.com
|
163
|
+
node12 :: node12.example.com</pre>
|
164
|
+
|
165
|
+
<h1 id="label-Development">Development<span><a href="#label-Development">¶</a> <a href="#top">↑</a></span></h1>
|
163
166
|
|
164
167
|
<p>If you are wanting to modify the code by all means do so. If you clone this
|
165
168
|
repository you can then run <code>bundle install</code> to install the
|
@@ -168,24 +171,26 @@ with <em>rake</em>.</p>
|
|
168
171
|
|
169
172
|
<p>Available Rake tasks are:</p>
|
170
173
|
|
171
|
-
<pre>rake build
|
172
|
-
rake clean
|
173
|
-
rake clobber
|
174
|
-
rake clobber_rdoc
|
175
|
-
rake console
|
176
|
-
rake install
|
177
|
-
rake install
|
178
|
-
rake rdoc
|
179
|
-
rake reinstall
|
180
|
-
rake release[remote]
|
181
|
-
rake rerdoc
|
182
|
-
rake spec
|
183
|
-
</
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
<p
|
174
|
+
<pre class="ruby"><span class="ruby-identifier">rake</span> <span class="ruby-identifier">build</span> <span class="ruby-comment"># Build rcmd-1.5.5.gem into the pkg directory</span>
|
175
|
+
<span class="ruby-identifier">rake</span> <span class="ruby-identifier">clean</span> <span class="ruby-comment"># Remove any temporary products</span>
|
176
|
+
<span class="ruby-identifier">rake</span> <span class="ruby-identifier">clobber</span> <span class="ruby-comment"># Remove any generated files</span>
|
177
|
+
<span class="ruby-identifier">rake</span> <span class="ruby-identifier">clobber_rdoc</span> <span class="ruby-comment"># Remove RDoc HTML files</span>
|
178
|
+
<span class="ruby-identifier">rake</span> <span class="ruby-identifier">console</span> <span class="ruby-comment"># Open an IRB console with this gem loaded</span>
|
179
|
+
<span class="ruby-identifier">rake</span> <span class="ruby-identifier">install</span> <span class="ruby-comment"># Build and install rcmd-1.5.5.gem into system gems</span>
|
180
|
+
<span class="ruby-identifier">rake</span> <span class="ruby-identifier">install</span>:<span class="ruby-identifier">local</span> <span class="ruby-comment"># Build and install rcmd-1.5.5.gem into system gems without network access</span>
|
181
|
+
<span class="ruby-identifier">rake</span> <span class="ruby-identifier">rdoc</span> <span class="ruby-comment"># Build RDoc HTML files</span>
|
182
|
+
<span class="ruby-identifier">rake</span> <span class="ruby-identifier">reinstall</span> <span class="ruby-comment"># Remove, build, and install gem</span>
|
183
|
+
<span class="ruby-identifier">rake</span> <span class="ruby-identifier">release</span>[<span class="ruby-identifier">remote</span>] <span class="ruby-comment"># Create tag v1.5.5 and build and push rcmd-1.5.5.gem to Rubygems</span>
|
184
|
+
<span class="ruby-identifier">rake</span> <span class="ruby-identifier">rerdoc</span> <span class="ruby-comment"># Rebuild RDoc HTML files</span>
|
185
|
+
<span class="ruby-identifier">rake</span> <span class="ruby-identifier">spec</span> <span class="ruby-comment"># Run RSpec code examples</span>
|
186
|
+
</pre>
|
187
|
+
</main>
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
<footer id="validator-badges" role="contentinfo">
|
192
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
193
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
|
194
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
190
195
|
</footer>
|
191
196
|
|
data/doc/rdocs/js/darkfish.js
CHANGED
@@ -44,28 +44,6 @@ function hookSourceViews() {
|
|
44
44
|
$('.method-heading').click( showSource );
|
45
45
|
};
|
46
46
|
|
47
|
-
function toggleDebuggingSection() {
|
48
|
-
$('.debugging-section').slideToggle();
|
49
|
-
};
|
50
|
-
|
51
|
-
function hookDebuggingToggle() {
|
52
|
-
$('#debugging-toggle img').click( toggleDebuggingSection );
|
53
|
-
};
|
54
|
-
|
55
|
-
function hookTableOfContentsToggle() {
|
56
|
-
$('.indexpage li .toc-toggle').each( function() {
|
57
|
-
$(this).click( function() {
|
58
|
-
$(this).toggleClass('open');
|
59
|
-
});
|
60
|
-
|
61
|
-
var section = $(this).next();
|
62
|
-
|
63
|
-
$(this).click( function() {
|
64
|
-
section.slideToggle();
|
65
|
-
});
|
66
|
-
});
|
67
|
-
}
|
68
|
-
|
69
47
|
function hookSearch() {
|
70
48
|
var input = $('#search-field').eq(0);
|
71
49
|
var result = $('#search-results').eq(0);
|
@@ -81,7 +59,7 @@ function hookSearch() {
|
|
81
59
|
var html = '';
|
82
60
|
|
83
61
|
// TODO add relative path to <script> per-page
|
84
|
-
html += '<p class="search-match"><a href="' +
|
62
|
+
html += '<p class="search-match"><a href="' + index_rel_prefix + result.path + '">' + this.hlt(result.title);
|
85
63
|
if (result.params)
|
86
64
|
html += '<span class="params">' + result.params + '</span>';
|
87
65
|
html += '</a>';
|
@@ -143,13 +121,41 @@ function highlightClickTarget( event ) {
|
|
143
121
|
};
|
144
122
|
};
|
145
123
|
|
124
|
+
function loadAsync(path, success, prefix) {
|
125
|
+
$.ajax({
|
126
|
+
url: prefix + path,
|
127
|
+
dataType: 'script',
|
128
|
+
success: success,
|
129
|
+
cache: true
|
130
|
+
});
|
131
|
+
};
|
146
132
|
|
147
133
|
$(document).ready( function() {
|
148
134
|
hookSourceViews();
|
149
|
-
hookDebuggingToggle();
|
150
|
-
hookSearch();
|
151
135
|
highlightLocationTarget();
|
152
|
-
hookTableOfContentsToggle();
|
153
|
-
|
154
136
|
$('ul.link-list a').bind( "click", highlightClickTarget );
|
137
|
+
|
138
|
+
var search_scripts_loaded = {
|
139
|
+
navigation_loaded: false,
|
140
|
+
search_loaded: false,
|
141
|
+
search_index_loaded: false,
|
142
|
+
searcher_loaded: false,
|
143
|
+
}
|
144
|
+
|
145
|
+
var search_success_function = function(variable) {
|
146
|
+
return (function (data, status, xhr) {
|
147
|
+
search_scripts_loaded[variable] = true;
|
148
|
+
|
149
|
+
if (search_scripts_loaded['navigation_loaded'] == true &&
|
150
|
+
search_scripts_loaded['search_loaded'] == true &&
|
151
|
+
search_scripts_loaded['search_index_loaded'] == true &&
|
152
|
+
search_scripts_loaded['searcher_loaded'] == true)
|
153
|
+
hookSearch();
|
154
|
+
});
|
155
|
+
}
|
156
|
+
|
157
|
+
loadAsync('js/navigation.js', search_success_function('navigation_loaded'), rdoc_rel_prefix);
|
158
|
+
loadAsync('js/search.js', search_success_function('search_loaded'), rdoc_rel_prefix);
|
159
|
+
loadAsync('js/search_index.js', search_success_function('search_index_loaded'), index_rel_prefix);
|
160
|
+
loadAsync('js/searcher.js', search_success_function('searcher_loaded'), rdoc_rel_prefix);
|
155
161
|
});
|
Binary file
|
data/doc/rdocs/js/search.js
CHANGED
@@ -14,7 +14,12 @@ Search.prototype = $.extend({}, Navigation, new function() {
|
|
14
14
|
|
15
15
|
this.init = function() {
|
16
16
|
var _this = this;
|
17
|
-
var observer = function() {
|
17
|
+
var observer = function(e) {
|
18
|
+
switch(e.originalEvent.keyCode) {
|
19
|
+
case 38: // Event.KEY_UP
|
20
|
+
case 40: // Event.KEY_DOWN
|
21
|
+
return;
|
22
|
+
}
|
18
23
|
_this.search(_this.$input[0].value);
|
19
24
|
};
|
20
25
|
this.$input.keyup(observer);
|
@@ -39,9 +44,12 @@ Search.prototype = $.extend({}, Navigation, new function() {
|
|
39
44
|
if (value == '') {
|
40
45
|
this.lastQuery = value;
|
41
46
|
this.$result.empty();
|
47
|
+
this.$result.attr('aria-expanded', 'false');
|
42
48
|
this.setNavigationActive(false);
|
43
49
|
} else if (value != this.lastQuery) {
|
44
50
|
this.lastQuery = value;
|
51
|
+
this.$result.attr('aria-busy', 'true');
|
52
|
+
this.$result.attr('aria-expanded', 'true');
|
45
53
|
this.firstRun = true;
|
46
54
|
this.searcher.find(value);
|
47
55
|
}
|
@@ -55,25 +63,32 @@ Search.prototype = $.extend({}, Navigation, new function() {
|
|
55
63
|
}
|
56
64
|
|
57
65
|
for (var i=0, l = results.length; i < l; i++) {
|
58
|
-
|
66
|
+
var item = this.renderItem.call(this, results[i]);
|
67
|
+
item.setAttribute('id', 'search-result-' + target.childElementCount);
|
68
|
+
target.appendChild(item);
|
59
69
|
};
|
60
70
|
|
61
71
|
if (this.firstRun && results.length > 0) {
|
62
72
|
this.firstRun = false;
|
63
73
|
this.$current = $(target.firstChild);
|
64
|
-
this.$current.addClass('
|
74
|
+
this.$current.addClass('search-selected');
|
65
75
|
}
|
66
76
|
if (jQuery.browser.msie) this.$element[0].className += '';
|
77
|
+
|
78
|
+
if (isLast) this.$result.attr('aria-busy', 'false');
|
67
79
|
}
|
68
80
|
|
69
81
|
this.move = function(isDown) {
|
70
82
|
if (!this.$current) return;
|
71
83
|
var $next = this.$current[isDown ? 'next' : 'prev']();
|
72
84
|
if ($next.length) {
|
73
|
-
this.$current.removeClass('
|
74
|
-
$next.addClass('
|
85
|
+
this.$current.removeClass('search-selected');
|
86
|
+
$next.addClass('search-selected');
|
87
|
+
this.$input.attr('aria-activedescendant', $next.attr('id'));
|
75
88
|
this.scrollIntoView($next[0], this.$view[0]);
|
76
89
|
this.$current = $next;
|
90
|
+
this.$input.val($next[0].firstChild.firstChild.text);
|
91
|
+
this.$input.select();
|
77
92
|
}
|
78
93
|
return true;
|
79
94
|
}
|
Binary file
|
data/doc/rdocs/js/searcher.js
CHANGED
@@ -52,13 +52,13 @@ Searcher.prototype = new function() {
|
|
52
52
|
/* ----- Utilities ------ */
|
53
53
|
function splitQuery(query) {
|
54
54
|
return jQuery.grep(query.split(/(\s+|::?|\(\)?)/), function(string) {
|
55
|
-
return string.match(/\S/)
|
55
|
+
return string.match(/\S/);
|
56
56
|
});
|
57
57
|
}
|
58
58
|
|
59
59
|
function buildRegexps(queries) {
|
60
60
|
return jQuery.map(queries, function(query) {
|
61
|
-
return new RegExp(query.replace(/(.)/g, '([$1])([^$1]*?)'), 'i')
|
61
|
+
return new RegExp(query.replace(/(.)/g, '([$1])([^$1]*?)'), 'i');
|
62
62
|
});
|
63
63
|
}
|
64
64
|
|
@@ -172,6 +172,7 @@ Searcher.prototype = new function() {
|
|
172
172
|
result.path = info[2];
|
173
173
|
result.params = info[3];
|
174
174
|
result.snippet = info[4];
|
175
|
+
result.badge = info[6];
|
175
176
|
return result;
|
176
177
|
}
|
177
178
|
|
Binary file
|
@@ -2,34 +2,33 @@
|
|
2
2
|
|
3
3
|
<html>
|
4
4
|
<head>
|
5
|
-
<meta
|
5
|
+
<meta charset="UTF-8">
|
6
6
|
|
7
7
|
<title>Table of Contents - RDoc Documentation</title>
|
8
8
|
|
9
|
-
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
10
|
-
|
11
9
|
<script type="text/javascript">
|
12
10
|
var rdoc_rel_prefix = "./";
|
11
|
+
var index_rel_prefix = "./";
|
13
12
|
</script>
|
14
13
|
|
15
|
-
<script
|
16
|
-
<script
|
17
|
-
|
18
|
-
<
|
19
|
-
<
|
20
|
-
<script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
|
14
|
+
<script src="./js/jquery.js"></script>
|
15
|
+
<script src="./js/darkfish.js"></script>
|
16
|
+
|
17
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
18
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
21
19
|
|
22
20
|
|
23
|
-
<body class="indexpage">
|
24
|
-
<h1>Table of Contents - RDoc Documentation</h1>
|
25
21
|
|
26
|
-
<
|
22
|
+
<body id="top" class="table-of-contents">
|
23
|
+
<main role="main">
|
24
|
+
<h1 class="class">Table of Contents - RDoc Documentation</h1>
|
25
|
+
|
26
|
+
<h2 id="pages">Pages</h2>
|
27
27
|
<ul>
|
28
28
|
<li class="file">
|
29
29
|
<a href="README_md.html">README</a>
|
30
30
|
|
31
|
-
<
|
32
|
-
<ul class="initially-hidden">
|
31
|
+
<ul>
|
33
32
|
<li><a href="README_md.html#label-Description">Description</a>
|
34
33
|
<li><a href="README_md.html#label-Features">Features</a>
|
35
34
|
<li><a href="README_md.html#label-Installation">Installation</a>
|
@@ -37,35 +36,37 @@
|
|
37
36
|
<li><a href="README_md.html#label-Help+Screen">Help Screen</a>
|
38
37
|
<li><a href="README_md.html#label-Specifying+nodes+manually">Specifying nodes manually</a>
|
39
38
|
<li><a href="README_md.html#label-Piping+list+of+nodes">Piping list of nodes</a>
|
40
|
-
<li><a href="README_md.html#label-Using+
|
39
|
+
<li><a href="README_md.html#label-Using+regex+to+build+node+list">Using regex to build node list</a>
|
41
40
|
<li><a href="README_md.html#label-Development">Development</a>
|
42
41
|
</ul>
|
43
42
|
</li>
|
44
43
|
|
45
44
|
</ul>
|
46
45
|
|
47
|
-
<h2 id="classes">Classes
|
46
|
+
<h2 id="classes">Classes and Modules</h2>
|
48
47
|
<ul>
|
49
48
|
<li class="module">
|
50
49
|
<a href="OptionParser.html">OptionParser</a>
|
51
50
|
</li>
|
52
|
-
|
51
|
+
<li class="module">
|
53
52
|
<a href="Rcmd.html">Rcmd</a>
|
54
53
|
</li>
|
55
|
-
|
56
54
|
</ul>
|
57
55
|
|
58
56
|
<h2 id="methods">Methods</h2>
|
59
57
|
<ul>
|
60
|
-
|
61
|
-
|
62
|
-
|
58
|
+
|
59
|
+
<li class="method">
|
60
|
+
<a href="Rcmd.html#method-c-run_command">::run_command</a>
|
61
|
+
—
|
62
|
+
<span class="container">Rcmd</span>
|
63
63
|
</ul>
|
64
|
+
</main>
|
64
65
|
|
65
66
|
|
66
|
-
<footer id="validator-badges">
|
67
|
-
<p><a href="http://validator.w3.org/check/referer">
|
68
|
-
<p>Generated by <a href="https://github.
|
69
|
-
<p>
|
67
|
+
<footer id="validator-badges" role="contentinfo">
|
68
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
69
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
|
70
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
70
71
|
</footer>
|
71
72
|
|
data/exe/rcmd
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'optparse'
|
4
|
+
require 'regexp-examples'
|
4
5
|
require 'rcmd'
|
5
6
|
|
6
7
|
# This program is for executing a command on multiple nodes at the same time and accepts the following arguments.
|
@@ -14,7 +15,7 @@ require 'rcmd'
|
|
14
15
|
|
15
16
|
|
16
17
|
# Set default options
|
17
|
-
options = { :threads => 4, :nodes => nil, :environment => nil, :host_file => nil, :user => 'root', :password => false, :command => nil, :quiet => false, :version => false, :debug => false }
|
18
|
+
options = { :threads => 4, :nodes => nil, :environment => nil, :host_file => nil, :user => 'root', :password => false, :command => nil, :quiet => false, :version => false, :debug => false, :expression => nil, :database => false }
|
18
19
|
|
19
20
|
host_list = []
|
20
21
|
|
@@ -23,8 +24,8 @@ opts = OptionParser.new #:nodoc:
|
|
23
24
|
|
24
25
|
opts.on('-u username', '--username username', String, "Username for SSH connections") { |v| options[:user] = v }
|
25
26
|
opts.on('-n nodes', '--nodes x,y,z', Array, "Comma seperated list of nodes. use '-' for a space seperated list piped from another command") { |v| options[:nodes] = v }
|
26
|
-
opts.on('-r regex', '--regexp regex', String, "Use Regex to build
|
27
|
-
opts.on('-d database', '--database
|
27
|
+
opts.on('-r regex', '--regexp regex', String, "Use Regex to build host list (ruby regexp)") { |v| options[:expression] = v}
|
28
|
+
# opts.on('-d database', '--database', "Use hosts from database (~/.dbconf.yaml)") { |v| options[:database] = v}
|
28
29
|
opts.on('-t threads', '--threads threads', Integer, "Number of threads to run") { |v| options[:threads] = v }
|
29
30
|
opts.on('-c <command>', '--command <command>', String, "Quoted string containing the command to be run") { |v| options[:command] = v }
|
30
31
|
opts.on('-q', '--quiet', "Suppress stdout of commands. stderr will still be displayed") { |v| options[:quiet] = v }
|
@@ -34,7 +35,7 @@ opts.on('-D', '--debug', "Print debug information") { |v| options[:debug] = v }
|
|
34
35
|
# Process options
|
35
36
|
begin
|
36
37
|
opts.parse!(ARGV)
|
37
|
-
unless options[:version]
|
38
|
+
unless options[:version] or options[:expression]
|
38
39
|
mandatory = [:command, :nodes]
|
39
40
|
missing = mandatory.select{ |param| options[param].nil? }
|
40
41
|
raise OptionParser::MissingArgument, missing.join(', ') unless missing.empty?
|
@@ -45,6 +46,13 @@ begin
|
|
45
46
|
exit
|
46
47
|
end
|
47
48
|
|
49
|
+
# Process Regex for node list generation
|
50
|
+
if options[:expression]
|
51
|
+
unless options[:database]
|
52
|
+
options[:nodes] = Regexp.new(options[:expression]).examples(max_group_results: 500)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
48
56
|
# Print version and exit if version option chosen
|
49
57
|
if options[:version]
|
50
58
|
$stdout.puts "Version: #{Rcmd::VERSION}"
|