starcitizen-tools 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 689f0b86e2517c09a7102a0f69d279e1fb603b93
4
+ data.tar.gz: a5c271828fa741f35e562256858f8e95fb6c4222
5
+ SHA512:
6
+ metadata.gz: ede806bce5d7e70b283e4f0956f0521905a17e8beaa085f6b8c83b500d109d671d4f2494c9d87e33a3db2fef51e1a02da126ecf02bf8536c3fd129632187a244
7
+ data.tar.gz: 4554ee649436f74bbdfd08e3cd5d7b0ae123f486d95b215ac7b3d04c50c6e57553a4bff749a2d5296440c5a947698e4532a162672cc10e0d133e7c438ef29126
@@ -0,0 +1,5 @@
1
+ # Star Citizen Tools
2
+
3
+ A Ruby API and command-line tools for the game [Star Citizen](https://robertsspaceindustries.com/about-the-game).
4
+
5
+ [todo: gem badge]
data/bin/sct ADDED
@@ -0,0 +1 @@
1
+ #! /usr/bin/env ruby
@@ -0,0 +1,130 @@
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: StarCitizen
8
+
9
+ &mdash; 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.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
+
36
+
37
+ <span class="title">StarCitizen</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: StarCitizen
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/starcitizen-tools.rb<span class="defines">,<br />
83
+ lib/starcitizen/pak.rb,<br /> lib/starcitizen/config.rb,<br /> lib/starcitizen/rake/extract_default_profile.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>:nodoc:</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="StarCitizen/Rake.html" title="StarCitizen::Rake (module)">Rake</a></span>
105
+
106
+
107
+
108
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="StarCitizen/Config.html" title="StarCitizen::Config (class)">Config</a></span>, <span class='object_link'><a href="StarCitizen/Pak.html" title="StarCitizen::Pak (class)">Pak</a></span>
109
+
110
+
111
+ </p>
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+ </div>
122
+
123
+ <div id="footer">
124
+ Generated on Sun Feb 1 16:57:08 2015 by
125
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
126
+ 0.8.7.6 (ruby-2.1.5).
127
+ </div>
128
+
129
+ </body>
130
+ </html>
@@ -0,0 +1,522 @@
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::Config
8
+
9
+ &mdash; 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/Config.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 (C)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../StarCitizen.html" title="StarCitizen (module)">StarCitizen</a></span></span>
36
+ &raquo;
37
+ <span class="title">Config</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::Config
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::Config</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/config.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>Configuration for starcitizen-tools.</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="#path-instance_method" title="#path (instance method)">- (Object) <strong>path</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>Config file path.</p>
144
+ </div></span>
145
+
146
+ </li>
147
+
148
+
149
+ </ul>
150
+
151
+
152
+
153
+
154
+
155
+ <h2>
156
+ Class 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="#game_path-class_method" title="game_path (class method)">+ (Object) <strong>game_path</strong> </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>Location of Star Citizen.</p>
181
+ </div></span>
182
+
183
+ </li>
184
+
185
+
186
+ </ul>
187
+
188
+ <h2>
189
+ Instance Method Summary
190
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
191
+ </h2>
192
+
193
+ <ul class="summary">
194
+
195
+ <li class="public ">
196
+ <span class="summary_signature">
197
+
198
+ <a href="#game_path-instance_method" title="#game_path (instance method)">- (Object) <strong>game_path</strong> </a>
199
+
200
+
201
+
202
+ </span>
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+ <span class="summary_desc"><div class='inline'>
213
+ <p>Location of Star Citizen.</p>
214
+ </div></span>
215
+
216
+ </li>
217
+
218
+
219
+ <li class="public ">
220
+ <span class="summary_signature">
221
+
222
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Config) <strong>initialize</strong>(**kwargs) </a>
223
+
224
+
225
+
226
+ </span>
227
+
228
+
229
+ <span class="note title constructor">constructor</span>
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+ <span class="summary_desc"><div class='inline'>
239
+ <p>A new instance of Config.</p>
240
+ </div></span>
241
+
242
+ </li>
243
+
244
+
245
+ </ul>
246
+
247
+
248
+ <div id="constructor_details" class="method_details_list">
249
+ <h2>Constructor Details</h2>
250
+
251
+ <div class="method_details first">
252
+ <h3 class="signature first" id="initialize-instance_method">
253
+
254
+ - (<tt><span class='object_link'><a href="" title="StarCitizen::Config (class)">Config</a></span></tt>) <strong>initialize</strong>(**kwargs)
255
+
256
+
257
+
258
+
259
+
260
+ </h3><div class="docstring">
261
+ <div class="discussion">
262
+
263
+ <p>Returns a new instance of Config</p>
264
+
265
+
266
+ </div>
267
+ </div>
268
+ <div class="tags">
269
+ <p class="tag_title">Parameters:</p>
270
+ <ul class="param">
271
+
272
+ <li>
273
+
274
+ <span class='name'>kwargs</span>
275
+
276
+
277
+ <span class='type'>(<tt>Hash</tt>)</span>
278
+
279
+
280
+
281
+ &mdash;
282
+ <div class='inline'>
283
+ <p>a customizable set of options</p>
284
+ </div>
285
+
286
+ </li>
287
+
288
+ </ul>
289
+
290
+
291
+
292
+
293
+ <p class="tag_title">Options Hash (<tt>**kwargs</tt>):</p>
294
+ <ul class="option">
295
+
296
+ <li>
297
+ <span class="name">:path</span>
298
+ <span class="type">(<tt>String</tt>)</span>
299
+ <span class="default">
300
+
301
+ </span>
302
+
303
+ &mdash; <div class='inline'>
304
+ <p>Config file path.</p>
305
+ </div>
306
+
307
+ </li>
308
+
309
+ </ul>
310
+
311
+
312
+
313
+ </div><table class="source_code">
314
+ <tr>
315
+ <td>
316
+ <pre class="lines">
317
+
318
+
319
+ 18
320
+ 19
321
+ 20
322
+ 21
323
+ 22
324
+ 23
325
+ 24
326
+ 25
327
+ 26
328
+ 27
329
+ 28
330
+ 29
331
+ 30
332
+ 31
333
+ 32
334
+ 33
335
+ 34
336
+ 35
337
+ 36
338
+ 37</pre>
339
+ </td>
340
+ <td>
341
+ <pre class="code"><span class="info file"># File 'lib/starcitizen/config.rb', line 18</span>
342
+
343
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span>
344
+ <span class='ivar'>@path</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>~/starcitizen-tools.cfg.yaml</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
345
+
346
+ <span class='comment'># Create config file.
347
+ </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='ivar'>@path</span>
348
+ <span class='kw'>begin</span>
349
+ <span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>win32/registry</span><span class='tstring_end'>&#39;</span></span>
350
+ <span class='id identifier rubyid_game_path'>game_path</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span> <span class='const'>Win32</span><span class='op'>::</span><span class='const'>Registry</span><span class='op'>::</span><span class='const'>HKEY_CURRENT_USER</span><span class='period'>
351
+ </span><span class='id identifier rubyid_ .open'> .open</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Software\Cloud Imperium Games\StarCitizen</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>UninstallString</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
352
+ <span class='kw'>rescue</span> <span class='const'>LoadError</span> <span class='comment'># Not Windows
353
+ </span> <span class='id identifier rubyid_game_path'>game_path</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>~/.wine/drive_c/Program Files/StarCitizen</span><span class='tstring_end'>&#39;</span></span>
354
+ <span class='kw'>end</span>
355
+
356
+ <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='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>w</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span>
357
+ <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>game_path</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_game_path'>game_path</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_to_yaml'>to_yaml</span><span class='rparen'>)</span>
358
+ <span class='kw'>end</span>
359
+ <span class='kw'>end</span>
360
+
361
+ <span class='ivar'>@config</span> <span class='op'>=</span> <span class='const'>YAML</span><span class='period'>.</span><span class='id identifier rubyid_load_file'>load_file</span> <span class='ivar'>@path</span>
362
+ <span class='kw'>end</span></pre>
363
+ </td>
364
+ </tr>
365
+ </table>
366
+ </div>
367
+
368
+ </div>
369
+
370
+ <div id="instance_attr_details" class="attr_details">
371
+ <h2>Instance Attribute Details</h2>
372
+
373
+
374
+ <span id=""></span>
375
+ <div class="method_details first">
376
+ <h3 class="signature first" id="path-instance_method">
377
+
378
+ - (<tt>Object</tt>) <strong>path</strong> <span class="extras">(readonly)</span>
379
+
380
+
381
+
382
+
383
+
384
+ </h3><div class="docstring">
385
+ <div class="discussion">
386
+
387
+ <p>Config file path.</p>
388
+
389
+
390
+ </div>
391
+ </div>
392
+ <div class="tags">
393
+
394
+
395
+ </div><table class="source_code">
396
+ <tr>
397
+ <td>
398
+ <pre class="lines">
399
+
400
+
401
+ 15
402
+ 16
403
+ 17</pre>
404
+ </td>
405
+ <td>
406
+ <pre class="code"><span class="info file"># File 'lib/starcitizen/config.rb', line 15</span>
407
+
408
+ <span class='kw'>def</span> <span class='id identifier rubyid_path'>path</span>
409
+ <span class='ivar'>@path</span>
410
+ <span class='kw'>end</span></pre>
411
+ </td>
412
+ </tr>
413
+ </table>
414
+ </div>
415
+
416
+ </div>
417
+
418
+
419
+ <div id="class_method_details" class="method_details_list">
420
+ <h2>Class Method Details</h2>
421
+
422
+
423
+ <div class="method_details first">
424
+ <h3 class="signature first" id="game_path-class_method">
425
+
426
+ + (<tt>Object</tt>) <strong>game_path</strong>
427
+
428
+
429
+
430
+
431
+
432
+ </h3><div class="docstring">
433
+ <div class="discussion">
434
+
435
+ <p>Location of Star Citizen.</p>
436
+
437
+
438
+ </div>
439
+ </div>
440
+ <div class="tags">
441
+
442
+
443
+ </div><table class="source_code">
444
+ <tr>
445
+ <td>
446
+ <pre class="lines">
447
+
448
+
449
+ 9
450
+ 10
451
+ 11</pre>
452
+ </td>
453
+ <td>
454
+ <pre class="code"><span class="info file"># File 'lib/starcitizen/config.rb', line 9</span>
455
+
456
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_game_path'>game_path</span>
457
+ <span class='id identifier rubyid_new'>new</span><span class='period'>.</span><span class='id identifier rubyid_game_path'>game_path</span>
458
+ <span class='kw'>end</span></pre>
459
+ </td>
460
+ </tr>
461
+ </table>
462
+ </div>
463
+
464
+ </div>
465
+
466
+ <div id="instance_method_details" class="method_details_list">
467
+ <h2>Instance Method Details</h2>
468
+
469
+
470
+ <div class="method_details first">
471
+ <h3 class="signature first" id="game_path-instance_method">
472
+
473
+ - (<tt>Object</tt>) <strong>game_path</strong>
474
+
475
+
476
+
477
+
478
+
479
+ </h3><div class="docstring">
480
+ <div class="discussion">
481
+
482
+ <p>Location of Star Citizen.</p>
483
+
484
+
485
+ </div>
486
+ </div>
487
+ <div class="tags">
488
+
489
+
490
+ </div><table class="source_code">
491
+ <tr>
492
+ <td>
493
+ <pre class="lines">
494
+
495
+
496
+ 40
497
+ 41
498
+ 42</pre>
499
+ </td>
500
+ <td>
501
+ <pre class="code"><span class="info file"># File 'lib/starcitizen/config.rb', line 40</span>
502
+
503
+ <span class='kw'>def</span> <span class='id identifier rubyid_game_path'>game_path</span>
504
+ <span class='ivar'>@config</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>game_path</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</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='comma'>,</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>
505
+ <span class='kw'>end</span></pre>
506
+ </td>
507
+ </tr>
508
+ </table>
509
+ </div>
510
+
511
+ </div>
512
+
513
+ </div>
514
+
515
+ <div id="footer">
516
+ Generated on Sun Feb 1 16:57:08 2015 by
517
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
518
+ 0.8.7.6 (ruby-2.1.5).
519
+ </div>
520
+
521
+ </body>
522
+ </html>