elephas 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/Elephas/Cache.html +1 -1
- data/doc/Elephas/Entry.html +1 -1
- data/doc/Elephas/Providers/Base.html +1 -1
- data/doc/Elephas/Providers/Hash.html +1 -1
- data/doc/Elephas/Providers/RubyOnRails.html +1 -1
- data/doc/Elephas/Providers.html +1 -1
- data/doc/Elephas/Version.html +2 -2
- data/doc/Elephas.html +1 -1
- data/doc/_index.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/top-level-namespace.html +1 -1
- data/elephas.gemspec +1 -1
- data/lib/elephas/version.rb +1 -1
- data/lib/elephas.rb +2 -2
- data/spec/elephas/cache_spec.rb +12 -7
- metadata +7 -7
data/doc/Elephas/Cache.html
CHANGED
@@ -1037,7 +1037,7 @@ Valid options are:</p>
|
|
1037
1037
|
</div>
|
1038
1038
|
|
1039
1039
|
<div id="footer">
|
1040
|
-
Generated on
|
1040
|
+
Generated on Wed Aug 1 10:06:30 2012 by
|
1041
1041
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1042
1042
|
0.8.2.1 (ruby-1.9.2).
|
1043
1043
|
</div>
|
data/doc/Elephas/Entry.html
CHANGED
@@ -1194,7 +1194,7 @@
|
|
1194
1194
|
</div>
|
1195
1195
|
|
1196
1196
|
<div id="footer">
|
1197
|
-
Generated on
|
1197
|
+
Generated on Wed Aug 1 10:06:30 2012 by
|
1198
1198
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1199
1199
|
0.8.2.1 (ruby-1.9.2).
|
1200
1200
|
</div>
|
@@ -699,7 +699,7 @@
|
|
699
699
|
</div>
|
700
700
|
|
701
701
|
<div id="footer">
|
702
|
-
Generated on
|
702
|
+
Generated on Wed Aug 1 10:06:30 2012 by
|
703
703
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
704
704
|
0.8.2.1 (ruby-1.9.2).
|
705
705
|
</div>
|
@@ -773,7 +773,7 @@
|
|
773
773
|
</div>
|
774
774
|
|
775
775
|
<div id="footer">
|
776
|
-
Generated on
|
776
|
+
Generated on Wed Aug 1 10:06:31 2012 by
|
777
777
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
778
778
|
0.8.2.1 (ruby-1.9.2).
|
779
779
|
</div>
|
@@ -605,7 +605,7 @@
|
|
605
605
|
</div>
|
606
606
|
|
607
607
|
<div id="footer">
|
608
|
-
Generated on
|
608
|
+
Generated on Wed Aug 1 10:06:31 2012 by
|
609
609
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
610
610
|
0.8.2.1 (ruby-1.9.2).
|
611
611
|
</div>
|
data/doc/Elephas/Providers.html
CHANGED
@@ -120,7 +120,7 @@
|
|
120
120
|
</div>
|
121
121
|
|
122
122
|
<div id="footer">
|
123
|
-
Generated on
|
123
|
+
Generated on Wed Aug 1 10:06:30 2012 by
|
124
124
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
125
125
|
0.8.2.1 (ruby-1.9.2).
|
126
126
|
</div>
|
data/doc/Elephas/Version.html
CHANGED
@@ -134,7 +134,7 @@
|
|
134
134
|
|
135
135
|
</div>
|
136
136
|
</dt>
|
137
|
-
<dd><pre class="code"><span class='int'>
|
137
|
+
<dd><pre class="code"><span class='int'>1</span></pre></dd>
|
138
138
|
|
139
139
|
<dt id="PATCH-constant" class="">PATCH =
|
140
140
|
<div class="docstring">
|
@@ -180,7 +180,7 @@
|
|
180
180
|
</div>
|
181
181
|
|
182
182
|
<div id="footer">
|
183
|
-
Generated on
|
183
|
+
Generated on Wed Aug 1 10:06:30 2012 by
|
184
184
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
185
185
|
0.8.2.1 (ruby-1.9.2).
|
186
186
|
</div>
|
data/doc/Elephas.html
CHANGED
@@ -121,7 +121,7 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
121
121
|
</div>
|
122
122
|
|
123
123
|
<div id="footer">
|
124
|
-
Generated on
|
124
|
+
Generated on Wed Aug 1 10:06:30 2012 by
|
125
125
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
126
126
|
0.8.2.1 (ruby-1.9.2).
|
127
127
|
</div>
|
data/doc/_index.html
CHANGED
@@ -198,7 +198,7 @@
|
|
198
198
|
</div>
|
199
199
|
|
200
200
|
<div id="footer">
|
201
|
-
Generated on
|
201
|
+
Generated on Wed Aug 1 10:06:30 2012 by
|
202
202
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
203
203
|
0.8.2.1 (ruby-1.9.2).
|
204
204
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -120,7 +120,7 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
120
120
|
</div></div>
|
121
121
|
|
122
122
|
<div id="footer">
|
123
|
-
Generated on
|
123
|
+
Generated on Wed Aug 1 10:06:30 2012 by
|
124
124
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
125
125
|
0.8.2.1 (ruby-1.9.2).
|
126
126
|
</div>
|
data/doc/index.html
CHANGED
@@ -120,7 +120,7 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
120
120
|
</div></div>
|
121
121
|
|
122
122
|
<div id="footer">
|
123
|
-
Generated on
|
123
|
+
Generated on Wed Aug 1 10:06:30 2012 by
|
124
124
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
125
125
|
0.8.2.1 (ruby-1.9.2).
|
126
126
|
</div>
|
@@ -103,7 +103,7 @@
|
|
103
103
|
</div>
|
104
104
|
|
105
105
|
<div id="footer">
|
106
|
-
Generated on
|
106
|
+
Generated on Wed Aug 1 10:06:30 2012 by
|
107
107
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
108
108
|
0.8.2.1 (ruby-1.9.2).
|
109
109
|
</div>
|
data/elephas.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
|
|
22
22
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
23
23
|
gem.require_paths = ["lib"]
|
24
24
|
|
25
|
-
gem.add_dependency("
|
25
|
+
gem.add_dependency("lazier", "~> 1.0.0")
|
26
26
|
|
27
27
|
gem.add_development_dependency("rspec", "~> 2.11.0")
|
28
28
|
gem.add_development_dependency("rake", "~> 0.9.0")
|
data/lib/elephas/version.rb
CHANGED
data/lib/elephas.rb
CHANGED
@@ -6,9 +6,9 @@
|
|
6
6
|
|
7
7
|
$KCODE='UTF8' if RUBY_VERSION < '1.9'
|
8
8
|
|
9
|
-
require "
|
9
|
+
require "lazier"
|
10
10
|
require "digest/sha2"
|
11
|
-
|
11
|
+
Lazier.load!("boolean", "math", "object")
|
12
12
|
|
13
13
|
require "elephas/version" if !defined?(Elephas::Version)
|
14
14
|
require "elephas/entry"
|
data/spec/elephas/cache_spec.rb
CHANGED
@@ -80,23 +80,28 @@ describe ::Elephas::Cache do
|
|
80
80
|
|
81
81
|
describe "setup_options" do
|
82
82
|
it "should set good defaults for options" do
|
83
|
+
hashes = {
|
84
|
+
:base => ::Elephas::Entry.hashify_key("#{::Elephas::Cache.default_prefix}[KEY]"),
|
85
|
+
:alternative => ::Elephas::Entry.hashify_key("prefix[KEY]")
|
86
|
+
}
|
87
|
+
|
83
88
|
options_hashes = [
|
84
89
|
nil,
|
85
90
|
"A",
|
86
91
|
{:ttl => 2.hour},
|
87
92
|
{:force => true},
|
88
93
|
{:as_entry => true},
|
89
|
-
{:prefix => "prefix", :hash =>
|
94
|
+
{:prefix => "prefix", :hash => hashes[:alternative]},
|
90
95
|
{:hash => "hash"}
|
91
96
|
]
|
92
97
|
|
93
98
|
reference_hashes = [
|
94
|
-
{:key => "KEY", :ttl => 1.hour * 1000, :force => false, :as_entry => false, :prefix => ::Elephas::Cache.default_prefix, :complete_key => "#{::Elephas::Cache.default_prefix}[KEY]", :hash =>
|
95
|
-
{:key => "KEY", :ttl => 1.hour * 1000, :force => false, :as_entry => false, :prefix => ::Elephas::Cache.default_prefix, :complete_key => "#{::Elephas::Cache.default_prefix}[KEY]", :hash =>
|
96
|
-
{:key => "KEY", :ttl => 2.hour, :force => false, :as_entry => false, :prefix => ::Elephas::Cache.default_prefix, :complete_key => "#{::Elephas::Cache.default_prefix}[KEY]", :hash =>
|
97
|
-
{:key => "KEY", :ttl => 1.hour * 1000, :force => true, :as_entry => false, :prefix => ::Elephas::Cache.default_prefix, :complete_key => "#{::Elephas::Cache.default_prefix}[KEY]", :hash =>
|
98
|
-
{:key => "KEY", :ttl => 1.hour * 1000, :force => false, :as_entry => true, :prefix => ::Elephas::Cache.default_prefix, :complete_key => "#{::Elephas::Cache.default_prefix}[KEY]", :hash =>
|
99
|
-
{:key => "KEY", :ttl => 1.hour * 1000, :force => false, :as_entry => false, :prefix => "prefix", :complete_key => "prefix[KEY]", :hash =>
|
99
|
+
{:key => "KEY", :ttl => 1.hour * 1000, :force => false, :as_entry => false, :prefix => ::Elephas::Cache.default_prefix, :complete_key => "#{::Elephas::Cache.default_prefix}[KEY]", :hash => hashes[:base]},
|
100
|
+
{:key => "KEY", :ttl => 1.hour * 1000, :force => false, :as_entry => false, :prefix => ::Elephas::Cache.default_prefix, :complete_key => "#{::Elephas::Cache.default_prefix}[KEY]", :hash => hashes[:base]},
|
101
|
+
{:key => "KEY", :ttl => 2.hour, :force => false, :as_entry => false, :prefix => ::Elephas::Cache.default_prefix, :complete_key => "#{::Elephas::Cache.default_prefix}[KEY]", :hash => hashes[:base]},
|
102
|
+
{:key => "KEY", :ttl => 1.hour * 1000, :force => true, :as_entry => false, :prefix => ::Elephas::Cache.default_prefix, :complete_key => "#{::Elephas::Cache.default_prefix}[KEY]", :hash => hashes[:base]},
|
103
|
+
{:key => "KEY", :ttl => 1.hour * 1000, :force => false, :as_entry => true, :prefix => ::Elephas::Cache.default_prefix, :complete_key => "#{::Elephas::Cache.default_prefix}[KEY]", :hash => hashes[:base]},
|
104
|
+
{:key => "KEY", :ttl => 1.hour * 1000, :force => false, :as_entry => false, :prefix => "prefix", :complete_key => "prefix[KEY]", :hash => hashes[:alternative]},
|
100
105
|
{:key => "KEY", :ttl => 1.hour * 1000, :force => false, :as_entry => false, :prefix => ::Elephas::Cache.default_prefix, :complete_key => "#{::Elephas::Cache.default_prefix}[KEY]", :hash => "hash"}
|
101
106
|
]
|
102
107
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elephas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,16 +9,16 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: lazier
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 1.0.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 1.0.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: rspec
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -204,7 +204,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
204
204
|
version: '0'
|
205
205
|
segments:
|
206
206
|
- 0
|
207
|
-
hash:
|
207
|
+
hash: 4421843090737901430
|
208
208
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
209
209
|
none: false
|
210
210
|
requirements:
|
@@ -213,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
213
|
version: '0'
|
214
214
|
segments:
|
215
215
|
- 0
|
216
|
-
hash:
|
216
|
+
hash: 4421843090737901430
|
217
217
|
requirements: []
|
218
218
|
rubyforge_project: elephas
|
219
219
|
rubygems_version: 1.8.24
|