netlinx-src 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,128 @@
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: NetLinx::SRC
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
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#!NetLinx/SRC.html";
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 (S)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../NetLinx.html" title="NetLinx (module)">NetLinx</a></span></span>
36
+ &raquo;
37
+ <span class="title">SRC</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: NetLinx::SRC
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/netlinx/src.rb<span class="defines">,<br />
83
+ lib/netlinx/src/package.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>Pertaining to .src files.</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
+
105
+
106
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="SRC/Package.html" title="NetLinx::SRC::Package (class)">Package</a></span>
107
+
108
+
109
+ </p>
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+ </div>
120
+
121
+ <div id="footer">
122
+ Generated on Mon May 12 11:49:57 2014 by
123
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
124
+ 0.8.7.4 (ruby-2.0.0).
125
+ </div>
126
+
127
+ </body>
128
+ </html>
@@ -0,0 +1,879 @@
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: NetLinx::SRC::Package
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
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#!NetLinx/SRC/Package.html";
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
+ <span class='title'><span class='object_link'><a href="../../NetLinx.html" title="NetLinx (module)">NetLinx</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../SRC.html" title="NetLinx::SRC (module)">SRC</a></span></span>
36
+ &raquo;
37
+ <span class="title">Package</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: NetLinx::SRC::Package
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">NetLinx::SRC::Package</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/netlinx/src/package.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>A NetLinx .src source code package.</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div>
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+ <h2>
122
+ Instance Method Summary
123
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
124
+ </h2>
125
+
126
+ <ul class="summary">
127
+
128
+ <li class="public ">
129
+ <span class="summary_signature">
130
+
131
+ <a href="#copy_to_zip-instance_method" title="#copy_to_zip (instance method)">- (Object) <strong>copy_to_zip</strong> </a>
132
+
133
+
134
+
135
+ </span>
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <span class="summary_desc"><div class='inline'>
146
+ <p>Copy the NetLinx .src file to .zip for easy browsing without unpacking.</p>
147
+ </div></span>
148
+
149
+ </li>
150
+
151
+
152
+ <li class="public ">
153
+ <span class="summary_signature">
154
+
155
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Package) <strong>initialize</strong>(**kvargs) </a>
156
+
157
+
158
+
159
+ </span>
160
+
161
+
162
+ <span class="note title constructor">constructor</span>
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ <span class="summary_desc"><div class='inline'>
172
+ <p>Parameters:.</p>
173
+ </div></span>
174
+
175
+ </li>
176
+
177
+
178
+ <li class="public ">
179
+ <span class="summary_signature">
180
+
181
+ <a href="#load_exclusions-instance_method" title="#load_exclusions (instance method)">- (Object) <strong>load_exclusions</strong> </a>
182
+
183
+
184
+
185
+ </span>
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+ <span class="summary_desc"><div class='inline'>
196
+ <p>Load a list of file exclusions (glob format) from .srcignore.</p>
197
+ </div></span>
198
+
199
+ </li>
200
+
201
+
202
+ <li class="public ">
203
+ <span class="summary_signature">
204
+
205
+ <a href="#make_srcignore-instance_method" title="#make_srcignore (instance method)">- (Object) <strong>make_srcignore</strong> </a>
206
+
207
+
208
+
209
+ </span>
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+ <span class="summary_desc"><div class='inline'>
220
+ <p>Create a standard .srcignore file in the current directory.</p>
221
+ </div></span>
222
+
223
+ </li>
224
+
225
+
226
+ <li class="public ">
227
+ <span class="summary_signature">
228
+
229
+ <a href="#make_warning_file-instance_method" title="#make_warning_file (instance method)">- (Object) <strong>make_warning_file</strong> </a>
230
+
231
+
232
+
233
+ </span>
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+ <span class="summary_desc"><div class='inline'>
244
+ <p>Returns a string for the unpack warning file.</p>
245
+ </div></span>
246
+
247
+ </li>
248
+
249
+
250
+ <li class="public ">
251
+ <span class="summary_signature">
252
+
253
+ <a href="#pack-instance_method" title="#pack (instance method)">- (Object) <strong>pack</strong> </a>
254
+
255
+
256
+
257
+ </span>
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+ <span class="summary_desc"><div class='inline'>
268
+ <p>Pack the project into a NetLinx .src package.</p>
269
+ </div></span>
270
+
271
+ </li>
272
+
273
+
274
+ <li class="public ">
275
+ <span class="summary_signature">
276
+
277
+ <a href="#remove_zip-instance_method" title="#remove_zip (instance method)">- (Object) <strong>remove_zip</strong> </a>
278
+
279
+
280
+
281
+ </span>
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+ <span class="summary_desc"><div class='inline'>
292
+ <p>Remove the .zip version of this NetLinx .src file if it exists.</p>
293
+ </div></span>
294
+
295
+ </li>
296
+
297
+
298
+ <li class="public ">
299
+ <span class="summary_signature">
300
+
301
+ <a href="#unpack-instance_method" title="#unpack (instance method)">- (Object) <strong>unpack</strong>(dir = nil) </a>
302
+
303
+
304
+
305
+ </span>
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+ <span class="summary_desc"><div class='inline'>
316
+ <p>Unpack a NetLinx .src project package.</p>
317
+ </div></span>
318
+
319
+ </li>
320
+
321
+
322
+ </ul>
323
+
324
+
325
+ <div id="constructor_details" class="method_details_list">
326
+ <h2>Constructor Details</h2>
327
+
328
+ <div class="method_details first">
329
+ <h3 class="signature first" id="initialize-instance_method">
330
+
331
+ - (<tt><span class='object_link'><a href="" title="NetLinx::SRC::Package (class)">Package</a></span></tt>) <strong>initialize</strong>(**kvargs)
332
+
333
+
334
+
335
+
336
+
337
+ </h3><div class="docstring">
338
+ <div class="discussion">
339
+
340
+ <p>Parameters:</p>
341
+
342
+ <pre class="code ruby"><code class="ruby">Mode:
343
+ :standard - Intelligently package all files pertaining to a
344
+ NetLinx project.
345
+
346
+ :classic - Emulates the AMX file packager, including only .axs
347
+ and .axi files in the package. Also mimicks the same folder
348
+ structure.</code></pre>
349
+
350
+
351
+ </div>
352
+ </div>
353
+ <div class="tags">
354
+
355
+
356
+ </div><table class="source_code">
357
+ <tr>
358
+ <td>
359
+ <pre class="lines">
360
+
361
+
362
+ 19
363
+ 20
364
+ 21
365
+ 22
366
+ 23
367
+ 24</pre>
368
+ </td>
369
+ <td>
370
+ <pre class="code"><span class="info file"># File 'lib/netlinx/src/package.rb', line 19</span>
371
+
372
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='op'>**</span><span class='id identifier rubyid_kvargs'>kvargs</span>
373
+ <span class='ivar'>@file</span> <span class='op'>=</span> <span class='id identifier rubyid_kvargs'>kvargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span> <span class='symbol'>:file</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
374
+ <span class='ivar'>@mode</span> <span class='op'>=</span> <span class='id identifier rubyid_kvargs'>kvargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span> <span class='symbol'>:mode</span><span class='comma'>,</span> <span class='symbol'>:standard</span>
375
+
376
+ <span class='ivar'>@warning_file</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>_FILE_EXTRACTION_WARNING.txt</span><span class='tstring_end'>&#39;</span></span>
377
+ <span class='kw'>end</span></pre>
378
+ </td>
379
+ </tr>
380
+ </table>
381
+ </div>
382
+
383
+ </div>
384
+
385
+
386
+ <div id="instance_method_details" class="method_details_list">
387
+ <h2>Instance Method Details</h2>
388
+
389
+
390
+ <div class="method_details first">
391
+ <h3 class="signature first" id="copy_to_zip-instance_method">
392
+
393
+ - (<tt>Object</tt>) <strong>copy_to_zip</strong>
394
+
395
+
396
+
397
+
398
+
399
+ </h3><div class="docstring">
400
+ <div class="discussion">
401
+
402
+ <p>Copy the NetLinx .src file to .zip for easy browsing without unpacking.</p>
403
+
404
+
405
+ </div>
406
+ </div>
407
+ <div class="tags">
408
+
409
+
410
+ </div><table class="source_code">
411
+ <tr>
412
+ <td>
413
+ <pre class="lines">
414
+
415
+
416
+ 67
417
+ 68
418
+ 69</pre>
419
+ </td>
420
+ <td>
421
+ <pre class="code"><span class="info file"># File 'lib/netlinx/src/package.rb', line 67</span>
422
+
423
+ <span class='kw'>def</span> <span class='id identifier rubyid_copy_to_zip'>copy_to_zip</span>
424
+ <span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_cp'>cp</span> <span class='ivar'>@file</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@file</span><span class='embexpr_end'>}</span><span class='tstring_content'>.zip</span><span class='tstring_end'>&quot;</span></span>
425
+ <span class='kw'>end</span></pre>
426
+ </td>
427
+ </tr>
428
+ </table>
429
+ </div>
430
+
431
+ <div class="method_details ">
432
+ <h3 class="signature " id="load_exclusions-instance_method">
433
+
434
+ - (<tt>Object</tt>) <strong>load_exclusions</strong>
435
+
436
+
437
+
438
+
439
+
440
+ </h3><div class="docstring">
441
+ <div class="discussion">
442
+
443
+ <p>Load a list of file exclusions (glob format) from .srcignore.</p>
444
+
445
+
446
+ </div>
447
+ </div>
448
+ <div class="tags">
449
+
450
+
451
+ </div><table class="source_code">
452
+ <tr>
453
+ <td>
454
+ <pre class="lines">
455
+
456
+
457
+ 57
458
+ 58
459
+ 59
460
+ 60
461
+ 61
462
+ 62
463
+ 63
464
+ 64</pre>
465
+ </td>
466
+ <td>
467
+ <pre class="code"><span class="info file"># File 'lib/netlinx/src/package.rb', line 57</span>
468
+
469
+ <span class='kw'>def</span> <span class='id identifier rubyid_load_exclusions'>load_exclusions</span>
470
+ <span class='kw'>return</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>.srcignore</span><span class='tstring_end'>&#39;</span></span>
471
+
472
+ <span class='id identifier rubyid_lines'>lines</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>.srcignore</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_lines'>lines</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:strip</span><span class='rparen'>)</span><span class='period'>
473
+ </span><span class='id identifier rubyid_ .reject'> .reject</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_l'>l</span><span class='op'>|</span> <span class='id identifier rubyid_l'>l</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='rbrace'>}</span> <span class='comment'># Remove empty lines.
474
+ </span><span class='period'> .</span><span class='id identifier rubyid_reject'>reject</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_l'>l</span><span class='op'>|</span> <span class='id identifier rubyid_l'>l</span><span class='period'>.</span><span class='id identifier rubyid_start_with?'>start_with?</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>#</span><span class='tstring_end'>&#39;</span></span> <span class='rbrace'>}</span> <span class='comment'># Remove commented lines.
475
+ </span><span class='period'> .</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_l'>l</span><span class='op'>|</span> <span class='id identifier rubyid_l'>l</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_l'>l</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>**/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_l'>l</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span> <span class='comment'># Append **/ if a specific path isn&#39;t referenced.
476
+ </span><span class='kw'>end</span></pre>
477
+ </td>
478
+ </tr>
479
+ </table>
480
+ </div>
481
+
482
+ <div class="method_details ">
483
+ <h3 class="signature " id="make_srcignore-instance_method">
484
+
485
+ - (<tt>Object</tt>) <strong>make_srcignore</strong>
486
+
487
+
488
+
489
+
490
+
491
+ </h3><div class="docstring">
492
+ <div class="discussion">
493
+
494
+ <p>Create a standard .srcignore file in the current directory. Raises
495
+ exception if file exists.</p>
496
+
497
+
498
+ </div>
499
+ </div>
500
+ <div class="tags">
501
+
502
+ <p class="tag_title">Raises:</p>
503
+ <ul class="raise">
504
+
505
+ <li>
506
+
507
+
508
+ <span class='type'>(<tt>IOError</tt>)</span>
509
+
510
+
511
+
512
+ </li>
513
+
514
+ </ul>
515
+
516
+ </div><table class="source_code">
517
+ <tr>
518
+ <td>
519
+ <pre class="lines">
520
+
521
+
522
+ 78
523
+ 79
524
+ 80
525
+ 81
526
+ 82
527
+ 83
528
+ 84
529
+ 85
530
+ 86
531
+ 87
532
+ 88
533
+ 89
534
+ 90
535
+ 91
536
+ 92
537
+ 93
538
+ 94
539
+ 95
540
+ 96
541
+ 97
542
+ 98
543
+ 99
544
+ 100
545
+ 101
546
+ 102
547
+ 103
548
+ 104
549
+ 105
550
+ 106
551
+ 107
552
+ 108
553
+ 109
554
+ 110
555
+ 111
556
+ 112
557
+ 113
558
+ 114
559
+ 115
560
+ 116
561
+ 117</pre>
562
+ </td>
563
+ <td>
564
+ <pre class="code"><span class="info file"># File 'lib/netlinx/src/package.rb', line 78</span>
565
+
566
+ <span class='kw'>def</span> <span class='id identifier rubyid_make_srcignore'>make_srcignore</span>
567
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>IOError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>A .srcignore file already exists in this directory.</span><span class='tstring_end'>&quot;</span></span> \
568
+ <span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>.srcignore</span><span class='tstring_end'>&#39;</span></span>
569
+
570
+ <span class='id identifier rubyid_string'>string</span> <span class='op'>=</span> <span class='heredoc_beg'>&lt;&lt;-EOS</span>
571
+ <span class='tstring_content'># --------------------------------------------------- #
572
+ # Files to exclude from .SRC package (glob format). #
573
+ # --------------------------------------------------- #
574
+
575
+ # AMX
576
+
577
+ *.src
578
+ *.tp4
579
+
580
+ # Graphics
581
+
582
+ *.ai
583
+ *.bmp
584
+ *.eps
585
+ *.gif
586
+ *.jpg
587
+ *.jpeg
588
+ *.png
589
+ *.psd
590
+ *.svg
591
+
592
+ # Archives
593
+
594
+ *.gz
595
+ *.tar
596
+ *.zip
597
+
598
+ # Documentation
599
+
600
+ *.pdf
601
+
602
+ </span><span class='heredoc_end'>EOS
603
+ </span>
604
+ <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>.srcignore</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_string'>string</span>
605
+ <span class='kw'>end</span></pre>
606
+ </td>
607
+ </tr>
608
+ </table>
609
+ </div>
610
+
611
+ <div class="method_details ">
612
+ <h3 class="signature " id="make_warning_file-instance_method">
613
+
614
+ - (<tt>Object</tt>) <strong>make_warning_file</strong>
615
+
616
+
617
+
618
+
619
+
620
+ </h3><div class="docstring">
621
+ <div class="discussion">
622
+
623
+ <p>Returns a string for the unpack warning file.</p>
624
+
625
+
626
+ </div>
627
+ </div>
628
+ <div class="tags">
629
+
630
+
631
+ </div><table class="source_code">
632
+ <tr>
633
+ <td>
634
+ <pre class="lines">
635
+
636
+
637
+ 120
638
+ 121
639
+ 122
640
+ 123
641
+ 124
642
+ 125
643
+ 126
644
+ 127
645
+ 128
646
+ 129
647
+ 130
648
+ 131
649
+ 132
650
+ 133
651
+ 134
652
+ 135
653
+ 136
654
+ 137
655
+ 138
656
+ 139
657
+ 140
658
+ 141
659
+ 142
660
+ 143
661
+ 144
662
+ 145
663
+ 146
664
+ 147
665
+ 148
666
+ 149</pre>
667
+ </td>
668
+ <td>
669
+ <pre class="code"><span class="info file"># File 'lib/netlinx/src/package.rb', line 120</span>
670
+
671
+ <span class='kw'>def</span> <span class='id identifier rubyid_make_warning_file'>make_warning_file</span>
672
+ <span class='heredoc_beg'>&lt;&lt;-EOS</span><span class='period'>
673
+ </span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\r\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='comment'># Format for readability in Notepad.
674
+ </span><span class='tstring_content'># ---------------------------------------------------------------------- #
675
+ # WARNING: This archive should be unpacked with the netlinx-src utility #
676
+ # ---------------------------------------------------------------------- #
677
+
678
+ Download
679
+ --------
680
+
681
+ http://sourceforge.net/p/netlinx-src/wiki/Home/
682
+
683
+
684
+ About
685
+ -----
686
+
687
+ netlinx-src is a third-party utility for creating and extracting NetLinx
688
+ .src source code package files. Unlike the standard utility that ships
689
+ with NetLinx Studio, netlinx-src will retain the project&#39;s folder
690
+ structure when the project is extracted. This becomes increasingly more
691
+ important based on the number of files a project contains.
692
+
693
+ Packaging a project with netlinx-src is also more comprehensive than
694
+ using the standard utility. Not only is netlinx-src courteous enough
695
+ to package files necessary for maintenance of the system (IR libraries,
696
+ Duet modules, NetLinx modules, etc.), it also features a fine-grained
697
+ file exclusion list that can prevent bulky touch panel files or graphics
698
+ from filling up the disk space on the master.
699
+ </span><span class='heredoc_end'>EOS
700
+ </span><span class='kw'>end</span></pre>
701
+ </td>
702
+ </tr>
703
+ </table>
704
+ </div>
705
+
706
+ <div class="method_details ">
707
+ <h3 class="signature " id="pack-instance_method">
708
+
709
+ - (<tt>Object</tt>) <strong>pack</strong>
710
+
711
+
712
+
713
+
714
+
715
+ </h3><div class="docstring">
716
+ <div class="discussion">
717
+
718
+ <p>Pack the project into a NetLinx .src package.</p>
719
+
720
+
721
+ </div>
722
+ </div>
723
+ <div class="tags">
724
+
725
+
726
+ </div><table class="source_code">
727
+ <tr>
728
+ <td>
729
+ <pre class="lines">
730
+
731
+
732
+ 27
733
+ 28
734
+ 29
735
+ 30
736
+ 31
737
+ 32
738
+ 33
739
+ 34
740
+ 35
741
+ 36
742
+ 37
743
+ 38
744
+ 39
745
+ 40
746
+ 41
747
+ 42
748
+ 43</pre>
749
+ </td>
750
+ <td>
751
+ <pre class="code"><span class="info file"># File 'lib/netlinx/src/package.rb', line 27</span>
752
+
753
+ <span class='kw'>def</span> <span class='id identifier rubyid_pack'>pack</span>
754
+ <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='ivar'>@file</span> <span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span> <span class='ivar'>@file</span>
755
+
756
+ <span class='id identifier rubyid_files'>files</span> <span class='op'>=</span> <span class='const'>Dir</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>**/*</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>-</span> <span class='const'>Dir</span><span class='lbracket'>[</span><span class='ivar'>@file</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='const'>Dir</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>.srcignore</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
757
+
758
+ <span class='comment'># Exclude ignored files.
759
+ </span> <span class='id identifier rubyid_exclusions'>exclusions</span> <span class='op'>=</span> <span class='id identifier rubyid_load_exclusions'>load_exclusions</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_e'>e</span><span class='op'>|</span> <span class='const'>Dir</span><span class='lbracket'>[</span><span class='id identifier rubyid_e'>e</span><span class='rbracket'>]</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span>
760
+ <span class='id identifier rubyid_files'>files</span> <span class='op'>=</span> <span class='id identifier rubyid_files'>files</span> <span class='op'>-</span> <span class='id identifier rubyid_exclusions'>exclusions</span>
761
+
762
+ <span class='const'>Zip</span><span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span> <span class='ivar'>@file</span><span class='comma'>,</span> <span class='const'>Zip</span><span class='op'>::</span><span class='const'>File</span><span class='op'>::</span><span class='const'>CREATE</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_zip'>zip</span><span class='op'>|</span>
763
+ <span class='id identifier rubyid_files'>files</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_file'>file</span><span class='op'>|</span> <span class='id identifier rubyid_zip'>zip</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span> <span class='id identifier rubyid_file'>file</span><span class='comma'>,</span> <span class='id identifier rubyid_file'>file</span> <span class='rbrace'>}</span>
764
+
765
+ <span class='id identifier rubyid_zip'>zip</span><span class='period'>.</span><span class='id identifier rubyid_get_output_stream'>get_output_stream</span><span class='lparen'>(</span><span class='ivar'>@warning_file</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span>
766
+ <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_make_warning_file'>make_warning_file</span>
767
+ <span class='rbrace'>}</span>
768
+ <span class='kw'>end</span>
769
+ <span class='kw'>end</span></pre>
770
+ </td>
771
+ </tr>
772
+ </table>
773
+ </div>
774
+
775
+ <div class="method_details ">
776
+ <h3 class="signature " id="remove_zip-instance_method">
777
+
778
+ - (<tt>Object</tt>) <strong>remove_zip</strong>
779
+
780
+
781
+
782
+
783
+
784
+ </h3><div class="docstring">
785
+ <div class="discussion">
786
+
787
+ <p>Remove the .zip version of this NetLinx .src file if it exists.</p>
788
+
789
+
790
+ </div>
791
+ </div>
792
+ <div class="tags">
793
+
794
+
795
+ </div><table class="source_code">
796
+ <tr>
797
+ <td>
798
+ <pre class="lines">
799
+
800
+
801
+ 72
802
+ 73
803
+ 74</pre>
804
+ </td>
805
+ <td>
806
+ <pre class="code"><span class="info file"># File 'lib/netlinx/src/package.rb', line 72</span>
807
+
808
+ <span class='kw'>def</span> <span class='id identifier rubyid_remove_zip'>remove_zip</span>
809
+ <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@file</span><span class='embexpr_end'>}</span><span class='tstring_content'>.zip</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@file</span><span class='embexpr_end'>}</span><span class='tstring_content'>.zip</span><span class='tstring_end'>&quot;</span></span>
810
+ <span class='kw'>end</span></pre>
811
+ </td>
812
+ </tr>
813
+ </table>
814
+ </div>
815
+
816
+ <div class="method_details ">
817
+ <h3 class="signature " id="unpack-instance_method">
818
+
819
+ - (<tt>Object</tt>) <strong>unpack</strong>(dir = nil)
820
+
821
+
822
+
823
+
824
+
825
+ </h3><div class="docstring">
826
+ <div class="discussion">
827
+
828
+ <p>Unpack a NetLinx .src project package. Unpacks to the given directory, if
829
+ provided.</p>
830
+
831
+
832
+ </div>
833
+ </div>
834
+ <div class="tags">
835
+
836
+
837
+ </div><table class="source_code">
838
+ <tr>
839
+ <td>
840
+ <pre class="lines">
841
+
842
+
843
+ 47
844
+ 48
845
+ 49
846
+ 50
847
+ 51
848
+ 52
849
+ 53
850
+ 54</pre>
851
+ </td>
852
+ <td>
853
+ <pre class="code"><span class="info file"># File 'lib/netlinx/src/package.rb', line 47</span>
854
+
855
+ <span class='kw'>def</span> <span class='id identifier rubyid_unpack'>unpack</span> <span class='id identifier rubyid_dir'>dir</span> <span class='op'>=</span> <span class='kw'>nil</span>
856
+ <span class='const'>Zip</span><span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span> <span class='ivar'>@file</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_zip'>zip</span><span class='op'>|</span>
857
+ <span class='id identifier rubyid_zip'>zip</span><span class='period'>.</span><span class='id identifier rubyid_each_entry'>each_entry</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_e'>e</span><span class='op'>|</span>
858
+ <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_dir'>dir</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dir'>dir</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
859
+ <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_extract'>extract</span> <span class='id identifier rubyid_path'>path</span> <span class='kw'>unless</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='ivar'>@warning_file</span>
860
+ <span class='kw'>end</span>
861
+ <span class='kw'>end</span>
862
+ <span class='kw'>end</span></pre>
863
+ </td>
864
+ </tr>
865
+ </table>
866
+ </div>
867
+
868
+ </div>
869
+
870
+ </div>
871
+
872
+ <div id="footer">
873
+ Generated on Mon May 12 11:49:57 2014 by
874
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
875
+ 0.8.7.4 (ruby-2.0.0).
876
+ </div>
877
+
878
+ </body>
879
+ </html>