elephas 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1037,7 +1037,7 @@ Valid options are:</p>
1037
1037
  </div>
1038
1038
 
1039
1039
  <div id="footer">
1040
- Generated on Sun Jul 29 10:32:07 2012 by
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>
@@ -1194,7 +1194,7 @@
1194
1194
  </div>
1195
1195
 
1196
1196
  <div id="footer">
1197
- Generated on Sun Jul 29 10:32:07 2012 by
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 Sun Jul 29 10:32:07 2012 by
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 Sun Jul 29 10:32:08 2012 by
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 Sun Jul 29 10:32:08 2012 by
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>
@@ -120,7 +120,7 @@
120
120
  </div>
121
121
 
122
122
  <div id="footer">
123
- Generated on Sun Jul 29 10:32:07 2012 by
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>
@@ -134,7 +134,7 @@
134
134
 
135
135
  </div>
136
136
  </dt>
137
- <dd><pre class="code"><span class='int'>0</span></pre></dd>
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 Sun Jul 29 10:32:07 2012 by
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 Sun Jul 29 10:32:07 2012 by
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 Sun Jul 29 10:32:07 2012 by
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 Sun Jul 29 10:32:07 2012 by
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 Sun Jul 29 10:32:07 2012 by
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 Sun Jul 29 10:32:07 2012 by
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("cowtech-extensions", "~> 2.7.0")
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")
@@ -14,7 +14,7 @@ module Elephas
14
14
  MAJOR = 1
15
15
 
16
16
  # The minor version.
17
- MINOR = 0
17
+ MINOR = 1
18
18
 
19
19
  # The patch version.
20
20
  PATCH = 0
data/lib/elephas.rb CHANGED
@@ -6,9 +6,9 @@
6
6
 
7
7
  $KCODE='UTF8' if RUBY_VERSION < '1.9'
8
8
 
9
- require "cowtech-extensions"
9
+ require "lazier"
10
10
  require "digest/sha2"
11
- Cowtech::Extensions.load!("boolean", "math", "object")
11
+ Lazier.load!("boolean", "math", "object")
12
12
 
13
13
  require "elephas/version" if !defined?(Elephas::Version)
14
14
  require "elephas/entry"
@@ -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 => "1f3caa3bd0b7ba49dc25f9445abdd4fed6fe65236681b392f0da251673885ea9"},
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 => "8a7675d5f1d9b163bb7bb4329c1a59ff18870fad4ed35a3a2e8d195a6f3c0332"},
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 => "8a7675d5f1d9b163bb7bb4329c1a59ff18870fad4ed35a3a2e8d195a6f3c0332"},
96
- {:key => "KEY", :ttl => 2.hour, :force => false, :as_entry => false, :prefix => ::Elephas::Cache.default_prefix, :complete_key => "#{::Elephas::Cache.default_prefix}[KEY]", :hash => "8a7675d5f1d9b163bb7bb4329c1a59ff18870fad4ed35a3a2e8d195a6f3c0332"},
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 => "8a7675d5f1d9b163bb7bb4329c1a59ff18870fad4ed35a3a2e8d195a6f3c0332"},
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 => "8a7675d5f1d9b163bb7bb4329c1a59ff18870fad4ed35a3a2e8d195a6f3c0332"},
99
- {:key => "KEY", :ttl => 1.hour * 1000, :force => false, :as_entry => false, :prefix => "prefix", :complete_key => "prefix[KEY]", :hash => "1f3caa3bd0b7ba49dc25f9445abdd4fed6fe65236681b392f0da251673885ea9"},
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.0.0
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-07-29 00:00:00.000000000 Z
12
+ date: 2012-08-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: cowtech-extensions
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: 2.7.0
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: 2.7.0
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: 3704477900054561540
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: 3704477900054561540
216
+ hash: 4421843090737901430
217
217
  requirements: []
218
218
  rubyforge_project: elephas
219
219
  rubygems_version: 1.8.24