starcitizen-tools 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +5 -0
- data/bin/sct +1 -0
- data/doc/StarCitizen.html +130 -0
- data/doc/StarCitizen/Config.html +522 -0
- data/doc/StarCitizen/Pak.html +482 -0
- data/doc/StarCitizen/Rake.html +128 -0
- data/doc/StarCitizen/Rake/ExtractDefaultProfile.html +419 -0
- data/doc/_index.html +173 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +80 -0
- data/doc/file.license.html +73 -0
- data/doc/file_list.html +63 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +80 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +117 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/starcitizen-tools.rb +10 -0
- data/lib/starcitizen/config.rb +45 -0
- data/lib/starcitizen/pak.rb +42 -0
- data/lib/starcitizen/rake.rb +4 -0
- data/lib/starcitizen/rake/extract_default_profile.rb +30 -0
- data/license.txt +21 -0
- metadata +186 -0
@@ -0,0 +1,482 @@
|
|
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: StarCitizen::Pak
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
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#!StarCitizen/Pak.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> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../StarCitizen.html" title="StarCitizen (module)">StarCitizen</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Pak</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: StarCitizen::Pak
|
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">StarCitizen::Pak</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/starcitizen/pak.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 .pak file. Located in /CitizenClient/Data</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
118
|
+
<ul class="summary">
|
119
|
+
|
120
|
+
<li class="public ">
|
121
|
+
<span class="summary_signature">
|
122
|
+
|
123
|
+
<a href="#name-instance_method" title="#name (instance method)">- (Object) <strong>name</strong> </a>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
</span>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
<span class="note title readonly">readonly</span>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<span class="summary_desc"><div class='inline'>
|
143
|
+
<p>Returns the value of attribute name.</p>
|
144
|
+
</div></span>
|
145
|
+
|
146
|
+
</li>
|
147
|
+
|
148
|
+
|
149
|
+
</ul>
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
<h2>
|
156
|
+
Instance Method Summary
|
157
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
158
|
+
</h2>
|
159
|
+
|
160
|
+
<ul class="summary">
|
161
|
+
|
162
|
+
<li class="public ">
|
163
|
+
<span class="summary_signature">
|
164
|
+
|
165
|
+
<a href="#extract-instance_method" title="#extract (instance method)">- (Object) <strong>extract</strong>(path, **kwargs) </a>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
</span>
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
<span class="summary_desc"><div class='inline'>
|
180
|
+
<p>Extract a file from the package.</p>
|
181
|
+
</div></span>
|
182
|
+
|
183
|
+
</li>
|
184
|
+
|
185
|
+
|
186
|
+
<li class="public ">
|
187
|
+
<span class="summary_signature">
|
188
|
+
|
189
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Pak) <strong>initialize</strong>(name) </a>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
</span>
|
194
|
+
|
195
|
+
|
196
|
+
<span class="note title constructor">constructor</span>
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
<span class="summary_desc"><div class='inline'>
|
206
|
+
<p>A new instance of Pak.</p>
|
207
|
+
</div></span>
|
208
|
+
|
209
|
+
</li>
|
210
|
+
|
211
|
+
|
212
|
+
</ul>
|
213
|
+
|
214
|
+
|
215
|
+
<div id="constructor_details" class="method_details_list">
|
216
|
+
<h2>Constructor Details</h2>
|
217
|
+
|
218
|
+
<div class="method_details first">
|
219
|
+
<h3 class="signature first" id="initialize-instance_method">
|
220
|
+
|
221
|
+
- (<tt><span class='object_link'><a href="" title="StarCitizen::Pak (class)">Pak</a></span></tt>) <strong>initialize</strong>(name)
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
</h3><div class="docstring">
|
228
|
+
<div class="discussion">
|
229
|
+
|
230
|
+
<p>Returns a new instance of Pak</p>
|
231
|
+
|
232
|
+
|
233
|
+
</div>
|
234
|
+
</div>
|
235
|
+
<div class="tags">
|
236
|
+
<p class="tag_title">Parameters:</p>
|
237
|
+
<ul class="param">
|
238
|
+
|
239
|
+
<li>
|
240
|
+
|
241
|
+
<span class='name'>name</span>
|
242
|
+
|
243
|
+
|
244
|
+
<span class='type'>(<tt>String</tt>)</span>
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
—
|
249
|
+
<div class='inline'>
|
250
|
+
<p>Name of the .pak file.</p>
|
251
|
+
</div>
|
252
|
+
|
253
|
+
</li>
|
254
|
+
|
255
|
+
</ul>
|
256
|
+
|
257
|
+
|
258
|
+
</div><table class="source_code">
|
259
|
+
<tr>
|
260
|
+
<td>
|
261
|
+
<pre class="lines">
|
262
|
+
|
263
|
+
|
264
|
+
15
|
265
|
+
16
|
266
|
+
17
|
267
|
+
18</pre>
|
268
|
+
</td>
|
269
|
+
<td>
|
270
|
+
<pre class="code"><span class="info file"># File 'lib/starcitizen/pak.rb', line 15</span>
|
271
|
+
|
272
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='id identifier rubyid_name'>name</span>
|
273
|
+
<span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span>
|
274
|
+
<span class='ivar'>@path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='const'>StarCitizen</span><span class='op'>::</span><span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_game_path'>game_path</span><span class='embexpr_end'>}</span><span class='tstring_content'>/CitizenClient/Data/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>.pak</span><span class='tstring_end'>"</span></span>
|
275
|
+
<span class='kw'>end</span></pre>
|
276
|
+
</td>
|
277
|
+
</tr>
|
278
|
+
</table>
|
279
|
+
</div>
|
280
|
+
|
281
|
+
</div>
|
282
|
+
|
283
|
+
<div id="instance_attr_details" class="attr_details">
|
284
|
+
<h2>Instance Attribute Details</h2>
|
285
|
+
|
286
|
+
|
287
|
+
<span id=""></span>
|
288
|
+
<div class="method_details first">
|
289
|
+
<h3 class="signature first" id="name-instance_method">
|
290
|
+
|
291
|
+
- (<tt>Object</tt>) <strong>name</strong> <span class="extras">(readonly)</span>
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
</h3><div class="docstring">
|
298
|
+
<div class="discussion">
|
299
|
+
|
300
|
+
<p>Returns the value of attribute name</p>
|
301
|
+
|
302
|
+
|
303
|
+
</div>
|
304
|
+
</div>
|
305
|
+
<div class="tags">
|
306
|
+
|
307
|
+
|
308
|
+
</div><table class="source_code">
|
309
|
+
<tr>
|
310
|
+
<td>
|
311
|
+
<pre class="lines">
|
312
|
+
|
313
|
+
|
314
|
+
12
|
315
|
+
13
|
316
|
+
14</pre>
|
317
|
+
</td>
|
318
|
+
<td>
|
319
|
+
<pre class="code"><span class="info file"># File 'lib/starcitizen/pak.rb', line 12</span>
|
320
|
+
|
321
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
|
322
|
+
<span class='ivar'>@name</span>
|
323
|
+
<span class='kw'>end</span></pre>
|
324
|
+
</td>
|
325
|
+
</tr>
|
326
|
+
</table>
|
327
|
+
</div>
|
328
|
+
|
329
|
+
</div>
|
330
|
+
|
331
|
+
|
332
|
+
<div id="instance_method_details" class="method_details_list">
|
333
|
+
<h2>Instance Method Details</h2>
|
334
|
+
|
335
|
+
|
336
|
+
<div class="method_details first">
|
337
|
+
<h3 class="signature first" id="extract-instance_method">
|
338
|
+
|
339
|
+
- (<tt>Object</tt>) <strong>extract</strong>(path, **kwargs)
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
</h3><div class="docstring">
|
346
|
+
<div class="discussion">
|
347
|
+
|
348
|
+
<p>Extract a file from the package.</p>
|
349
|
+
|
350
|
+
|
351
|
+
</div>
|
352
|
+
</div>
|
353
|
+
<div class="tags">
|
354
|
+
|
355
|
+
<div class="examples">
|
356
|
+
<p class="tag_title">Examples:</p>
|
357
|
+
|
358
|
+
|
359
|
+
<pre class="example code"><code><span class='comment'># Extract defaultProfile.xml
|
360
|
+
</span><span class='id identifier rubyid_package'>package</span><span class='period'>.</span><span class='id identifier rubyid_extract'>extract</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Libs/Config/defaultProfile.xml</span><span class='tstring_end'>'</span></span></code></pre>
|
361
|
+
|
362
|
+
</div>
|
363
|
+
<p class="tag_title">Parameters:</p>
|
364
|
+
<ul class="param">
|
365
|
+
|
366
|
+
<li>
|
367
|
+
|
368
|
+
<span class='name'>path</span>
|
369
|
+
|
370
|
+
|
371
|
+
<span class='type'>(<tt>String</tt>)</span>
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
—
|
376
|
+
<div class='inline'>
|
377
|
+
<p>Path of the file inside the package.</p>
|
378
|
+
</div>
|
379
|
+
|
380
|
+
</li>
|
381
|
+
|
382
|
+
<li>
|
383
|
+
|
384
|
+
<span class='name'>kwargs</span>
|
385
|
+
|
386
|
+
|
387
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
—
|
392
|
+
<div class='inline'>
|
393
|
+
<p>a customizable set of options</p>
|
394
|
+
</div>
|
395
|
+
|
396
|
+
</li>
|
397
|
+
|
398
|
+
</ul>
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
<p class="tag_title">Options Hash (<tt>**kwargs</tt>):</p>
|
406
|
+
<ul class="option">
|
407
|
+
|
408
|
+
<li>
|
409
|
+
<span class="name">:output_dir</span>
|
410
|
+
<span class="type">(<tt>String</tt>)</span>
|
411
|
+
<span class="default">
|
412
|
+
|
413
|
+
— default:
|
414
|
+
<tt>'.'</tt>
|
415
|
+
|
416
|
+
</span>
|
417
|
+
|
418
|
+
— <div class='inline'>
|
419
|
+
<p>File is extracted to this directory.</p>
|
420
|
+
</div>
|
421
|
+
|
422
|
+
</li>
|
423
|
+
|
424
|
+
</ul>
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
</div><table class="source_code">
|
429
|
+
<tr>
|
430
|
+
<td>
|
431
|
+
<pre class="lines">
|
432
|
+
|
433
|
+
|
434
|
+
26
|
435
|
+
27
|
436
|
+
28
|
437
|
+
29
|
438
|
+
30
|
439
|
+
31
|
440
|
+
32
|
441
|
+
33
|
442
|
+
34
|
443
|
+
35
|
444
|
+
36
|
445
|
+
37
|
446
|
+
38
|
447
|
+
39</pre>
|
448
|
+
</td>
|
449
|
+
<td>
|
450
|
+
<pre class="code"><span class="info file"># File 'lib/starcitizen/pak.rb', line 26</span>
|
451
|
+
|
452
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_extract'>extract</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span>
|
453
|
+
<span class='id identifier rubyid_output_dir'>output_dir</span> <span class='op'>=</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span> <span class='symbol'>:output_dir</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.</span><span class='tstring_end'>'</span></span>
|
454
|
+
|
455
|
+
<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='lparen'>(</span><span class='ivar'>@path</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_files'>files</span><span class='op'>|</span>
|
456
|
+
<span class='id identifier rubyid_pak_file'>pak_file</span> <span class='op'>=</span> <span class='id identifier rubyid_files'>files</span><span class='period'>.</span><span class='id identifier rubyid_glob'>glob</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
|
457
|
+
|
458
|
+
<span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_mkdir_p'>mkdir_p</span> <span class='id identifier rubyid_output_dir'>output_dir</span>
|
459
|
+
<span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_chdir'>chdir</span> <span class='id identifier rubyid_output_dir'>output_dir</span> <span class='kw'>do</span>
|
460
|
+
<span class='id identifier rubyid_filename'>filename</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</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='period'>.</span><span class='id identifier rubyid_last'>last</span>
|
461
|
+
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='id identifier rubyid_filename'>filename</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='id identifier rubyid_filename'>filename</span>
|
462
|
+
<span class='id identifier rubyid_pak_file'>pak_file</span><span class='period'>.</span><span class='id identifier rubyid_extract'>extract</span> <span class='id identifier rubyid_pak_file'>pak_file</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</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='period'>.</span><span class='id identifier rubyid_last'>last</span>
|
463
|
+
<span class='kw'>end</span>
|
464
|
+
<span class='kw'>end</span>
|
465
|
+
<span class='kw'>end</span></pre>
|
466
|
+
</td>
|
467
|
+
</tr>
|
468
|
+
</table>
|
469
|
+
</div>
|
470
|
+
|
471
|
+
</div>
|
472
|
+
|
473
|
+
</div>
|
474
|
+
|
475
|
+
<div id="footer">
|
476
|
+
Generated on Sun Feb 1 16:57:08 2015 by
|
477
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
478
|
+
0.8.7.6 (ruby-2.1.5).
|
479
|
+
</div>
|
480
|
+
|
481
|
+
</body>
|
482
|
+
</html>
|