marked-conductor 1.0.17 → 1.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/README.md +2 -0
- data/lib/conductor/config.rb +24 -24
- data/lib/conductor/filter.rb +49 -23
- data/lib/conductor/version.rb +1 -1
- data/src/_README.md +2 -0
- metadata +1 -62
- data/html/Array.html +0 -160
- data/html/Conductor/Command.html +0 -271
- data/html/Conductor/Condition.html +0 -791
- data/html/Conductor/Config.html +0 -170
- data/html/Conductor/Env.html +0 -220
- data/html/Conductor/Script.html +0 -288
- data/html/Conductor.html +0 -363
- data/html/FalseClass.html +0 -138
- data/html/Filter.html +0 -269
- data/html/Hash.html +0 -160
- data/html/Object.html +0 -138
- data/html/README_rdoc.html +0 -86
- data/html/String.html +0 -1409
- data/html/TrueClass.html +0 -138
- data/html/YuiCompressor/Yui.html +0 -447
- data/html/YuiCompressor.html +0 -93
- data/html/created.rid +0 -16
- data/html/css/fonts.css +0 -167
- data/html/css/rdoc.css +0 -687
- data/html/fonts/Lato-Light.ttf +0 -0
- data/html/fonts/Lato-LightItalic.ttf +0 -0
- data/html/fonts/Lato-Regular.ttf +0 -0
- data/html/fonts/Lato-RegularItalic.ttf +0 -0
- data/html/fonts/SourceCodePro-Bold.ttf +0 -0
- data/html/fonts/SourceCodePro-Regular.ttf +0 -0
- data/html/images/add.png +0 -0
- data/html/images/arrow_up.png +0 -0
- data/html/images/brick.png +0 -0
- data/html/images/brick_link.png +0 -0
- data/html/images/bug.png +0 -0
- data/html/images/bullet_black.png +0 -0
- data/html/images/bullet_toggle_minus.png +0 -0
- data/html/images/bullet_toggle_plus.png +0 -0
- data/html/images/date.png +0 -0
- data/html/images/delete.png +0 -0
- data/html/images/find.png +0 -0
- data/html/images/loadingAnimation.gif +0 -0
- data/html/images/macFFBgHack.png +0 -0
- data/html/images/package.png +0 -0
- data/html/images/page_green.png +0 -0
- data/html/images/page_white_text.png +0 -0
- data/html/images/page_white_width.png +0 -0
- data/html/images/plugin.png +0 -0
- data/html/images/ruby.png +0 -0
- data/html/images/tag_blue.png +0 -0
- data/html/images/tag_green.png +0 -0
- data/html/images/transparent.png +0 -0
- data/html/images/wrench.png +0 -0
- data/html/images/wrench_orange.png +0 -0
- data/html/images/zoom.png +0 -0
- data/html/index.html +0 -110
- data/html/js/darkfish.js +0 -97
- data/html/js/navigation.js +0 -105
- data/html/js/navigation.js.gz +0 -0
- data/html/js/search.js +0 -110
- data/html/js/search_index.js +0 -1
- data/html/js/search_index.js.gz +0 -0
- data/html/js/searcher.js +0 -229
- data/html/js/searcher.js.gz +0 -0
- data/html/table_of_contents.html +0 -539
- data/test.md +0 -14
data/html/Conductor/Script.html
DELETED
@@ -1,288 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
|
7
|
-
<title>class Conductor::Script - Marked Conductor</title>
|
8
|
-
|
9
|
-
<script type="text/javascript">
|
10
|
-
var rdoc_rel_prefix = "../";
|
11
|
-
var index_rel_prefix = "../";
|
12
|
-
</script>
|
13
|
-
|
14
|
-
<script src="../js/navigation.js" defer></script>
|
15
|
-
<script src="../js/search.js" defer></script>
|
16
|
-
<script src="../js/search_index.js" defer></script>
|
17
|
-
<script src="../js/searcher.js" defer></script>
|
18
|
-
<script src="../js/darkfish.js" defer></script>
|
19
|
-
|
20
|
-
<link href="../css/fonts.css" rel="stylesheet">
|
21
|
-
<link href="../css/rdoc.css" rel="stylesheet">
|
22
|
-
|
23
|
-
|
24
|
-
<body id="top" role="document" class="class">
|
25
|
-
<nav role="navigation">
|
26
|
-
<div id="project-navigation">
|
27
|
-
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
-
<h2>
|
29
|
-
<a href="../index.html" rel="home">Home</a>
|
30
|
-
</h2>
|
31
|
-
|
32
|
-
<div id="table-of-contents-navigation">
|
33
|
-
<a href="../table_of_contents.html#pages">Pages</a>
|
34
|
-
<a href="../table_of_contents.html#classes">Classes</a>
|
35
|
-
<a href="../table_of_contents.html#methods">Methods</a>
|
36
|
-
</div>
|
37
|
-
</div>
|
38
|
-
|
39
|
-
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
-
<form action="#" method="get" accept-charset="utf-8">
|
41
|
-
<div id="search-field-wrapper">
|
42
|
-
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
-
aria-autocomplete="list" aria-controls="search-results"
|
44
|
-
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
45
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
-
</div>
|
47
|
-
|
48
|
-
<ul id="search-results" aria-label="Search Results"
|
49
|
-
aria-busy="false" aria-expanded="false"
|
50
|
-
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
-
</form>
|
52
|
-
</div>
|
53
|
-
|
54
|
-
</div>
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
<div id="class-metadata">
|
59
|
-
|
60
|
-
|
61
|
-
<div id="parent-class-section" class="nav-section">
|
62
|
-
<h3>Parent</h3>
|
63
|
-
|
64
|
-
<p class="link"><a href="../Object.html">Object</a>
|
65
|
-
</div>
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
<!-- Method Quickref -->
|
71
|
-
<div id="method-list-section" class="nav-section">
|
72
|
-
<h3>Methods</h3>
|
73
|
-
|
74
|
-
<ul class="link-list" role="directory">
|
75
|
-
<li ><a href="#method-c-new">::new</a>
|
76
|
-
<li ><a href="#method-i-args-3D">#args=</a>
|
77
|
-
<li ><a href="#method-i-path-3D">#path=</a>
|
78
|
-
<li ><a href="#method-i-run">#run</a>
|
79
|
-
</ul>
|
80
|
-
</div>
|
81
|
-
|
82
|
-
</div>
|
83
|
-
</nav>
|
84
|
-
|
85
|
-
<main role="main" aria-labelledby="class-Conductor::Script">
|
86
|
-
<h1 id="class-Conductor::Script" class="class">
|
87
|
-
class Conductor::Script
|
88
|
-
</h1>
|
89
|
-
|
90
|
-
<section class="description">
|
91
|
-
|
92
|
-
<p><a href="Script.html"><code>Script</code></a> runner</p>
|
93
|
-
|
94
|
-
</section>
|
95
|
-
|
96
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
<section class="attribute-method-details" class="method-section">
|
101
|
-
<header>
|
102
|
-
<h3>Attributes</h3>
|
103
|
-
</header>
|
104
|
-
|
105
|
-
<div id="attribute-i-args" class="method-detail">
|
106
|
-
<div class="method-heading attribute-method-heading">
|
107
|
-
<span class="method-name">args</span><span
|
108
|
-
class="attribute-access-type">[R]</span>
|
109
|
-
</div>
|
110
|
-
|
111
|
-
<div class="method-description">
|
112
|
-
|
113
|
-
</div>
|
114
|
-
</div>
|
115
|
-
<div id="attribute-i-path" class="method-detail">
|
116
|
-
<div class="method-heading attribute-method-heading">
|
117
|
-
<span class="method-name">path</span><span
|
118
|
-
class="attribute-access-type">[R]</span>
|
119
|
-
</div>
|
120
|
-
|
121
|
-
<div class="method-description">
|
122
|
-
|
123
|
-
</div>
|
124
|
-
</div>
|
125
|
-
</section>
|
126
|
-
|
127
|
-
|
128
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
129
|
-
<header>
|
130
|
-
<h3>Public Class Methods</h3>
|
131
|
-
</header>
|
132
|
-
|
133
|
-
<div id="method-c-new" class="method-detail ">
|
134
|
-
<div class="method-header">
|
135
|
-
<div class="method-heading">
|
136
|
-
<span class="method-name">new</span><span
|
137
|
-
class="method-args">(script)</span>
|
138
|
-
<span class="method-click-advice">click to toggle source</span>
|
139
|
-
</div>
|
140
|
-
</div>
|
141
|
-
|
142
|
-
<div class="method-description">
|
143
|
-
<p>Initializes the given script.</p>
|
144
|
-
|
145
|
-
<p>@param script The script/path</p>
|
146
|
-
|
147
|
-
<div class="method-source-code" id="new-source">
|
148
|
-
<pre><span class="ruby-comment"># File lib/conductor/script.rb, line 13</span>
|
149
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">script</span>)
|
150
|
-
<span class="ruby-identifier">parts</span> = <span class="ruby-constant">Shellwords</span>.<span class="ruby-identifier">split</span>(<span class="ruby-identifier">script</span>)
|
151
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">path</span> = <span class="ruby-identifier">parts</span>[<span class="ruby-value">0</span>]
|
152
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">args</span> = <span class="ruby-identifier">parts</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span>].<span class="ruby-identifier">join</span>(<span class="ruby-string">" "</span>)
|
153
|
-
<span class="ruby-keyword">end</span></pre>
|
154
|
-
</div>
|
155
|
-
</div>
|
156
|
-
|
157
|
-
|
158
|
-
</div>
|
159
|
-
|
160
|
-
</section>
|
161
|
-
|
162
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
163
|
-
<header>
|
164
|
-
<h3>Public Instance Methods</h3>
|
165
|
-
</header>
|
166
|
-
|
167
|
-
<div id="method-i-args-3D" class="method-detail ">
|
168
|
-
<div class="method-header">
|
169
|
-
<div class="method-heading">
|
170
|
-
<span class="method-name">args=</span><span
|
171
|
-
class="method-args">(array)</span>
|
172
|
-
<span class="method-click-advice">click to toggle source</span>
|
173
|
-
</div>
|
174
|
-
</div>
|
175
|
-
|
176
|
-
<div class="method-description">
|
177
|
-
<p>Set the args array</p>
|
178
|
-
|
179
|
-
<p>@param array The array</p>
|
180
|
-
|
181
|
-
<div class="method-source-code" id="args-3D-source">
|
182
|
-
<pre><span class="ruby-comment"># File lib/conductor/script.rb, line 45</span>
|
183
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">args=</span>(<span class="ruby-identifier">array</span>)
|
184
|
-
<span class="ruby-ivar">@args</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">array</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
|
185
|
-
<span class="ruby-identifier">array</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">" "</span>)
|
186
|
-
<span class="ruby-keyword">else</span>
|
187
|
-
<span class="ruby-identifier">array</span>
|
188
|
-
<span class="ruby-keyword">end</span>
|
189
|
-
<span class="ruby-keyword">end</span></pre>
|
190
|
-
</div>
|
191
|
-
</div>
|
192
|
-
|
193
|
-
|
194
|
-
</div>
|
195
|
-
|
196
|
-
<div id="method-i-path-3D" class="method-detail ">
|
197
|
-
<div class="method-header">
|
198
|
-
<div class="method-heading">
|
199
|
-
<span class="method-name">path=</span><span
|
200
|
-
class="method-args">(path)</span>
|
201
|
-
<span class="method-click-advice">click to toggle source</span>
|
202
|
-
</div>
|
203
|
-
</div>
|
204
|
-
|
205
|
-
<div class="method-description">
|
206
|
-
<p>Set script path, automatically expands/tests</p>
|
207
|
-
|
208
|
-
<p>@param path The path</p>
|
209
|
-
|
210
|
-
<div class="method-source-code" id="path-3D-source">
|
211
|
-
<pre><span class="ruby-comment"># File lib/conductor/script.rb, line 24</span>
|
212
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">path=</span>(<span class="ruby-identifier">path</span>)
|
213
|
-
<span class="ruby-ivar">@path</span> = <span class="ruby-keyword">if</span> <span class="ruby-regexp">%r{^[%/]}</span>.<span class="ruby-identifier">match?</span>(<span class="ruby-identifier">path</span>)
|
214
|
-
<span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">path</span>)
|
215
|
-
<span class="ruby-keyword">else</span>
|
216
|
-
<span class="ruby-identifier">script_dir</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-string">"~/.config/conductor/scripts"</span>)
|
217
|
-
<span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">script_dir</span>, <span class="ruby-identifier">path</span>))
|
218
|
-
<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">script_dir</span>, <span class="ruby-identifier">path</span>)
|
219
|
-
<span class="ruby-keyword">elsif</span> <span class="ruby-constant">TTY</span><span class="ruby-operator">::</span><span class="ruby-constant">Which</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">path</span>)
|
220
|
-
<span class="ruby-constant">TTY</span><span class="ruby-operator">::</span><span class="ruby-constant">Which</span>.<span class="ruby-identifier">which</span>(<span class="ruby-identifier">path</span>)
|
221
|
-
<span class="ruby-keyword">else</span>
|
222
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Path to #{path} not found"</span>
|
223
|
-
|
224
|
-
<span class="ruby-keyword">end</span>
|
225
|
-
<span class="ruby-keyword">end</span>
|
226
|
-
<span class="ruby-keyword">end</span></pre>
|
227
|
-
</div>
|
228
|
-
</div>
|
229
|
-
|
230
|
-
|
231
|
-
</div>
|
232
|
-
|
233
|
-
<div id="method-i-run" class="method-detail ">
|
234
|
-
<div class="method-header">
|
235
|
-
<div class="method-heading">
|
236
|
-
<span class="method-name">run</span><span
|
237
|
-
class="method-args">()</span>
|
238
|
-
<span class="method-click-advice">click to toggle source</span>
|
239
|
-
</div>
|
240
|
-
</div>
|
241
|
-
|
242
|
-
<div class="method-description">
|
243
|
-
<p>Execute the script</p>
|
244
|
-
|
245
|
-
<p>@return [String] script results (STDOUT)</p>
|
246
|
-
|
247
|
-
<div class="method-source-code" id="run-source">
|
248
|
-
<pre><span class="ruby-comment"># File lib/conductor/script.rb, line 58</span>
|
249
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">run</span>
|
250
|
-
<span class="ruby-identifier">stdin</span> = <span class="ruby-constant">Conductor</span>.<span class="ruby-identifier">stdin</span>
|
251
|
-
|
252
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-string">"Script path not defined"</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@path</span>
|
253
|
-
|
254
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-string">"Script not executable"</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">executable?</span>(<span class="ruby-ivar">@path</span>)
|
255
|
-
|
256
|
-
<span class="ruby-identifier">use_stdin</span> = <span class="ruby-keyword">true</span>
|
257
|
-
<span class="ruby-keyword">if</span> <span class="ruby-regexp">/\$\{?file\}?/</span>.<span class="ruby-identifier">match?</span>(<span class="ruby-identifier">args</span>)
|
258
|
-
<span class="ruby-identifier">use_stdin</span> = <span class="ruby-keyword">false</span>
|
259
|
-
<span class="ruby-identifier">args</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp">/\$\{?file\}?/</span>, <span class="ruby-constant">Env</span>.<span class="ruby-identifier">env</span>[<span class="ruby-value">:filepath</span>])
|
260
|
-
<span class="ruby-keyword">else</span>
|
261
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-string">"No input"</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">stdin</span>
|
262
|
-
|
263
|
-
<span class="ruby-keyword">end</span>
|
264
|
-
|
265
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">use_stdin</span>
|
266
|
-
<span class="ruby-node">`echo #{Shellwords.escape(stdin)} | #{Env} #{@path} #{@args}`</span>
|
267
|
-
<span class="ruby-keyword">else</span>
|
268
|
-
<span class="ruby-node">`#{Env} #{@path} #{@args}`</span>
|
269
|
-
<span class="ruby-keyword">end</span>
|
270
|
-
<span class="ruby-keyword">end</span></pre>
|
271
|
-
</div>
|
272
|
-
</div>
|
273
|
-
|
274
|
-
|
275
|
-
</div>
|
276
|
-
|
277
|
-
</section>
|
278
|
-
|
279
|
-
</section>
|
280
|
-
</main>
|
281
|
-
|
282
|
-
|
283
|
-
<footer id="validator-badges" role="contentinfo">
|
284
|
-
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
285
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.7.0.
|
286
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
287
|
-
</footer>
|
288
|
-
|