netlinx-src 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +46 -3
- data/doc/NetLinx.html +19 -6
- data/doc/NetLinx/ProjectPackage.html +386 -29
- data/doc/NetLinx/Rake.html +128 -0
- data/doc/NetLinx/Rake/DelZip.html +337 -0
- data/doc/NetLinx/Rake/MkZip.html +337 -0
- data/doc/NetLinx/Rake/Pack.html +337 -0
- data/doc/NetLinx/Rake/SrcIgnore.html +337 -0
- data/doc/NetLinx/Rake/ToZip.html +337 -0
- data/doc/NetLinx/Rake/Unpack.html +337 -0
- data/doc/NetLinx/Rake/Zip.html +326 -0
- data/doc/NetLinx/SRC.html +128 -0
- data/doc/NetLinx/SRC/Package.html +879 -0
- data/doc/_index.html +94 -8
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +52 -6
- data/doc/file.license.html +2 -2
- data/doc/file_list.html +2 -5
- data/doc/index.html +54 -10
- data/doc/method_list.html +88 -10
- data/doc/top-level-namespace.html +2 -2
- data/lib/netlinx/rake/src.rb +11 -0
- data/lib/netlinx/rake/src/delzip.rb +36 -0
- data/lib/netlinx/rake/src/mkzip.rb +38 -0
- data/lib/netlinx/rake/src/pack.rb +46 -0
- data/lib/netlinx/rake/src/srcignore.rb +36 -0
- data/lib/netlinx/rake/src/unpack.rb +46 -0
- data/lib/netlinx/src.rb +15 -0
- data/lib/netlinx/src/package.rb +154 -0
- metadata +60 -31
- data/doc/file.README.md.html +0 -82
- data/lib/netlinx-src.rb +0 -0
- data/lib/netlinx/project_package.rb +0 -59
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b63b0c4956da78d0cedc93896c5dd81ca478979
|
4
|
+
data.tar.gz: 703bce06cf6617416c2b470c2371948a41611845
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01d3d28c011530fc15b37af620b822220b73277dc341f24b29e6f7fbd730e3772cce8643b39093f25d6535aac4ca970cdd58d3da27f0f74aa68d81128b51dc38
|
7
|
+
data.tar.gz: 9233ebf48e6e867c8a61115b7ff63789a347e8ec7f226a9ce3a7e9543b8a4b22f6784f905f93078250107ca9fcc6f5a6fd579dce832e73900e3cab4f3fbad358
|
data/README.md
CHANGED
@@ -1,6 +1,49 @@
|
|
1
1
|
# NetLinx Source File Utility
|
2
2
|
|
3
|
-
|
3
|
+
A toolset for working with NetLinx `.src` source code packages.
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
[](http://badge.fury.io/rb/netlinx-src)
|
6
|
+
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Install Ruby `>= 2.0.0` for [Windows](http://rubyinstaller.org/downloads/) or [Linux](https://github.com/sstephenson/rbenv#basic-github-checkout).
|
11
|
+
|
12
|
+
gem install netlinx-src
|
13
|
+
|
14
|
+
|
15
|
+
## Rake Tasks
|
16
|
+
|
17
|
+
Commands are executed with
|
18
|
+
|
19
|
+
rake [task]
|
20
|
+
|
21
|
+
#### pack
|
22
|
+
|
23
|
+
Create a NetLinx `.src` source code package, excluding any files specified in `.srcignore`.
|
24
|
+
This command will look for a `.apw` NetLinx Workspace file in the directory `rake pack` was executed in to determine the file name.
|
25
|
+
|
26
|
+
#### unpack
|
27
|
+
|
28
|
+
Unpack a NetLinx `.src` file into a directory named `extracted`.
|
29
|
+
|
30
|
+
#### srcignore
|
31
|
+
|
32
|
+
Generate a default `.srcignore` file in the working directory.
|
33
|
+
|
34
|
+
#### mkzip
|
35
|
+
|
36
|
+
Create a copy of the `.src` file and append `.zip` so it can be opened in any standard file compression utility.
|
37
|
+
|
38
|
+
#### delzip
|
39
|
+
|
40
|
+
Delete any `.src.zip` files in the working directory.
|
41
|
+
|
42
|
+
|
43
|
+
## Rakefile
|
44
|
+
|
45
|
+
To add the default Rake tasks to a project's `Rakefile`:
|
46
|
+
|
47
|
+
```ruby
|
48
|
+
require 'netlinx/rake/src'
|
49
|
+
```
|
data/doc/NetLinx.html
CHANGED
@@ -79,18 +79,31 @@
|
|
79
79
|
|
80
80
|
|
81
81
|
<dt class="r1 last">Defined in:</dt>
|
82
|
-
<dd class="r1 last">lib/netlinx/
|
82
|
+
<dd class="r1 last">lib/netlinx/src.rb<span class="defines">,<br />
|
83
|
+
lib/netlinx/src/package.rb,<br /> lib/netlinx/rake/src/pack.rb,<br /> lib/netlinx/rake/src/mkzip.rb,<br /> lib/netlinx/rake/src/unpack.rb,<br /> lib/netlinx/rake/src/delzip.rb,<br /> lib/netlinx/rake/src/srcignore.rb</span>
|
84
|
+
</dd>
|
83
85
|
|
84
86
|
</dl>
|
85
87
|
<div class="clear"></div>
|
86
88
|
|
87
|
-
<h2>
|
89
|
+
<h2>Overview</h2><div class="docstring">
|
90
|
+
<div class="discussion">
|
91
|
+
|
92
|
+
<p>:nodoc:</p>
|
93
|
+
|
94
|
+
|
95
|
+
</div>
|
96
|
+
</div>
|
97
|
+
<div class="tags">
|
98
|
+
|
99
|
+
|
100
|
+
</div><h2>Defined Under Namespace</h2>
|
88
101
|
<p class="children">
|
89
102
|
|
90
103
|
|
91
|
-
|
104
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="NetLinx/Rake.html" title="NetLinx::Rake (module)">Rake</a></span>, <span class='object_link'><a href="NetLinx/SRC.html" title="NetLinx::SRC (module)">SRC</a></span>
|
92
105
|
|
93
|
-
|
106
|
+
|
94
107
|
|
95
108
|
|
96
109
|
</p>
|
@@ -106,9 +119,9 @@
|
|
106
119
|
</div>
|
107
120
|
|
108
121
|
<div id="footer">
|
109
|
-
Generated on
|
122
|
+
Generated on Mon May 12 11:49:57 2014 by
|
110
123
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
111
|
-
0.8.7.4 (ruby-2.
|
124
|
+
0.8.7.4 (ruby-2.0.0).
|
112
125
|
</div>
|
113
126
|
|
114
127
|
</body>
|
@@ -161,6 +161,78 @@
|
|
161
161
|
<p>Parameters:.</p>
|
162
162
|
</div></span>
|
163
163
|
|
164
|
+
</li>
|
165
|
+
|
166
|
+
|
167
|
+
<li class="public ">
|
168
|
+
<span class="summary_signature">
|
169
|
+
|
170
|
+
<a href="#load_exclusions-instance_method" title="#load_exclusions (instance method)">- (Object) <strong>load_exclusions</strong> </a>
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
</span>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
<span class="summary_desc"><div class='inline'>
|
185
|
+
<p>Load a list of file exclusions (glob format) from .srcignore.</p>
|
186
|
+
</div></span>
|
187
|
+
|
188
|
+
</li>
|
189
|
+
|
190
|
+
|
191
|
+
<li class="public ">
|
192
|
+
<span class="summary_signature">
|
193
|
+
|
194
|
+
<a href="#make_srcignore-instance_method" title="#make_srcignore (instance method)">- (Object) <strong>make_srcignore</strong> </a>
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
</span>
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
<span class="summary_desc"><div class='inline'>
|
209
|
+
<p>Create a standard .srcignore file in the current directory.</p>
|
210
|
+
</div></span>
|
211
|
+
|
212
|
+
</li>
|
213
|
+
|
214
|
+
|
215
|
+
<li class="public ">
|
216
|
+
<span class="summary_signature">
|
217
|
+
|
218
|
+
<a href="#make_warning_file-instance_method" title="#make_warning_file (instance method)">- (Object) <strong>make_warning_file</strong> </a>
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
</span>
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
<span class="summary_desc"><div class='inline'>
|
233
|
+
<p>Returns a string for the unpack warning file.</p>
|
234
|
+
</div></span>
|
235
|
+
|
164
236
|
</li>
|
165
237
|
|
166
238
|
|
@@ -281,10 +353,7 @@
|
|
281
353
|
18
|
282
354
|
19
|
283
355
|
20
|
284
|
-
21
|
285
|
-
22
|
286
|
-
23
|
287
|
-
24</pre>
|
356
|
+
21</pre>
|
288
357
|
</td>
|
289
358
|
<td>
|
290
359
|
<pre class="code"><span class="info file"># File 'lib/netlinx/project_package.rb', line 16</span>
|
@@ -292,11 +361,8 @@
|
|
292
361
|
<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>
|
293
362
|
<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'>'</span><span class='tstring_end'>'</span></span>
|
294
363
|
<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>
|
295
|
-
|
296
|
-
|
297
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ai</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>bmp</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>eps</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>gz</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>jpg</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>jpeg</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>png</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>psd</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>src</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
298
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>svg</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>tar</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>zip</span><span class='tstring_end'>'</span></span>
|
299
|
-
<span class='rbracket'>]</span>
|
364
|
+
|
365
|
+
<span class='ivar'>@warning_file</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>_FILE_EXTRACTION_WARNING.txt</span><span class='tstring_end'>'</span></span>
|
300
366
|
<span class='kw'>end</span></pre>
|
301
367
|
</td>
|
302
368
|
</tr>
|
@@ -336,12 +402,12 @@
|
|
336
402
|
<pre class="lines">
|
337
403
|
|
338
404
|
|
339
|
-
|
340
|
-
|
341
|
-
|
405
|
+
64
|
406
|
+
65
|
407
|
+
66</pre>
|
342
408
|
</td>
|
343
409
|
<td>
|
344
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/project_package.rb', line
|
410
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/project_package.rb', line 64</span>
|
345
411
|
|
346
412
|
<span class='kw'>def</span> <span class='id identifier rubyid_copy_to_zip'>copy_to_zip</span>
|
347
413
|
<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'>"</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'>"</span></span>
|
@@ -349,6 +415,281 @@
|
|
349
415
|
</td>
|
350
416
|
</tr>
|
351
417
|
</table>
|
418
|
+
</div>
|
419
|
+
|
420
|
+
<div class="method_details ">
|
421
|
+
<h3 class="signature " id="load_exclusions-instance_method">
|
422
|
+
|
423
|
+
- (<tt>Object</tt>) <strong>load_exclusions</strong>
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
</h3><div class="docstring">
|
430
|
+
<div class="discussion">
|
431
|
+
|
432
|
+
<p>Load a list of file exclusions (glob format) from .srcignore.</p>
|
433
|
+
|
434
|
+
|
435
|
+
</div>
|
436
|
+
</div>
|
437
|
+
<div class="tags">
|
438
|
+
|
439
|
+
|
440
|
+
</div><table class="source_code">
|
441
|
+
<tr>
|
442
|
+
<td>
|
443
|
+
<pre class="lines">
|
444
|
+
|
445
|
+
|
446
|
+
54
|
447
|
+
55
|
448
|
+
56
|
449
|
+
57
|
450
|
+
58
|
451
|
+
59
|
452
|
+
60
|
453
|
+
61</pre>
|
454
|
+
</td>
|
455
|
+
<td>
|
456
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/project_package.rb', line 54</span>
|
457
|
+
|
458
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_load_exclusions'>load_exclusions</span>
|
459
|
+
<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'>'</span><span class='tstring_content'>.srcignore</span><span class='tstring_end'>'</span></span>
|
460
|
+
|
461
|
+
<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'>'</span><span class='tstring_content'>.srcignore</span><span class='tstring_end'>'</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'>&</span><span class='symbol'>:strip</span><span class='rparen'>)</span><span class='period'>
|
462
|
+
</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.
|
463
|
+
</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'>'</span><span class='tstring_content'>#</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span> <span class='comment'># Remove commented lines.
|
464
|
+
</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'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</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'>"</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'>"</span></span> <span class='rbrace'>}</span> <span class='comment'># Append **/ if a specific path isn't referenced.
|
465
|
+
</span><span class='kw'>end</span></pre>
|
466
|
+
</td>
|
467
|
+
</tr>
|
468
|
+
</table>
|
469
|
+
</div>
|
470
|
+
|
471
|
+
<div class="method_details ">
|
472
|
+
<h3 class="signature " id="make_srcignore-instance_method">
|
473
|
+
|
474
|
+
- (<tt>Object</tt>) <strong>make_srcignore</strong>
|
475
|
+
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
</h3><div class="docstring">
|
481
|
+
<div class="discussion">
|
482
|
+
|
483
|
+
<p>Create a standard .srcignore file in the current directory. Raises
|
484
|
+
exception if file exists.</p>
|
485
|
+
|
486
|
+
|
487
|
+
</div>
|
488
|
+
</div>
|
489
|
+
<div class="tags">
|
490
|
+
|
491
|
+
<p class="tag_title">Raises:</p>
|
492
|
+
<ul class="raise">
|
493
|
+
|
494
|
+
<li>
|
495
|
+
|
496
|
+
|
497
|
+
<span class='type'>(<tt>IOError</tt>)</span>
|
498
|
+
|
499
|
+
|
500
|
+
|
501
|
+
</li>
|
502
|
+
|
503
|
+
</ul>
|
504
|
+
|
505
|
+
</div><table class="source_code">
|
506
|
+
<tr>
|
507
|
+
<td>
|
508
|
+
<pre class="lines">
|
509
|
+
|
510
|
+
|
511
|
+
75
|
512
|
+
76
|
513
|
+
77
|
514
|
+
78
|
515
|
+
79
|
516
|
+
80
|
517
|
+
81
|
518
|
+
82
|
519
|
+
83
|
520
|
+
84
|
521
|
+
85
|
522
|
+
86
|
523
|
+
87
|
524
|
+
88
|
525
|
+
89
|
526
|
+
90
|
527
|
+
91
|
528
|
+
92
|
529
|
+
93
|
530
|
+
94
|
531
|
+
95
|
532
|
+
96
|
533
|
+
97
|
534
|
+
98
|
535
|
+
99
|
536
|
+
100
|
537
|
+
101
|
538
|
+
102
|
539
|
+
103
|
540
|
+
104
|
541
|
+
105
|
542
|
+
106
|
543
|
+
107
|
544
|
+
108
|
545
|
+
109
|
546
|
+
110
|
547
|
+
111
|
548
|
+
112
|
549
|
+
113
|
550
|
+
114</pre>
|
551
|
+
</td>
|
552
|
+
<td>
|
553
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/project_package.rb', line 75</span>
|
554
|
+
|
555
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_make_srcignore'>make_srcignore</span>
|
556
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>IOError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>A .srcignore file already exists in this directory.</span><span class='tstring_end'>"</span></span> \
|
557
|
+
<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'>'</span><span class='tstring_content'>.srcignore</span><span class='tstring_end'>'</span></span>
|
558
|
+
|
559
|
+
<span class='id identifier rubyid_string'>string</span> <span class='op'>=</span> <span class='heredoc_beg'><<-EOS</span>
|
560
|
+
<span class='tstring_content'># --------------------------------------------------- #
|
561
|
+
# Files to exclude from .SRC package (glob format). #
|
562
|
+
# --------------------------------------------------- #
|
563
|
+
|
564
|
+
# AMX
|
565
|
+
|
566
|
+
*.src
|
567
|
+
*.tp4
|
568
|
+
|
569
|
+
# Graphics
|
570
|
+
|
571
|
+
*.ai
|
572
|
+
*.bmp
|
573
|
+
*.eps
|
574
|
+
*.gif
|
575
|
+
*.jpg
|
576
|
+
*.jpeg
|
577
|
+
*.png
|
578
|
+
*.psd
|
579
|
+
*.svg
|
580
|
+
|
581
|
+
# Archives
|
582
|
+
|
583
|
+
*.gz
|
584
|
+
*.tar
|
585
|
+
*.zip
|
586
|
+
|
587
|
+
# Documentation
|
588
|
+
|
589
|
+
*.pdf
|
590
|
+
|
591
|
+
</span><span class='heredoc_end'>EOS
|
592
|
+
</span>
|
593
|
+
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.srcignore</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_string'>string</span>
|
594
|
+
<span class='kw'>end</span></pre>
|
595
|
+
</td>
|
596
|
+
</tr>
|
597
|
+
</table>
|
598
|
+
</div>
|
599
|
+
|
600
|
+
<div class="method_details ">
|
601
|
+
<h3 class="signature " id="make_warning_file-instance_method">
|
602
|
+
|
603
|
+
- (<tt>Object</tt>) <strong>make_warning_file</strong>
|
604
|
+
|
605
|
+
|
606
|
+
|
607
|
+
|
608
|
+
|
609
|
+
</h3><div class="docstring">
|
610
|
+
<div class="discussion">
|
611
|
+
|
612
|
+
<p>Returns a string for the unpack warning file.</p>
|
613
|
+
|
614
|
+
|
615
|
+
</div>
|
616
|
+
</div>
|
617
|
+
<div class="tags">
|
618
|
+
|
619
|
+
|
620
|
+
</div><table class="source_code">
|
621
|
+
<tr>
|
622
|
+
<td>
|
623
|
+
<pre class="lines">
|
624
|
+
|
625
|
+
|
626
|
+
117
|
627
|
+
118
|
628
|
+
119
|
629
|
+
120
|
630
|
+
121
|
631
|
+
122
|
632
|
+
123
|
633
|
+
124
|
634
|
+
125
|
635
|
+
126
|
636
|
+
127
|
637
|
+
128
|
638
|
+
129
|
639
|
+
130
|
640
|
+
131
|
641
|
+
132
|
642
|
+
133
|
643
|
+
134
|
644
|
+
135
|
645
|
+
136
|
646
|
+
137
|
647
|
+
138
|
648
|
+
139
|
649
|
+
140
|
650
|
+
141
|
651
|
+
142
|
652
|
+
143
|
653
|
+
144
|
654
|
+
145
|
655
|
+
146</pre>
|
656
|
+
</td>
|
657
|
+
<td>
|
658
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/project_package.rb', line 117</span>
|
659
|
+
|
660
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_make_warning_file'>make_warning_file</span>
|
661
|
+
<span class='heredoc_beg'><<-EOS</span><span class='period'>
|
662
|
+
</span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\r\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='comment'># Format for readability in Notepad.
|
663
|
+
</span><span class='tstring_content'># ---------------------------------------------------------------------- #
|
664
|
+
# WARNING: This archive should be unpacked with the netlinx-src utility #
|
665
|
+
# ---------------------------------------------------------------------- #
|
666
|
+
|
667
|
+
Download
|
668
|
+
--------
|
669
|
+
|
670
|
+
http://sourceforge.net/p/netlinx-src/wiki/Home/
|
671
|
+
|
672
|
+
|
673
|
+
About
|
674
|
+
-----
|
675
|
+
|
676
|
+
netlinx-src is a third-party utility for creating and extracting NetLinx
|
677
|
+
.src source code package files. Unlike the standard utility that ships
|
678
|
+
with NetLinx Studio, netlinx-src will retain the project's folder
|
679
|
+
structure when the project is extracted. This becomes increasingly more
|
680
|
+
important based on the number of files a project contains.
|
681
|
+
|
682
|
+
Packaging a project with netlinx-src is also more comprehensive than
|
683
|
+
using the standard utility. Not only is netlinx-src courteous enough
|
684
|
+
to package files necessary for maintenance of the system (IR libraries,
|
685
|
+
Duet modules, NetLinx modules, etc.), it also features a fine-grained
|
686
|
+
file exclusion list that can prevent bulky touch panel files or graphics
|
687
|
+
from filling up the disk space on the master.
|
688
|
+
</span><span class='heredoc_end'>EOS
|
689
|
+
</span><span class='kw'>end</span></pre>
|
690
|
+
</td>
|
691
|
+
</tr>
|
692
|
+
</table>
|
352
693
|
</div>
|
353
694
|
|
354
695
|
<div class="method_details ">
|
@@ -377,6 +718,9 @@
|
|
377
718
|
<pre class="lines">
|
378
719
|
|
379
720
|
|
721
|
+
24
|
722
|
+
25
|
723
|
+
26
|
380
724
|
27
|
381
725
|
28
|
382
726
|
29
|
@@ -385,18 +729,31 @@
|
|
385
729
|
32
|
386
730
|
33
|
387
731
|
34
|
388
|
-
35
|
732
|
+
35
|
733
|
+
36
|
734
|
+
37
|
735
|
+
38
|
736
|
+
39
|
737
|
+
40</pre>
|
389
738
|
</td>
|
390
739
|
<td>
|
391
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/project_package.rb', line
|
740
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/project_package.rb', line 24</span>
|
392
741
|
|
393
742
|
<span class='kw'>def</span> <span class='id identifier rubyid_pack'>pack</span>
|
394
743
|
<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>
|
395
744
|
|
396
745
|
<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'>'</span><span class='tstring_content'>**/*</span><span class='tstring_end'>'</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>
|
397
746
|
|
747
|
+
<span class='comment'># Exclude ignored files.
|
748
|
+
</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>
|
749
|
+
<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>
|
750
|
+
|
398
751
|
<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>
|
399
752
|
<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>
|
753
|
+
|
754
|
+
<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>
|
755
|
+
<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>
|
756
|
+
<span class='rbrace'>}</span>
|
400
757
|
<span class='kw'>end</span>
|
401
758
|
<span class='kw'>end</span></pre>
|
402
759
|
</td>
|
@@ -430,12 +787,12 @@
|
|
430
787
|
<pre class="lines">
|
431
788
|
|
432
789
|
|
433
|
-
|
434
|
-
|
435
|
-
|
790
|
+
69
|
791
|
+
70
|
792
|
+
71</pre>
|
436
793
|
</td>
|
437
794
|
<td>
|
438
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/project_package.rb', line
|
795
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/project_package.rb', line 69</span>
|
439
796
|
|
440
797
|
<span class='kw'>def</span> <span class='id identifier rubyid_remove_zip'>remove_zip</span>
|
441
798
|
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='tstring'><span class='tstring_beg'>"</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'>"</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'>"</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'>"</span></span>
|
@@ -472,23 +829,23 @@ provided.</p>
|
|
472
829
|
<pre class="lines">
|
473
830
|
|
474
831
|
|
475
|
-
39
|
476
|
-
40
|
477
|
-
41
|
478
|
-
42
|
479
|
-
43
|
480
832
|
44
|
481
833
|
45
|
482
|
-
46
|
834
|
+
46
|
835
|
+
47
|
836
|
+
48
|
837
|
+
49
|
838
|
+
50
|
839
|
+
51</pre>
|
483
840
|
</td>
|
484
841
|
<td>
|
485
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/project_package.rb', line
|
842
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/project_package.rb', line 44</span>
|
486
843
|
|
487
844
|
<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>
|
488
845
|
<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>
|
489
846
|
<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>
|
490
847
|
<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'>"</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'>"</span></span>
|
491
|
-
<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>
|
848
|
+
<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>
|
492
849
|
<span class='kw'>end</span>
|
493
850
|
<span class='kw'>end</span>
|
494
851
|
<span class='kw'>end</span></pre>
|
@@ -502,9 +859,9 @@ provided.</p>
|
|
502
859
|
</div>
|
503
860
|
|
504
861
|
<div id="footer">
|
505
|
-
Generated on
|
862
|
+
Generated on Fri May 9 14:50:55 2014 by
|
506
863
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
507
|
-
0.8.7.4 (ruby-2.
|
864
|
+
0.8.7.4 (ruby-2.0.0).
|
508
865
|
</div>
|
509
866
|
|
510
867
|
</body>
|