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
@@ -4,24 +4,24 @@
4
4
  <head>
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
6
  <title>
7
- Class: Ray::Cache
7
+ Class: Ray::Search::Cache
8
8
 
9
9
  &mdash; Documentation by YARD 0.7.3
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
14
 
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
16
 
17
17
  <script type="text/javascript" charset="utf-8">
18
- relpath = '..';
18
+ relpath = '../..';
19
19
  if (relpath != '') relpath += '/';
20
20
  </script>
21
21
 
22
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
22
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
23
23
 
24
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
24
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
25
25
 
26
26
 
27
27
  </head>
@@ -33,8 +33,8 @@
33
33
  <div id="header">
34
34
  <div id="menu">
35
35
 
36
- <a href="../_index.html">Index (C)</a> &raquo;
37
- <span class='title'><span class='object_link'><a href="../Ray.html" title="Ray (module)">Ray</a></span></span>
36
+ <a href="../../_index.html">Index (C)</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="../Search.html" title="Ray::Search (class)">Search</a></span></span>
38
38
  &raquo;
39
39
  <span class="title">Cache</span>
40
40
 
@@ -56,7 +56,7 @@
56
56
 
57
57
  <iframe id="search_frame"></iframe>
58
58
 
59
- <div id="content"><h1>Class: Ray::Cache
59
+ <div id="content"><h1>Class: Ray::Search::Cache
60
60
 
61
61
 
62
62
 
@@ -66,12 +66,14 @@
66
66
 
67
67
  <dt class="r1">Inherits:</dt>
68
68
  <dd class="r1">
69
- <span class="inheritName">Object</span>
69
+ <span class="inheritName"><span class='object_link'><a href="../Search.html" title="Ray::Search (class)">Ray::Search</a></span></span>
70
70
 
71
71
  <ul class="fullTree">
72
72
  <li>Object</li>
73
73
 
74
- <li class="next">Ray::Cache</li>
74
+ <li class="next"><span class='object_link'><a href="../Search.html" title="Ray::Search (class)">Ray::Search</a></span></li>
75
+
76
+ <li class="next">Ray::Search::Cache</li>
75
77
 
76
78
  </ul>
77
79
  <a href="#" class="inheritanceTree">show all</a>
@@ -83,21 +85,27 @@
83
85
 
84
86
 
85
87
 
86
- <dt class="r2">Includes:</dt>
87
- <dd class="r2"><span class='object_link'><a href="../Search.html" title="Search (module)">Search</a></span></dd>
88
-
89
-
90
88
 
91
89
 
92
90
 
93
- <dt class="r1 last">Defined in:</dt>
94
- <dd class="r1 last">lib/ray/search/cache.rb</dd>
91
+ <dt class="r2 last">Defined in:</dt>
92
+ <dd class="r2 last">lib/ray/search.rb</dd>
95
93
 
96
94
  </dl>
97
95
  <div class="clear"></div>
98
96
 
97
+ <h2>Overview</h2><div class="docstring">
98
+ <div class="discussion">
99
+ <p>Search the local cache for extension information</p>
99
100
 
100
101
 
102
+ </div>
103
+ </div>
104
+ <div class="tags">
105
+
106
+
107
+ </div>
108
+
101
109
 
102
110
 
103
111
 
@@ -140,7 +148,7 @@
140
148
  </span>
141
149
 
142
150
 
143
-
151
+ <span class="note title readonly">readonly</span>
144
152
 
145
153
 
146
154
 
@@ -187,38 +195,12 @@
187
195
 
188
196
 
189
197
 
190
-
191
-
192
- <h2>
193
- Class Method Summary
194
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
195
- </h2>
196
-
197
- <ul class="summary">
198
-
199
- <li class="public ">
200
- <span class="summary_signature">
201
-
202
- <a href="#clear-class_method" title="clear (class method)">+ (Object) <strong>clear</strong> </a>
203
-
204
-
205
-
206
- </span>
207
-
208
-
209
-
210
-
211
198
 
212
199
 
200
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../Search.html" title="Ray::Search (class)">Ray::Search</a></span></h3>
201
+ <p class="inherited"><span class='object_link'><a href="../Search.html#query-instance_method" title="Ray::Search#query (method)">query</a></span>, <span class='object_link'><a href="../Search.html#results-instance_method" title="Ray::Search#results (method)">results</a></span>, <span class='object_link'><a href="../Search.html#uri-instance_method" title="Ray::Search#uri (method)">uri</a></span></p>
213
202
 
214
-
215
- <span class="summary_desc"><div class='inline'>
216
- </div></span>
217
-
218
- </li>
219
203
 
220
-
221
- </ul>
222
204
 
223
205
  <h2>
224
206
  Instance Method Summary
@@ -230,29 +212,7 @@
230
212
  <li class="public ">
231
213
  <span class="summary_signature">
232
214
 
233
- <a href="#cache-instance_method" title="#cache (instance method)">- (Object) <strong>cache</strong> </a>
234
-
235
-
236
-
237
- </span>
238
-
239
-
240
-
241
-
242
-
243
-
244
-
245
-
246
- <span class="summary_desc"><div class='inline'>
247
- </div></span>
248
-
249
- </li>
250
-
251
-
252
- <li class="public ">
253
- <span class="summary_signature">
254
-
255
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (Cache) <strong>initialize</strong>(query) </a>
215
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Cache) <strong>initialize</strong>(query = nil) </a>
256
216
 
257
217
 
258
218
 
@@ -276,29 +236,7 @@
276
236
  <li class="public ">
277
237
  <span class="summary_signature">
278
238
 
279
- <a href="#match%3F-instance_method" title="#match? (instance method)">- (Boolean) <strong>match?</strong>(name, description) </a>
280
-
281
-
282
-
283
- </span>
284
-
285
-
286
-
287
-
288
-
289
-
290
-
291
-
292
- <span class="summary_desc"><div class='inline'>
293
- </div></span>
294
-
295
- </li>
296
-
297
-
298
- <li class="public ">
299
- <span class="summary_signature">
300
-
301
- <a href="#search-instance_method" title="#search (instance method)">- (Object) <strong>search</strong> </a>
239
+ <a href="#search-instance_method" title="#search (instance method)">- (Hash) <strong>search</strong> </a>
302
240
 
303
241
 
304
242
 
@@ -311,7 +249,7 @@
311
249
 
312
250
 
313
251
 
314
- <span class="summary_desc"><div class='inline'>
252
+ <span class="summary_desc"><div class='inline'><p>Override Search#search to use the local cache.</p>
315
253
  </div></span>
316
254
 
317
255
  </li>
@@ -328,15 +266,15 @@
328
266
 
329
267
 
330
268
 
331
- <h3 class="inherited">Methods included from <span class='object_link'><a href="../Search.html" title="Search (module)">Search</a></span></h3>
332
- <p class="inherited"><span class='object_link'><a href="../Search.html#merge-instance_method" title="Search#merge (method)">#merge</a></span>, <span class='object_link'><a href="../Search.html#multiple_choice-instance_method" title="Search#multiple_choice (method)">#multiple_choice</a></span>, <span class='object_link'><a href="../Search.html#output-instance_method" title="Search#output (method)">#output</a></span></p>
269
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Search.html" title="Ray::Search (class)">Ray::Search</a></span></h3>
270
+ <p class="inherited"><span class='object_link'><a href="../Search.html#cache-instance_method" title="Ray::Search#cache (method)">#cache</a></span>, <span class='object_link'><a href="../Search.html#multiple_choice-instance_method" title="Ray::Search#multiple_choice (method)">#multiple_choice</a></span>, <span class='object_link'><a href="../Search.html#output-instance_method" title="Ray::Search#output (method)">#output</a></span></p>
333
271
  <div id="constructor_details" class="method_details_list">
334
272
  <h2>Constructor Details</h2>
335
273
 
336
274
  <div class="method_details first">
337
275
  <p class="signature first" id="initialize-instance_method">
338
276
 
339
- - (<tt><span class='object_link'><a href="" title="Ray::Cache (class)">Cache</a></span></tt>) <strong>initialize</strong>(query)
277
+ - (<tt><span class='object_link'><a href="" title="Ray::Search::Cache (class)">Cache</a></span></tt>) <strong>initialize</strong>(query = nil)
340
278
 
341
279
 
342
280
 
@@ -356,19 +294,27 @@
356
294
  <pre class="lines">
357
295
 
358
296
 
359
- 15
360
- 16
361
- 17
362
- 18
363
- 19</pre>
297
+ 179
298
+ 180
299
+ 181
300
+ 182
301
+ 183
302
+ 184
303
+ 185
304
+ 186
305
+ 187</pre>
364
306
  </td>
365
307
  <td>
366
- <pre class="code"><span class="info file"># File 'lib/ray/search/cache.rb', line 15</span>
367
-
368
- <span class='kw'>def</span> <span class='id initialize'>initialize</span> <span class='id query'>query</span>
369
- <span class='ivar'>@query</span> <span class='op'>=</span> <span class='id query'>query</span>
370
- <span class='ivar'>@results</span> <span class='op'>=</span> <span class='id search'>search</span>
371
- <span class='ivar'>@uri</span> <span class='op'>=</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>CACHE</span>
308
+ <pre class="code"><span class="info file"># File 'lib/ray/search.rb', line 179</span>
309
+
310
+ <span class='kw'>def</span> <span class='id initialize'>initialize</span> <span class='id query'>query</span> <span class='op'>=</span> <span class='kw'>nil</span>
311
+ <span class='kw'>if</span> <span class='id query'>query</span>
312
+ <span class='ivar'>@query</span> <span class='op'>=</span> <span class='id query'>query</span>
313
+ <span class='ivar'>@uri</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>file:///</span><span class='embexpr_beg'>#{</span><span class='const'>CACHE</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
314
+ <span class='ivar'>@results</span> <span class='op'>=</span> <span class='id search'>search</span>
315
+ <span class='kw'>else</span>
316
+ <span class='ivar'>@results</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>A search query is required. Try: ray help search</span><span class='tstring_end'>&quot;</span></span>
317
+ <span class='kw'>end</span>
372
318
  <span class='kw'>end</span></pre>
373
319
  </td>
374
320
  </tr>
@@ -406,12 +352,12 @@
406
352
  <pre class="lines">
407
353
 
408
354
 
409
- 12
410
- 13
411
- 14</pre>
355
+ 175
356
+ 176
357
+ 177</pre>
412
358
  </td>
413
359
  <td>
414
- <pre class="code"><span class="info file"># File 'lib/ray/search/cache.rb', line 12</span>
360
+ <pre class="code"><span class="info file"># File 'lib/ray/search.rb', line 175</span>
415
361
 
416
362
  <span class='kw'>def</span> <span class='id query'>query</span>
417
363
  <span class='ivar'>@query</span>
@@ -422,12 +368,12 @@
422
368
  </div>
423
369
 
424
370
 
425
- <span id="results=-instance_method"></span>
371
+ <span id=""></span>
426
372
  <span id="results-instance_method"></span>
427
373
  <div class="method_details ">
428
374
  <p class="signature " id="results-instance_method">
429
375
 
430
- - (<tt>Object</tt>) <strong>results</strong>
376
+ - (<tt>Object</tt>) <strong>results</strong> <span class="extras">(readonly)</span>
431
377
 
432
378
 
433
379
 
@@ -447,12 +393,12 @@
447
393
  <pre class="lines">
448
394
 
449
395
 
450
- 13
451
- 14
452
- 15</pre>
396
+ 175
397
+ 176
398
+ 177</pre>
453
399
  </td>
454
400
  <td>
455
- <pre class="code"><span class="info file"># File 'lib/ray/search/cache.rb', line 13</span>
401
+ <pre class="code"><span class="info file"># File 'lib/ray/search.rb', line 175</span>
456
402
 
457
403
  <span class='kw'>def</span> <span class='id results'>results</span>
458
404
  <span class='ivar'>@results</span>
@@ -488,12 +434,12 @@
488
434
  <pre class="lines">
489
435
 
490
436
 
491
- 12
492
- 13
493
- 14</pre>
437
+ 175
438
+ 176
439
+ 177</pre>
494
440
  </td>
495
441
  <td>
496
- <pre class="code"><span class="info file"># File 'lib/ray/search/cache.rb', line 12</span>
442
+ <pre class="code"><span class="info file"># File 'lib/ray/search.rb', line 175</span>
497
443
 
498
444
  <span class='kw'>def</span> <span class='id uri'>uri</span>
499
445
  <span class='ivar'>@uri</span>
@@ -506,82 +452,20 @@
506
452
  </div>
507
453
 
508
454
 
509
- <div id="class_method_details" class="method_details_list">
510
- <h2>Class Method Details</h2>
511
-
512
-
513
- <div class="method_details first">
514
- <p class="signature first" id="clear-class_method">
515
-
516
- + (<tt>Object</tt>) <strong>clear</strong>
517
-
518
-
519
-
520
- </p><table class="source_code">
521
- <tr>
522
- <td>
523
- <pre class="lines">
524
-
525
-
526
- 51
527
- 52
528
- 53</pre>
529
- </td>
530
- <td>
531
- <pre class="code"><span class="info file"># File 'lib/ray/search/cache.rb', line 51</span>
532
-
533
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id clear'>clear</span>
534
- <span class='const'>FileUtils</span><span class='period'>.</span><span class='id rm'>rm</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>CACHE</span>
535
- <span class='kw'>end</span></pre>
536
- </td>
537
- </tr>
538
- </table>
539
- </div>
540
-
541
- </div>
542
-
543
455
  <div id="instance_method_details" class="method_details_list">
544
456
  <h2>Instance Method Details</h2>
545
457
 
546
458
 
547
459
  <div class="method_details first">
548
- <p class="signature first" id="cache-instance_method">
460
+ <p class="signature first" id="search-instance_method">
549
461
 
550
- - (<tt>Object</tt>) <strong>cache</strong>
551
-
552
-
553
-
554
- </p><table class="source_code">
555
- <tr>
556
- <td>
557
- <pre class="lines">
558
-
559
-
560
- 55
561
- 56
562
- 57</pre>
563
- </td>
564
- <td>
565
- <pre class="code"><span class="info file"># File 'lib/ray/search/cache.rb', line 55</span>
566
-
567
- <span class='kw'>def</span> <span class='id cache'>cache</span>
568
- <span class='kw'>return</span> <span class='kw'>self</span>
569
- <span class='kw'>end</span></pre>
570
- </td>
571
- </tr>
572
- </table>
573
- </div>
574
-
575
- <div class="method_details ">
576
- <p class="signature " id="match?-instance_method">
577
-
578
- - (<tt>Boolean</tt>) <strong>match?</strong>(name, description)
462
+ - (<tt>Hash</tt>) <strong>search</strong>
579
463
 
580
464
 
581
465
 
582
466
  </p><div class="docstring">
583
467
  <div class="discussion">
584
-
468
+ <p>Override Search#search to use the local cache</p>
585
469
 
586
470
 
587
471
  </div>
@@ -594,10 +478,14 @@
594
478
  <li>
595
479
 
596
480
 
597
- <span class='type'>(<tt>Boolean</tt>)</span>
481
+ <span class='type'>(<tt>Hash</tt>)</span>
598
482
 
599
483
 
600
484
 
485
+ &mdash;
486
+ <div class='inline'><p>local search results</p>
487
+ </div>
488
+
601
489
  </li>
602
490
 
603
491
  </ul>
@@ -608,83 +496,47 @@
608
496
  <pre class="lines">
609
497
 
610
498
 
611
- 42
612
- 43
613
- 44
614
- 45
615
- 46
616
- 47
617
- 48
618
- 49</pre>
619
- </td>
620
- <td>
621
- <pre class="code"><span class="info file"># File 'lib/ray/search/cache.rb', line 42</span>
622
-
623
- <span class='kw'>def</span> <span class='id match?'>match?</span> <span class='id name'>name</span><span class='comma'>,</span> <span class='id description'>description</span>
624
- <span class='kw'>if</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id description'>description</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='period'>.</span><span class='id include?'>include?</span><span class='lparen'>(</span><span class='ivar'>@query</span><span class='rparen'>)</span>
625
- <span class='kw'>return</span> <span class='kw'>true</span>
626
- <span class='kw'>elsif</span> <span class='id name'>name</span><span class='period'>.</span><span class='id include?'>include?</span><span class='lparen'>(</span><span class='ivar'>@query</span><span class='period'>.</span><span class='id to_extension_name'>to_extension_name</span><span class='rparen'>)</span>
627
- <span class='kw'>return</span> <span class='kw'>true</span>
628
- <span class='kw'>end</span>
629
- <span class='kw'>return</span> <span class='kw'>false</span>
630
- <span class='kw'>end</span></pre>
631
- </td>
632
- </tr>
633
- </table>
634
- </div>
635
-
636
- <div class="method_details ">
637
- <p class="signature " id="search-instance_method">
638
-
639
- - (<tt>Object</tt>) <strong>search</strong>
640
-
641
-
642
-
643
- </p><table class="source_code">
644
- <tr>
645
- <td>
646
- <pre class="lines">
647
-
648
-
649
- 21
650
- 22
651
- 23
652
- 24
653
- 25
654
- 26
655
- 27
656
- 28
657
- 29
658
- 30
659
- 31
660
- 32
661
- 33
662
- 34
663
- 35
664
- 36
665
- 37
666
- 38
667
- 39
668
- 40</pre>
499
+ 191
500
+ 192
501
+ 193
502
+ 194
503
+ 195
504
+ 196
505
+ 197
506
+ 198
507
+ 199
508
+ 200
509
+ 201
510
+ 202
511
+ 203
512
+ 204
513
+ 205
514
+ 206
515
+ 207
516
+ 208
517
+ 209
518
+ 210
519
+ 211</pre>
669
520
  </td>
670
521
  <td>
671
- <pre class="code"><span class="info file"># File 'lib/ray/search/cache.rb', line 21</span>
522
+ <pre class="code"><span class="info file"># File 'lib/ray/search.rb', line 191</span>
672
523
 
673
524
  <span class='kw'>def</span> <span class='id search'>search</span>
674
- <span class='kw'>return</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='kw'>unless</span> <span class='const'>File</span><span class='period'>.</span><span class='id exist?'>exist?</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>CACHE</span>
675
- <span class='id cache'>cache</span> <span class='op'>=</span> <span class='const'>YAML</span><span class='period'>.</span><span class='id load_file'>load_file</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>CACHE</span>
525
+ <span class='kw'>return</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='kw'>unless</span> <span class='const'>File</span><span class='period'>.</span><span class='id exist?'>exist?</span> <span class='const'>CACHE</span>
526
+ <span class='id cache'>cache</span> <span class='op'>=</span> <span class='const'>YAML</span><span class='period'>.</span><span class='id load_file'>load_file</span> <span class='const'>CACHE</span>
676
527
  <span class='id results'>results</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
677
528
  <span class='id cache'>cache</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id extension'>extension</span><span class='op'>|</span>
678
529
  <span class='id name'>name</span> <span class='op'>=</span> <span class='id extension'>extension</span><span class='period'>.</span><span class='id first'>first</span>
679
530
  <span class='id info'>info</span> <span class='op'>=</span> <span class='id extension'>extension</span><span class='period'>.</span><span class='id last'>last</span>
680
- <span class='kw'>if</span> <span class='id match?'>match?</span> <span class='id name'>name</span><span class='comma'>,</span> <span class='id info'>info</span><span class='lbracket'>[</span><span class='symbol'>:description</span><span class='rbracket'>]</span>
531
+ <span class='kw'>if</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id info'>info</span><span class='lbracket'>[</span><span class='symbol'>:description</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='period'>.</span><span class='id include?'>include?</span> <span class='ivar'>@query</span>
681
532
  <span class='id results'>results</span><span class='lbracket'>[</span><span class='id name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbrace'>{</span>
682
- <span class='symbol'>:author</span> <span class='op'>=&gt;</span> <span class='id info'>info</span><span class='lbracket'>[</span><span class='symbol'>:author</span><span class='rbracket'>]</span><span class='comma'>,</span>
683
- <span class='symbol'>:description</span> <span class='op'>=&gt;</span> <span class='id info'>info</span><span class='lbracket'>[</span><span class='symbol'>:description</span><span class='rbracket'>]</span><span class='comma'>,</span>
684
- <span class='symbol'>:homepage</span> <span class='op'>=&gt;</span> <span class='id info'>info</span><span class='lbracket'>[</span><span class='symbol'>:homepage</span><span class='rbracket'>]</span><span class='comma'>,</span>
685
- <span class='symbol'>:name</span> <span class='op'>=&gt;</span> <span class='id name'>name</span><span class='comma'>,</span>
686
- <span class='symbol'>:uri</span> <span class='op'>=&gt;</span> <span class='id info'>info</span><span class='lbracket'>[</span><span class='symbol'>:uri</span><span class='rbracket'>]</span><span class='comma'>,</span>
687
- <span class='symbol'>:version</span> <span class='op'>=&gt;</span> <span class='id info'>info</span><span class='lbracket'>[</span><span class='symbol'>:version</span><span class='rbracket'>]</span>
533
+ <span class='symbol'>:author</span> <span class='op'>=&gt;</span> <span class='id info'>info</span><span class='lbracket'>[</span><span class='symbol'>:author</span><span class='rbracket'>]</span><span class='comma'>,</span>
534
+ <span class='symbol'>:description</span> <span class='op'>=&gt;</span> <span class='id info'>info</span><span class='lbracket'>[</span><span class='symbol'>:description</span><span class='rbracket'>]</span><span class='comma'>,</span>
535
+ <span class='symbol'>:homepage</span> <span class='op'>=&gt;</span> <span class='id info'>info</span><span class='lbracket'>[</span><span class='symbol'>:homepage</span><span class='rbracket'>]</span><span class='comma'>,</span>
536
+ <span class='symbol'>:name</span> <span class='op'>=&gt;</span> <span class='id name'>name</span><span class='comma'>,</span>
537
+ <span class='symbol'>:repository</span> <span class='op'>=&gt;</span> <span class='id info'>info</span><span class='lbracket'>[</span><span class='symbol'>:repository</span><span class='rbracket'>]</span><span class='comma'>,</span>
538
+ <span class='symbol'>:uri</span> <span class='op'>=&gt;</span> <span class='id info'>info</span><span class='lbracket'>[</span><span class='symbol'>:uri</span><span class='rbracket'>]</span><span class='comma'>,</span>
539
+ <span class='symbol'>:version</span> <span class='op'>=&gt;</span> <span class='id info'>info</span><span class='lbracket'>[</span><span class='symbol'>:version</span><span class='rbracket'>]</span>
688
540
  <span class='rbrace'>}</span>
689
541
  <span class='kw'>end</span>
690
542
  <span class='kw'>end</span>
@@ -700,7 +552,7 @@
700
552
  </div>
701
553
 
702
554
  <div id="footer">
703
- Generated on Sun Nov 20 20:26:44 2011 by
555
+ Generated on Tue Nov 15 19:16:23 2011 by
704
556
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
705
557
  0.7.3 (ruby-1.9.3).
706
558
  </div>