elephas 2.2.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/README.md +4 -4
- data/doc/Elephas/{Providers → Backends}/Base.html +48 -38
- data/doc/Elephas/{Providers → Backends}/Hash.html +35 -38
- data/doc/Elephas/{Providers → Backends}/RubyOnRails.html +32 -35
- data/doc/Elephas/{Providers.html → Backends.html} +8 -10
- data/doc/Elephas/Cache.html +894 -111
- data/doc/Elephas/Entry.html +63 -50
- data/doc/Elephas/Version.html +3 -3
- data/doc/Elephas.html +3 -3
- data/doc/_index.html +14 -22
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +5 -5
- data/doc/index.html +5 -5
- data/doc/method_list.html +62 -54
- data/doc/top-level-namespace.html +1 -1
- data/elephas.gemspec +1 -1
- data/lib/elephas/{provider.rb → backends/base.rb} +4 -6
- data/lib/elephas/{providers → backends}/hash.rb +7 -7
- data/lib/elephas/{providers → backends}/ruby_on_rails.rb +4 -6
- data/lib/elephas/cache.rb +47 -29
- data/lib/elephas/entry.rb +6 -6
- data/lib/elephas/version.rb +2 -2
- data/lib/elephas.rb +4 -6
- data/locales/en.yml +1 -1
- data/locales/it.yml +1 -1
- data/spec/elephas/cache_spec.rb +32 -35
- data/spec/elephas/entry_spec.rb +6 -5
- data/spec/elephas/{provider_spec.rb → providers/base_spec.rb} +2 -6
- data/spec/elephas/providers/hash_spec.rb +6 -6
- data/spec/elephas/providers/ruby_on_rails_spec.rb +2 -2
- metadata +14 -14
@@ -4,7 +4,7 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Class: Elephas::
|
7
|
+
Class: Elephas::Backends::RubyOnRails
|
8
8
|
|
9
9
|
— Documentation by YARD 0.8.5.2
|
10
10
|
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<div id="menu">
|
33
33
|
|
34
34
|
<a href="../../_index.html">Index (R)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../../Elephas.html" title="Elephas (module)">Elephas</a></span></span> » <span class='title'><span class='object_link'><a href="../
|
35
|
+
<span class='title'><span class='object_link'><a href="../../Elephas.html" title="Elephas (module)">Elephas</a></span></span> » <span class='title'><span class='object_link'><a href="../Backends.html" title="Elephas::Backends (module)">Backends</a></span></span>
|
36
36
|
»
|
37
37
|
<span class="title">RubyOnRails</span>
|
38
38
|
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>Class: Elephas::
|
66
|
+
<div id="content"><h1>Class: Elephas::Backends::RubyOnRails
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -73,12 +73,14 @@
|
|
73
73
|
|
74
74
|
<dt class="r1">Inherits:</dt>
|
75
75
|
<dd class="r1">
|
76
|
-
<span class="inheritName">
|
76
|
+
<span class="inheritName"><span class='object_link'><a href="Base.html" title="Elephas::Backends::Base (class)">Base</a></span></span>
|
77
77
|
|
78
78
|
<ul class="fullTree">
|
79
79
|
<li>Object</li>
|
80
80
|
|
81
|
-
<li class="next"
|
81
|
+
<li class="next"><span class='object_link'><a href="Base.html" title="Elephas::Backends::Base (class)">Base</a></span></li>
|
82
|
+
|
83
|
+
<li class="next">Elephas::Backends::RubyOnRails</li>
|
82
84
|
|
83
85
|
</ul>
|
84
86
|
<a href="#" class="inheritanceTree">show all</a>
|
@@ -90,22 +92,18 @@
|
|
90
92
|
|
91
93
|
|
92
94
|
|
93
|
-
<dt class="r2">Includes:</dt>
|
94
|
-
<dd class="r2"><span class='object_link'><a href="Base.html" title="Elephas::Providers::Base (module)">Base</a></span></dd>
|
95
|
-
|
96
|
-
|
97
95
|
|
98
96
|
|
99
97
|
|
100
|
-
<dt class="
|
101
|
-
<dd class="
|
98
|
+
<dt class="r2 last">Defined in:</dt>
|
99
|
+
<dd class="r2 last">lib/elephas/backends/ruby_on_rails.rb</dd>
|
102
100
|
|
103
101
|
</dl>
|
104
102
|
<div class="clear"></div>
|
105
103
|
|
106
104
|
<h2>Overview</h2><div class="docstring">
|
107
105
|
<div class="discussion">
|
108
|
-
<p>This is a Ruby on Rails
|
106
|
+
<p>This is a Ruby on Rails backend, which uses Rails.cache.</p>
|
109
107
|
|
110
108
|
|
111
109
|
</div>
|
@@ -232,11 +230,10 @@
|
|
232
230
|
|
233
231
|
|
234
232
|
|
235
|
-
<h3 class="inherited">Methods
|
236
|
-
<p class="inherited"><span class='object_link'><a href="Base.html#now-instance_method" title="Elephas::
|
233
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="Elephas::Backends::Base (class)">Base</a></span></h3>
|
234
|
+
<p class="inherited"><span class='object_link'><a href="Base.html#now-instance_method" title="Elephas::Backends::Base#now (method)">#now</a></span></p>
|
237
235
|
|
238
236
|
|
239
|
-
|
240
237
|
|
241
238
|
<div id="instance_method_details" class="method_details_list">
|
242
239
|
<h2>Instance Method Details</h2>
|
@@ -303,15 +300,15 @@
|
|
303
300
|
<pre class="lines">
|
304
301
|
|
305
302
|
|
303
|
+
37
|
304
|
+
38
|
306
305
|
39
|
307
306
|
40
|
308
307
|
41
|
309
|
-
42
|
310
|
-
43
|
311
|
-
44</pre>
|
308
|
+
42</pre>
|
312
309
|
</td>
|
313
310
|
<td>
|
314
|
-
<pre class="code"><span class="info file"># File 'lib/elephas/
|
311
|
+
<pre class="code"><span class="info file"># File 'lib/elephas/backends/ruby_on_rails.rb', line 37</span>
|
315
312
|
|
316
313
|
<span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
317
314
|
<span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span>
|
@@ -385,17 +382,17 @@
|
|
385
382
|
<pre class="lines">
|
386
383
|
|
387
384
|
|
385
|
+
48
|
386
|
+
49
|
388
387
|
50
|
389
|
-
51
|
390
|
-
52
|
391
|
-
53</pre>
|
388
|
+
51</pre>
|
392
389
|
</td>
|
393
390
|
<td>
|
394
|
-
<pre class="code"><span class="info file"># File 'lib/elephas/
|
391
|
+
<pre class="code"><span class="info file"># File 'lib/elephas/backends/ruby_on_rails.rb', line 48</span>
|
395
392
|
|
396
393
|
<span class='kw'>def</span> <span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
397
394
|
<span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span>
|
398
|
-
<span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_cache'>cache</span><span class='period'>.</span><span class='id identifier rubyid_exist?'>exist?</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_cache'>cache</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_valid?'>valid?</span>
|
395
|
+
<span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_cache'>cache</span><span class='period'>.</span><span class='id identifier rubyid_exist?'>exist?</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_cache'>cache</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_valid?'>valid?</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
|
399
396
|
<span class='kw'>end</span></pre>
|
400
397
|
</td>
|
401
398
|
</tr>
|
@@ -463,12 +460,12 @@
|
|
463
460
|
<pre class="lines">
|
464
461
|
|
465
462
|
|
466
|
-
|
467
|
-
|
468
|
-
|
463
|
+
15
|
464
|
+
16
|
465
|
+
17</pre>
|
469
466
|
</td>
|
470
467
|
<td>
|
471
|
-
<pre class="code"><span class="info file"># File 'lib/elephas/
|
468
|
+
<pre class="code"><span class="info file"># File 'lib/elephas/backends/ruby_on_rails.rb', line 15</span>
|
472
469
|
|
473
470
|
<span class='kw'>def</span> <span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
474
471
|
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_cache'>cache</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='kw'>nil</span>
|
@@ -533,7 +530,7 @@
|
|
533
530
|
<span class='name'>options</span>
|
534
531
|
|
535
532
|
|
536
|
-
<span class='type'>(<tt><span class='object_link'><a href="Hash.html" title="Elephas::
|
533
|
+
<span class='type'>(<tt><span class='object_link'><a href="Hash.html" title="Elephas::Backends::Hash (class)">Hash</a></span></tt>)</span>
|
537
534
|
|
538
535
|
|
539
536
|
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
@@ -568,7 +565,7 @@
|
|
568
565
|
<p class="tag_title">See Also:</p>
|
569
566
|
<ul class="see">
|
570
567
|
|
571
|
-
<li
|
568
|
+
<li>Cache.setup_options</li>
|
572
569
|
|
573
570
|
</ul>
|
574
571
|
|
@@ -578,15 +575,15 @@
|
|
578
575
|
<pre class="lines">
|
579
576
|
|
580
577
|
|
578
|
+
26
|
579
|
+
27
|
581
580
|
28
|
582
581
|
29
|
583
582
|
30
|
584
|
-
31
|
585
|
-
32
|
586
|
-
33</pre>
|
583
|
+
31</pre>
|
587
584
|
</td>
|
588
585
|
<td>
|
589
|
-
<pre class="code"><span class="info file"># File 'lib/elephas/
|
586
|
+
<pre class="code"><span class="info file"># File 'lib/elephas/backends/ruby_on_rails.rb', line 26</span>
|
590
587
|
|
591
588
|
<span class='kw'>def</span> <span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
592
589
|
<span class='id identifier rubyid_entry'>entry</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>Elephas</span><span class='op'>::</span><span class='const'>Entry</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
@@ -604,7 +601,7 @@
|
|
604
601
|
</div>
|
605
602
|
|
606
603
|
<div id="footer">
|
607
|
-
Generated on
|
604
|
+
Generated on Sun Mar 24 12:12:02 2013 by
|
608
605
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
609
606
|
0.8.5.2 (ruby-1.9.3).
|
610
607
|
</div>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Module: Elephas::
|
7
|
+
Module: Elephas::Backends
|
8
8
|
|
9
9
|
— Documentation by YARD 0.8.5.2
|
10
10
|
|
@@ -31,10 +31,10 @@
|
|
31
31
|
<div id="header">
|
32
32
|
<div id="menu">
|
33
33
|
|
34
|
-
<a href="../_index.html">Index (
|
34
|
+
<a href="../_index.html">Index (B)</a> »
|
35
35
|
<span class='title'><span class='object_link'><a href="../Elephas.html" title="Elephas (module)">Elephas</a></span></span>
|
36
36
|
»
|
37
|
-
<span class="title">
|
37
|
+
<span class="title">Backends</span>
|
38
38
|
|
39
39
|
|
40
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>Module: Elephas::
|
66
|
+
<div id="content"><h1>Module: Elephas::Backends
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -79,8 +79,8 @@
|
|
79
79
|
|
80
80
|
|
81
81
|
<dt class="r1 last">Defined in:</dt>
|
82
|
-
<dd class="r1 last">lib/elephas/
|
83
|
-
lib/elephas/
|
82
|
+
<dd class="r1 last">lib/elephas/backends/base.rb<span class="defines">,<br />
|
83
|
+
lib/elephas/backends/hash.rb,<br /> lib/elephas/backends/ruby_on_rails.rb</span>
|
84
84
|
</dd>
|
85
85
|
|
86
86
|
</dl>
|
@@ -100,11 +100,9 @@
|
|
100
100
|
<p class="children">
|
101
101
|
|
102
102
|
|
103
|
-
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Providers/Base.html" title="Elephas::Providers::Base (module)">Base</a></span>
|
104
|
-
|
105
103
|
|
106
104
|
|
107
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="
|
105
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Backends/Base.html" title="Elephas::Backends::Base (class)">Base</a></span>, <span class='object_link'><a href="Backends/Hash.html" title="Elephas::Backends::Hash (class)">Hash</a></span>, <span class='object_link'><a href="Backends/RubyOnRails.html" title="Elephas::Backends::RubyOnRails (class)">RubyOnRails</a></span>
|
108
106
|
|
109
107
|
|
110
108
|
</p>
|
@@ -120,7 +118,7 @@
|
|
120
118
|
</div>
|
121
119
|
|
122
120
|
<div id="footer">
|
123
|
-
Generated on
|
121
|
+
Generated on Sun Mar 24 12:12:01 2013 by
|
124
122
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
125
123
|
0.8.5.2 (ruby-1.9.3).
|
126
124
|
</div>
|