naether 0.8.6 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,796 @@
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: Naether::Bootstrap
8
+
9
+ &mdash; Documentation by YARD 0.8.2.1
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (B)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Naether.html" title="Naether (class)">Naether</a></span></span>
36
+ &raquo;
37
+ <span class="title">Bootstrap</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: Naether::Bootstrap
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">Naether::Bootstrap</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/naether/bootstrap.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>:title:Naether::Bootstrap</p>
106
+
107
+ <p>Helper for bootstrapping Naether</p>
108
+
109
+ <h1 id="label-Authors">Authors</h1>
110
+
111
+ <p>Michael Guymon</p>
112
+
113
+
114
+ </div>
115
+ </div>
116
+ <div class="tags">
117
+
118
+
119
+ </div>
120
+ <h2>Constant Summary</h2>
121
+
122
+ <dl class="constants">
123
+
124
+ <dt id="dependencies-classvariable" class="">@@dependencies =
125
+
126
+ </dt>
127
+ <dd><pre class="code"><span class='kw'>nil</span></pre></dd>
128
+
129
+ </dl>
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+ <h2>
140
+ Class Method Summary
141
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
142
+ </h2>
143
+
144
+ <ul class="summary">
145
+
146
+ <li class="public ">
147
+ <span class="summary_signature">
148
+
149
+ <a href="#bootstrap_local_repo-class_method" title="bootstrap_local_repo (class method)">+ (Object) <strong>bootstrap_local_repo</strong>(local_repo = nil, opts = {}) </a>
150
+
151
+
152
+
153
+ </span>
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+ <span class="summary_desc"><div class='inline'></div></span>
164
+
165
+ </li>
166
+
167
+
168
+ <li class="public ">
169
+ <span class="summary_signature">
170
+
171
+ <a href="#check_local_repo_for_deps-class_method" title="check_local_repo_for_deps (class method)">+ (Object) <strong>check_local_repo_for_deps</strong>(local_repo = nil, opts = {}) </a>
172
+
173
+
174
+
175
+ </span>
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+ <span class="summary_desc"><div class='inline'></div></span>
186
+
187
+ </li>
188
+
189
+
190
+ <li class="public ">
191
+ <span class="summary_signature">
192
+
193
+ <a href="#default_local_repo-class_method" title="default_local_repo (class method)">+ (Object) <strong>default_local_repo</strong> </a>
194
+
195
+
196
+
197
+ </span>
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+ <span class="summary_desc"><div class='inline'></div></span>
208
+
209
+ </li>
210
+
211
+
212
+ <li class="public ">
213
+ <span class="summary_signature">
214
+
215
+ <a href="#dependencies-class_method" title="dependencies (class method)">+ (Object) <strong>dependencies</strong>(dep_file = nil) </a>
216
+
217
+
218
+
219
+ </span>
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+ <span class="summary_desc"><div class='inline'>
230
+ <p>List of Java dependencies for Naether.</p>
231
+ </div></span>
232
+
233
+ </li>
234
+
235
+
236
+ <li class="public ">
237
+ <span class="summary_signature">
238
+
239
+ <a href="#download_dependencies-class_method" title="download_dependencies (class method)">+ (Object) <strong>download_dependencies</strong>(dest, opts = {}) </a>
240
+
241
+
242
+
243
+ </span>
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+
253
+ <span class="summary_desc"><div class='inline'></div></span>
254
+
255
+ </li>
256
+
257
+
258
+ <li class="public ">
259
+ <span class="summary_signature">
260
+
261
+ <a href="#install_dependencies_to_local_repo-class_method" title="install_dependencies_to_local_repo (class method)">+ (Object) <strong>install_dependencies_to_local_repo</strong>(install_jars, naether_jars, opts = {}) </a>
262
+
263
+
264
+
265
+ </span>
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+ <span class="summary_desc"><div class='inline'></div></span>
276
+
277
+ </li>
278
+
279
+
280
+ <li class="public ">
281
+ <span class="summary_signature">
282
+
283
+ <a href="#write_dependencies-class_method" title="write_dependencies (class method)">+ (Object) <strong>write_dependencies</strong>(dest = 'jar_dependencies.yml') </a>
284
+
285
+
286
+
287
+ </span>
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+ <span class="summary_desc"><div class='inline'>
298
+ <p>write bootstrap dependencies to yaml file.</p>
299
+ </div></span>
300
+
301
+ </li>
302
+
303
+
304
+ </ul>
305
+
306
+
307
+
308
+
309
+ <div id="class_method_details" class="method_details_list">
310
+ <h2>Class Method Details</h2>
311
+
312
+
313
+ <div class="method_details first">
314
+ <h3 class="signature first" id="bootstrap_local_repo-class_method">
315
+
316
+ + (<tt>Object</tt>) <strong>bootstrap_local_repo</strong>(local_repo = nil, opts = {})
317
+
318
+
319
+
320
+
321
+
322
+ </h3><table class="source_code">
323
+ <tr>
324
+ <td>
325
+ <pre class="lines">
326
+
327
+
328
+ 56
329
+ 57
330
+ 58
331
+ 59
332
+ 60
333
+ 61
334
+ 62
335
+ 63
336
+ 64
337
+ 65
338
+ 66
339
+ 67
340
+ 68
341
+ 69
342
+ 70
343
+ 71
344
+ 72
345
+ 73
346
+ 74
347
+ 75
348
+ 76</pre>
349
+ </td>
350
+ <td>
351
+ <pre class="code"><span class="info file"># File 'lib/naether/bootstrap.rb', line 56</span>
352
+
353
+ <span class='kw'>def</span> <span class='id identifier rubyid_bootstrap_local_repo'>bootstrap_local_repo</span><span class='lparen'>(</span><span class='id identifier rubyid_local_repo'>local_repo</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='rparen'>)</span>
354
+ <span class='id identifier rubyid_local_repo'>local_repo</span> <span class='op'>=</span> <span class='id identifier rubyid_local_repo'>local_repo</span> <span class='op'>||</span> <span class='id identifier rubyid_default_local_repo'>default_local_repo</span>
355
+
356
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:local_repo</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_local_repo'>local_repo</span>
357
+
358
+ <span class='id identifier rubyid_temp_naether_dir'>temp_naether_dir</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span> <span class='id identifier rubyid_local_repo'>local_repo</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.naether</span><span class='tstring_end'>&quot;</span></span> <span class='rparen'>)</span>
359
+
360
+
361
+ <span class='id identifier rubyid_deps'>deps</span> <span class='op'>=</span> <span class='id identifier rubyid_download_dependencies'>download_dependencies</span><span class='lparen'>(</span> <span class='id identifier rubyid_temp_naether_dir'>temp_naether_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='rparen'>)</span>
362
+
363
+ <span class='id identifier rubyid_jars'>jars</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_deps'>deps</span><span class='lbracket'>[</span><span class='symbol'>:exists</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='id identifier rubyid_deps'>deps</span><span class='lbracket'>[</span><span class='symbol'>:downloaded</span><span class='rbracket'>]</span><span class='rparen'>)</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_jar'>jar</span><span class='op'>|</span> <span class='id identifier rubyid_jar'>jar</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span> <span class='rbrace'>}</span>
364
+
365
+ <span class='id identifier rubyid_jars'>jars</span> <span class='op'>=</span> <span class='const'>Naether</span><span class='op'>::</span><span class='const'>Java</span><span class='period'>.</span><span class='id identifier rubyid_internal_load_paths'>internal_load_paths</span><span class='lparen'>(</span> <span class='id identifier rubyid_jars'>jars</span> <span class='rparen'>)</span>
366
+
367
+ <span class='kw'>if</span> <span class='lparen'>(</span> <span class='id identifier rubyid_deps'>deps</span><span class='lbracket'>[</span><span class='symbol'>:downloaded</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='int'>0</span><span class='rparen'>)</span>
368
+ <span class='id identifier rubyid_install_dependencies_to_local_repo'>install_dependencies_to_local_repo</span><span class='lparen'>(</span> <span class='id identifier rubyid_deps'>deps</span><span class='lbracket'>[</span><span class='symbol'>:downloaded</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_jars'>jars</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='rparen'>)</span>
369
+ <span class='kw'>end</span>
370
+
371
+ <span class='comment'>#raise Naether::Java.instance.java.class_loader.getLoadedPaths().map { |x| x.toString() }.sort.inspect
372
+ </span>
373
+ <span class='kw'>end</span></pre>
374
+ </td>
375
+ </tr>
376
+ </table>
377
+ </div>
378
+
379
+ <div class="method_details ">
380
+ <h3 class="signature " id="check_local_repo_for_deps-class_method">
381
+
382
+ + (<tt>Object</tt>) <strong>check_local_repo_for_deps</strong>(local_repo = nil, opts = {})
383
+
384
+
385
+
386
+
387
+
388
+ </h3><table class="source_code">
389
+ <tr>
390
+ <td>
391
+ <pre class="lines">
392
+
393
+
394
+ 124
395
+ 125
396
+ 126
397
+ 127
398
+ 128
399
+ 129
400
+ 130
401
+ 131
402
+ 132
403
+ 133
404
+ 134
405
+ 135
406
+ 136
407
+ 137
408
+ 138
409
+ 139
410
+ 140
411
+ 141
412
+ 142
413
+ 143
414
+ 144
415
+ 145
416
+ 146
417
+ 147
418
+ 148
419
+ 149
420
+ 150
421
+ 151
422
+ 152</pre>
423
+ </td>
424
+ <td>
425
+ <pre class="code"><span class="info file"># File 'lib/naether/bootstrap.rb', line 124</span>
426
+
427
+ <span class='kw'>def</span> <span class='id identifier rubyid_check_local_repo_for_deps'>check_local_repo_for_deps</span><span class='lparen'>(</span><span class='id identifier rubyid_local_repo'>local_repo</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='rparen'>)</span>
428
+
429
+ <span class='id identifier rubyid_local_repo'>local_repo</span> <span class='op'>=</span> <span class='id identifier rubyid_local_repo'>local_repo</span> <span class='op'>||</span> <span class='id identifier rubyid_default_local_repo'>default_local_repo</span>
430
+ <span class='id identifier rubyid_local_repo'>local_repo</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='lparen'>(</span><span class='id identifier rubyid_local_repo'>local_repo</span><span class='rparen'>)</span>
431
+
432
+ <span class='comment'>#puts &quot;Checking #{local_repo} for jars to bootstrap Naether&quot;
433
+ </span>
434
+ <span class='id identifier rubyid_deps'>deps</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='symbol'>:exists</span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:missing</span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:downloaded</span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
435
+
436
+ <span class='id identifier rubyid_dependencies'>dependencies</span><span class='lparen'>(</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:dep_yaml</span><span class='rbracket'>]</span> <span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_dep'>dep</span><span class='op'>|</span>
437
+ <span class='id identifier rubyid_notation'>notation</span> <span class='op'>=</span> <span class='id identifier rubyid_dep'>dep</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>:</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
438
+ <span class='id identifier rubyid_group'>group</span> <span class='op'>=</span> <span class='id identifier rubyid_notation'>notation</span><span class='lbracket'>[</span><span class='int'>0</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'>&quot;</span><span class='tstring_content'>\.</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='const'>File</span><span class='op'>::</span><span class='const'>SEPARATOR</span><span class='rparen'>)</span>
439
+ <span class='id identifier rubyid_artifact'>artifact</span> <span class='op'>=</span> <span class='id identifier rubyid_notation'>notation</span><span class='lbracket'>[</span><span class='int'>1</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'>&quot;</span><span class='tstring_content'>\.</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='const'>File</span><span class='op'>::</span><span class='const'>SEPARATOR</span><span class='rparen'>)</span>
440
+ <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='id identifier rubyid_notation'>notation</span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span>
441
+ <span class='id identifier rubyid_version'>version</span> <span class='op'>=</span> <span class='id identifier rubyid_notation'>notation</span><span class='lbracket'>[</span><span class='int'>3</span><span class='rbracket'>]</span>
442
+
443
+ <span class='id identifier rubyid_jar'>jar</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_artifact'>artifact</span><span class='rbrace'>}</span><span class='tstring_content'>-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_version'>version</span><span class='rbrace'>}</span><span class='tstring_content'>.</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
444
+
445
+ <span class='id identifier rubyid_maven_path'>maven_path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_local_repo'>local_repo</span><span class='rbrace'>}</span><span class='embexpr_beg'>#{</span><span class='const'>File</span><span class='op'>::</span><span class='const'>SEPARATOR</span><span class='rbrace'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_group'>group</span><span class='rbrace'>}</span><span class='embexpr_beg'>#{</span><span class='const'>File</span><span class='op'>::</span><span class='const'>SEPARATOR</span><span class='rbrace'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_artifact'>artifact</span><span class='rbrace'>}</span><span class='embexpr_beg'>#{</span><span class='const'>File</span><span class='op'>::</span><span class='const'>SEPARATOR</span><span class='rbrace'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_version'>version</span><span class='rbrace'>}</span><span class='embexpr_beg'>#{</span><span class='const'>File</span><span class='op'>::</span><span class='const'>SEPARATOR</span><span class='rbrace'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_jar'>jar</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
446
+
447
+ <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_maven_path'>maven_path</span>
448
+ <span class='id identifier rubyid_deps'>deps</span><span class='lbracket'>[</span><span class='symbol'>:exists</span><span class='rbracket'>]</span> <span class='op'>&lt;&lt;</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_dep'>dep</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_maven_path'>maven_path</span> <span class='rbrace'>}</span>
449
+ <span class='kw'>else</span>
450
+ <span class='id identifier rubyid_deps'>deps</span><span class='lbracket'>[</span><span class='symbol'>:missing</span><span class='rbracket'>]</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_dep'>dep</span>
451
+ <span class='kw'>end</span>
452
+
453
+ <span class='kw'>end</span>
454
+ <span class='id identifier rubyid_deps'>deps</span>
455
+ <span class='kw'>end</span></pre>
456
+ </td>
457
+ </tr>
458
+ </table>
459
+ </div>
460
+
461
+ <div class="method_details ">
462
+ <h3 class="signature " id="default_local_repo-class_method">
463
+
464
+ + (<tt>Object</tt>) <strong>default_local_repo</strong>
465
+
466
+
467
+
468
+
469
+
470
+ </h3><table class="source_code">
471
+ <tr>
472
+ <td>
473
+ <pre class="lines">
474
+
475
+
476
+ 21
477
+ 22
478
+ 23</pre>
479
+ </td>
480
+ <td>
481
+ <pre class="code"><span class="info file"># File 'lib/naether/bootstrap.rb', line 21</span>
482
+
483
+ <span class='kw'>def</span> <span class='id identifier rubyid_default_local_repo'>default_local_repo</span>
484
+ <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>M2_REPO</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</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='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>~/.m2/repository</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
485
+ <span class='kw'>end</span></pre>
486
+ </td>
487
+ </tr>
488
+ </table>
489
+ </div>
490
+
491
+ <div class="method_details ">
492
+ <h3 class="signature " id="dependencies-class_method">
493
+
494
+ + (<tt>Object</tt>) <strong>dependencies</strong>(dep_file = nil)
495
+
496
+
497
+
498
+
499
+
500
+ </h3><div class="docstring">
501
+ <div class="discussion">
502
+
503
+ <p>List of Java dependencies for Naether</p>
504
+
505
+
506
+ </div>
507
+ </div>
508
+ <div class="tags">
509
+
510
+
511
+ </div><table class="source_code">
512
+ <tr>
513
+ <td>
514
+ <pre class="lines">
515
+
516
+
517
+ 41
518
+ 42
519
+ 43
520
+ 44
521
+ 45
522
+ 46
523
+ 47
524
+ 48
525
+ 49
526
+ 50
527
+ 51
528
+ 52
529
+ 53</pre>
530
+ </td>
531
+ <td>
532
+ <pre class="code"><span class="info file"># File 'lib/naether/bootstrap.rb', line 41</span>
533
+
534
+ <span class='kw'>def</span> <span class='id identifier rubyid_dependencies'>dependencies</span><span class='lparen'>(</span> <span class='id identifier rubyid_dep_file'>dep_file</span><span class='op'>=</span><span class='kw'>nil</span> <span class='rparen'>)</span>
535
+
536
+ <span class='kw'>if</span> <span class='cvar'>@@dependencies</span>
537
+ <span class='kw'>return</span> <span class='cvar'>@@dependencies</span>
538
+ <span class='kw'>end</span>
539
+
540
+ <span class='kw'>if</span> <span class='id identifier rubyid_dep_file'>dep_file</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
541
+ <span class='id identifier rubyid_dep_file'>dep_file</span> <span class='op'>=</span> <span class='const'>Naether</span><span class='op'>::</span><span class='const'>Configuration</span><span class='period'>.</span><span class='id identifier rubyid_dependencies_yml'>dependencies_yml</span>
542
+ <span class='kw'>end</span>
543
+
544
+ <span class='id identifier rubyid_dep'>dep</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='lparen'>(</span> <span class='id identifier rubyid_dep_file'>dep_file</span> <span class='rparen'>)</span>
545
+ <span class='cvar'>@@dependencies</span> <span class='op'>=</span> <span class='id identifier rubyid_dep'>dep</span><span class='lbracket'>[</span><span class='symbol'>:dependencies</span><span class='rbracket'>]</span>
546
+ <span class='kw'>end</span></pre>
547
+ </td>
548
+ </tr>
549
+ </table>
550
+ </div>
551
+
552
+ <div class="method_details ">
553
+ <h3 class="signature " id="download_dependencies-class_method">
554
+
555
+ + (<tt>Object</tt>) <strong>download_dependencies</strong>(dest, opts = {})
556
+
557
+
558
+
559
+
560
+
561
+ </h3><table class="source_code">
562
+ <tr>
563
+ <td>
564
+ <pre class="lines">
565
+
566
+
567
+ 78
568
+ 79
569
+ 80
570
+ 81
571
+ 82
572
+ 83
573
+ 84
574
+ 85
575
+ 86
576
+ 87
577
+ 88
578
+ 89
579
+ 90
580
+ 91
581
+ 92
582
+ 93
583
+ 94
584
+ 95
585
+ 96
586
+ 97
587
+ 98
588
+ 99
589
+ 100
590
+ 101
591
+ 102
592
+ 103
593
+ 104
594
+ 105
595
+ 106
596
+ 107
597
+ 108
598
+ 109
599
+ 110
600
+ 111
601
+ 112
602
+ 113
603
+ 114
604
+ 115
605
+ 116
606
+ 117
607
+ 118
608
+ 119
609
+ 120
610
+ 121
611
+ 122</pre>
612
+ </td>
613
+ <td>
614
+ <pre class="code"><span class="info file"># File 'lib/naether/bootstrap.rb', line 78</span>
615
+
616
+ <span class='kw'>def</span> <span class='id identifier rubyid_download_dependencies'>download_dependencies</span><span class='lparen'>(</span> <span class='id identifier rubyid_dest'>dest</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='rparen'>)</span>
617
+
618
+ <span class='kw'>if</span> <span class='op'>!</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span> <span class='id identifier rubyid_dest'>dest</span>
619
+ <span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_mkdir_p'>mkdir_p</span><span class='lparen'>(</span> <span class='id identifier rubyid_dest'>dest</span> <span class='rparen'>)</span>
620
+ <span class='kw'>end</span>
621
+
622
+ <span class='id identifier rubyid_deps'>deps</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
623
+
624
+ <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:deps</span><span class='rbracket'>]</span>
625
+ <span class='id identifier rubyid_deps'>deps</span><span class='lbracket'>[</span><span class='symbol'>:missing</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:deps</span><span class='rbracket'>]</span>
626
+ <span class='kw'>else</span>
627
+ <span class='id identifier rubyid_deps'>deps</span> <span class='op'>=</span> <span class='id identifier rubyid_check_local_repo_for_deps'>check_local_repo_for_deps</span><span class='lparen'>(</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:local_repo</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='rparen'>)</span>
628
+ <span class='kw'>end</span>
629
+
630
+ <span class='id identifier rubyid_deps'>deps</span><span class='lbracket'>[</span><span class='symbol'>:downloaded</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
631
+
632
+ <span class='kw'>if</span> <span class='id identifier rubyid_deps'>deps</span><span class='lbracket'>[</span><span class='symbol'>:missing</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='int'>0</span>
633
+
634
+ <span class='id identifier rubyid_deps'>deps</span><span class='lbracket'>[</span><span class='symbol'>:missing</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_dep'>dep</span><span class='op'>|</span>
635
+ <span class='id identifier rubyid_notation'>notation</span> <span class='op'>=</span> <span class='id identifier rubyid_dep'>dep</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>:</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
636
+ <span class='id identifier rubyid_group'>group</span> <span class='op'>=</span> <span class='id identifier rubyid_notation'>notation</span><span class='lbracket'>[</span><span class='int'>0</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'>&quot;</span><span class='tstring_content'>\.</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='const'>File</span><span class='op'>::</span><span class='const'>SEPARATOR</span><span class='rparen'>)</span>
637
+ <span class='id identifier rubyid_artifact'>artifact</span> <span class='op'>=</span> <span class='id identifier rubyid_notation'>notation</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
638
+ <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='id identifier rubyid_notation'>notation</span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span>
639
+ <span class='id identifier rubyid_version'>version</span> <span class='op'>=</span> <span class='id identifier rubyid_notation'>notation</span><span class='lbracket'>[</span><span class='int'>3</span><span class='rbracket'>]</span>
640
+
641
+ <span class='id identifier rubyid_jar'>jar</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_artifact'>artifact</span><span class='rbrace'>}</span><span class='tstring_content'>-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_version'>version</span><span class='rbrace'>}</span><span class='tstring_content'>.</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
642
+
643
+ <span class='id identifier rubyid_maven_path'>maven_path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dest'>dest</span><span class='rbrace'>}</span><span class='embexpr_beg'>#{</span><span class='const'>File</span><span class='op'>::</span><span class='const'>SEPARATOR</span><span class='rbrace'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_jar'>jar</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
644
+
645
+ <span class='kw'>if</span> <span class='op'>!</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span> <span class='id identifier rubyid_maven_path'>maven_path</span>
646
+ <span class='id identifier rubyid_maven_mirror'>maven_mirror</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>http://repo1.maven.org/maven2/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_group'>group</span><span class='rbrace'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_artifact'>artifact</span><span class='rbrace'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_version'>version</span><span class='rbrace'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_jar'>jar</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
647
+
648
+ <span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_maven_path'>maven_path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>wb</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_io'>io</span><span class='op'>|</span>
649
+ <span class='id identifier rubyid_io'>io</span><span class='period'>.</span><span class='id identifier rubyid_print'>print</span> <span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_maven_mirror'>maven_mirror</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span>
650
+ <span class='kw'>end</span>
651
+
652
+ <span class='id identifier rubyid_deps'>deps</span><span class='lbracket'>[</span><span class='symbol'>:downloaded</span><span class='rbracket'>]</span> <span class='op'>&lt;&lt;</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_dep'>dep</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_maven_path'>maven_path</span> <span class='rbrace'>}</span>
653
+ <span class='kw'>else</span>
654
+ <span class='id identifier rubyid_deps'>deps</span><span class='lbracket'>[</span><span class='symbol'>:downloaded</span><span class='rbracket'>]</span> <span class='op'>&lt;&lt;</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_dep'>dep</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_maven_path'>maven_path</span> <span class='rbrace'>}</span>
655
+ <span class='kw'>end</span>
656
+ <span class='kw'>end</span>
657
+ <span class='kw'>end</span>
658
+
659
+ <span class='id identifier rubyid_deps'>deps</span>
660
+ <span class='kw'>end</span></pre>
661
+ </td>
662
+ </tr>
663
+ </table>
664
+ </div>
665
+
666
+ <div class="method_details ">
667
+ <h3 class="signature " id="install_dependencies_to_local_repo-class_method">
668
+
669
+ + (<tt>Object</tt>) <strong>install_dependencies_to_local_repo</strong>(install_jars, naether_jars, opts = {})
670
+
671
+
672
+
673
+
674
+
675
+ </h3><table class="source_code">
676
+ <tr>
677
+ <td>
678
+ <pre class="lines">
679
+
680
+
681
+ 154
682
+ 155
683
+ 156
684
+ 157
685
+ 158
686
+ 159
687
+ 160
688
+ 161
689
+ 162
690
+ 163
691
+ 164
692
+ 165
693
+ 166
694
+ 167
695
+ 168
696
+ 169
697
+ 170</pre>
698
+ </td>
699
+ <td>
700
+ <pre class="code"><span class="info file"># File 'lib/naether/bootstrap.rb', line 154</span>
701
+
702
+ <span class='kw'>def</span> <span class='id identifier rubyid_install_dependencies_to_local_repo'>install_dependencies_to_local_repo</span><span class='lparen'>(</span> <span class='id identifier rubyid_install_jars'>install_jars</span><span class='comma'>,</span> <span class='id identifier rubyid_naether_jars'>naether_jars</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='rparen'>)</span>
703
+
704
+ <span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>/../naether</span><span class='tstring_end'>&quot;</span></span>
705
+
706
+ <span class='ivar'>@naether</span> <span class='op'>=</span> <span class='const'>Naether</span><span class='period'>.</span><span class='id identifier rubyid_create_from_jars'>create_from_jars</span><span class='lparen'>(</span> <span class='id identifier rubyid_naether_jars'>naether_jars</span> <span class='rparen'>)</span>
707
+
708
+ <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:local_repo</span><span class='rbracket'>]</span>
709
+ <span class='ivar'>@naether</span><span class='period'>.</span><span class='id identifier rubyid_local_repo_path'>local_repo_path</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:local_repo</span><span class='rbracket'>]</span>
710
+ <span class='kw'>end</span>
711
+
712
+ <span class='id identifier rubyid_install_jars'>install_jars</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_dep'>dep</span><span class='op'>|</span>
713
+ <span class='id identifier rubyid_notation'>notation</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_dep'>dep</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
714
+ <span class='ivar'>@naether</span><span class='period'>.</span><span class='id identifier rubyid_install'>install</span><span class='lparen'>(</span> <span class='id identifier rubyid_notation'>notation</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span> <span class='rparen'>)</span>
715
+ <span class='kw'>end</span>
716
+
717
+ <span class='ivar'>@naether</span>
718
+ <span class='kw'>end</span></pre>
719
+ </td>
720
+ </tr>
721
+ </table>
722
+ </div>
723
+
724
+ <div class="method_details ">
725
+ <h3 class="signature " id="write_dependencies-class_method">
726
+
727
+ + (<tt>Object</tt>) <strong>write_dependencies</strong>(dest = 'jar_dependencies.yml')
728
+
729
+
730
+
731
+
732
+
733
+ </h3><div class="docstring">
734
+ <div class="discussion">
735
+
736
+ <p>write bootstrap dependencies to yaml file</p>
737
+
738
+
739
+ </div>
740
+ </div>
741
+ <div class="tags">
742
+
743
+
744
+ </div><table class="source_code">
745
+ <tr>
746
+ <td>
747
+ <pre class="lines">
748
+
749
+
750
+ 26
751
+ 27
752
+ 28
753
+ 29
754
+ 30
755
+ 31
756
+ 32
757
+ 33
758
+ 34
759
+ 35
760
+ 36
761
+ 37
762
+ 38</pre>
763
+ </td>
764
+ <td>
765
+ <pre class="code"><span class="info file"># File 'lib/naether/bootstrap.rb', line 26</span>
766
+
767
+ <span class='kw'>def</span> <span class='id identifier rubyid_write_dependencies'>write_dependencies</span><span class='lparen'>(</span> <span class='id identifier rubyid_dest'>dest</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>jar_dependencies.yml</span><span class='tstring_end'>'</span></span> <span class='rparen'>)</span>
768
+ <span class='id identifier rubyid_deps'>deps</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='semicolon'>;</span>
769
+ <span class='kw'>if</span> <span class='const'>Naether</span><span class='op'>::</span><span class='const'>Configuration</span><span class='period'>.</span><span class='id identifier rubyid_platform'>platform</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>java</span><span class='tstring_end'>'</span></span>
770
+ <span class='id identifier rubyid_deps'>deps</span><span class='lbracket'>[</span><span class='symbol'>:dependencies</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_com'>com</span><span class='period'>.</span><span class='id identifier rubyid_tobedevoured'>tobedevoured</span><span class='period'>.</span><span class='id identifier rubyid_naether'>naether</span><span class='period'>.</span><span class='const'>Bootstrap</span><span class='period'>.</span><span class='id identifier rubyid_dependencies'>dependencies</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span>
771
+ <span class='kw'>else</span>
772
+ <span class='id identifier rubyid_bootstrap'>bootstrap</span> <span class='op'>=</span> <span class='const'>Rjb</span><span class='op'>::</span><span class='id identifier rubyid_import'>import</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>com.tobedevoured.naether.Bootstrap</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
773
+ <span class='id identifier rubyid_deps'>deps</span><span class='lbracket'>[</span><span class='symbol'>:dependencies</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_bootstrap'>bootstrap</span><span class='period'>.</span><span class='id identifier rubyid_dependencies'>dependencies</span><span class='period'>.</span><span class='id identifier rubyid_toArray'>toArray</span><span class='lparen'>(</span><span class='rparen'>)</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_dep'>dep</span><span class='op'>|</span> <span class='id identifier rubyid_dep'>dep</span><span class='period'>.</span><span class='id identifier rubyid_toString'>toString</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
774
+ <span class='kw'>end</span>
775
+
776
+ <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span> <span class='id identifier rubyid_dest'>dest</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>w</span><span class='tstring_end'>'</span></span> <span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_out'>out</span><span class='op'>|</span>
777
+ <span class='const'>YAML</span><span class='period'>.</span><span class='id identifier rubyid_dump'>dump</span><span class='lparen'>(</span> <span class='id identifier rubyid_deps'>deps</span><span class='comma'>,</span> <span class='id identifier rubyid_out'>out</span> <span class='rparen'>)</span>
778
+ <span class='kw'>end</span>
779
+ <span class='kw'>end</span></pre>
780
+ </td>
781
+ </tr>
782
+ </table>
783
+ </div>
784
+
785
+ </div>
786
+
787
+ </div>
788
+
789
+ <div id="footer">
790
+ Generated on Wed Sep 12 14:18:13 2012 by
791
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
792
+ 0.8.2.1 (ruby-1.9.3).
793
+ </div>
794
+
795
+ </body>
796
+ </html>