cachetastic 2.1.3 → 2.1.4

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.
Files changed (32) hide show
  1. data/doc/classes/ActiveRecord/Base.html +12 -12
  2. data/doc/classes/Cachetastic/Adapters/Base.html +33 -33
  3. data/doc/classes/Cachetastic/Adapters/Drb.html +42 -42
  4. data/doc/classes/Cachetastic/Adapters/File.html +18 -18
  5. data/doc/classes/Cachetastic/Adapters/FileBase.html +36 -36
  6. data/doc/classes/Cachetastic/Adapters/HtmlFile.html +18 -18
  7. data/doc/classes/Cachetastic/Adapters/LocalMemory.html +42 -42
  8. data/doc/classes/Cachetastic/Adapters/Memcache.html +72 -72
  9. data/doc/classes/Cachetastic/Cacheable.html +16 -16
  10. data/doc/classes/Cachetastic/Cacheable/ClassAndInstanceMethods.html +18 -18
  11. data/doc/classes/Cachetastic/Cacheable/ClassOnlyMethods.html +18 -18
  12. data/doc/classes/Cachetastic/Caches/Base.html +94 -94
  13. data/doc/classes/Cachetastic/Caches/Base/RegisteredCaches.html +6 -6
  14. data/doc/classes/Cachetastic/Caches/RailsSessionCache.html +6 -6
  15. data/doc/classes/Cachetastic/Connection.html +13 -13
  16. data/doc/classes/Cachetastic/Errors/UnsupportedAdapter.html +6 -6
  17. data/doc/classes/Cachetastic/Logger.html +6 -6
  18. data/doc/classes/Object.html +38 -6
  19. data/doc/classes/String.html +172 -0
  20. data/doc/created.rid +1 -1
  21. data/doc/files/lib/cachetastic/ruby_extensions/object_rb.html +1 -1
  22. data/doc/files/lib/cachetastic/ruby_extensions/string_rb.html +101 -0
  23. data/doc/files/lib/cachetastic_rb.html +1 -1
  24. data/doc/fr_class_index.html +1 -0
  25. data/doc/fr_file_index.html +1 -0
  26. data/doc/fr_method_index.html +77 -74
  27. data/lib/cachetastic.rb +1 -0
  28. data/lib/cachetastic/ruby_extensions/object.rb +14 -0
  29. data/lib/cachetastic/ruby_extensions/string.rb +15 -0
  30. data/test/memcache_adapter_test.rb +4 -0
  31. data/test/test_helper.rb +1 -2
  32. metadata +5 -2
@@ -96,7 +96,7 @@ href="../Base.html">Cachetastic::Caches::Base</a>.
96
96
  <h3 class="section-bar">Methods</h3>
97
97
 
98
98
  <div class="name-list">
99
- <a href="#M000062">new</a>&nbsp;&nbsp;
99
+ <a href="#M000065">new</a>&nbsp;&nbsp;
100
100
  </div>
101
101
  </div>
102
102
 
@@ -141,19 +141,19 @@ list of all caches registered with the system.
141
141
  <div id="methods">
142
142
  <h3 class="section-bar">Public Class methods</h3>
143
143
 
144
- <div id="method-M000062" class="method-detail">
145
- <a name="M000062"></a>
144
+ <div id="method-M000065" class="method-detail">
145
+ <a name="M000065"></a>
146
146
 
147
147
  <div class="method-heading">
148
- <a href="#M000062" class="method-signature">
148
+ <a href="#M000065" class="method-signature">
149
149
  <span class="method-name">new</span><span class="method-args">()</span>
150
150
  </a>
151
151
  </div>
152
152
 
153
153
  <div class="method-description">
154
154
  <p><a class="source-toggle" href="#"
155
- onclick="toggleCode('M000062-source');return false;">[Source]</a></p>
156
- <div class="method-source-code" id="M000062-source">
155
+ onclick="toggleCode('M000065-source');return false;">[Source]</a></p>
156
+ <div class="method-source-code" id="M000065-source">
157
157
  <pre>
158
158
  <span class="ruby-comment cmt"># File lib/cachetastic/caches/base.rb, line 37</span>
159
159
  37: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
@@ -94,7 +94,7 @@ Used for storing Rails sessions.
94
94
  <h3 class="section-bar">Methods</h3>
95
95
 
96
96
  <div class="name-list">
97
- <a href="#M000047">unsupported_adapters</a>&nbsp;&nbsp;
97
+ <a href="#M000050">unsupported_adapters</a>&nbsp;&nbsp;
98
98
  </div>
99
99
  </div>
100
100
 
@@ -116,19 +116,19 @@ Used for storing Rails sessions.
116
116
  <div id="methods">
117
117
  <h3 class="section-bar">Public Class methods</h3>
118
118
 
119
- <div id="method-M000047" class="method-detail">
120
- <a name="M000047"></a>
119
+ <div id="method-M000050" class="method-detail">
120
+ <a name="M000050"></a>
121
121
 
122
122
  <div class="method-heading">
123
- <a href="#M000047" class="method-signature">
123
+ <a href="#M000050" class="method-signature">
124
124
  <span class="method-name">unsupported_adapters</span><span class="method-args">()</span>
125
125
  </a>
126
126
  </div>
127
127
 
128
128
  <div class="method-description">
129
129
  <p><a class="source-toggle" href="#"
130
- onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
131
- <div class="method-source-code" id="M000047-source">
130
+ onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
131
+ <div class="method-source-code" id="M000050-source">
132
132
  <pre>
133
133
  <span class="ruby-comment cmt"># File lib/cachetastic/caches/rails_session_cache.rb, line 6</span>
134
134
  6: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unsupported_adapters</span>
@@ -94,8 +94,8 @@ This class caches adapter objects for each cache in the system.
94
94
  <h3 class="section-bar">Methods</h3>
95
95
 
96
96
  <div class="name-list">
97
- <a href="#M000073">get</a>&nbsp;&nbsp;
98
- <a href="#M000072">new</a>&nbsp;&nbsp;
97
+ <a href="#M000076">get</a>&nbsp;&nbsp;
98
+ <a href="#M000075">new</a>&nbsp;&nbsp;
99
99
  </div>
100
100
  </div>
101
101
 
@@ -137,19 +137,19 @@ This class caches adapter objects for each cache in the system.
137
137
  <div id="methods">
138
138
  <h3 class="section-bar">Public Class methods</h3>
139
139
 
140
- <div id="method-M000072" class="method-detail">
141
- <a name="M000072"></a>
140
+ <div id="method-M000075" class="method-detail">
141
+ <a name="M000075"></a>
142
142
 
143
143
  <div class="method-heading">
144
- <a href="#M000072" class="method-signature">
144
+ <a href="#M000075" class="method-signature">
145
145
  <span class="method-name">new</span><span class="method-args">()</span>
146
146
  </a>
147
147
  </div>
148
148
 
149
149
  <div class="method-description">
150
150
  <p><a class="source-toggle" href="#"
151
- onclick="toggleCode('M000072-source');return false;">[Source]</a></p>
152
- <div class="method-source-code" id="M000072-source">
151
+ onclick="toggleCode('M000075-source');return false;">[Source]</a></p>
152
+ <div class="method-source-code" id="M000075-source">
153
153
  <pre>
154
154
  <span class="ruby-comment cmt"># File lib/cachetastic/connection.rb, line 7</span>
155
155
  7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
@@ -162,11 +162,11 @@ This class caches adapter objects for each cache in the system.
162
162
 
163
163
  <h3 class="section-bar">Public Instance methods</h3>
164
164
 
165
- <div id="method-M000073" class="method-detail">
166
- <a name="M000073"></a>
165
+ <div id="method-M000076" class="method-detail">
166
+ <a name="M000076"></a>
167
167
 
168
168
  <div class="method-heading">
169
- <a href="#M000073" class="method-signature">
169
+ <a href="#M000076" class="method-signature">
170
170
  <span class="method-name">get</span><span class="method-args">(name)</span>
171
171
  </a>
172
172
  </div>
@@ -176,11 +176,11 @@ This class caches adapter objects for each cache in the system.
176
176
  Takes the name of the cache, that&#8216;s been methodized, and returns back
177
177
  the adapter object associated with the cache. If the adapter object
178
178
  doesn&#8216;t exist or if the adapter is no longer valid (adapter.valid?) a
179
- <a href="Connection.html#M000072">new</a> one is created and returned.
179
+ <a href="Connection.html#M000075">new</a> one is created and returned.
180
180
  </p>
181
181
  <p><a class="source-toggle" href="#"
182
- onclick="toggleCode('M000073-source');return false;">[Source]</a></p>
183
- <div class="method-source-code" id="M000073-source">
182
+ onclick="toggleCode('M000076-source');return false;">[Source]</a></p>
183
+ <div class="method-source-code" id="M000076-source">
184
184
  <pre>
185
185
  <span class="ruby-comment cmt"># File lib/cachetastic/connection.rb, line 14</span>
186
186
  14: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">name</span>)
@@ -86,7 +86,7 @@
86
86
  <h3 class="section-bar">Methods</h3>
87
87
 
88
88
  <div class="name-list">
89
- <a href="#M000003">new</a>&nbsp;&nbsp;
89
+ <a href="#M000006">new</a>&nbsp;&nbsp;
90
90
  </div>
91
91
  </div>
92
92
 
@@ -108,19 +108,19 @@
108
108
  <div id="methods">
109
109
  <h3 class="section-bar">Public Class methods</h3>
110
110
 
111
- <div id="method-M000003" class="method-detail">
112
- <a name="M000003"></a>
111
+ <div id="method-M000006" class="method-detail">
112
+ <a name="M000006"></a>
113
113
 
114
114
  <div class="method-heading">
115
- <a href="#M000003" class="method-signature">
115
+ <a href="#M000006" class="method-signature">
116
116
  <span class="method-name">new</span><span class="method-args">(cache_name, adapter)</span>
117
117
  </a>
118
118
  </div>
119
119
 
120
120
  <div class="method-description">
121
121
  <p><a class="source-toggle" href="#"
122
- onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
123
- <div class="method-source-code" id="M000003-source">
122
+ onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
123
+ <div class="method-source-code" id="M000006-source">
124
124
  <pre>
125
125
  <span class="ruby-comment cmt"># File lib/cachetastic/errors/unsupported_adapter.rb, line 3</span>
126
126
  3: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">cache_name</span>, <span class="ruby-identifier">adapter</span>)
@@ -94,7 +94,7 @@ This class handles logging for the caches and their adapters.
94
94
  <h3 class="section-bar">Methods</h3>
95
95
 
96
96
  <div class="name-list">
97
- <a href="#M000071">new</a>&nbsp;&nbsp;
97
+ <a href="#M000074">new</a>&nbsp;&nbsp;
98
98
  </div>
99
99
  </div>
100
100
 
@@ -145,19 +145,19 @@ attr_accessor :options attr_accessor :cache_name
145
145
  <div id="methods">
146
146
  <h3 class="section-bar">Public Class methods</h3>
147
147
 
148
- <div id="method-M000071" class="method-detail">
149
- <a name="M000071"></a>
148
+ <div id="method-M000074" class="method-detail">
149
+ <a name="M000074"></a>
150
150
 
151
151
  <div class="method-heading">
152
- <a href="#M000071" class="method-signature">
152
+ <a href="#M000074" class="method-signature">
153
153
  <span class="method-name">new</span><span class="method-args">(loggers)</span>
154
154
  </a>
155
155
  </div>
156
156
 
157
157
  <div class="method-description">
158
158
  <p><a class="source-toggle" href="#"
159
- onclick="toggleCode('M000071-source');return false;">[Source]</a></p>
160
- <div class="method-source-code" id="M000071-source">
159
+ onclick="toggleCode('M000074-source');return false;">[Source]</a></p>
160
+ <div class="method-source-code" id="M000074-source">
161
161
  <pre>
162
162
  <span class="ruby-comment cmt"># File lib/cachetastic/logger.rb, line 8</span>
163
163
  8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">loggers</span>)
@@ -93,7 +93,8 @@
93
93
 
94
94
  <div class="name-list">
95
95
  <a href="#M000001">cachetastic_key</a>&nbsp;&nbsp;
96
- <a href="#M000002">needs_method</a>&nbsp;&nbsp;
96
+ <a href="#M000002">ivar_cache</a>&nbsp;&nbsp;
97
+ <a href="#M000003">needs_method</a>&nbsp;&nbsp;
97
98
  </div>
98
99
  </div>
99
100
 
@@ -115,11 +116,11 @@
115
116
  <div id="methods">
116
117
  <h3 class="section-bar">Public Class methods</h3>
117
118
 
118
- <div id="method-M000002" class="method-detail">
119
- <a name="M000002"></a>
119
+ <div id="method-M000003" class="method-detail">
120
+ <a name="M000003"></a>
120
121
 
121
122
  <div class="method-heading">
122
- <a href="#M000002" class="method-signature">
123
+ <a href="#M000003" class="method-signature">
123
124
  <span class="method-name">needs_method</span><span class="method-args">(meth)</span>
124
125
  </a>
125
126
  </div>
@@ -132,8 +133,8 @@ for creating interfaces and you want to stub out methods that others need
132
133
  to implement.
133
134
  </p>
134
135
  <p><a class="source-toggle" href="#"
135
- onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
136
- <div class="method-source-code" id="M000002-source">
136
+ onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
137
+ <div class="method-source-code" id="M000003-source">
137
138
  <pre>
138
139
  <span class="ruby-comment cmt"># File lib/cachetastic.rb, line 24</span>
139
140
  24: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">needs_method</span>(<span class="ruby-identifier">meth</span>)
@@ -175,6 +176,37 @@ href="Cachetastic/Cacheable.html">Cachetastic::Cacheable</a> module.
175
176
  </div>
176
177
  </div>
177
178
 
179
+ <div id="method-M000002" class="method-detail">
180
+ <a name="M000002"></a>
181
+
182
+ <div class="method-heading">
183
+ <a href="#M000002" class="method-signature">
184
+ <span class="method-name">ivar_cache</span><span class="method-args">(var_name = nil) {|| ...}</span>
185
+ </a>
186
+ </div>
187
+
188
+ <div class="method-description">
189
+ <p><a class="source-toggle" href="#"
190
+ onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
191
+ <div class="method-source-code" id="M000002-source">
192
+ <pre>
193
+ <span class="ruby-comment cmt"># File lib/cachetastic/ruby_extensions/object.rb, line 9</span>
194
+ 9: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ivar_cache</span>(<span class="ruby-identifier">var_name</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
195
+ 10: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">var_name</span>.<span class="ruby-identifier">nil?</span>
196
+ 11: <span class="ruby-identifier">call</span> = <span class="ruby-identifier">caller</span>[<span class="ruby-value">0</span>]
197
+ 12: <span class="ruby-identifier">var_name</span> = <span class="ruby-identifier">call</span>[(<span class="ruby-identifier">call</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">'`'</span>)<span class="ruby-operator">+</span><span class="ruby-value">1</span>)<span class="ruby-operator">...</span><span class="ruby-identifier">call</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">&quot;'&quot;</span>)]
198
+ 13: <span class="ruby-keyword kw">end</span>
199
+ 14: <span class="ruby-identifier">var</span> = <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-node">&quot;@#{var_name}&quot;</span>)
200
+ 15: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">var</span>
201
+ 16: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{var_name}&quot;</span>, <span class="ruby-keyword kw">yield</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
202
+ 17: <span class="ruby-keyword kw">end</span>
203
+ 18: <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-node">&quot;@#{var_name}&quot;</span>)
204
+ 19: <span class="ruby-keyword kw">end</span>
205
+ </pre>
206
+ </div>
207
+ </div>
208
+ </div>
209
+
178
210
 
179
211
  </div>
180
212
 
@@ -0,0 +1,172 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: String</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">String</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/cachetastic/ruby_extensions/string_rb.html">
59
+ lib/cachetastic/ruby_extensions/string.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ <a href="Object.html">
69
+ Object
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+
84
+
85
+ </div>
86
+
87
+ <div id="method-list">
88
+ <h3 class="section-bar">Methods</h3>
89
+
90
+ <div class="name-list">
91
+ <a href="#M000004">camelcase</a>&nbsp;&nbsp;
92
+ <a href="#M000005">constantize</a>&nbsp;&nbsp;
93
+ </div>
94
+ </div>
95
+
96
+ </div>
97
+
98
+
99
+ <!-- if includes -->
100
+
101
+ <div id="section">
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <!-- if method_list -->
111
+ <div id="methods">
112
+ <h3 class="section-bar">Public Instance methods</h3>
113
+
114
+ <div id="method-M000004" class="method-detail">
115
+ <a name="M000004"></a>
116
+
117
+ <div class="method-heading">
118
+ <a href="#M000004" class="method-signature">
119
+ <span class="method-name">camelcase</span><span class="method-args">()</span>
120
+ </a>
121
+ </div>
122
+
123
+ <div class="method-description">
124
+ <p><a class="source-toggle" href="#"
125
+ onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
126
+ <div class="method-source-code" id="M000004-source">
127
+ <pre>
128
+ <span class="ruby-comment cmt"># File lib/cachetastic/ruby_extensions/string.rb, line 4</span>
129
+ 4: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">camelcase</span>
130
+ 5: <span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\/(.?)/</span>){ <span class="ruby-node">&quot;::#{$1.upcase}&quot;</span> }.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/(?:^|_)(.)/</span>){ <span class="ruby-identifier">$1</span>.<span class="ruby-identifier">upcase</span> }
131
+ 6: <span class="ruby-keyword kw">end</span>
132
+ </pre>
133
+ </div>
134
+ </div>
135
+ </div>
136
+
137
+ <div id="method-M000005" class="method-detail">
138
+ <a name="M000005"></a>
139
+
140
+ <div class="method-heading">
141
+ <a href="#M000005" class="method-signature">
142
+ <span class="method-name">constantize</span><span class="method-args">()</span>
143
+ </a>
144
+ </div>
145
+
146
+ <div class="method-description">
147
+ <p><a class="source-toggle" href="#"
148
+ onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
149
+ <div class="method-source-code" id="M000005-source">
150
+ <pre>
151
+ <span class="ruby-comment cmt"># File lib/cachetastic/ruby_extensions/string.rb, line 10</span>
152
+ 10: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">constantize</span>
153
+ 11: <span class="ruby-constant">Module</span>.<span class="ruby-identifier">instance_eval</span>(<span class="ruby-node">&quot;::#{self}&quot;</span>)
154
+ 12: <span class="ruby-keyword kw">end</span>
155
+ </pre>
156
+ </div>
157
+ </div>
158
+ </div>
159
+
160
+
161
+ </div>
162
+
163
+
164
+ </div>
165
+
166
+
167
+ <div id="validator-badges">
168
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
169
+ </div>
170
+
171
+ </body>
172
+ </html>