radiant-ray-extension 3.0.0.alpha → 3.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. data/README.markdown +1 -1
  2. data/Rakefile +2 -0
  3. data/doc/NilClass.html +178 -0
  4. data/doc/Ray/CLI.html +211 -197
  5. data/doc/Ray/Extension/Git.html +435 -0
  6. data/doc/Ray/Extension/RubyGem.html +858 -0
  7. data/doc/Ray/Extension/Zip.html +453 -0
  8. data/doc/Ray/Extension.html +755 -0
  9. data/doc/Ray/{Cache.html → Search/Cache.html} +108 -256
  10. data/doc/Ray/{GitHub.html → Search/GitHub.html} +167 -81
  11. data/doc/Ray/{RubyGems.html → Search/RubyGems.html} +118 -68
  12. data/doc/Ray/Search.html +822 -0
  13. data/doc/Ray.html +89 -34
  14. data/doc/String.html +99 -29
  15. data/doc/_index.html +1 -1
  16. data/doc/file.LICENSE.html +1 -1
  17. data/doc/file.README.html +2 -4
  18. data/doc/index.html +1 -1
  19. data/doc/top-level-namespace.html +3 -3
  20. data/lib/ray/cli.rb +146 -193
  21. data/lib/ray/constants.rb +7 -12
  22. data/lib/ray/extension.rb +203 -89
  23. data/lib/ray/search.rb +198 -43
  24. data/lib/ray/utility.rb +31 -0
  25. data/lib/ray.rb +2 -7
  26. data/spec/fixtures/cache_single.yml +2 -1
  27. data/spec/fixtures/cassettes/combined_search_empty.yml +71 -0
  28. data/spec/fixtures/cassettes/combined_search_multiple.yml +264 -0
  29. data/spec/fixtures/cassettes/combined_search_single.yml +108 -0
  30. data/spec/fixtures/cassettes/github_reorder_children_zip_file.yml +487 -0
  31. data/spec/fixtures/cassettes/github_sitemap_xml_zip_file.yml +553 -0
  32. data/spec/fixtures/cassettes/{github_v2_api_no_matches.yml → github_v2_search_empty.yml} +3 -3
  33. data/spec/fixtures/cassettes/github_v2_search_multiple.yml +225 -0
  34. data/spec/fixtures/cassettes/github_v2_search_single.yml +76 -0
  35. data/spec/fixtures/cassettes/{zip_file.yml → github_zip_file.yml} +3 -3
  36. data/spec/fixtures/cassettes/{rubygems_v1_api_gem_info.yml → rubygems_v1_gem_info.yml} +5 -5
  37. data/spec/fixtures/cassettes/{rubygems_v1_api_no_matches.yml → rubygems_v1_search_empty.yml} +3 -3
  38. data/spec/fixtures/cassettes/rubygems_v1_search_multiple.yml +40 -0
  39. data/spec/fixtures/cassettes/{rubygems_v1_api_search_reorder_children.yml → rubygems_v1_search_single.yml} +6 -6
  40. data/spec/fixtures/dummy.zip +0 -0
  41. data/spec/ray/extension_spec.rb +172 -0
  42. data/spec/ray/search_spec.rb +300 -0
  43. data/spec/spec_helper.rb +36 -9
  44. metadata +50 -85
  45. data/doc/Extension.html +0 -1189
  46. data/doc/Ray/Gem.html +0 -760
  47. data/doc/Ray/Git.html +0 -278
  48. data/doc/Ray/Zip.html +0 -300
  49. data/doc/Search.html +0 -433
  50. data/lib/ray/extension/gem.rb +0 -96
  51. data/lib/ray/extension/git.rb +0 -30
  52. data/lib/ray/extension/zip.rb +0 -44
  53. data/lib/ray/search/cache.rb +0 -61
  54. data/lib/ray/search/github.rb +0 -40
  55. data/lib/ray/search/rubygems.rb +0 -36
  56. data/lib/ray/string.rb +0 -18
  57. data/spec/fixtures/Gemfile +0 -4
  58. data/spec/fixtures/cassettes/github_v2_api_search_no_matches.yml +0 -38
  59. data/spec/fixtures/cassettes/github_v2_api_search_reorder_children.yml +0 -75
  60. data/spec/fixtures/cassettes/github_v2_api_search_single.yml +0 -74
  61. data/spec/fixtures/cassettes/github_v3_api_owner_name.yml +0 -75
  62. data/spec/fixtures/cassettes/rubygems_v1_api_search_no_matches.yml +0 -34
  63. data/spec/fixtures/cassettes/rubygems_v1_api_search_reorder.yml +0 -36
  64. data/spec/fixtures/cassettes/rubygems_v1_api_search_single.yml +0 -41
  65. data/spec/fixtures/dummy/README +0 -1
  66. data/spec/fixtures/dummy/Rakefile +0 -109
  67. data/spec/fixtures/dummy/config/initializers/radiant_config.rb +0 -3
  68. data/spec/fixtures/dummy/config/locales/en.yml +0 -3
  69. data/spec/fixtures/dummy/config/routes.rb +0 -5
  70. data/spec/fixtures/dummy/dummy_extension.rb +0 -21
  71. data/spec/fixtures/dummy/lib/radiant-dummy-extension.rb +0 -8
  72. data/spec/fixtures/dummy/lib/tasks/dummy_extension_tasks.rake +0 -47
  73. data/spec/fixtures/dummy/public/stylesheets/extensions/dummy/dummy.css +0 -0
  74. data/spec/fixtures/dummy/radiant-dummy-extension.gemspec +0 -29
  75. data/spec/ray/extension/gem_spec.rb +0 -214
  76. data/spec/ray/extension/git_spec.rb +0 -216
  77. data/spec/ray/extension/zip_spec.rb +0 -239
  78. data/spec/ray/search/cache_spec.rb +0 -74
  79. data/spec/ray/search/github_spec.rb +0 -137
  80. data/spec/ray/search/rubygems_spec.rb +0 -127
  81. data/spec/ray/string_spec.rb +0 -30
@@ -0,0 +1,858 @@
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: Ray::Extension::RubyGem
8
+
9
+ &mdash; Documentation by YARD 0.7.3
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
+ relpath = '../..';
19
+ if (relpath != '') relpath += '/';
20
+ </script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <script type="text/javascript" charset="utf-8">
30
+ if (window.top.frames.main) document.body.className = 'frames';
31
+ </script>
32
+
33
+ <div id="header">
34
+ <div id="menu">
35
+
36
+ <a href="../../_index.html">Index (R)</a> &raquo;
37
+ <span class='title'><span class='object_link'><a href="../../Ray.html" title="Ray (module)">Ray</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Extension.html" title="Ray::Extension (class)">Extension</a></span></span>
38
+ &raquo;
39
+ <span class="title">RubyGem</span>
40
+
41
+
42
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
+ </div>
44
+
45
+ <div id="search">
46
+
47
+ <a id="class_list_link" href="#">Class List</a>
48
+
49
+ <a id="method_list_link" href="#">Method List</a>
50
+
51
+ <a id="file_list_link" href="#">File List</a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1>Class: Ray::Extension::RubyGem
60
+
61
+
62
+
63
+ </h1>
64
+
65
+ <dl class="box">
66
+
67
+ <dt class="r1">Inherits:</dt>
68
+ <dd class="r1">
69
+ <span class="inheritName"><span class='object_link'><a href="../Extension.html" title="Ray::Extension (class)">Ray::Extension</a></span></span>
70
+
71
+ <ul class="fullTree">
72
+ <li>Object</li>
73
+
74
+ <li class="next"><span class='object_link'><a href="../Extension.html" title="Ray::Extension (class)">Ray::Extension</a></span></li>
75
+
76
+ <li class="next">Ray::Extension::RubyGem</li>
77
+
78
+ </ul>
79
+ <a href="#" class="inheritanceTree">show all</a>
80
+
81
+ </dd>
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+ <dt class="r2 last">Defined in:</dt>
92
+ <dd class="r2 last">lib/ray/extension.rb</dd>
93
+
94
+ </dl>
95
+ <div class="clear"></div>
96
+
97
+ <h2>Overview</h2><div class="docstring">
98
+ <div class="discussion">
99
+ <p>Install extensions from RubyGems</p>
100
+
101
+
102
+ </div>
103
+ </div>
104
+ <div class="tags">
105
+
106
+
107
+ </div>
108
+
109
+
110
+
111
+
112
+
113
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
114
+ <ul class="summary">
115
+
116
+ <li class="public ">
117
+ <span class="summary_signature">
118
+
119
+ <a href="#name-instance_method" title="#name (instance method)">- (Object) <strong>name</strong> </a>
120
+
121
+
122
+
123
+ </span>
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute name.</p>
136
+ </div></span>
137
+
138
+ </li>
139
+
140
+
141
+ <li class="public ">
142
+ <span class="summary_signature">
143
+
144
+ <a href="#uri-instance_method" title="#uri (instance method)">- (Object) <strong>uri</strong> </a>
145
+
146
+
147
+
148
+ </span>
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute uri.</p>
161
+ </div></span>
162
+
163
+ </li>
164
+
165
+
166
+ </ul>
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+ <h2>
176
+ Instance Method Summary
177
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
178
+ </h2>
179
+
180
+ <ul class="summary">
181
+
182
+ <li class="public ">
183
+ <span class="summary_signature">
184
+
185
+ <a href="#bundle-instance_method" title="#bundle (instance method)">- (Object) <strong>bundle</strong> </a>
186
+
187
+
188
+
189
+ (also: #enable)
190
+
191
+ </span>
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+ <span class="summary_desc"><div class='inline'><p>Bundle extension.</p>
201
+ </div></span>
202
+
203
+ </li>
204
+
205
+
206
+ <li class="public ">
207
+ <span class="summary_signature">
208
+
209
+ <a href="#disable-instance_method" title="#disable (instance method)">- (Object) <strong>disable</strong> </a>
210
+
211
+
212
+
213
+ </span>
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+ <span class="summary_desc"><div class='inline'>
223
+ </div></span>
224
+
225
+ </li>
226
+
227
+
228
+ <li class="public ">
229
+ <span class="summary_signature">
230
+
231
+ <a href="#get_version-instance_method" title="#get_version (instance method)">- (Object) <strong>get_version</strong> </a>
232
+
233
+
234
+
235
+ </span>
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+ <span class="summary_desc"><div class='inline'>
245
+ </div></span>
246
+
247
+ </li>
248
+
249
+
250
+ <li class="public ">
251
+ <span class="summary_signature">
252
+
253
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (RubyGem) <strong>initialize</strong>(name = nil, uri = nil, version = nil) </a>
254
+
255
+
256
+
257
+ </span>
258
+
259
+ <span class="note title constructor">constructor</span>
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+ <span class="summary_desc"><div class='inline'><p>A new instance of RubyGem.</p>
269
+ </div></span>
270
+
271
+ </li>
272
+
273
+
274
+ <li class="public ">
275
+ <span class="summary_signature">
276
+
277
+ <a href="#install-instance_method" title="#install (instance method)">- (Object) <strong>install</strong> </a>
278
+
279
+
280
+
281
+ </span>
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+ <span class="summary_desc"><div class='inline'><p>copy and run Rake tasks.</p>
291
+ </div></span>
292
+
293
+ </li>
294
+
295
+
296
+ <li class="public ">
297
+ <span class="summary_signature">
298
+
299
+ <a href="#load_rake_tasks-instance_method" title="#load_rake_tasks (instance method)">- (Array) <strong>load_rake_tasks</strong> </a>
300
+
301
+
302
+
303
+ </span>
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+ <span class="summary_desc"><div class='inline'><p>Load Rakefile.</p>
313
+ </div></span>
314
+
315
+ </li>
316
+
317
+
318
+ <li class="public ">
319
+ <span class="summary_signature">
320
+
321
+ <a href="#public_service_announcement-instance_method" title="#public_service_announcement (instance method)">- (Object) <strong>public_service_announcement</strong> </a>
322
+
323
+
324
+
325
+ </span>
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+ <span class="summary_desc"><div class='inline'>
335
+ </div></span>
336
+
337
+ </li>
338
+
339
+
340
+ <li class="public ">
341
+ <span class="summary_signature">
342
+
343
+ <a href="#uninstall-instance_method" title="#uninstall (instance method)">- (Object) <strong>uninstall</strong> </a>
344
+
345
+
346
+
347
+ </span>
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+ <span class="summary_desc"><div class='inline'><p>def enable.</p>
357
+ </div></span>
358
+
359
+ </li>
360
+
361
+
362
+ </ul>
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Extension.html" title="Ray::Extension (class)">Ray::Extension</a></span></h3>
374
+ <p class="inherited"><span class='object_link'><a href="../Extension.html#download-instance_method" title="Ray::Extension#download (method)">#download</a></span>, <span class='object_link'><a href="../Extension.html#run_rake_tasks-instance_method" title="Ray::Extension#run_rake_tasks (method)">#run_rake_tasks</a></span>, <span class='object_link'><a href="../Extension.html#run_task-instance_method" title="Ray::Extension#run_task (method)">#run_task</a></span></p>
375
+ <div id="constructor_details" class="method_details_list">
376
+ <h2>Constructor Details</h2>
377
+
378
+ <div class="method_details first">
379
+ <p class="signature first" id="initialize-instance_method">
380
+
381
+ - (<tt><span class='object_link'><a href="" title="Ray::Extension::RubyGem (class)">RubyGem</a></span></tt>) <strong>initialize</strong>(name = nil, uri = nil, version = nil)
382
+
383
+
384
+
385
+ </p><div class="docstring">
386
+ <div class="discussion">
387
+ <p>A new instance of RubyGem</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
+ 153
402
+ 154
403
+ 155
404
+ 156
405
+ 157</pre>
406
+ </td>
407
+ <td>
408
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 153</span>
409
+
410
+ <span class='kw'>def</span> <span class='id initialize'>initialize</span> <span class='id name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id uri'>uri</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id version'>version</span> <span class='op'>=</span> <span class='kw'>nil</span>
411
+ <span class='ivar'>@name</span> <span class='op'>=</span> <span class='id name'>name</span><span class='period'>.</span><span class='id to_extension_name'>to_extension_name</span>
412
+ <span class='ivar'>@uri</span> <span class='op'>=</span> <span class='id uri'>uri</span>
413
+ <span class='ivar'>@version</span> <span class='op'>=</span> <span class='id version'>version</span> <span class='op'>||</span> <span class='id get_version'>get_version</span> <span class='kw'>if</span> <span class='ivar'>@name</span>
414
+ <span class='kw'>end</span></pre>
415
+ </td>
416
+ </tr>
417
+ </table>
418
+ </div>
419
+
420
+ </div>
421
+
422
+ <div id="instance_attr_details" class="attr_details">
423
+ <h2>Instance Attribute Details</h2>
424
+
425
+
426
+ <span id="name=-instance_method"></span>
427
+ <span id="name-instance_method"></span>
428
+ <div class="method_details first">
429
+ <p class="signature first" id="name-instance_method">
430
+
431
+ - (<tt>Object</tt>) <strong>name</strong>
432
+
433
+
434
+
435
+ </p><div class="docstring">
436
+ <div class="discussion">
437
+ <p>Returns the value of attribute name</p>
438
+
439
+
440
+ </div>
441
+ </div>
442
+ <div class="tags">
443
+
444
+
445
+ </div><table class="source_code">
446
+ <tr>
447
+ <td>
448
+ <pre class="lines">
449
+
450
+
451
+ 151
452
+ 152
453
+ 153</pre>
454
+ </td>
455
+ <td>
456
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 151</span>
457
+
458
+ <span class='kw'>def</span> <span class='id name'>name</span>
459
+ <span class='ivar'>@name</span>
460
+ <span class='kw'>end</span></pre>
461
+ </td>
462
+ </tr>
463
+ </table>
464
+ </div>
465
+
466
+
467
+ <span id="uri=-instance_method"></span>
468
+ <span id="uri-instance_method"></span>
469
+ <div class="method_details ">
470
+ <p class="signature " id="uri-instance_method">
471
+
472
+ - (<tt>Object</tt>) <strong>uri</strong>
473
+
474
+
475
+
476
+ </p><div class="docstring">
477
+ <div class="discussion">
478
+ <p>Returns the value of attribute uri</p>
479
+
480
+
481
+ </div>
482
+ </div>
483
+ <div class="tags">
484
+
485
+
486
+ </div><table class="source_code">
487
+ <tr>
488
+ <td>
489
+ <pre class="lines">
490
+
491
+
492
+ 151
493
+ 152
494
+ 153</pre>
495
+ </td>
496
+ <td>
497
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 151</span>
498
+
499
+ <span class='kw'>def</span> <span class='id uri'>uri</span>
500
+ <span class='ivar'>@uri</span>
501
+ <span class='kw'>end</span></pre>
502
+ </td>
503
+ </tr>
504
+ </table>
505
+ </div>
506
+
507
+ </div>
508
+
509
+
510
+ <div id="instance_method_details" class="method_details_list">
511
+ <h2>Instance Method Details</h2>
512
+
513
+
514
+ <div class="method_details first">
515
+ <p class="signature first" id="bundle-instance_method">
516
+
517
+ - (<tt>Object</tt>) <strong>bundle</strong>
518
+
519
+
520
+
521
+ <span class="aliases">Also known as:
522
+ <span class="names"><span id='enable-instance_method'>enable</span></span>
523
+ </span>
524
+
525
+ </p><div class="docstring">
526
+ <div class="discussion">
527
+ <p>Bundle extension</p>
528
+
529
+
530
+ </div>
531
+ </div>
532
+ <div class="tags">
533
+
534
+
535
+ </div><table class="source_code">
536
+ <tr>
537
+ <td>
538
+ <pre class="lines">
539
+
540
+
541
+ 160
542
+ 161
543
+ 162
544
+ 163
545
+ 164
546
+ 165</pre>
547
+ </td>
548
+ <td>
549
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 160</span>
550
+
551
+ <span class='kw'>def</span> <span class='id bundle'>bundle</span>
552
+ <span class='const'>File</span><span class='period'>.</span><span class='id open'>open</span> <span class='const'>GEMFILE</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>a</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id gemfile'>gemfile</span><span class='op'>|</span>
553
+ <span class='id gemfile'>gemfile</span><span class='period'>.</span><span class='id puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>gem \&quot;radiant-</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_content'>-extension\&quot;, \&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@version</span><span class='rbrace'>}</span><span class='tstring_content'>\&quot;</span><span class='tstring_end'>&quot;</span></span>
554
+ <span class='kw'>end</span>
555
+ <span class='backtick'>`</span><span class='tstring_content'>bundle update</span><span class='tstring_end'>`</span></span>
556
+ <span class='kw'>end</span></pre>
557
+ </td>
558
+ </tr>
559
+ </table>
560
+ </div>
561
+
562
+ <div class="method_details ">
563
+ <p class="signature " id="disable-instance_method">
564
+
565
+ - (<tt>Object</tt>) <strong>disable</strong>
566
+
567
+
568
+
569
+ </p><table class="source_code">
570
+ <tr>
571
+ <td>
572
+ <pre class="lines">
573
+
574
+
575
+ 178
576
+ 179
577
+ 180
578
+ 181
579
+ 182
580
+ 183
581
+ 184
582
+ 185
583
+ 186</pre>
584
+ </td>
585
+ <td>
586
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 178</span>
587
+
588
+ <span class='kw'>def</span> <span class='id disable'>disable</span>
589
+ <span class='id current'>current</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id read'>read</span> <span class='const'>GEMFILE</span>
590
+ <span class='id updated'>updated</span> <span class='op'>=</span> <span class='id current'>current</span><span class='period'>.</span><span class='id sub'>sub</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>gem &quot;radiant-</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_content'>-extension&quot;.+\n</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span>
591
+ <span class='const'>File</span><span class='period'>.</span><span class='id open'>open</span> <span class='const'>GEMFILE</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>w</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id gemfile'>gemfile</span><span class='op'>|</span>
592
+ <span class='id gemfile'>gemfile</span><span class='period'>.</span><span class='id puts'>puts</span> <span class='id updated'>updated</span>
593
+ <span class='kw'>end</span>
594
+ <span class='const'>FileUtils</span><span class='period'>.</span><span class='id rm'>rm</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>GEMFILE</span><span class='rbrace'>}</span><span class='tstring_content'>.lock</span><span class='tstring_end'>&quot;</span></span>
595
+ <span class='backtick'>`</span><span class='tstring_content'>bundle update</span><span class='tstring_end'>`</span></span>
596
+ <span class='kw'>end</span></pre>
597
+ </td>
598
+ </tr>
599
+ </table>
600
+ </div>
601
+
602
+ <div class="method_details ">
603
+ <p class="signature " id="get_version-instance_method">
604
+
605
+ - (<tt>Object</tt>) <strong>get_version</strong>
606
+
607
+
608
+
609
+ </p><table class="source_code">
610
+ <tr>
611
+ <td>
612
+ <pre class="lines">
613
+
614
+
615
+ 216
616
+ 217
617
+ 218
618
+ 219</pre>
619
+ </td>
620
+ <td>
621
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 216</span>
622
+
623
+ <span class='kw'>def</span> <span class='id get_version'>get_version</span>
624
+ <span class='id uri'>uri</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>http://rubygems.org/api/v1/gems/radiant-</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_content'>-extension.json</span><span class='tstring_end'>&quot;</span></span>
625
+ <span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>~&gt; </span><span class='embexpr_beg'>#{</span><span class='const'>MultiJson</span><span class='period'>.</span><span class='id decode'>decode</span><span class='lparen'>(</span><span class='id open'>open</span><span class='lparen'>(</span><span class='id uri'>uri</span><span class='rparen'>)</span><span class='period'>.</span><span class='id read'>read</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>version</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
626
+ <span class='kw'>end</span></pre>
627
+ </td>
628
+ </tr>
629
+ </table>
630
+ </div>
631
+
632
+ <div class="method_details ">
633
+ <p class="signature " id="install-instance_method">
634
+
635
+ - (<tt>Object</tt>) <strong>install</strong>
636
+
637
+
638
+
639
+ </p><div class="docstring">
640
+ <div class="discussion">
641
+ <p>copy and run Rake tasks</p>
642
+
643
+
644
+ </div>
645
+ </div>
646
+ <div class="tags">
647
+
648
+
649
+ </div><table class="source_code">
650
+ <tr>
651
+ <td>
652
+ <pre class="lines">
653
+
654
+
655
+ 169
656
+ 170
657
+ 171
658
+ 172
659
+ 173
660
+ 174
661
+ 175
662
+ 176</pre>
663
+ </td>
664
+ <td>
665
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 169</span>
666
+
667
+ <span class='kw'>def</span> <span class='id install'>install</span>
668
+ <span class='id path'>path</span> <span class='op'>=</span> <span class='backtick'>`</span><span class='tstring_content'>bundle show radiant-</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_content'>-extension</span><span class='tstring_end'>`</span></span><span class='period'>.</span><span class='id chomp'>chomp</span>
669
+ <span class='kw'>begin</span>
670
+ <span class='const'>FileUtils</span><span class='period'>.</span><span class='id cp'>cp</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id path'>path</span><span class='rbrace'>}</span><span class='tstring_content'>/lib/tasks/</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_content'>_extension_tasks.rake</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ROOT</span><span class='rbrace'>}</span><span class='tstring_content'>/lib/tasks/</span><span class='tstring_end'>&quot;</span></span>
671
+ <span class='kw'>rescue</span>
672
+ <span class='kw'>end</span>
673
+ <span class='id run_rake_tasks'>run_rake_tasks</span>
674
+ <span class='kw'>end</span></pre>
675
+ </td>
676
+ </tr>
677
+ </table>
678
+ </div>
679
+
680
+ <div class="method_details ">
681
+ <p class="signature " id="load_rake_tasks-instance_method">
682
+
683
+ - (<tt>Array</tt>) <strong>load_rake_tasks</strong>
684
+
685
+
686
+
687
+ </p><div class="docstring">
688
+ <div class="discussion">
689
+ <p>Load Rakefile</p>
690
+
691
+
692
+ </div>
693
+ </div>
694
+ <div class="tags">
695
+
696
+ <h3>Returns:</h3>
697
+ <ul class="return">
698
+
699
+ <li>
700
+
701
+
702
+ <span class='type'>(<tt>Array</tt>)</span>
703
+
704
+
705
+
706
+ &mdash;
707
+ <div class='inline'><p>List of available tasks</p>
708
+ </div>
709
+
710
+ </li>
711
+
712
+ </ul>
713
+
714
+ </div><table class="source_code">
715
+ <tr>
716
+ <td>
717
+ <pre class="lines">
718
+
719
+
720
+ 210
721
+ 211
722
+ 212
723
+ 213
724
+ 214</pre>
725
+ </td>
726
+ <td>
727
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 210</span>
728
+
729
+ <span class='kw'>def</span> <span class='id load_rake_tasks'>load_rake_tasks</span>
730
+ <span class='id rake_file'>rake_file</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ROOT</span><span class='rbrace'>}</span><span class='tstring_content'>/lib/tasks/</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_content'>_extension_tasks.rake</span><span class='tstring_end'>&quot;</span></span>
731
+ <span class='id load'>load</span> <span class='id rake_file'>rake_file</span> <span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id exist?'>exist?</span> <span class='id rake_file'>rake_file</span>
732
+ <span class='const'>Rake</span><span class='period'>.</span><span class='id application'>application</span><span class='period'>.</span><span class='id tasks'>tasks</span><span class='period'>.</span><span class='id map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:name</span><span class='rparen'>)</span>
733
+ <span class='kw'>end</span></pre>
734
+ </td>
735
+ </tr>
736
+ </table>
737
+ </div>
738
+
739
+ <div class="method_details ">
740
+ <p class="signature " id="public_service_announcement-instance_method">
741
+
742
+ - (<tt>Object</tt>) <strong>public_service_announcement</strong>
743
+
744
+
745
+
746
+ </p><table class="source_code">
747
+ <tr>
748
+ <td>
749
+ <pre class="lines">
750
+
751
+
752
+ 221
753
+ 222
754
+ 223
755
+ 224
756
+ 225
757
+ 226
758
+ 227
759
+ 228
760
+ 229
761
+ 230
762
+ 231</pre>
763
+ </td>
764
+ <td>
765
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 221</span>
766
+
767
+ <span class='kw'>def</span> <span class='id public_service_announcement'>public_service_announcement</span>
768
+ <span class='id path'>path</span> <span class='op'>=</span> <span class='backtick'>`</span><span class='tstring_content'>bundle show radiant-</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_content'>-extension</span><span class='tstring_end'>`</span></span><span class='period'>.</span><span class='id chop'>chop</span>
769
+ <span class='id stuff_in_public'>stuff_in_public</span> <span class='op'>=</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id glob'>glob</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id path'>path</span><span class='rbrace'>}</span><span class='tstring_content'>/public/**/*.*</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id f'>f</span><span class='op'>|</span>
770
+ <span class='id f'>f</span><span class='period'>.</span><span class='id sub!'>sub!</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='embexpr_beg'>#{</span><span class='id path'>path</span><span class='rbrace'>}</span><span class='tstring_content'>\/</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
771
+ <span class='kw'>end</span>
772
+ <span class='tstring'><span class='tstring_beg'>%Q{</span><span class='tstring_content'>
773
+ # The </span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_content'> extension added the following files to the public directory:
774
+ # </span><span class='embexpr_beg'>#{</span><span class='id stuff_in_public'>stuff_in_public</span><span class='period'>.</span><span class='id join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n# </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>
775
+ # These files were not deleted in case some other extension might need them.
776
+ </span><span class='tstring_end'>}</span></span><span class='period'>.</span><span class='id lstrip'>lstrip</span> <span class='kw'>unless</span> <span class='id stuff_in_public'>stuff_in_public</span><span class='period'>.</span><span class='id empty?'>empty?</span>
777
+ <span class='kw'>end</span></pre>
778
+ </td>
779
+ </tr>
780
+ </table>
781
+ </div>
782
+
783
+ <div class="method_details ">
784
+ <p class="signature " id="uninstall-instance_method">
785
+
786
+ - (<tt>Object</tt>) <strong>uninstall</strong>
787
+
788
+
789
+
790
+ </p><div class="docstring">
791
+ <div class="discussion">
792
+ <p>def enable
793
+ bundle
794
+ end</p>
795
+
796
+
797
+ </div>
798
+ </div>
799
+ <div class="tags">
800
+
801
+
802
+ </div><table class="source_code">
803
+ <tr>
804
+ <td>
805
+ <pre class="lines">
806
+
807
+
808
+ 192
809
+ 193
810
+ 194
811
+ 195
812
+ 196
813
+ 197
814
+ 198
815
+ 199
816
+ 200
817
+ 201
818
+ 202
819
+ 203
820
+ 204
821
+ 205
822
+ 206</pre>
823
+ </td>
824
+ <td>
825
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 192</span>
826
+
827
+ <span class='kw'>def</span> <span class='id uninstall'>uninstall</span>
828
+ <span class='id tasks'>tasks</span> <span class='op'>=</span> <span class='id load_rake_tasks'>load_rake_tasks</span>
829
+ <span class='id tasks'>tasks</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id task'>task</span><span class='op'>|</span>
830
+ <span class='kw'>case</span> <span class='id task'>task</span>
831
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>radiant:extensions:</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_content'>:uninstall</span><span class='tstring_end'>&quot;</span></span>
832
+ <span class='id run_task'>run_task</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>uninstall</span><span class='tstring_end'>&quot;</span></span>
833
+ <span class='kw'>break</span>
834
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>radiant:extensions:</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_content'>:migrate</span><span class='tstring_end'>&quot;</span></span>
835
+ <span class='id run_task'>run_task</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>migrate</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>VERSION=0</span><span class='tstring_end'>&quot;</span></span>
836
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>radiant:extensions:</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_content'>:update</span><span class='tstring_end'>&quot;</span></span>
837
+ <span class='id public_service_announcement'>public_service_announcement</span>
838
+ <span class='kw'>end</span>
839
+ <span class='kw'>end</span>
840
+ <span class='id disable'>disable</span>
841
+ <span class='kw'>end</span></pre>
842
+ </td>
843
+ </tr>
844
+ </table>
845
+ </div>
846
+
847
+ </div>
848
+
849
+ </div>
850
+
851
+ <div id="footer">
852
+ Generated on Tue Nov 15 19:16:23 2011 by
853
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
854
+ 0.7.3 (ruby-1.9.3).
855
+ </div>
856
+
857
+ </body>
858
+ </html>