cachetastic 2.1.3 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/classes/ActiveRecord/Base.html +12 -12
- data/doc/classes/Cachetastic/Adapters/Base.html +33 -33
- data/doc/classes/Cachetastic/Adapters/Drb.html +42 -42
- data/doc/classes/Cachetastic/Adapters/File.html +18 -18
- data/doc/classes/Cachetastic/Adapters/FileBase.html +36 -36
- data/doc/classes/Cachetastic/Adapters/HtmlFile.html +18 -18
- data/doc/classes/Cachetastic/Adapters/LocalMemory.html +42 -42
- data/doc/classes/Cachetastic/Adapters/Memcache.html +72 -72
- data/doc/classes/Cachetastic/Cacheable.html +16 -16
- data/doc/classes/Cachetastic/Cacheable/ClassAndInstanceMethods.html +18 -18
- data/doc/classes/Cachetastic/Cacheable/ClassOnlyMethods.html +18 -18
- data/doc/classes/Cachetastic/Caches/Base.html +94 -94
- data/doc/classes/Cachetastic/Caches/Base/RegisteredCaches.html +6 -6
- data/doc/classes/Cachetastic/Caches/RailsSessionCache.html +6 -6
- data/doc/classes/Cachetastic/Connection.html +13 -13
- data/doc/classes/Cachetastic/Errors/UnsupportedAdapter.html +6 -6
- data/doc/classes/Cachetastic/Logger.html +6 -6
- data/doc/classes/Object.html +38 -6
- data/doc/classes/String.html +172 -0
- data/doc/created.rid +1 -1
- data/doc/files/lib/cachetastic/ruby_extensions/object_rb.html +1 -1
- data/doc/files/lib/cachetastic/ruby_extensions/string_rb.html +101 -0
- data/doc/files/lib/cachetastic_rb.html +1 -1
- data/doc/fr_class_index.html +1 -0
- data/doc/fr_file_index.html +1 -0
- data/doc/fr_method_index.html +77 -74
- data/lib/cachetastic.rb +1 -0
- data/lib/cachetastic/ruby_extensions/object.rb +14 -0
- data/lib/cachetastic/ruby_extensions/string.rb +15 -0
- data/test/memcache_adapter_test.rb +4 -0
- data/test/test_helper.rb +1 -2
- metadata +5 -2
data/doc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Fri, 27 Feb 2009 14:06:40 -0500
|
@@ -0,0 +1,101 @@
|
|
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>File: string.rb</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="fileHeader">
|
50
|
+
<h1>string.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/cachetastic/ruby_extensions/string.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Fri Feb 27 10:56:04 -0500 2009</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
</div>
|
74
|
+
|
75
|
+
|
76
|
+
</div>
|
77
|
+
|
78
|
+
|
79
|
+
<!-- if includes -->
|
80
|
+
|
81
|
+
<div id="section">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<!-- if method_list -->
|
91
|
+
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
<div id="validator-badges">
|
97
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
98
|
+
</div>
|
99
|
+
|
100
|
+
</body>
|
101
|
+
</html>
|
data/doc/fr_class_index.html
CHANGED
@@ -41,6 +41,7 @@
|
|
41
41
|
<a href="classes/Cachetastic/Errors/UnsupportedAdapter.html">Cachetastic::Errors::UnsupportedAdapter</a><br />
|
42
42
|
<a href="classes/Cachetastic/Logger.html">Cachetastic::Logger</a><br />
|
43
43
|
<a href="classes/Object.html">Object</a><br />
|
44
|
+
<a href="classes/String.html">String</a><br />
|
44
45
|
</div>
|
45
46
|
</div>
|
46
47
|
</body>
|
data/doc/fr_file_index.html
CHANGED
@@ -42,6 +42,7 @@
|
|
42
42
|
<a href="files/lib/cachetastic/rails_extensions/cgi_session_store_rb.html">lib/cachetastic/rails_extensions/cgi_session_store.rb</a><br />
|
43
43
|
<a href="files/lib/cachetastic/ruby_extensions/kernel_rb.html">lib/cachetastic/ruby_extensions/kernel.rb</a><br />
|
44
44
|
<a href="files/lib/cachetastic/ruby_extensions/object_rb.html">lib/cachetastic/ruby_extensions/object.rb</a><br />
|
45
|
+
<a href="files/lib/cachetastic/ruby_extensions/string_rb.html">lib/cachetastic/ruby_extensions/string.rb</a><br />
|
45
46
|
</div>
|
46
47
|
</div>
|
47
48
|
</body>
|
data/doc/fr_method_index.html
CHANGED
@@ -20,81 +20,84 @@
|
|
20
20
|
<div id="index">
|
21
21
|
<h1 class="section-bar">Methods</h1>
|
22
22
|
<div id="index-entries">
|
23
|
-
<a href="classes/Cachetastic/Caches/Base.html#
|
24
|
-
<a href="classes/Cachetastic/Caches/Base.html#
|
25
|
-
<a href="classes/Cachetastic/Caches/Base.html#
|
26
|
-
<a href="classes/Cachetastic/Cacheable/ClassAndInstanceMethods.html#
|
27
|
-
<a href="classes/Cachetastic/Caches/Base.html#
|
28
|
-
<a href="classes/Cachetastic/Cacheable.html#
|
29
|
-
<a href="classes/Cachetastic/Cacheable/ClassAndInstanceMethods.html#
|
23
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000058">adapter (Cachetastic::Caches::Base)</a><br />
|
24
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000061">adapter_supported? (Cachetastic::Caches::Base)</a><br />
|
25
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000051">all_registered_caches (Cachetastic::Caches::Base)</a><br />
|
26
|
+
<a href="classes/Cachetastic/Cacheable/ClassAndInstanceMethods.html#M000071">cache_class (Cachetastic::Cacheable::ClassAndInstanceMethods)</a><br />
|
27
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000057">cache_name (Cachetastic::Caches::Base)</a><br />
|
28
|
+
<a href="classes/Cachetastic/Cacheable.html#M000066">cache_self (Cachetastic::Cacheable)</a><br />
|
29
|
+
<a href="classes/Cachetastic/Cacheable/ClassAndInstanceMethods.html#M000072">cacher (Cachetastic::Cacheable::ClassAndInstanceMethods)</a><br />
|
30
30
|
<a href="classes/Object.html#M000001">cachetastic_key (Object)</a><br />
|
31
|
-
<a href="classes/ActiveRecord/Base.html#
|
32
|
-
<a href="classes/Cachetastic/Caches/Base.html#
|
33
|
-
<a href="classes/
|
34
|
-
<a href="classes/Cachetastic/Adapters/Base.html#
|
35
|
-
<a href="classes/Cachetastic/Adapters/Base.html#
|
36
|
-
<a href="classes/
|
37
|
-
<a href="classes/Cachetastic/Adapters/
|
38
|
-
<a href="classes/Cachetastic/Adapters/
|
39
|
-
<a href="classes/Cachetastic/
|
40
|
-
<a href="classes/Cachetastic/
|
41
|
-
<a href="classes/Cachetastic/
|
42
|
-
<a href="classes/Cachetastic/Adapters/
|
43
|
-
<a href="classes/Cachetastic/
|
44
|
-
<a href="classes/Cachetastic/
|
45
|
-
<a href="classes/Cachetastic/Adapters/FileBase.html#
|
46
|
-
<a href="classes/Cachetastic/Adapters/
|
47
|
-
<a href="classes/Cachetastic/
|
48
|
-
<a href="classes/Cachetastic/
|
49
|
-
<a href="classes/Cachetastic/Adapters/
|
50
|
-
<a href="classes/Cachetastic/Adapters/
|
51
|
-
<a href="classes/Cachetastic/Caches/Base.html#
|
52
|
-
<a href="classes/Cachetastic/Adapters/
|
53
|
-
<a href="classes/Cachetastic/Adapters/
|
54
|
-
<a href="classes/Cachetastic/Connection.html#
|
55
|
-
<a href="classes/Cachetastic/
|
56
|
-
<a href="classes/
|
57
|
-
<a href="classes/Cachetastic/
|
58
|
-
<a href="classes/
|
59
|
-
<a href="classes/Cachetastic/Adapters/Memcache.html#
|
60
|
-
<a href="classes/Cachetastic/
|
61
|
-
<a href="classes/Cachetastic/
|
62
|
-
<a href="classes/
|
63
|
-
<a href="classes/
|
64
|
-
<a href="classes/Cachetastic/
|
65
|
-
<a href="classes/Cachetastic/
|
66
|
-
<a href="classes/
|
67
|
-
<a href="classes/Cachetastic/
|
68
|
-
<a href="classes/Cachetastic/
|
69
|
-
<a href="classes/Cachetastic/
|
70
|
-
<a href="classes/Cachetastic/Adapters/
|
71
|
-
<a href="classes/Cachetastic/
|
72
|
-
<a href="classes/Cachetastic/
|
73
|
-
<a href="classes/Cachetastic/Adapters/
|
74
|
-
<a href="classes/Cachetastic/Adapters/
|
75
|
-
<a href="classes/Cachetastic/
|
76
|
-
<a href="classes/Cachetastic/
|
77
|
-
<a href="classes/Cachetastic/Adapters/
|
78
|
-
<a href="classes/Cachetastic/Adapters/
|
79
|
-
<a href="classes/Cachetastic/
|
80
|
-
<a href="classes/Cachetastic/Adapters/
|
81
|
-
<a href="classes/Cachetastic/Adapters/
|
82
|
-
<a href="classes/Cachetastic/Adapters/
|
83
|
-
<a href="classes/Cachetastic/Adapters/
|
84
|
-
<a href="classes/Cachetastic/
|
85
|
-
<a href="classes/Cachetastic/Adapters/
|
86
|
-
<a href="classes/Cachetastic/Adapters/FileBase.html#
|
87
|
-
<a href="classes/Cachetastic/Adapters/
|
88
|
-
<a href="classes/Cachetastic/Adapters/
|
89
|
-
<a href="classes/Cachetastic/
|
90
|
-
<a href="classes/Cachetastic/
|
91
|
-
<a href="classes/Cachetastic/
|
92
|
-
<a href="classes/Cachetastic/
|
93
|
-
<a href="classes/Cachetastic/
|
94
|
-
<a href="classes/Cachetastic/
|
95
|
-
<a href="classes/Cachetastic/
|
96
|
-
<a href="classes/Cachetastic/
|
97
|
-
<a href="classes/Cachetastic/Adapters/
|
31
|
+
<a href="classes/ActiveRecord/Base.html#M000077">cachetastic_key (ActiveRecord::Base)</a><br />
|
32
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000064">calculate_expiry_time (Cachetastic::Caches::Base)</a><br />
|
33
|
+
<a href="classes/String.html#M000004">camelcase (String)</a><br />
|
34
|
+
<a href="classes/Cachetastic/Adapters/Base.html#M000039">configuration (Cachetastic::Adapters::Base)</a><br />
|
35
|
+
<a href="classes/Cachetastic/Adapters/Base.html#M000038">configuration (Cachetastic::Adapters::Base)</a><br />
|
36
|
+
<a href="classes/String.html#M000005">constantize (String)</a><br />
|
37
|
+
<a href="classes/Cachetastic/Adapters/Base.html#M000036">debug? (Cachetastic::Adapters::Base)</a><br />
|
38
|
+
<a href="classes/Cachetastic/Adapters/Memcache.html#M000012">delete (Cachetastic::Adapters::Memcache)</a><br />
|
39
|
+
<a href="classes/Cachetastic/Adapters/FileBase.html#M000032">delete (Cachetastic::Adapters::FileBase)</a><br />
|
40
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000054">delete (Cachetastic::Caches::Base)</a><br />
|
41
|
+
<a href="classes/Cachetastic/Adapters/Drb.html#M000045">delete (Cachetastic::Adapters::Drb)</a><br />
|
42
|
+
<a href="classes/Cachetastic/Adapters/LocalMemory.html#M000027">delete (Cachetastic::Adapters::LocalMemory)</a><br />
|
43
|
+
<a href="classes/Cachetastic/Cacheable/ClassOnlyMethods.html#M000069">delete_from_cache (Cachetastic::Cacheable::ClassOnlyMethods)</a><br />
|
44
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000055">expire_all (Cachetastic::Caches::Base)</a><br />
|
45
|
+
<a href="classes/Cachetastic/Adapters/FileBase.html#M000033">expire_all (Cachetastic::Adapters::FileBase)</a><br />
|
46
|
+
<a href="classes/Cachetastic/Adapters/LocalMemory.html#M000024">expire_all (Cachetastic::Adapters::LocalMemory)</a><br />
|
47
|
+
<a href="classes/Cachetastic/Adapters/Drb.html#M000042">expire_all (Cachetastic::Adapters::Drb)</a><br />
|
48
|
+
<a href="classes/Cachetastic/Cacheable/ClassAndInstanceMethods.html#M000073">expire_all (Cachetastic::Cacheable::ClassAndInstanceMethods)</a><br />
|
49
|
+
<a href="classes/Cachetastic/Adapters/Memcache.html#M000014">expire_all (Cachetastic::Adapters::Memcache)</a><br />
|
50
|
+
<a href="classes/Cachetastic/Adapters/File.html#M000047">get (Cachetastic::Adapters::File)</a><br />
|
51
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000052">get (Cachetastic::Caches::Base)</a><br />
|
52
|
+
<a href="classes/Cachetastic/Adapters/Drb.html#M000043">get (Cachetastic::Adapters::Drb)</a><br />
|
53
|
+
<a href="classes/Cachetastic/Adapters/HtmlFile.html#M000007">get (Cachetastic::Adapters::HtmlFile)</a><br />
|
54
|
+
<a href="classes/Cachetastic/Connection.html#M000076">get (Cachetastic::Connection)</a><br />
|
55
|
+
<a href="classes/Cachetastic/Adapters/Memcache.html#M000013">get (Cachetastic::Adapters::Memcache)</a><br />
|
56
|
+
<a href="classes/Cachetastic/Adapters/LocalMemory.html#M000025">get (Cachetastic::Adapters::LocalMemory)</a><br />
|
57
|
+
<a href="classes/Cachetastic/Cacheable/ClassOnlyMethods.html#M000068">get_from_cache (Cachetastic::Cacheable::ClassOnlyMethods)</a><br />
|
58
|
+
<a href="classes/ActiveRecord/Base.html#M000078">get_from_cache (ActiveRecord::Base)</a><br />
|
59
|
+
<a href="classes/Cachetastic/Adapters/Memcache.html#M000021">get_version (Cachetastic::Adapters::Memcache)</a><br />
|
60
|
+
<a href="classes/Cachetastic/Adapters/Memcache.html#M000020">increment_version (Cachetastic::Adapters::Memcache)</a><br />
|
61
|
+
<a href="classes/Cachetastic/Adapters/Memcache.html#M000015">inspect (Cachetastic::Adapters::Memcache)</a><br />
|
62
|
+
<a href="classes/Object.html#M000002">ivar_cache (Object)</a><br />
|
63
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000059">logger (Cachetastic::Caches::Base)</a><br />
|
64
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000062">marshall (Cachetastic::Caches::Base)</a><br />
|
65
|
+
<a href="classes/Cachetastic/Adapters/Memcache.html#M000018">namespace (Cachetastic::Adapters::Memcache)</a><br />
|
66
|
+
<a href="classes/Object.html#M000003">needs_method (Object)</a><br />
|
67
|
+
<a href="classes/Cachetastic/Logger.html#M000074">new (Cachetastic::Logger)</a><br />
|
68
|
+
<a href="classes/Cachetastic/Caches/Base/RegisteredCaches.html#M000065">new (Cachetastic::Caches::Base::RegisteredCaches)</a><br />
|
69
|
+
<a href="classes/Cachetastic/Connection.html#M000075">new (Cachetastic::Connection)</a><br />
|
70
|
+
<a href="classes/Cachetastic/Adapters/Base.html#M000035">new (Cachetastic::Adapters::Base)</a><br />
|
71
|
+
<a href="classes/Cachetastic/Errors/UnsupportedAdapter.html#M000006">new (Cachetastic::Errors::UnsupportedAdapter)</a><br />
|
72
|
+
<a href="classes/Cachetastic/Adapters/Memcache.html#M000019">ns_versions (Cachetastic::Adapters::Memcache)</a><br />
|
73
|
+
<a href="classes/Cachetastic/Adapters/LocalMemory.html#M000026">set (Cachetastic::Adapters::LocalMemory)</a><br />
|
74
|
+
<a href="classes/Cachetastic/Adapters/Memcache.html#M000011">set (Cachetastic::Adapters::Memcache)</a><br />
|
75
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000053">set (Cachetastic::Caches::Base)</a><br />
|
76
|
+
<a href="classes/Cachetastic/Adapters/File.html#M000048">set (Cachetastic::Adapters::File)</a><br />
|
77
|
+
<a href="classes/Cachetastic/Adapters/HtmlFile.html#M000008">set (Cachetastic::Adapters::HtmlFile)</a><br />
|
78
|
+
<a href="classes/Cachetastic/Adapters/Drb.html#M000044">set (Cachetastic::Adapters::Drb)</a><br />
|
79
|
+
<a href="classes/Cachetastic/Cacheable/ClassOnlyMethods.html#M000070">set_into_cache (Cachetastic::Cacheable::ClassOnlyMethods)</a><br />
|
80
|
+
<a href="classes/Cachetastic/Adapters/LocalMemory.html#M000023">setup (Cachetastic::Adapters::LocalMemory)</a><br />
|
81
|
+
<a href="classes/Cachetastic/Adapters/Drb.html#M000041">setup (Cachetastic::Adapters::Drb)</a><br />
|
82
|
+
<a href="classes/Cachetastic/Adapters/Memcache.html#M000010">setup (Cachetastic::Adapters::Memcache)</a><br />
|
83
|
+
<a href="classes/Cachetastic/Adapters/FileBase.html#M000029">setup (Cachetastic::Adapters::FileBase)</a><br />
|
84
|
+
<a href="classes/Cachetastic/Adapters/Drb.html#M000046">stats (Cachetastic::Adapters::Drb)</a><br />
|
85
|
+
<a href="classes/Cachetastic/Adapters/Base.html#M000037">stats (Cachetastic::Adapters::Base)</a><br />
|
86
|
+
<a href="classes/Cachetastic/Adapters/FileBase.html#M000031">stats (Cachetastic::Adapters::FileBase)</a><br />
|
87
|
+
<a href="classes/Cachetastic/Adapters/Memcache.html#M000017">stats (Cachetastic::Adapters::Memcache)</a><br />
|
88
|
+
<a href="classes/Cachetastic/Adapters/LocalMemory.html#M000028">stats (Cachetastic::Adapters::LocalMemory)</a><br />
|
89
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000056">stats (Cachetastic::Caches::Base)</a><br />
|
90
|
+
<a href="classes/Cachetastic/Adapters/HtmlFile.html#M000009">store_file_name (Cachetastic::Adapters::HtmlFile)</a><br />
|
91
|
+
<a href="classes/Cachetastic/Adapters/File.html#M000049">store_file_name (Cachetastic::Adapters::File)</a><br />
|
92
|
+
<a href="classes/Cachetastic/Adapters/FileBase.html#M000034">store_file_name (Cachetastic::Adapters::FileBase)</a><br />
|
93
|
+
<a href="classes/Cachetastic/Cacheable.html#M000067">uncache_self (Cachetastic::Cacheable)</a><br />
|
94
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000063">unmarshall (Cachetastic::Caches::Base)</a><br />
|
95
|
+
<a href="classes/Cachetastic/Caches/RailsSessionCache.html#M000050">unsupported_adapters (Cachetastic::Caches::RailsSessionCache)</a><br />
|
96
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000060">unsupported_adapters (Cachetastic::Caches::Base)</a><br />
|
97
|
+
<a href="classes/Cachetastic/Adapters/Drb.html#M000040">valid? (Cachetastic::Adapters::Drb)</a><br />
|
98
|
+
<a href="classes/Cachetastic/Adapters/LocalMemory.html#M000022">valid? (Cachetastic::Adapters::LocalMemory)</a><br />
|
99
|
+
<a href="classes/Cachetastic/Adapters/Memcache.html#M000016">valid? (Cachetastic::Adapters::Memcache)</a><br />
|
100
|
+
<a href="classes/Cachetastic/Adapters/FileBase.html#M000030">valid? (Cachetastic::Adapters::FileBase)</a><br />
|
98
101
|
</div>
|
99
102
|
</div>
|
100
103
|
</body>
|
data/lib/cachetastic.rb
CHANGED
@@ -63,6 +63,7 @@ require File.join(home, 'rails_extensions/active_record_base')
|
|
63
63
|
require File.join(home, 'rails_extensions/cgi_session_store')
|
64
64
|
require File.join(home, 'ruby_extensions/object')
|
65
65
|
require File.join(home, 'ruby_extensions/kernel')
|
66
|
+
require File.join(home, 'ruby_extensions/string')
|
66
67
|
|
67
68
|
configatron.cachetastic_default_options.set_default(:debug, false)
|
68
69
|
configatron.cachetastic_default_options.set_default(:adapter, :local_memory)
|
@@ -5,4 +5,18 @@ class Object
|
|
5
5
|
raise NoMethodError.new('cachetastic_key')
|
6
6
|
end
|
7
7
|
|
8
|
+
unless respond_to?(:ivar_cache)
|
9
|
+
def ivar_cache(var_name = nil, &block)
|
10
|
+
if var_name.nil?
|
11
|
+
call = caller[0]
|
12
|
+
var_name = call[(call.index('`')+1)...call.index("'")]
|
13
|
+
end
|
14
|
+
var = instance_variable_get("@#{var_name}")
|
15
|
+
unless var
|
16
|
+
return instance_variable_set("@#{var_name}", yield) if block_given?
|
17
|
+
end
|
18
|
+
instance_variable_get("@#{var_name}")
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
8
22
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class String
|
2
|
+
|
3
|
+
unless ''.respond_to?(:camelcase)
|
4
|
+
def camelcase
|
5
|
+
to_s.gsub(/\/(.?)/){ "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/){ $1.upcase }
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
unless ''.respond_to?(:constantize)
|
10
|
+
def constantize
|
11
|
+
Module.instance_eval("::#{self}")
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require "test/unit"
|
2
2
|
require File.join(File.dirname(__FILE__), "..", "lib", "cachetastic")
|
3
3
|
require 'rubygems'
|
4
|
-
require 'mack-facets'
|
4
|
+
# require 'mack-facets'
|
5
5
|
require 'active_record'
|
6
6
|
|
7
7
|
# place common methods, assertions, and other type things in this file so
|
@@ -45,7 +45,6 @@ end
|
|
45
45
|
|
46
46
|
#---- AR:
|
47
47
|
AR_DB = File.join(Dir.pwd, "ar_test.db")
|
48
|
-
puts "AR_DB: #{AR_DB}"
|
49
48
|
ActiveRecord::Base.establish_connection({:adapter => "sqlite3", :database => AR_DB})
|
50
49
|
|
51
50
|
class ArAlbum < ActiveRecord::Base
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cachetastic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- markbates
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-02-27 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -51,6 +51,7 @@ files:
|
|
51
51
|
- lib/cachetastic/rails_extensions/cgi_session_store.rb
|
52
52
|
- lib/cachetastic/ruby_extensions/kernel.rb
|
53
53
|
- lib/cachetastic/ruby_extensions/object.rb
|
54
|
+
- lib/cachetastic/ruby_extensions/string.rb
|
54
55
|
- lib/cachetastic.rb
|
55
56
|
- README
|
56
57
|
- doc/classes/ActiveRecord/Base.html
|
@@ -74,6 +75,7 @@ files:
|
|
74
75
|
- doc/classes/Cachetastic/Logger.html
|
75
76
|
- doc/classes/CGI/Session/CachetasticStore.html
|
76
77
|
- doc/classes/Object.html
|
78
|
+
- doc/classes/String.html
|
77
79
|
- doc/created.rid
|
78
80
|
- doc/files/lib/cachetastic/adapters/base_rb.html
|
79
81
|
- doc/files/lib/cachetastic/adapters/drb_rb.html
|
@@ -95,6 +97,7 @@ files:
|
|
95
97
|
- doc/files/lib/cachetastic/rails_extensions/cgi_session_store_rb.html
|
96
98
|
- doc/files/lib/cachetastic/ruby_extensions/kernel_rb.html
|
97
99
|
- doc/files/lib/cachetastic/ruby_extensions/object_rb.html
|
100
|
+
- doc/files/lib/cachetastic/ruby_extensions/string_rb.html
|
98
101
|
- doc/files/lib/cachetastic_rb.html
|
99
102
|
- doc/files/README.html
|
100
103
|
- doc/fr_class_index.html
|