imp 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,359 @@
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
+ Module: Imp::Util
8
+
9
+ &mdash; Documentation by YARD 0.8.7.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" 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 (U)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Imp.html" title="Imp (module)">Imp</a></span></span>
36
+ &raquo;
37
+ <span class="title">Util</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>Module: Imp::Util
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/imp/util.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+ <h2>Overview</h2><div class="docstring">
88
+ <div class="discussion">
89
+
90
+ <p>Contains misc. utility methods.</p>
91
+
92
+
93
+ </div>
94
+ </div>
95
+ <div class="tags">
96
+
97
+
98
+ </div>
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+ <h2>
107
+ Class Method Summary
108
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
109
+ </h2>
110
+
111
+ <ul class="summary">
112
+
113
+ <li class="public ">
114
+ <span class="summary_signature">
115
+
116
+ <a href="#mkdirs-class_method" title="mkdirs (class method)">+ (Object) <strong>mkdirs</strong>(dir) </a>
117
+
118
+
119
+
120
+ </span>
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+ <span class="summary_desc"><div class='inline'>
131
+ <p>Creates as many directories as needed.</p>
132
+ </div></span>
133
+
134
+ </li>
135
+
136
+
137
+ <li class="public ">
138
+ <span class="summary_signature">
139
+
140
+ <a href="#read_passwd-class_method" title="read_passwd (class method)">+ (String<sup>?</sup>) <strong>read_passwd</strong>(desc = &#39;password&#39;) </a>
141
+
142
+
143
+
144
+ </span>
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+ <span class="summary_desc"><div class='inline'>
155
+ <p>Reads a password from the user.</p>
156
+ </div></span>
157
+
158
+ </li>
159
+
160
+
161
+ </ul>
162
+
163
+
164
+
165
+
166
+ <div id="class_method_details" class="method_details_list">
167
+ <h2>Class Method Details</h2>
168
+
169
+
170
+ <div class="method_details first">
171
+ <h3 class="signature first" id="mkdirs-class_method">
172
+
173
+ + (<tt>Object</tt>) <strong>mkdirs</strong>(dir)
174
+
175
+
176
+
177
+
178
+
179
+ </h3><div class="docstring">
180
+ <div class="discussion">
181
+
182
+ <p>Creates as many directories as needed.</p>
183
+
184
+
185
+ </div>
186
+ </div>
187
+ <div class="tags">
188
+ <p class="tag_title">Parameters:</p>
189
+ <ul class="param">
190
+
191
+ <li>
192
+
193
+ <span class='name'>dir</span>
194
+
195
+
196
+ <span class='type'>(<tt>String</tt>)</span>
197
+
198
+
199
+
200
+ &mdash;
201
+ <div class='inline'>
202
+ <p>The directory to create.</p>
203
+ </div>
204
+
205
+ </li>
206
+
207
+ </ul>
208
+
209
+
210
+ </div><table class="source_code">
211
+ <tr>
212
+ <td>
213
+ <pre class="lines">
214
+
215
+
216
+ 10
217
+ 11
218
+ 12
219
+ 13
220
+ 14
221
+ 15</pre>
222
+ </td>
223
+ <td>
224
+ <pre class="code"><span class="info file"># File 'lib/imp/util.rb', line 10</span>
225
+
226
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_mkdirs'>mkdirs</span><span class='lparen'>(</span><span class='id identifier rubyid_dir'>dir</span><span class='rparen'>)</span>
227
+ <span class='kw'>return</span> <span class='kw'>if</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span> <span class='id identifier rubyid_dir'>dir</span>
228
+ <span class='id identifier rubyid_parent'>parent</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='id identifier rubyid_dir'>dir</span><span class='rparen'>)</span>
229
+ <span class='id identifier rubyid_mkdirs'>mkdirs</span><span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</span><span class='rparen'>)</span>
230
+ <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_mkdir'>mkdir</span><span class='lparen'>(</span><span class='id identifier rubyid_dir'>dir</span><span class='rparen'>)</span>
231
+ <span class='kw'>end</span></pre>
232
+ </td>
233
+ </tr>
234
+ </table>
235
+ </div>
236
+
237
+ <div class="method_details ">
238
+ <h3 class="signature " id="read_passwd-class_method">
239
+
240
+ + (<tt>String</tt><sup>?</sup>) <strong>read_passwd</strong>(desc = &#39;password&#39;)
241
+
242
+
243
+
244
+
245
+
246
+ </h3><div class="docstring">
247
+ <div class="discussion">
248
+
249
+ <p>Reads a password from the user.</p>
250
+
251
+
252
+ </div>
253
+ </div>
254
+ <div class="tags">
255
+ <p class="tag_title">Parameters:</p>
256
+ <ul class="param">
257
+
258
+ <li>
259
+
260
+ <span class='name'>desc</span>
261
+
262
+
263
+ <span class='type'>(<tt>String</tt>)</span>
264
+
265
+
266
+ <em class="default">(defaults to: <tt>&#39;password&#39;</tt>)</em>
267
+
268
+
269
+ &mdash;
270
+ <div class='inline'>
271
+ <p>The description of the password inserted into query texts.</p>
272
+ </div>
273
+
274
+ </li>
275
+
276
+ </ul>
277
+
278
+ <p class="tag_title">Returns:</p>
279
+ <ul class="return">
280
+
281
+ <li>
282
+
283
+
284
+ <span class='type'>(<tt>String</tt>, <tt>nil</tt>)</span>
285
+
286
+
287
+
288
+ &mdash;
289
+ <div class='inline'>
290
+ <p>The password enetered, or nil if aborted.</p>
291
+ </div>
292
+
293
+ </li>
294
+
295
+ </ul>
296
+
297
+ </div><table class="source_code">
298
+ <tr>
299
+ <td>
300
+ <pre class="lines">
301
+
302
+
303
+ 22
304
+ 23
305
+ 24
306
+ 25
307
+ 26
308
+ 27
309
+ 28
310
+ 29
311
+ 30
312
+ 31
313
+ 32
314
+ 33
315
+ 34
316
+ 35
317
+ 36
318
+ 37
319
+ 38
320
+ 39</pre>
321
+ </td>
322
+ <td>
323
+ <pre class="code"><span class="info file"># File 'lib/imp/util.rb', line 22</span>
324
+
325
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_read_passwd'>read_passwd</span><span class='lparen'>(</span><span class='id identifier rubyid_desc'>desc</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>password</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
326
+ <span class='id identifier rubyid_first_pass'>first_pass</span> <span class='op'>=</span> <span class='kw'>true</span>
327
+ <span class='id identifier rubyid_pass1'>pass1</span> <span class='op'>=</span> <span class='id identifier rubyid_pass2'>pass2</span> <span class='op'>=</span> <span class='kw'>nil</span>
328
+ <span class='kw'>until</span> <span class='id identifier rubyid_pass1'>pass1</span> <span class='op'>==</span> <span class='id identifier rubyid_pass2'>pass2</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_first_pass'>first_pass</span>
329
+ <span class='kw'>unless</span> <span class='id identifier rubyid_first_pass'>first_pass</span>
330
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>The pass did not match. Please try again.</span><span class='tstring_end'>&quot;</span></span>
331
+ <span class='kw'>end</span>
332
+ <span class='id identifier rubyid_pass1'>pass1</span> <span class='op'>=</span> <span class='id identifier rubyid_ask'>ask</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Please enter the </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_desc'>desc</span><span class='embexpr_end'>}</span><span class='tstring_content'> (leave blank to cancel): </span><span class='tstring_end'>&quot;</span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_q'>q</span><span class='op'>|</span>
333
+ <span class='id identifier rubyid_q'>q</span><span class='period'>.</span><span class='id identifier rubyid_echo'>echo</span> <span class='op'>=</span> <span class='kw'>false</span>
334
+ <span class='kw'>end</span>
335
+ <span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_pass1'>pass1</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
336
+ <span class='id identifier rubyid_pass2'>pass2</span> <span class='op'>=</span> <span class='id identifier rubyid_ask'>ask</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Re-enter the </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_desc'>desc</span><span class='embexpr_end'>}</span><span class='tstring_content'> to confirm: </span><span class='tstring_end'>&quot;</span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_q'>q</span><span class='op'>|</span>
337
+ <span class='id identifier rubyid_q'>q</span><span class='period'>.</span><span class='id identifier rubyid_echo'>echo</span> <span class='op'>=</span> <span class='kw'>false</span>
338
+ <span class='kw'>end</span>
339
+ <span class='id identifier rubyid_first_pass'>first_pass</span> <span class='op'>=</span> <span class='kw'>false</span>
340
+ <span class='kw'>end</span>
341
+ <span class='kw'>return</span> <span class='id identifier rubyid_pass1'>pass1</span>
342
+ <span class='kw'>end</span></pre>
343
+ </td>
344
+ </tr>
345
+ </table>
346
+ </div>
347
+
348
+ </div>
349
+
350
+ </div>
351
+
352
+ <div id="footer">
353
+ Generated on Sun Nov 10 00:39:21 2013 by
354
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
355
+ 0.8.7.3 (ruby-2.0.0).
356
+ </div>
357
+
358
+ </body>
359
+ </html>
@@ -0,0 +1,153 @@
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
+ Module: PasswdManage
8
+
9
+ &mdash; Documentation by YARD 0.8.7.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" 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 (P)</a> &raquo;
35
+
36
+
37
+ <span class="title">PasswdManage</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>Module: PasswdManage
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/passwd_manage/ui.rb<span class="defines">,<br />
83
+ lib/passwd_manage/util.rb,<br /> lib/passwd_manage/tree.rb,<br /> lib/passwd_manage/crypto.rb</span>
84
+ </dd>
85
+
86
+ </dl>
87
+ <div class="clear"></div>
88
+
89
+ <h2>Overview</h2><div class="docstring">
90
+ <div class="discussion">
91
+
92
+ <p>A small and simple password manager.</p>
93
+
94
+
95
+ </div>
96
+ </div>
97
+ <div class="tags">
98
+
99
+
100
+ </div><h2>Defined Under Namespace</h2>
101
+ <p class="children">
102
+
103
+
104
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="PasswdManage/Commands.html" title="PasswdManage::Commands (module)">Commands</a></span>, <span class='object_link'><a href="PasswdManage/Crypto.html" title="PasswdManage::Crypto (module)">Crypto</a></span>, <span class='object_link'><a href="PasswdManage/UI.html" title="PasswdManage::UI (module)">UI</a></span>, <span class='object_link'><a href="PasswdManage/Util.html" title="PasswdManage::Util (module)">Util</a></span>
105
+
106
+
107
+
108
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="PasswdManage/EncryptedFile.html" title="PasswdManage::EncryptedFile (class)">EncryptedFile</a></span>, <span class='object_link'><a href="PasswdManage/EncryptedTree.html" title="PasswdManage::EncryptedTree (class)">EncryptedTree</a></span>, <span class='object_link'><a href="PasswdManage/Tree.html" title="PasswdManage::Tree (class)">Tree</a></span>
109
+
110
+
111
+ </p>
112
+
113
+ <h2>Constant Summary</h2>
114
+
115
+ <dl class="constants">
116
+
117
+ <dt id="VERSION-constant" class="">VERSION =
118
+ <div class="docstring">
119
+ <div class="discussion">
120
+
121
+ <p>The current version.</p>
122
+
123
+
124
+ </div>
125
+ </div>
126
+ <div class="tags">
127
+
128
+
129
+ </div>
130
+ </dt>
131
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.1.0</span><span class='tstring_end'>&quot;</span></span></pre></dd>
132
+
133
+ </dl>
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+ </div>
145
+
146
+ <div id="footer">
147
+ Generated on Sat Nov 9 18:07:45 2013 by
148
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
149
+ 0.8.7.3 (ruby-2.0.0).
150
+ </div>
151
+
152
+ </body>
153
+ </html>