unicache 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.rdoc +4 -1
- data/Rakefile +29 -4
- data/doc/UniCache/CallbackError.html +1 -1
- data/doc/UniCache/Error.html +1 -1
- data/doc/UniCache/FetchError.html +1 -1
- data/doc/UniCache/LruEviction.html +52 -47
- data/doc/UniCache/RemoveError.html +1 -1
- data/doc/UniCache/SizeError.html +1 -1
- data/doc/UniCache/UniCacheCommon.html +132 -0
- data/doc/UniCache.html +395 -148
- data/doc/_index.html +1 -1
- data/doc/file.CHANGELOG.html +6 -2
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/method_list.html +34 -16
- data/doc/top-level-namespace.html +1 -1
- data/lib/unicache.rb +91 -47
- data/lib/version.rb +6 -0
- data/test/test_all.rb +62 -10
- metadata +4 -2
data/CHANGELOG.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -11,14 +11,14 @@ task :cleanup_test do
|
|
11
11
|
sh "rm -rf test/test"
|
12
12
|
end
|
13
13
|
|
14
|
-
task :doc do
|
15
|
-
sh "yardoc lib/* - README.rdoc CHANGELOG.rdoc"
|
16
|
-
end
|
17
|
-
|
18
14
|
task :build => :doc do
|
19
15
|
sh "gem build unicache.gemspec"
|
20
16
|
end
|
21
17
|
|
18
|
+
task :doc do
|
19
|
+
sh "yardoc lib/* - README.rdoc CHANGELOG.rdoc"
|
20
|
+
end
|
21
|
+
|
22
22
|
task :publish do
|
23
23
|
if Dir.glob('unicache-*gem').length == 1
|
24
24
|
sh "gem push unicache*.gem"
|
@@ -26,3 +26,28 @@ task :publish do
|
|
26
26
|
raise "Multiple gems in the directory..."
|
27
27
|
end
|
28
28
|
end
|
29
|
+
|
30
|
+
|
31
|
+
# Create unicache.gemspec with current version and date fields.
|
32
|
+
file 'unicache.gemspec' => [:version, 'unicache.rx.gemspec'] do
|
33
|
+
sh "mucgly -i unicache.rx.gemspec -o unicache.gemspec"
|
34
|
+
sh "ruvermgr -f .version -i build"
|
35
|
+
# sh "ruvermgr -f .version"
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
# Create 'lib/version.rb' file including 'Unicache.version' method.
|
40
|
+
# :version task is usually executed indirectly by 'unicache.gemspec'.
|
41
|
+
task :version do
|
42
|
+
version = %x{ruvermgr -f .version -o ruby}.chomp
|
43
|
+
File.open( "lib/version.rb", 'w' ) do |fh|
|
44
|
+
fh.puts "\
|
45
|
+
class UniCache
|
46
|
+
VERSION=\"#{version}\"
|
47
|
+
def UniCache.version
|
48
|
+
VERSION
|
49
|
+
end
|
50
|
+
end
|
51
|
+
"
|
52
|
+
end
|
53
|
+
end
|
@@ -133,7 +133,7 @@
|
|
133
133
|
</div>
|
134
134
|
|
135
135
|
<div id="footer">
|
136
|
-
Generated on
|
136
|
+
Generated on Thu Jul 17 14:54:03 2014 by
|
137
137
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
138
138
|
0.8.6.1 (ruby-1.9.3).
|
139
139
|
</div>
|
data/doc/UniCache/Error.html
CHANGED
@@ -129,7 +129,7 @@
|
|
129
129
|
</div>
|
130
130
|
|
131
131
|
<div id="footer">
|
132
|
-
Generated on
|
132
|
+
Generated on Thu Jul 17 14:54:03 2014 by
|
133
133
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
134
134
|
0.8.6.1 (ruby-1.9.3).
|
135
135
|
</div>
|
@@ -133,7 +133,7 @@
|
|
133
133
|
</div>
|
134
134
|
|
135
135
|
<div id="footer">
|
136
|
-
Generated on
|
136
|
+
Generated on Thu Jul 17 14:54:03 2014 by
|
137
137
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
138
138
|
0.8.6.1 (ruby-1.9.3).
|
139
139
|
</div>
|
@@ -295,13 +295,13 @@ of operations.</p>
|
|
295
295
|
<pre class="lines">
|
296
296
|
|
297
297
|
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
298
|
+
340
|
299
|
+
341
|
300
|
+
342
|
301
|
+
343</pre>
|
302
302
|
</td>
|
303
303
|
<td>
|
304
|
-
<pre class="code"><span class="info file"># File 'lib/unicache.rb', line
|
304
|
+
<pre class="code"><span class="info file"># File 'lib/unicache.rb', line 340</span>
|
305
305
|
|
306
306
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
307
307
|
<span class='ivar'>@lock</span> <span class='op'>=</span> <span class='const'>Mutex</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
@@ -345,14 +345,14 @@ of operations.</p>
|
|
345
345
|
<pre class="lines">
|
346
346
|
|
347
347
|
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
348
|
+
347
|
349
|
+
348
|
350
|
+
349
|
351
|
+
350
|
352
|
+
351</pre>
|
353
353
|
</td>
|
354
354
|
<td>
|
355
|
-
<pre class="code"><span class="info file"># File 'lib/unicache.rb', line
|
355
|
+
<pre class="code"><span class="info file"># File 'lib/unicache.rb', line 347</span>
|
356
356
|
|
357
357
|
<span class='kw'>def</span> <span class='id identifier rubyid_clear'>clear</span>
|
358
358
|
<span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_lock'>lock</span>
|
@@ -390,12 +390,12 @@ of operations.</p>
|
|
390
390
|
<pre class="lines">
|
391
391
|
|
392
392
|
|
393
|
-
|
394
|
-
|
395
|
-
|
393
|
+
394
|
394
|
+
395
|
395
|
+
396</pre>
|
396
396
|
</td>
|
397
397
|
<td>
|
398
|
-
<pre class="code"><span class="info file"># File 'lib/unicache.rb', line
|
398
|
+
<pre class="code"><span class="info file"># File 'lib/unicache.rb', line 394</span>
|
399
399
|
|
400
400
|
<span class='kw'>def</span> <span class='id identifier rubyid_nextEvict'>nextEvict</span>
|
401
401
|
<span class='ivar'>@list</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
@@ -453,25 +453,25 @@ of operations.</p>
|
|
453
453
|
<pre class="lines">
|
454
454
|
|
455
455
|
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
456
|
+
375
|
457
|
+
376
|
458
|
+
377
|
459
|
+
378
|
460
|
+
379
|
461
|
+
380
|
462
|
+
381
|
463
|
+
382
|
464
|
+
383
|
465
|
+
384
|
466
|
+
385
|
467
|
+
386
|
468
|
+
387
|
469
|
+
388
|
470
|
+
389
|
471
|
+
390</pre>
|
472
472
|
</td>
|
473
473
|
<td>
|
474
|
-
<pre class="code"><span class="info file"># File 'lib/unicache.rb', line
|
474
|
+
<pre class="code"><span class="info file"># File 'lib/unicache.rb', line 375</span>
|
475
475
|
|
476
476
|
<span class='kw'>def</span> <span class='id identifier rubyid_remove'>remove</span><span class='lparen'>(</span> <span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='rparen'>)</span>
|
477
477
|
<span class='ivar'>@lock</span><span class='period'>.</span><span class='id identifier rubyid_lock'>lock</span>
|
@@ -525,6 +525,11 @@ of the list.</p>
|
|
525
525
|
|
526
526
|
|
527
527
|
|
528
|
+
—
|
529
|
+
<div class='inline'>
|
530
|
+
<p>Entry key.</p>
|
531
|
+
</div>
|
532
|
+
|
528
533
|
</li>
|
529
534
|
|
530
535
|
</ul>
|
@@ -536,21 +541,21 @@ of the list.</p>
|
|
536
541
|
<pre class="lines">
|
537
542
|
|
538
543
|
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
544
|
+
358
|
545
|
+
359
|
546
|
+
360
|
547
|
+
361
|
548
|
+
362
|
549
|
+
363
|
550
|
+
364
|
551
|
+
365
|
552
|
+
366
|
553
|
+
367
|
554
|
+
368
|
555
|
+
369</pre>
|
551
556
|
</td>
|
552
557
|
<td>
|
553
|
-
<pre class="code"><span class="info file"># File 'lib/unicache.rb', line
|
558
|
+
<pre class="code"><span class="info file"># File 'lib/unicache.rb', line 358</span>
|
554
559
|
|
555
560
|
<span class='kw'>def</span> <span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span> <span class='id identifier rubyid_key'>key</span> <span class='rparen'>)</span>
|
556
561
|
|
@@ -558,7 +563,7 @@ of the list.</p>
|
|
558
563
|
|
559
564
|
<span class='comment'># Delete old entries of this key.
|
560
565
|
</span> <span class='ivar'>@list</span><span class='period'>.</span><span class='id identifier rubyid_delete_if'>delete_if</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span> <span class='id identifier rubyid_i'>i</span> <span class='op'>==</span> <span class='id identifier rubyid_key'>key</span> <span class='kw'>end</span>
|
561
|
-
|
566
|
+
|
562
567
|
<span class='comment'># Add to end of LRU.
|
563
568
|
</span> <span class='ivar'>@list</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span> <span class='id identifier rubyid_key'>key</span>
|
564
569
|
|
@@ -574,7 +579,7 @@ of the list.</p>
|
|
574
579
|
</div>
|
575
580
|
|
576
581
|
<div id="footer">
|
577
|
-
Generated on
|
582
|
+
Generated on Thu Jul 17 14:54:03 2014 by
|
578
583
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
579
584
|
0.8.6.1 (ruby-1.9.3).
|
580
585
|
</div>
|
@@ -133,7 +133,7 @@
|
|
133
133
|
</div>
|
134
134
|
|
135
135
|
<div id="footer">
|
136
|
-
Generated on
|
136
|
+
Generated on Thu Jul 17 14:54:03 2014 by
|
137
137
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
138
138
|
0.8.6.1 (ruby-1.9.3).
|
139
139
|
</div>
|
data/doc/UniCache/SizeError.html
CHANGED
@@ -133,7 +133,7 @@
|
|
133
133
|
</div>
|
134
134
|
|
135
135
|
<div id="footer">
|
136
|
-
Generated on
|
136
|
+
Generated on Thu Jul 17 14:54:03 2014 by
|
137
137
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
138
138
|
0.8.6.1 (ruby-1.9.3).
|
139
139
|
</div>
|
@@ -0,0 +1,132 @@
|
|
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: UniCache::UniCacheCommon
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.6.1
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!" + escape(window.location.href);
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../_index.html">Index (U)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../UniCache.html" title="UniCache (module)">UniCache</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">UniCacheCommon</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: UniCache::UniCacheCommon
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">UniCache::UniCacheCommon</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/version.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
|
103
|
+
<h2>Constant Summary</h2>
|
104
|
+
|
105
|
+
<dl class="constants">
|
106
|
+
|
107
|
+
<dt id="VERSION-constant" class="">VERSION =
|
108
|
+
|
109
|
+
</dt>
|
110
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.0.3</span><span class='tstring_end'>"</span></span></pre></dd>
|
111
|
+
|
112
|
+
</dl>
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
</div>
|
124
|
+
|
125
|
+
<div id="footer">
|
126
|
+
Generated on Thu Jul 17 14:43:45 2014 by
|
127
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
128
|
+
0.8.6.1 (ruby-1.9.3).
|
129
|
+
</div>
|
130
|
+
|
131
|
+
</body>
|
132
|
+
</html>
|