radiant-ray-extension 3.0.0.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. data/LICENSE +19 -0
  2. data/README.markdown +30 -0
  3. data/Rakefile +26 -0
  4. data/bin/ray +5 -0
  5. data/doc/Extension.html +1189 -0
  6. data/doc/Ray.html +175 -0
  7. data/doc/Ray/CLI.html +585 -0
  8. data/doc/Ray/Cache.html +709 -0
  9. data/doc/Ray/Gem.html +760 -0
  10. data/doc/Ray/Git.html +278 -0
  11. data/doc/Ray/GitHub.html +553 -0
  12. data/doc/Ray/RubyGems.html +501 -0
  13. data/doc/Ray/Zip.html +300 -0
  14. data/doc/Search.html +433 -0
  15. data/doc/String.html +242 -0
  16. data/doc/_index.html +84 -0
  17. data/doc/class_list.html +47 -0
  18. data/doc/css/common.css +1 -0
  19. data/doc/css/full_list.css +55 -0
  20. data/doc/css/style.css +322 -0
  21. data/doc/file.LICENSE.html +85 -0
  22. data/doc/file.README.html +97 -0
  23. data/doc/file_list.html +46 -0
  24. data/doc/frames.html +13 -0
  25. data/doc/index.html +84 -0
  26. data/doc/js/app.js +205 -0
  27. data/doc/js/full_list.js +167 -0
  28. data/doc/js/jquery.js +16 -0
  29. data/doc/method_list.html +46 -0
  30. data/doc/top-level-namespace.html +105 -0
  31. data/lib/ray.rb +8 -0
  32. data/lib/ray/cli.rb +271 -0
  33. data/lib/ray/constants.rb +17 -0
  34. data/lib/ray/extension.rb +116 -0
  35. data/lib/ray/extension/gem.rb +96 -0
  36. data/lib/ray/extension/git.rb +30 -0
  37. data/lib/ray/extension/zip.rb +44 -0
  38. data/lib/ray/search.rb +62 -0
  39. data/lib/ray/search/cache.rb +61 -0
  40. data/lib/ray/search/github.rb +40 -0
  41. data/lib/ray/search/rubygems.rb +36 -0
  42. data/lib/ray/string.rb +18 -0
  43. data/ray.gemspec +31 -0
  44. data/spec/fixtures/Gemfile +4 -0
  45. data/spec/fixtures/cache_single.yml +8 -0
  46. data/spec/fixtures/cassettes/github_v2_api_no_matches.yml +38 -0
  47. data/spec/fixtures/cassettes/github_v2_api_search_no_matches.yml +38 -0
  48. data/spec/fixtures/cassettes/github_v2_api_search_reorder_children.yml +75 -0
  49. data/spec/fixtures/cassettes/github_v2_api_search_single.yml +74 -0
  50. data/spec/fixtures/cassettes/github_v3_api_owner_name.yml +75 -0
  51. data/spec/fixtures/cassettes/rubygems_v1_api_gem_info.yml +36 -0
  52. data/spec/fixtures/cassettes/rubygems_v1_api_no_matches.yml +34 -0
  53. data/spec/fixtures/cassettes/rubygems_v1_api_search_no_matches.yml +34 -0
  54. data/spec/fixtures/cassettes/rubygems_v1_api_search_reorder.yml +36 -0
  55. data/spec/fixtures/cassettes/rubygems_v1_api_search_reorder_children.yml +36 -0
  56. data/spec/fixtures/cassettes/rubygems_v1_api_search_single.yml +41 -0
  57. data/spec/fixtures/cassettes/zip_file.yml +101 -0
  58. data/spec/fixtures/dummy.zip +0 -0
  59. data/spec/fixtures/dummy/README +1 -0
  60. data/spec/fixtures/dummy/Rakefile +109 -0
  61. data/spec/fixtures/dummy/config/initializers/radiant_config.rb +3 -0
  62. data/spec/fixtures/dummy/config/locales/en.yml +3 -0
  63. data/spec/fixtures/dummy/config/routes.rb +5 -0
  64. data/spec/fixtures/dummy/dummy_extension.rb +21 -0
  65. data/spec/fixtures/dummy/lib/radiant-dummy-extension.rb +8 -0
  66. data/spec/fixtures/dummy/lib/tasks/dummy_extension_tasks.rake +47 -0
  67. data/spec/fixtures/dummy/public/stylesheets/extensions/dummy/dummy.css +0 -0
  68. data/spec/fixtures/dummy/radiant-dummy-extension.gemspec +29 -0
  69. data/spec/ray/cli_spec.rb +56 -0
  70. data/spec/ray/extension/gem_spec.rb +214 -0
  71. data/spec/ray/extension/git_spec.rb +216 -0
  72. data/spec/ray/extension/zip_spec.rb +239 -0
  73. data/spec/ray/search/cache_spec.rb +74 -0
  74. data/spec/ray/search/github_spec.rb +137 -0
  75. data/spec/ray/search/rubygems_spec.rb +127 -0
  76. data/spec/ray/string_spec.rb +30 -0
  77. data/spec/spec_helper.rb +27 -0
  78. metadata +205 -0
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright 2011 john muhl
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
@@ -0,0 +1,30 @@
1
+ # Overview
2
+
3
+ Ray simplifies finding, installing, disabling, enabling and uninstalling
4
+ Radiant extensions. It uses RubyGems and GitHub to find (and cache) extension
5
+ information but you can install extensions from any location.
6
+
7
+ RubyGems, Git and zip archives are used to install extensions based on
8
+ preference or availability.
9
+
10
+ gem install radiant-ray-extension
11
+ ray help
12
+
13
+ * [CLI Manual][man]
14
+ * [API Documentation][api]
15
+ * [Bugs, Features][bug]
16
+ * [Contributors][con]
17
+ * [License][mit]
18
+
19
+ [api]: http://rubydoc.info/github/johnmuhl/radiant-ray-extension
20
+ [bug]: http://github.com/johnmuhl/radiant-ray-extension/issues
21
+ [con]: http://github.com/johnmuhl/radiant-ray-extension/contributors
22
+ [man]: http://johnmuhl.github.com/radiant-ray-extension/
23
+ [mit]: http://github.com/johnmuhl/radiant-ray-extension/blob/master/LICENSE
24
+
25
+ # Developing
26
+
27
+ 1. Fork
28
+ 2. Branch
29
+ 3. Commit
30
+ 4. Pull Request
@@ -0,0 +1,26 @@
1
+ $:.push File.expand_path "spec"
2
+
3
+ task :default => :spec
4
+
5
+ desc "Run specs"
6
+ task :spec do
7
+ require "minitest/autorun"
8
+ Dir.glob("spec/**/*_spec.rb").each do |spec|
9
+ require File.expand_path spec unless spec =~ /cli/i
10
+ end
11
+ MiniTest::Unit.autorun
12
+ end
13
+
14
+ namespace :spec do
15
+
16
+ # TODO: setup the entire radiant needed to run cli specs
17
+ desc "Run CLI specs"
18
+ task :cli do
19
+ require "minitest/autorun"
20
+ Dir.glob("spec/**/*_spec.rb").each do |spec|
21
+ require File.expand_path spec if spec =~ /cli/i
22
+ end
23
+ MiniTest::Unit.autorun
24
+ end
25
+
26
+ end
data/bin/ray ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "ray/cli"
4
+
5
+ Ray::CLI.start
@@ -0,0 +1,1189 @@
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: Extension
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 (E)</a> &raquo;
37
+
38
+
39
+ <span class="title">Extension</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>Module: Extension
60
+
61
+
62
+
63
+ </h1>
64
+
65
+ <dl class="box">
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+ <dt class="r1">Included in:</dt>
74
+ <dd class="r1"><span class='object_link'><a href="Ray/Gem.html" title="Ray::Gem (class)">Ray::Gem</a></span>, <span class='object_link'><a href="Ray/Git.html" title="Ray::Git (class)">Ray::Git</a></span>, <span class='object_link'><a href="Ray/Zip.html" title="Ray::Zip (class)">Ray::Zip</a></span></dd>
75
+
76
+
77
+
78
+ <dt class="r2 last">Defined in:</dt>
79
+ <dd class="r2 last">lib/ray/extension.rb</dd>
80
+
81
+ </dl>
82
+ <div class="clear"></div>
83
+
84
+
85
+
86
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
87
+ <ul class="summary">
88
+
89
+ <li class="public ">
90
+ <span class="summary_signature">
91
+
92
+ <a href="#author-instance_method" title="#author (instance method)">- (Object) <strong>author</strong> </a>
93
+
94
+
95
+
96
+ </span>
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute author.</p>
109
+ </div></span>
110
+
111
+ </li>
112
+
113
+
114
+ <li class="public ">
115
+ <span class="summary_signature">
116
+
117
+ <a href="#description-instance_method" title="#description (instance method)">- (Object) <strong>description</strong> </a>
118
+
119
+
120
+
121
+ </span>
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute description.</p>
134
+ </div></span>
135
+
136
+ </li>
137
+
138
+
139
+ <li class="public ">
140
+ <span class="summary_signature">
141
+
142
+ <a href="#homepage-instance_method" title="#homepage (instance method)">- (Object) <strong>homepage</strong> </a>
143
+
144
+
145
+
146
+ </span>
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute homepage.</p>
159
+ </div></span>
160
+
161
+ </li>
162
+
163
+
164
+ <li class="public ">
165
+ <span class="summary_signature">
166
+
167
+ <a href="#name-instance_method" title="#name (instance method)">- (Object) <strong>name</strong> </a>
168
+
169
+
170
+
171
+ </span>
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute name.</p>
184
+ </div></span>
185
+
186
+ </li>
187
+
188
+
189
+ <li class="public ">
190
+ <span class="summary_signature">
191
+
192
+ <a href="#uri-instance_method" title="#uri (instance method)">- (Object) <strong>uri</strong> </a>
193
+
194
+
195
+
196
+ </span>
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute uri.</p>
209
+ </div></span>
210
+
211
+ </li>
212
+
213
+
214
+ <li class="public ">
215
+ <span class="summary_signature">
216
+
217
+ <a href="#version-instance_method" title="#version (instance method)">- (Object) <strong>version</strong> </a>
218
+
219
+
220
+
221
+ </span>
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute version.</p>
234
+ </div></span>
235
+
236
+ </li>
237
+
238
+
239
+ </ul>
240
+
241
+
242
+
243
+
244
+
245
+ <h2>
246
+ Instance Method Summary
247
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
248
+ </h2>
249
+
250
+ <ul class="summary">
251
+
252
+ <li class="public ">
253
+ <span class="summary_signature">
254
+
255
+ <a href="#cleanup-instance_method" title="#cleanup (instance method)">- (Object) <strong>cleanup</strong> </a>
256
+
257
+
258
+
259
+ </span>
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+ <span class="summary_desc"><div class='inline'>
269
+ </div></span>
270
+
271
+ </li>
272
+
273
+
274
+ <li class="public ">
275
+ <span class="summary_signature">
276
+
277
+ <a href="#disable-instance_method" title="#disable (instance method)">- (Object) <strong>disable</strong> </a>
278
+
279
+
280
+
281
+ </span>
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+ <span class="summary_desc"><div class='inline'>
291
+ </div></span>
292
+
293
+ </li>
294
+
295
+
296
+ <li class="public ">
297
+ <span class="summary_signature">
298
+
299
+ <a href="#download-instance_method" title="#download (instance method)">- (Object) <strong>download</strong> </a>
300
+
301
+
302
+
303
+ </span>
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+ <span class="summary_desc"><div class='inline'>
313
+ </div></span>
314
+
315
+ </li>
316
+
317
+
318
+ <li class="public ">
319
+ <span class="summary_signature">
320
+
321
+ <a href="#enable-instance_method" title="#enable (instance method)">- (Object) <strong>enable</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="#initialize-instance_method" title="#initialize (instance method)">- (Extension) <strong>initialize</strong>(options = {}) </a>
344
+
345
+
346
+
347
+ </span>
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+ <span class="summary_desc"><div class='inline'><p>A new instance of Extension.</p>
357
+ </div></span>
358
+
359
+ </li>
360
+
361
+
362
+ <li class="public ">
363
+ <span class="summary_signature">
364
+
365
+ <a href="#load_tasks-instance_method" title="#load_tasks (instance method)">- (Object) <strong>load_tasks</strong> </a>
366
+
367
+
368
+
369
+ </span>
370
+
371
+
372
+
373
+
374
+
375
+
376
+
377
+
378
+ <span class="summary_desc"><div class='inline'>
379
+ </div></span>
380
+
381
+ </li>
382
+
383
+
384
+ <li class="public ">
385
+ <span class="summary_signature">
386
+
387
+ <a href="#public_service_announcement-instance_method" title="#public_service_announcement (instance method)">- (Object) <strong>public_service_announcement</strong>(path = nil) </a>
388
+
389
+
390
+
391
+ </span>
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+
400
+ <span class="summary_desc"><div class='inline'>
401
+ </div></span>
402
+
403
+ </li>
404
+
405
+
406
+ <li class="public ">
407
+ <span class="summary_signature">
408
+
409
+ <a href="#run_task-instance_method" title="#run_task (instance method)">- (Object) <strong>run_task</strong>(task, options = {}) </a>
410
+
411
+
412
+
413
+ </span>
414
+
415
+
416
+
417
+
418
+
419
+
420
+
421
+
422
+ <span class="summary_desc"><div class='inline'>
423
+ </div></span>
424
+
425
+ </li>
426
+
427
+
428
+ <li class="public ">
429
+ <span class="summary_signature">
430
+
431
+ <a href="#run_tasks-instance_method" title="#run_tasks (instance method)">- (Object) <strong>run_tasks</strong>(options = { :migrate =&gt; &quot;&quot;, :update =&gt; &quot;&quot; }) </a>
432
+
433
+
434
+
435
+ </span>
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+ <span class="summary_desc"><div class='inline'>
445
+ </div></span>
446
+
447
+ </li>
448
+
449
+
450
+ <li class="public ">
451
+ <span class="summary_signature">
452
+
453
+ <a href="#uninstall-instance_method" title="#uninstall (instance method)">- (Object) <strong>uninstall</strong> </a>
454
+
455
+
456
+
457
+ </span>
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+
466
+ <span class="summary_desc"><div class='inline'>
467
+ </div></span>
468
+
469
+ </li>
470
+
471
+
472
+ <li class="public ">
473
+ <span class="summary_signature">
474
+
475
+ <a href="#vendor-instance_method" title="#vendor (instance method)">- (Object) <strong>vendor</strong> </a>
476
+
477
+
478
+
479
+ </span>
480
+
481
+
482
+
483
+
484
+
485
+
486
+
487
+
488
+ <span class="summary_desc"><div class='inline'>
489
+ </div></span>
490
+
491
+ </li>
492
+
493
+
494
+ </ul>
495
+
496
+
497
+
498
+ <div id="instance_attr_details" class="attr_details">
499
+ <h2>Instance Attribute Details</h2>
500
+
501
+
502
+ <span id="author=-instance_method"></span>
503
+ <span id="author-instance_method"></span>
504
+ <div class="method_details first">
505
+ <p class="signature first" id="author-instance_method">
506
+
507
+ - (<tt>Object</tt>) <strong>author</strong>
508
+
509
+
510
+
511
+ </p><div class="docstring">
512
+ <div class="discussion">
513
+ <p>Returns the value of attribute author</p>
514
+
515
+
516
+ </div>
517
+ </div>
518
+ <div class="tags">
519
+
520
+
521
+ </div><table class="source_code">
522
+ <tr>
523
+ <td>
524
+ <pre class="lines">
525
+
526
+
527
+ 8
528
+ 9
529
+ 10</pre>
530
+ </td>
531
+ <td>
532
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 8</span>
533
+
534
+ <span class='kw'>def</span> <span class='id author'>author</span>
535
+ <span class='ivar'>@author</span>
536
+ <span class='kw'>end</span></pre>
537
+ </td>
538
+ </tr>
539
+ </table>
540
+ </div>
541
+
542
+
543
+ <span id="description=-instance_method"></span>
544
+ <span id="description-instance_method"></span>
545
+ <div class="method_details ">
546
+ <p class="signature " id="description-instance_method">
547
+
548
+ - (<tt>Object</tt>) <strong>description</strong>
549
+
550
+
551
+
552
+ </p><div class="docstring">
553
+ <div class="discussion">
554
+ <p>Returns the value of attribute description</p>
555
+
556
+
557
+ </div>
558
+ </div>
559
+ <div class="tags">
560
+
561
+
562
+ </div><table class="source_code">
563
+ <tr>
564
+ <td>
565
+ <pre class="lines">
566
+
567
+
568
+ 8
569
+ 9
570
+ 10</pre>
571
+ </td>
572
+ <td>
573
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 8</span>
574
+
575
+ <span class='kw'>def</span> <span class='id description'>description</span>
576
+ <span class='ivar'>@description</span>
577
+ <span class='kw'>end</span></pre>
578
+ </td>
579
+ </tr>
580
+ </table>
581
+ </div>
582
+
583
+
584
+ <span id="homepage=-instance_method"></span>
585
+ <span id="homepage-instance_method"></span>
586
+ <div class="method_details ">
587
+ <p class="signature " id="homepage-instance_method">
588
+
589
+ - (<tt>Object</tt>) <strong>homepage</strong>
590
+
591
+
592
+
593
+ </p><div class="docstring">
594
+ <div class="discussion">
595
+ <p>Returns the value of attribute homepage</p>
596
+
597
+
598
+ </div>
599
+ </div>
600
+ <div class="tags">
601
+
602
+
603
+ </div><table class="source_code">
604
+ <tr>
605
+ <td>
606
+ <pre class="lines">
607
+
608
+
609
+ 8
610
+ 9
611
+ 10</pre>
612
+ </td>
613
+ <td>
614
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 8</span>
615
+
616
+ <span class='kw'>def</span> <span class='id homepage'>homepage</span>
617
+ <span class='ivar'>@homepage</span>
618
+ <span class='kw'>end</span></pre>
619
+ </td>
620
+ </tr>
621
+ </table>
622
+ </div>
623
+
624
+
625
+ <span id="name=-instance_method"></span>
626
+ <span id="name-instance_method"></span>
627
+ <div class="method_details ">
628
+ <p class="signature " id="name-instance_method">
629
+
630
+ - (<tt>Object</tt>) <strong>name</strong>
631
+
632
+
633
+
634
+ </p><div class="docstring">
635
+ <div class="discussion">
636
+ <p>Returns the value of attribute name</p>
637
+
638
+
639
+ </div>
640
+ </div>
641
+ <div class="tags">
642
+
643
+
644
+ </div><table class="source_code">
645
+ <tr>
646
+ <td>
647
+ <pre class="lines">
648
+
649
+
650
+ 8
651
+ 9
652
+ 10</pre>
653
+ </td>
654
+ <td>
655
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 8</span>
656
+
657
+ <span class='kw'>def</span> <span class='id name'>name</span>
658
+ <span class='ivar'>@name</span>
659
+ <span class='kw'>end</span></pre>
660
+ </td>
661
+ </tr>
662
+ </table>
663
+ </div>
664
+
665
+
666
+ <span id="uri=-instance_method"></span>
667
+ <span id="uri-instance_method"></span>
668
+ <div class="method_details ">
669
+ <p class="signature " id="uri-instance_method">
670
+
671
+ - (<tt>Object</tt>) <strong>uri</strong>
672
+
673
+
674
+
675
+ </p><div class="docstring">
676
+ <div class="discussion">
677
+ <p>Returns the value of attribute uri</p>
678
+
679
+
680
+ </div>
681
+ </div>
682
+ <div class="tags">
683
+
684
+
685
+ </div><table class="source_code">
686
+ <tr>
687
+ <td>
688
+ <pre class="lines">
689
+
690
+
691
+ 8
692
+ 9
693
+ 10</pre>
694
+ </td>
695
+ <td>
696
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 8</span>
697
+
698
+ <span class='kw'>def</span> <span class='id uri'>uri</span>
699
+ <span class='ivar'>@uri</span>
700
+ <span class='kw'>end</span></pre>
701
+ </td>
702
+ </tr>
703
+ </table>
704
+ </div>
705
+
706
+
707
+ <span id="version=-instance_method"></span>
708
+ <span id="version-instance_method"></span>
709
+ <div class="method_details ">
710
+ <p class="signature " id="version-instance_method">
711
+
712
+ - (<tt>Object</tt>) <strong>version</strong>
713
+
714
+
715
+
716
+ </p><div class="docstring">
717
+ <div class="discussion">
718
+ <p>Returns the value of attribute version</p>
719
+
720
+
721
+ </div>
722
+ </div>
723
+ <div class="tags">
724
+
725
+
726
+ </div><table class="source_code">
727
+ <tr>
728
+ <td>
729
+ <pre class="lines">
730
+
731
+
732
+ 8
733
+ 9
734
+ 10</pre>
735
+ </td>
736
+ <td>
737
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 8</span>
738
+
739
+ <span class='kw'>def</span> <span class='id version'>version</span>
740
+ <span class='ivar'>@version</span>
741
+ <span class='kw'>end</span></pre>
742
+ </td>
743
+ </tr>
744
+ </table>
745
+ </div>
746
+
747
+ </div>
748
+
749
+
750
+ <div id="instance_method_details" class="method_details_list">
751
+ <h2>Instance Method Details</h2>
752
+
753
+
754
+ <div class="method_details first">
755
+ <p class="signature first" id="cleanup-instance_method">
756
+
757
+ - (<tt>Object</tt>) <strong>cleanup</strong>
758
+
759
+
760
+
761
+ </p><table class="source_code">
762
+ <tr>
763
+ <td>
764
+ <pre class="lines">
765
+
766
+
767
+ 96
768
+ 97
769
+ 98</pre>
770
+ </td>
771
+ <td>
772
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 96</span>
773
+
774
+ <span class='kw'>def</span> <span class='id cleanup'>cleanup</span>
775
+ <span class='const'>FileUtils</span><span class='period'>.</span><span class='id rm_rf'>rm_rf</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>TMP_DIR</span>
776
+ <span class='kw'>end</span></pre>
777
+ </td>
778
+ </tr>
779
+ </table>
780
+ </div>
781
+
782
+ <div class="method_details ">
783
+ <p class="signature " id="disable-instance_method">
784
+
785
+ - (<tt>Object</tt>) <strong>disable</strong>
786
+
787
+
788
+
789
+ </p><table class="source_code">
790
+ <tr>
791
+ <td>
792
+ <pre class="lines">
793
+
794
+
795
+ 24
796
+ 25
797
+ 26
798
+ 27
799
+ 28
800
+ 29
801
+ 30
802
+ 31</pre>
803
+ </td>
804
+ <td>
805
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 24</span>
806
+
807
+ <span class='kw'>def</span> <span class='id disable'>disable</span>
808
+ <span class='kw'>unless</span> <span class='const'>File</span><span class='period'>.</span><span class='id exist?'>exist?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>Ray</span><span class='op'>::</span><span class='const'>EXT_DIR</span><span class='rbrace'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
809
+ <span class='id raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>The </span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_content'> extension is not installed</span><span class='tstring_end'>&quot;</span></span>
810
+ <span class='kw'>end</span>
811
+
812
+ <span class='const'>FileUtils</span><span class='period'>.</span><span class='id mkdir_p'>mkdir_p</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>Ray</span><span class='op'>::</span><span class='const'>EXT_DIR</span><span class='rbrace'>}</span><span class='tstring_content'>/.disabled</span><span class='tstring_end'>&quot;</span></span>
813
+ <span class='const'>FileUtils</span><span class='period'>.</span><span class='id mv'>mv</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>Ray</span><span class='op'>::</span><span class='const'>EXT_DIR</span><span class='rbrace'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</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'>Ray</span><span class='op'>::</span><span class='const'>EXT_DIR</span><span class='rbrace'>}</span><span class='tstring_content'>/.disabled/</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
814
+ <span class='kw'>end</span></pre>
815
+ </td>
816
+ </tr>
817
+ </table>
818
+ </div>
819
+
820
+ <div class="method_details ">
821
+ <p class="signature " id="download-instance_method">
822
+
823
+ - (<tt>Object</tt>) <strong>download</strong>
824
+
825
+
826
+
827
+ </p><table class="source_code">
828
+ <tr>
829
+ <td>
830
+ <pre class="lines">
831
+
832
+
833
+ 53
834
+ 54
835
+ 55
836
+ 56
837
+ 57
838
+ 58
839
+ 59
840
+ 60</pre>
841
+ </td>
842
+ <td>
843
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 53</span>
844
+
845
+ <span class='kw'>def</span> <span class='id download'>download</span>
846
+ <span class='id raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>The extension name is required</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='ivar'>@name</span>
847
+ <span class='id raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>The extension URI is required</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='ivar'>@uri</span>
848
+
849
+ <span class='const'>FileUtils</span><span class='period'>.</span><span class='id mkdir_p'>mkdir_p</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>TMP_DIR</span>
850
+ <span class='id tmpfile'>tmpfile</span> <span class='op'>=</span> <span class='id open'>open</span><span class='lparen'>(</span><span class='ivar'>@uri</span><span class='rparen'>)</span><span class='period'>.</span><span class='id path'>path</span>
851
+ <span class='const'>FileUtils</span><span class='period'>.</span><span class='id cp'>cp</span> <span class='id tmpfile'>tmpfile</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>Ray</span><span class='op'>::</span><span class='const'>TMP_DIR</span><span class='rbrace'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='ivar'>@uri</span><span class='period'>.</span><span class='id split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id last'>last</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
852
+ <span class='kw'>end</span></pre>
853
+ </td>
854
+ </tr>
855
+ </table>
856
+ </div>
857
+
858
+ <div class="method_details ">
859
+ <p class="signature " id="enable-instance_method">
860
+
861
+ - (<tt>Object</tt>) <strong>enable</strong>
862
+
863
+
864
+
865
+ </p><table class="source_code">
866
+ <tr>
867
+ <td>
868
+ <pre class="lines">
869
+
870
+
871
+ 33
872
+ 34
873
+ 35
874
+ 36
875
+ 37
876
+ 38
877
+ 39</pre>
878
+ </td>
879
+ <td>
880
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 33</span>
881
+
882
+ <span class='kw'>def</span> <span class='id enable'>enable</span>
883
+ <span class='kw'>unless</span> <span class='const'>File</span><span class='period'>.</span><span class='id exist?'>exist?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>Ray</span><span class='op'>::</span><span class='const'>EXT_DIR</span><span class='rbrace'>}</span><span class='tstring_content'>/.disabled/</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
884
+ <span class='id raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>The </span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_content'> extension is not disabled</span><span class='tstring_end'>&quot;</span></span>
885
+ <span class='kw'>end</span>
886
+
887
+ <span class='const'>FileUtils</span><span class='period'>.</span><span class='id mv'>mv</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>Ray</span><span class='op'>::</span><span class='const'>EXT_DIR</span><span class='rbrace'>}</span><span class='tstring_content'>/.disabled/</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</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'>Ray</span><span class='op'>::</span><span class='const'>EXT_DIR</span><span class='rbrace'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
888
+ <span class='kw'>end</span></pre>
889
+ </td>
890
+ </tr>
891
+ </table>
892
+ </div>
893
+
894
+ <div class="method_details ">
895
+ <p class="signature " id="initialize-instance_method">
896
+
897
+ - (<tt><span class='object_link'><a href="" title="Extension (module)">Extension</a></span></tt>) <strong>initialize</strong>(options = {})
898
+
899
+
900
+
901
+ </p><div class="docstring">
902
+ <div class="discussion">
903
+ <p>A new instance of Extension</p>
904
+
905
+
906
+ </div>
907
+ </div>
908
+ <div class="tags">
909
+
910
+
911
+ </div><table class="source_code">
912
+ <tr>
913
+ <td>
914
+ <pre class="lines">
915
+
916
+
917
+ 15
918
+ 16
919
+ 17
920
+ 18
921
+ 19
922
+ 20
923
+ 21
924
+ 22</pre>
925
+ </td>
926
+ <td>
927
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 15</span>
928
+
929
+ <span class='kw'>def</span> <span class='id initialize'>initialize</span> <span class='id options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
930
+ <span class='ivar'>@author</span> <span class='op'>=</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='symbol'>:author</span><span class='rbracket'>]</span>
931
+ <span class='ivar'>@description</span> <span class='op'>=</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='symbol'>:description</span><span class='rbracket'>]</span>
932
+ <span class='ivar'>@homepage</span> <span class='op'>=</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='symbol'>:homepage</span><span class='rbracket'>]</span>
933
+ <span class='ivar'>@name</span> <span class='op'>=</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id to_s'>to_s</span><span class='period'>.</span><span class='id to_extension_name'>to_extension_name</span>
934
+ <span class='ivar'>@uri</span> <span class='op'>=</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='symbol'>:uri</span><span class='rbracket'>]</span>
935
+ <span class='ivar'>@version</span> <span class='op'>=</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='symbol'>:version</span><span class='rbracket'>]</span>
936
+ <span class='kw'>end</span></pre>
937
+ </td>
938
+ </tr>
939
+ </table>
940
+ </div>
941
+
942
+ <div class="method_details ">
943
+ <p class="signature " id="load_tasks-instance_method">
944
+
945
+ - (<tt>Object</tt>) <strong>load_tasks</strong>
946
+
947
+
948
+
949
+ </p><table class="source_code">
950
+ <tr>
951
+ <td>
952
+ <pre class="lines">
953
+
954
+
955
+ 90
956
+ 91
957
+ 92
958
+ 93
959
+ 94</pre>
960
+ </td>
961
+ <td>
962
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 90</span>
963
+
964
+ <span class='kw'>def</span> <span class='id load_tasks'>load_tasks</span>
965
+ <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'>Ray</span><span class='op'>::</span><span class='const'>ROOT</span><span class='rbrace'>}</span><span class='tstring_content'>/vendor/extensions/</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</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>
966
+ <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>
967
+ <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>
968
+ <span class='kw'>end</span></pre>
969
+ </td>
970
+ </tr>
971
+ </table>
972
+ </div>
973
+
974
+ <div class="method_details ">
975
+ <p class="signature " id="public_service_announcement-instance_method">
976
+
977
+ - (<tt>Object</tt>) <strong>public_service_announcement</strong>(path = nil)
978
+
979
+
980
+
981
+ </p><table class="source_code">
982
+ <tr>
983
+ <td>
984
+ <pre class="lines">
985
+
986
+
987
+ 100
988
+ 101
989
+ 102
990
+ 103
991
+ 104
992
+ 105
993
+ 106
994
+ 107
995
+ 108
996
+ 109
997
+ 110</pre>
998
+ </td>
999
+ <td>
1000
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 100</span>
1001
+
1002
+ <span class='kw'>def</span> <span class='id public_service_announcement'>public_service_announcement</span> <span class='id path'>path</span> <span class='op'>=</span> <span class='kw'>nil</span>
1003
+ <span class='id path'>path</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>Ray</span><span class='op'>::</span><span class='const'>EXT_DIR</span><span class='rbrace'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
1004
+ <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>
1005
+ <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>
1006
+ <span class='kw'>end</span>
1007
+ <span class='tstring'><span class='tstring_beg'>%Q{</span><span class='tstring_content'>
1008
+ # 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:
1009
+ # </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'>
1010
+ # These files were not deleted in case some other extension might need them.
1011
+ </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>
1012
+ <span class='kw'>end</span></pre>
1013
+ </td>
1014
+ </tr>
1015
+ </table>
1016
+ </div>
1017
+
1018
+ <div class="method_details ">
1019
+ <p class="signature " id="run_task-instance_method">
1020
+
1021
+ - (<tt>Object</tt>) <strong>run_task</strong>(task, options = {})
1022
+
1023
+
1024
+
1025
+ </p><table class="source_code">
1026
+ <tr>
1027
+ <td>
1028
+ <pre class="lines">
1029
+
1030
+
1031
+ 82
1032
+ 83
1033
+ 84
1034
+ 85
1035
+ 86
1036
+ 87
1037
+ 88</pre>
1038
+ </td>
1039
+ <td>
1040
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 82</span>
1041
+
1042
+ <span class='kw'>def</span> <span class='id run_task'>run_task</span> <span class='id task'>task</span><span class='comma'>,</span> <span class='id options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1043
+ <span class='kw'>if</span> <span class='id task'>task</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>update</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>and</span> <span class='id options'>options</span> <span class='op'>==</span> <span class='symbol'>:psa</span>
1044
+ <span class='id public_service_announcement'>public_service_announcement</span>
1045
+ <span class='kw'>else</span>
1046
+ <span class='backtick'>`</span><span class='tstring_content'>rake radiant:extensions:</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id task'>task</span><span class='rbrace'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id options'>options</span><span class='rbrace'>}</span><span class='tstring_end'>`</span></span>
1047
+ <span class='kw'>end</span>
1048
+ <span class='kw'>end</span></pre>
1049
+ </td>
1050
+ </tr>
1051
+ </table>
1052
+ </div>
1053
+
1054
+ <div class="method_details ">
1055
+ <p class="signature " id="run_tasks-instance_method">
1056
+
1057
+ - (<tt>Object</tt>) <strong>run_tasks</strong>(options = { :migrate =&gt; &quot;&quot;, :update =&gt; &quot;&quot; })
1058
+
1059
+
1060
+
1061
+ </p><table class="source_code">
1062
+ <tr>
1063
+ <td>
1064
+ <pre class="lines">
1065
+
1066
+
1067
+ 67
1068
+ 68
1069
+ 69
1070
+ 70
1071
+ 71
1072
+ 72
1073
+ 73
1074
+ 74
1075
+ 75
1076
+ 76
1077
+ 77
1078
+ 78
1079
+ 79
1080
+ 80</pre>
1081
+ </td>
1082
+ <td>
1083
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 67</span>
1084
+
1085
+ <span class='kw'>def</span> <span class='id run_tasks'>run_tasks</span> <span class='id options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:migrate</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:update</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span>
1086
+ <span class='id tasks'>tasks</span> <span class='op'>=</span> <span class='id load_tasks'>load_tasks</span>
1087
+ <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>
1088
+ <span class='kw'>case</span> <span class='id task'>task</span>
1089
+ <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'>:install</span><span class='tstring_end'>&quot;</span></span>
1090
+ <span class='id run_task'>run_task</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>install</span><span class='tstring_end'>&quot;</span></span>
1091
+ <span class='kw'>break</span>
1092
+ <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>
1093
+ <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='id options'>options</span><span class='lbracket'>[</span><span class='symbol'>:migrate</span><span class='rbracket'>]</span>
1094
+ <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>
1095
+ <span class='id run_task'>run_task</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>update</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='symbol'>:update</span><span class='rbracket'>]</span>
1096
+ <span class='kw'>end</span>
1097
+ <span class='kw'>end</span>
1098
+ <span class='kw'>end</span></pre>
1099
+ </td>
1100
+ </tr>
1101
+ </table>
1102
+ </div>
1103
+
1104
+ <div class="method_details ">
1105
+ <p class="signature " id="uninstall-instance_method">
1106
+
1107
+ - (<tt>Object</tt>) <strong>uninstall</strong>
1108
+
1109
+
1110
+
1111
+ </p><table class="source_code">
1112
+ <tr>
1113
+ <td>
1114
+ <pre class="lines">
1115
+
1116
+
1117
+ 41
1118
+ 42
1119
+ 43
1120
+ 44
1121
+ 45
1122
+ 46
1123
+ 47
1124
+ 48
1125
+ 49
1126
+ 50
1127
+ 51</pre>
1128
+ </td>
1129
+ <td>
1130
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 41</span>
1131
+
1132
+ <span class='kw'>def</span> <span class='id uninstall'>uninstall</span>
1133
+ <span class='kw'>unless</span> <span class='const'>File</span><span class='period'>.</span><span class='id exist?'>exist?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>Ray</span><span class='op'>::</span><span class='const'>EXT_DIR</span><span class='rbrace'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
1134
+ <span class='id raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>The </span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_content'> extension is not installed</span><span class='tstring_end'>&quot;</span></span>
1135
+ <span class='kw'>end</span>
1136
+
1137
+ <span class='id run_tasks'>run_tasks</span><span class='lparen'>(</span><span class='lbrace'>{</span>
1138
+ <span class='symbol'>:migrate</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>VERSION=0</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
1139
+ <span class='symbol'>:update</span> <span class='op'>=&gt;</span> <span class='symbol'>:psa</span>
1140
+ <span class='rbrace'>}</span><span class='rparen'>)</span>
1141
+ <span class='const'>FileUtils</span><span class='period'>.</span><span class='id rm_rf'>rm_rf</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>Ray</span><span class='op'>::</span><span class='const'>EXT_DIR</span><span class='rbrace'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
1142
+ <span class='kw'>end</span></pre>
1143
+ </td>
1144
+ </tr>
1145
+ </table>
1146
+ </div>
1147
+
1148
+ <div class="method_details ">
1149
+ <p class="signature " id="vendor-instance_method">
1150
+
1151
+ - (<tt>Object</tt>) <strong>vendor</strong>
1152
+
1153
+
1154
+
1155
+ </p><table class="source_code">
1156
+ <tr>
1157
+ <td>
1158
+ <pre class="lines">
1159
+
1160
+
1161
+ 62
1162
+ 63
1163
+ 64
1164
+ 65</pre>
1165
+ </td>
1166
+ <td>
1167
+ <pre class="code"><span class="info file"># File 'lib/ray/extension.rb', line 62</span>
1168
+
1169
+ <span class='kw'>def</span> <span class='id vendor'>vendor</span>
1170
+ <span class='id directory'>directory</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='const'>Ray</span><span class='op'>::</span><span class='const'>TMP_DIR</span><span class='rbrace'>}</span><span class='tstring_content'>/*</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id first'>first</span>
1171
+ <span class='const'>FileUtils</span><span class='period'>.</span><span class='id mv'>mv</span> <span class='id directory'>directory</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>Ray</span><span class='op'>::</span><span class='const'>EXT_DIR</span><span class='rbrace'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
1172
+ <span class='kw'>end</span></pre>
1173
+ </td>
1174
+ </tr>
1175
+ </table>
1176
+ </div>
1177
+
1178
+ </div>
1179
+
1180
+ </div>
1181
+
1182
+ <div id="footer">
1183
+ Generated on Sun Nov 20 20:26:44 2011 by
1184
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1185
+ 0.7.3 (ruby-1.9.3).
1186
+ </div>
1187
+
1188
+ </body>
1189
+ </html>