dtf 0.3.5 → 0.3.6
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/README.md +4 -0
- data/doc/AnalysisCase.html +1 -1
- data/doc/CaseTest.html +1 -1
- data/doc/Dtf.html +5 -3
- data/doc/Dtf/Command.html +30 -546
- data/doc/Dtf/Command/CreateUser.html +320 -0
- data/doc/Dtf/Command/CreateVs.html +311 -0
- data/doc/Dtf/Command/DeleteUser.html +354 -0
- data/doc/Dtf/Command/DeleteVs.html +296 -0
- data/doc/Dtf/Command/SetupDtf.html +293 -0
- data/doc/Dtf/ErrorSystem.html +15 -19
- data/doc/Dtf/OptionsParser.html +73 -65
- data/doc/User.html +1 -1
- data/doc/VerificationSuite.html +1 -1
- data/doc/_index.html +48 -2
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +5 -1
- data/doc/index.html +5 -1
- data/doc/method_list.html +61 -13
- data/doc/top-level-namespace.html +1 -1
- data/lib/dtf.rb +4 -3
- data/lib/dtf/version.rb +1 -1
- metadata +6 -1
@@ -0,0 +1,354 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Dtf::Command::DeleteUser
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.2.1
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../../';
|
20
|
+
framesUrl = "../../frames.html#!" + escape(window.location.href);
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../../_index.html">Index (D)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../../Dtf.html" title="Dtf (module)">Dtf</a></span></span> » <span class='title'><span class='object_link'><a href="../Command.html" title="Dtf::Command (module)">Command</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">DeleteUser</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Dtf::Command::DeleteUser
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Dtf::Command::DeleteUser</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/dtf.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>This sub-command removes a User from the Testing Framework system</p>
|
106
|
+
|
107
|
+
<p>Required Parameters are:</p>
|
108
|
+
|
109
|
+
<pre class="code ruby"><code>--user-name [String]</code></pre>
|
110
|
+
|
111
|
+
<p>'--user-name' is the assigned user_name of the User you wish to delete.</p>
|
112
|
+
|
113
|
+
<p>Optional Flags are:</p>
|
114
|
+
|
115
|
+
<pre class="code ruby"><code><span class='op'>-</span><span class='op'>-</span><span class='id identifier rubyid_delete'>delete</span><span class='op'>-</span><span class='id identifier rubyid_all'>all</span><span class='op'>|</span><span class='op'>-</span><span class='op'>-</span><span class='id identifier rubyid_no'>no</span><span class='op'>-</span><span class='id identifier rubyid_delete'>delete</span><span class='op'>-</span><span class='id identifier rubyid_all'>all</span></code></pre>
|
116
|
+
|
117
|
+
<p>By default this command will delete <b>all</b> Verification Suites owned by
|
118
|
+
the deleted user. The default behaviour is as if the sub-command had been
|
119
|
+
invoked passing the '--delete-all' flag explicitly.</p>
|
120
|
+
|
121
|
+
<p>To delete the user, but <b>keep</b> their VS, pass the '--no-delete-all'
|
122
|
+
flag. This flag will find all Verification Suites owned by the user being
|
123
|
+
deleted, and reassign them to 'Library Owner' (user_name: library_owner)
|
124
|
+
which is the generic in-house User shipped with DTF.</p>
|
125
|
+
|
126
|
+
|
127
|
+
</div>
|
128
|
+
</div>
|
129
|
+
<div class="tags">
|
130
|
+
|
131
|
+
|
132
|
+
</div>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
<h2>
|
141
|
+
Instance Method Summary
|
142
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
143
|
+
</h2>
|
144
|
+
|
145
|
+
<ul class="summary">
|
146
|
+
|
147
|
+
<li class="public ">
|
148
|
+
<span class="summary_signature">
|
149
|
+
|
150
|
+
<a href="#execute-instance_method" title="#execute (instance method)">- (Object) <strong>execute</strong> </a>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
</span>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
165
|
+
|
166
|
+
</li>
|
167
|
+
|
168
|
+
|
169
|
+
<li class="public ">
|
170
|
+
<span class="summary_signature">
|
171
|
+
|
172
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (DeleteUser) <strong>initialize</strong>(cmd_name, options) </a>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
</span>
|
177
|
+
|
178
|
+
|
179
|
+
<span class="note title constructor">constructor</span>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
<span class="summary_desc"><div class='inline'>
|
189
|
+
<p>A new instance of DeleteUser.</p>
|
190
|
+
</div></span>
|
191
|
+
|
192
|
+
</li>
|
193
|
+
|
194
|
+
|
195
|
+
</ul>
|
196
|
+
|
197
|
+
|
198
|
+
<div id="constructor_details" class="method_details_list">
|
199
|
+
<h2>Constructor Details</h2>
|
200
|
+
|
201
|
+
<div class="method_details first">
|
202
|
+
<h3 class="signature first" id="initialize-instance_method">
|
203
|
+
|
204
|
+
- (<tt><span class='object_link'><a href="" title="Dtf::Command::DeleteUser (class)">DeleteUser</a></span></tt>) <strong>initialize</strong>(cmd_name, options)
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
</h3><div class="docstring">
|
211
|
+
<div class="discussion">
|
212
|
+
|
213
|
+
<p>A new instance of DeleteUser</p>
|
214
|
+
|
215
|
+
|
216
|
+
</div>
|
217
|
+
</div>
|
218
|
+
<div class="tags">
|
219
|
+
|
220
|
+
|
221
|
+
</div><table class="source_code">
|
222
|
+
<tr>
|
223
|
+
<td>
|
224
|
+
<pre class="lines">
|
225
|
+
|
226
|
+
|
227
|
+
130
|
228
|
+
131
|
229
|
+
132
|
230
|
+
133</pre>
|
231
|
+
</td>
|
232
|
+
<td>
|
233
|
+
<pre class="code"><span class="info file"># File 'lib/dtf.rb', line 130</span>
|
234
|
+
|
235
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_cmd_name'>cmd_name</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
236
|
+
<span class='ivar'>@cmd_name</span> <span class='op'>=</span> <span class='id identifier rubyid_cmd_name'>cmd_name</span>
|
237
|
+
<span class='ivar'>@cmd_opts</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span>
|
238
|
+
<span class='kw'>end</span></pre>
|
239
|
+
</td>
|
240
|
+
</tr>
|
241
|
+
</table>
|
242
|
+
</div>
|
243
|
+
|
244
|
+
</div>
|
245
|
+
|
246
|
+
|
247
|
+
<div id="instance_method_details" class="method_details_list">
|
248
|
+
<h2>Instance Method Details</h2>
|
249
|
+
|
250
|
+
|
251
|
+
<div class="method_details first">
|
252
|
+
<h3 class="signature first" id="execute-instance_method">
|
253
|
+
|
254
|
+
- (<tt>Object</tt>) <strong>execute</strong>
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
</h3><table class="source_code">
|
261
|
+
<tr>
|
262
|
+
<td>
|
263
|
+
<pre class="lines">
|
264
|
+
|
265
|
+
|
266
|
+
135
|
267
|
+
136
|
268
|
+
137
|
269
|
+
138
|
270
|
+
139
|
271
|
+
140
|
272
|
+
141
|
273
|
+
142
|
274
|
+
143
|
275
|
+
144
|
276
|
+
145
|
277
|
+
146
|
278
|
+
147
|
279
|
+
148
|
280
|
+
149
|
281
|
+
150
|
282
|
+
151
|
283
|
+
152
|
284
|
+
153
|
285
|
+
154
|
286
|
+
155
|
287
|
+
156
|
288
|
+
157
|
289
|
+
158
|
290
|
+
159
|
291
|
+
160
|
292
|
+
161
|
293
|
+
162
|
294
|
+
163
|
295
|
+
164
|
296
|
+
165
|
297
|
+
166
|
298
|
+
167
|
299
|
+
168</pre>
|
300
|
+
</td>
|
301
|
+
<td>
|
302
|
+
<pre class="code"><span class="info file"># File 'lib/dtf.rb', line 135</span>
|
303
|
+
|
304
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_execute'>execute</span>
|
305
|
+
<span class='kw'>if</span> <span class='lbracket'>[</span><span class='symbol'>:user_name_given</span><span class='comma'>,</span> <span class='symbol'>:delete_all</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_sym'>sym</span><span class='op'>|</span> <span class='ivar'>@cmd_opts</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_sym'>sym</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>then</span>
|
306
|
+
<span class='comment'># NOTE: :delete_all is 'true' by default. passing '--no-delete-all' sets it to false,
|
307
|
+
</span> <span class='comment'># and adds the :delete_all_given key to the cmd_opts hash, set to true.
|
308
|
+
</span> <span class='comment'># This means NOT to delete all VSs associated with this user. We delete them by default.
|
309
|
+
</span> <span class='kw'>if</span> <span class='ivar'>@cmd_opts</span><span class='lbracket'>[</span><span class='symbol'>:delete_all</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='kw'>false</span> <span class='op'>&&</span> <span class='ivar'>@cmd_opts</span><span class='lbracket'>[</span><span class='symbol'>:delete_all_given</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='kw'>true</span>
|
310
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Called with '--no-delete-all' set! NOT deleting all owned VSs!</span><span class='tstring_end'>"</span></span>
|
311
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Reassigning VSs to Library. New owner will be \'Library Owner\'</span><span class='tstring_end'>"</span></span>
|
312
|
+
<span class='id identifier rubyid_user'>user</span> <span class='op'>=</span> <span class='const'>User</span><span class='period'>.</span><span class='id identifier rubyid_find_by_user_name'>find_by_user_name</span><span class='lparen'>(</span><span class='ivar'>@cmd_opts</span><span class='lbracket'>[</span><span class='symbol'>:user_name</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
313
|
+
<span class='id identifier rubyid_lib_owner'>lib_owner</span> <span class='op'>=</span> <span class='const'>User</span><span class='period'>.</span><span class='id identifier rubyid_find_by_user_name'>find_by_user_name</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>library_owner</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
314
|
+
<span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_verification_suites'>verification_suites</span><span class='period'>.</span><span class='id identifier rubyid_all'>all</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_vs'>vs</span><span class='op'>|</span>
|
315
|
+
<span class='id identifier rubyid_vs'>vs</span><span class='period'>.</span><span class='id identifier rubyid_user_id'>user_id</span> <span class='op'>=</span> <span class='id identifier rubyid_lib_owner'>lib_owner</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span>
|
316
|
+
<span class='id identifier rubyid_vs'>vs</span><span class='period'>.</span><span class='id identifier rubyid_save'>save</span>
|
317
|
+
<span class='kw'>end</span>
|
318
|
+
<span class='const'>User</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span>
|
319
|
+
<span class='kw'>else</span>
|
320
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Called with '--delete-all' set or on by default! Deleting all VSs owned by </span><span class='embexpr_beg'>#{</span><span class='ivar'>@cmd_opts</span><span class='lbracket'>[</span><span class='symbol'>:user_name</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
321
|
+
<span class='id identifier rubyid_user'>user</span> <span class='op'>=</span> <span class='const'>User</span><span class='period'>.</span><span class='id identifier rubyid_find_by_user_name'>find_by_user_name</span><span class='lparen'>(</span><span class='ivar'>@cmd_opts</span><span class='lbracket'>[</span><span class='symbol'>:user_name</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
322
|
+
<span class='kw'>if</span> <span class='op'>!</span> <span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>then</span>
|
323
|
+
<span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_verification_suites'>verification_suites</span><span class='period'>.</span><span class='id identifier rubyid_all'>all</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_vs'>vs</span><span class='op'>|</span>
|
324
|
+
<span class='const'>VerificationSuite</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_vs'>vs</span><span class='rparen'>)</span>
|
325
|
+
<span class='kw'>end</span>
|
326
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_verification_suites'>verification_suites</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='kw'>then</span>
|
327
|
+
<span class='const'>User</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span>
|
328
|
+
<span class='kw'>end</span>
|
329
|
+
<span class='kw'>else</span>
|
330
|
+
<span class='gvar'>$stderr</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ERROR: No user named \'</span><span class='embexpr_beg'>#{</span><span class='ivar'>@cmd_opts</span><span class='lbracket'>[</span><span class='symbol'>:user_name</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbrace'>}</span><span class='tstring_content'>\' found!</span><span class='tstring_end'>"</span></span>
|
331
|
+
<span class='id identifier rubyid_abort'>abort</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
332
|
+
<span class='kw'>end</span>
|
333
|
+
<span class='kw'>end</span>
|
334
|
+
<span class='kw'>else</span>
|
335
|
+
<span class='const'>Dtf</span><span class='op'>::</span><span class='const'>ErrorSystem</span><span class='period'>.</span><span class='id identifier rubyid_raise_error'>raise_error</span><span class='lparen'>(</span><span class='ivar'>@cmd_name</span><span class='rparen'>)</span>
|
336
|
+
<span class='kw'>end</span>
|
337
|
+
<span class='kw'>end</span></pre>
|
338
|
+
</td>
|
339
|
+
</tr>
|
340
|
+
</table>
|
341
|
+
</div>
|
342
|
+
|
343
|
+
</div>
|
344
|
+
|
345
|
+
</div>
|
346
|
+
|
347
|
+
<div id="footer">
|
348
|
+
Generated on Mon Oct 1 20:33:52 2012 by
|
349
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
350
|
+
0.8.2.1 (ruby-1.9.3).
|
351
|
+
</div>
|
352
|
+
|
353
|
+
</body>
|
354
|
+
</html>
|
@@ -0,0 +1,296 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Dtf::Command::DeleteVs
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.2.1
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../../';
|
20
|
+
framesUrl = "../../frames.html#!" + escape(window.location.href);
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../../_index.html">Index (D)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../../Dtf.html" title="Dtf (module)">Dtf</a></span></span> » <span class='title'><span class='object_link'><a href="../Command.html" title="Dtf::Command (module)">Command</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">DeleteVs</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Dtf::Command::DeleteVs
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Dtf::Command::DeleteVs</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/dtf.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>This sub-command removes a Verification Suite from the Testing Framework
|
106
|
+
system</p>
|
107
|
+
|
108
|
+
<p>Required Parameters are:</p>
|
109
|
+
|
110
|
+
<pre class="code ruby"><code>--user-name [String], --id [Integer]</code></pre>
|
111
|
+
|
112
|
+
<p>The '--user-name' parameter is the user_name of the User that owns the
|
113
|
+
Verification Suite you wish to delete The '--id' parameter is the ID # of
|
114
|
+
the Verification Suite you wish to delete, as provided by @vs.id</p>
|
115
|
+
|
116
|
+
|
117
|
+
</div>
|
118
|
+
</div>
|
119
|
+
<div class="tags">
|
120
|
+
|
121
|
+
|
122
|
+
</div>
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
<h2>
|
131
|
+
Instance Method Summary
|
132
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
133
|
+
</h2>
|
134
|
+
|
135
|
+
<ul class="summary">
|
136
|
+
|
137
|
+
<li class="public ">
|
138
|
+
<span class="summary_signature">
|
139
|
+
|
140
|
+
<a href="#execute-instance_method" title="#execute (instance method)">- (Object) <strong>execute</strong> </a>
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
</span>
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
155
|
+
|
156
|
+
</li>
|
157
|
+
|
158
|
+
|
159
|
+
<li class="public ">
|
160
|
+
<span class="summary_signature">
|
161
|
+
|
162
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (DeleteVs) <strong>initialize</strong>(cmd_name, options) </a>
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
</span>
|
167
|
+
|
168
|
+
|
169
|
+
<span class="note title constructor">constructor</span>
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
<span class="summary_desc"><div class='inline'>
|
179
|
+
<p>A new instance of DeleteVs.</p>
|
180
|
+
</div></span>
|
181
|
+
|
182
|
+
</li>
|
183
|
+
|
184
|
+
|
185
|
+
</ul>
|
186
|
+
|
187
|
+
|
188
|
+
<div id="constructor_details" class="method_details_list">
|
189
|
+
<h2>Constructor Details</h2>
|
190
|
+
|
191
|
+
<div class="method_details first">
|
192
|
+
<h3 class="signature first" id="initialize-instance_method">
|
193
|
+
|
194
|
+
- (<tt><span class='object_link'><a href="" title="Dtf::Command::DeleteVs (class)">DeleteVs</a></span></tt>) <strong>initialize</strong>(cmd_name, options)
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
</h3><div class="docstring">
|
201
|
+
<div class="discussion">
|
202
|
+
|
203
|
+
<p>A new instance of DeleteVs</p>
|
204
|
+
|
205
|
+
|
206
|
+
</div>
|
207
|
+
</div>
|
208
|
+
<div class="tags">
|
209
|
+
|
210
|
+
|
211
|
+
</div><table class="source_code">
|
212
|
+
<tr>
|
213
|
+
<td>
|
214
|
+
<pre class="lines">
|
215
|
+
|
216
|
+
|
217
|
+
179
|
218
|
+
180
|
219
|
+
181
|
220
|
+
182</pre>
|
221
|
+
</td>
|
222
|
+
<td>
|
223
|
+
<pre class="code"><span class="info file"># File 'lib/dtf.rb', line 179</span>
|
224
|
+
|
225
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_cmd_name'>cmd_name</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
226
|
+
<span class='ivar'>@cmd_name</span> <span class='op'>=</span> <span class='id identifier rubyid_cmd_name'>cmd_name</span>
|
227
|
+
<span class='ivar'>@cmd_opts</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span>
|
228
|
+
<span class='kw'>end</span></pre>
|
229
|
+
</td>
|
230
|
+
</tr>
|
231
|
+
</table>
|
232
|
+
</div>
|
233
|
+
|
234
|
+
</div>
|
235
|
+
|
236
|
+
|
237
|
+
<div id="instance_method_details" class="method_details_list">
|
238
|
+
<h2>Instance Method Details</h2>
|
239
|
+
|
240
|
+
|
241
|
+
<div class="method_details first">
|
242
|
+
<h3 class="signature first" id="execute-instance_method">
|
243
|
+
|
244
|
+
- (<tt>Object</tt>) <strong>execute</strong>
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
</h3><table class="source_code">
|
251
|
+
<tr>
|
252
|
+
<td>
|
253
|
+
<pre class="lines">
|
254
|
+
|
255
|
+
|
256
|
+
184
|
257
|
+
185
|
258
|
+
186
|
259
|
+
187
|
260
|
+
188
|
261
|
+
189
|
262
|
+
190
|
263
|
+
191
|
264
|
+
192
|
265
|
+
193</pre>
|
266
|
+
</td>
|
267
|
+
<td>
|
268
|
+
<pre class="code"><span class="info file"># File 'lib/dtf.rb', line 184</span>
|
269
|
+
|
270
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_execute'>execute</span>
|
271
|
+
<span class='kw'>if</span> <span class='lbracket'>[</span><span class='symbol'>:user_name_given</span><span class='comma'>,</span> <span class='symbol'>:id_given</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_sym'>sym</span><span class='op'>|</span> <span class='ivar'>@cmd_opts</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_sym'>sym</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>then</span>
|
272
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Deleting </span><span class='embexpr_beg'>#{</span><span class='ivar'>@cmd_opts</span><span class='lbracket'>[</span><span class='symbol'>:user_name</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'>\'s VS with ID \'</span><span class='embexpr_beg'>#{</span><span class='ivar'>@cmd_opts</span><span class='lbracket'>[</span><span class='symbol'>:id</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'>\'</span><span class='tstring_end'>"</span></span>
|
273
|
+
<span class='id identifier rubyid_user'>user</span> <span class='op'>=</span> <span class='const'>User</span><span class='period'>.</span><span class='id identifier rubyid_find_by_user_name'>find_by_user_name</span><span class='lparen'>(</span><span class='ivar'>@cmd_opts</span><span class='lbracket'>[</span><span class='symbol'>:user_name</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
274
|
+
<span class='id identifier rubyid_vs'>vs</span> <span class='op'>=</span> <span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_verification_suites'>verification_suites</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='ivar'>@cmd_opts</span><span class='lbracket'>[</span><span class='symbol'>:id</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
275
|
+
<span class='const'>VerificationSuite</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_vs'>vs</span><span class='rparen'>)</span>
|
276
|
+
<span class='kw'>else</span>
|
277
|
+
<span class='const'>Dtf</span><span class='op'>::</span><span class='const'>ErrorSystem</span><span class='period'>.</span><span class='id identifier rubyid_raise_error'>raise_error</span><span class='lparen'>(</span><span class='ivar'>@cmd_name</span><span class='rparen'>)</span>
|
278
|
+
<span class='kw'>end</span>
|
279
|
+
<span class='kw'>end</span></pre>
|
280
|
+
</td>
|
281
|
+
</tr>
|
282
|
+
</table>
|
283
|
+
</div>
|
284
|
+
|
285
|
+
</div>
|
286
|
+
|
287
|
+
</div>
|
288
|
+
|
289
|
+
<div id="footer">
|
290
|
+
Generated on Mon Oct 1 20:33:52 2012 by
|
291
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
292
|
+
0.8.2.1 (ruby-1.9.3).
|
293
|
+
</div>
|
294
|
+
|
295
|
+
</body>
|
296
|
+
</html>
|