elephas 1.1.3 → 2.0.0
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.
- data/.travis.yml +1 -1
- data/Gemfile +1 -1
- data/README.md +4 -2
- data/Rakefile +1 -1
- data/doc/Elephas/Cache.html +83 -63
- data/doc/Elephas/Entry.html +897 -59
- data/doc/Elephas/Providers/Base.html +31 -78
- data/doc/Elephas/Providers/Hash.html +137 -23
- data/doc/Elephas/Providers/RubyOnRails.html +20 -21
- data/doc/Elephas/Providers.html +3 -3
- data/doc/Elephas/Version.html +6 -6
- data/doc/Elephas.html +4 -4
- data/doc/_index.html +4 -4
- data/doc/file.README.html +8 -6
- data/doc/frames.html +1 -1
- data/doc/index.html +8 -6
- data/doc/top-level-namespace.html +3 -3
- data/elephas.gemspec +10 -8
- data/lib/elephas/cache.rb +124 -103
- data/lib/elephas/entry.rb +23 -22
- data/lib/elephas/provider.rb +13 -5
- data/lib/elephas/providers/hash.rb +14 -14
- data/lib/elephas/providers/ruby_on_rails.rb +10 -11
- data/lib/elephas/version.rb +4 -4
- data/lib/elephas.rb +1 -3
- data/locales/en.yml +9 -0
- data/locales/it.yml +9 -0
- data/spec/coverage_helper.rb +1 -1
- data/spec/elephas/cache_spec.rb +19 -19
- data/spec/elephas/entry_spec.rb +1 -1
- data/spec/elephas/provider_spec.rb +1 -1
- data/spec/elephas/providers/hash_spec.rb +3 -3
- data/spec/elephas/providers/ruby_on_rails_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -1
- metadata +18 -23
- data/doc/Elephas/Exceptions.html +0 -115
data/lib/elephas/provider.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
#
|
|
3
|
-
# This file is part of the elephas gem. Copyright (C)
|
|
3
|
+
# This file is part of the elephas gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
|
4
4
|
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
|
5
5
|
#
|
|
6
6
|
|
|
@@ -11,13 +11,14 @@ module Elephas
|
|
|
11
11
|
# The base provider, with all methods a valid provider should override.
|
|
12
12
|
module Base
|
|
13
13
|
extend ActiveSupport::Concern
|
|
14
|
+
include Lazier::I18n
|
|
14
15
|
|
|
15
16
|
# Reads a value from the cache.
|
|
16
17
|
#
|
|
17
18
|
# @param key [String] The key to lookup.
|
|
18
19
|
# @return [Entry|NilClass] The read value or `nil`.
|
|
19
20
|
def read(key)
|
|
20
|
-
|
|
21
|
+
unimplemented
|
|
21
22
|
end
|
|
22
23
|
|
|
23
24
|
# Writes a value to the cache.
|
|
@@ -28,7 +29,7 @@ module Elephas
|
|
|
28
29
|
# @see Elephas::Cache.setup_options
|
|
29
30
|
# @return [Object] The value itself.
|
|
30
31
|
def write(key, value, options = {})
|
|
31
|
-
|
|
32
|
+
unimplemented
|
|
32
33
|
end
|
|
33
34
|
|
|
34
35
|
# Deletes a value from the cache.
|
|
@@ -36,7 +37,7 @@ module Elephas
|
|
|
36
37
|
# @param key [String] The key to delete.
|
|
37
38
|
# @return [TrueClass|FalseClass] `true` if the key was in the cache, `false` otherwise.
|
|
38
39
|
def delete(key)
|
|
39
|
-
|
|
40
|
+
unimplemented
|
|
40
41
|
end
|
|
41
42
|
|
|
42
43
|
# Checks if a key exists in the cache.
|
|
@@ -44,7 +45,7 @@ module Elephas
|
|
|
44
45
|
# @param key [String] The key to lookup.
|
|
45
46
|
# @return [TrueClass|FalseClass] `true` if the key is in the cache, `false` otherwise.
|
|
46
47
|
def exists?(key)
|
|
47
|
-
|
|
48
|
+
unimplemented
|
|
48
49
|
end
|
|
49
50
|
|
|
50
51
|
# Returns the current time for comparing with entries TTL.
|
|
@@ -53,6 +54,13 @@ module Elephas
|
|
|
53
54
|
def now
|
|
54
55
|
::Time.now.to_f
|
|
55
56
|
end
|
|
57
|
+
|
|
58
|
+
private
|
|
59
|
+
# Marks a method as unimplemented.
|
|
60
|
+
def unimplemented
|
|
61
|
+
self.i18n_setup(:elephas, ::File.absolute_path(::Pathname.new(::File.dirname(__FILE__)).to_s + "/../../locales/")) if !@i18n
|
|
62
|
+
raise ArgumentError.new(self.i18n.unimplemented)
|
|
63
|
+
end
|
|
56
64
|
end
|
|
57
65
|
end
|
|
58
66
|
end
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
#
|
|
3
|
-
# This file is part of the elephas gem. Copyright (C)
|
|
3
|
+
# This file is part of the elephas gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
|
4
4
|
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
|
5
5
|
#
|
|
6
6
|
|
|
7
7
|
module Elephas
|
|
8
8
|
module Providers
|
|
9
9
|
# This is a simple providers, which uses an hash for storing the values.
|
|
10
|
+
#
|
|
11
|
+
# @attribute data
|
|
12
|
+
# @return [Hash] The internal hash used by the provider.
|
|
10
13
|
class Hash
|
|
11
14
|
include Elephas::Providers::Base
|
|
12
|
-
|
|
13
|
-
# The internal hash used by the provider.
|
|
14
15
|
attr_accessor :data
|
|
15
16
|
|
|
16
17
|
# Initialize the provider
|
|
17
18
|
# @param data [Hash] The initial data stored.
|
|
18
19
|
def initialize(data = nil)
|
|
19
|
-
data =
|
|
20
|
-
@data = data
|
|
20
|
+
@data = data && data.is_a?(::Hash) ? data : {}
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
# Reads a value from the cache.
|
|
@@ -36,10 +36,10 @@ module Elephas
|
|
|
36
36
|
# @see Elephas::Cache.setup_options
|
|
37
37
|
# @return [Object] The value itself.
|
|
38
38
|
def write(key, value, options = {})
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
@data[key.ensure_string] =
|
|
42
|
-
|
|
39
|
+
entry = ::Elephas::Entry.ensure(value, key, options)
|
|
40
|
+
entry.refresh
|
|
41
|
+
@data[key.ensure_string] = entry
|
|
42
|
+
entry
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
# Deletes a value from the cache.
|
|
@@ -47,9 +47,9 @@ module Elephas
|
|
|
47
47
|
# @param key [String] The key to delete.
|
|
48
48
|
# @return [Boolean] `true` if the key was in the cache, `false` otherwise.
|
|
49
49
|
def delete(key)
|
|
50
|
-
|
|
51
|
-
rv = @data.has_key?(
|
|
52
|
-
@data.delete(
|
|
50
|
+
key = key.ensure_string
|
|
51
|
+
rv = @data.has_key?(key)
|
|
52
|
+
@data.delete(key)
|
|
53
53
|
rv
|
|
54
54
|
end
|
|
55
55
|
|
|
@@ -58,8 +58,8 @@ module Elephas
|
|
|
58
58
|
# @param key [String] The key to lookup.
|
|
59
59
|
# @return [Boolean] `true` if the key is in the cache, `false` otherwise.
|
|
60
60
|
def exists?(key)
|
|
61
|
-
|
|
62
|
-
@data.has_key?(
|
|
61
|
+
key = key.ensure_string
|
|
62
|
+
@data.has_key?(key) && @data[key].valid?
|
|
63
63
|
end
|
|
64
64
|
end
|
|
65
65
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
#
|
|
3
|
-
# This file is part of the elephas gem. Copyright (C)
|
|
3
|
+
# This file is part of the elephas gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
|
4
4
|
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
|
5
5
|
#
|
|
6
6
|
|
|
@@ -26,11 +26,10 @@ module Elephas
|
|
|
26
26
|
# @see Elephas::Cache.setup_options
|
|
27
27
|
# @return [Object] The value itself.
|
|
28
28
|
def write(key, value, options = {})
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
value
|
|
29
|
+
entry = ::Elephas::Entry.ensure(value, key, options)
|
|
30
|
+
entry.refresh
|
|
31
|
+
Rails.cache.write(key, entry, expires_in: entry.ttl)
|
|
32
|
+
entry
|
|
34
33
|
end
|
|
35
34
|
|
|
36
35
|
# Deletes a value from the cache.
|
|
@@ -38,9 +37,9 @@ module Elephas
|
|
|
38
37
|
# @param key [String] The key to delete.
|
|
39
38
|
# @return [Boolean] `true` if the key was in the cache, `false` otherwise.
|
|
40
39
|
def delete(key)
|
|
41
|
-
|
|
42
|
-
rv = Rails.cache.exist?(
|
|
43
|
-
Rails.cache.delete(
|
|
40
|
+
key = key.ensure_string
|
|
41
|
+
rv = Rails.cache.exist?(key)
|
|
42
|
+
Rails.cache.delete(key)
|
|
44
43
|
rv
|
|
45
44
|
end
|
|
46
45
|
|
|
@@ -49,8 +48,8 @@ module Elephas
|
|
|
49
48
|
# @param key [String] The key to lookup.
|
|
50
49
|
# @return [Boolean] `true` if the key is in the cache, `false` otherwise.
|
|
51
50
|
def exists?(key)
|
|
52
|
-
|
|
53
|
-
Rails.cache.exist?(
|
|
51
|
+
key = key.ensure_string
|
|
52
|
+
Rails.cache.exist?(key) && Rails.cache.read(key).valid?
|
|
54
53
|
end
|
|
55
54
|
end
|
|
56
55
|
end
|
data/lib/elephas/version.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
#
|
|
3
|
-
# This file is part of the elephas gem. Copyright (C)
|
|
3
|
+
# This file is part of the elephas gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
|
4
4
|
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
|
5
5
|
#
|
|
6
6
|
|
|
@@ -11,13 +11,13 @@ module Elephas
|
|
|
11
11
|
# @see http://semver.org
|
|
12
12
|
module Version
|
|
13
13
|
# The major version.
|
|
14
|
-
MAJOR =
|
|
14
|
+
MAJOR = 2
|
|
15
15
|
|
|
16
16
|
# The minor version.
|
|
17
|
-
MINOR =
|
|
17
|
+
MINOR = 0
|
|
18
18
|
|
|
19
19
|
# The patch version.
|
|
20
|
-
PATCH =
|
|
20
|
+
PATCH = 0
|
|
21
21
|
|
|
22
22
|
# The current version of elephas.
|
|
23
23
|
STRING = [MAJOR, MINOR, PATCH].compact.join(".")
|
data/lib/elephas.rb
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
#
|
|
3
|
-
# This file is part of the elephas gem. Copyright (C)
|
|
3
|
+
# This file is part of the elephas gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
|
4
4
|
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
|
5
5
|
#
|
|
6
6
|
|
|
7
|
-
$KCODE='UTF8' if RUBY_VERSION < '1.9'
|
|
8
|
-
|
|
9
7
|
require "lazier"
|
|
10
8
|
require "digest/sha2"
|
|
11
9
|
Lazier.load!("boolean", "math", "object")
|
data/locales/en.yml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
#
|
|
3
|
+
# This file is part of the elephas gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
|
4
|
+
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
elephas:
|
|
9
|
+
unimplemented: "A Elephas::Providers subclass must override this method."
|
data/locales/it.yml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
#
|
|
3
|
+
# This file is part of the elephas gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
|
4
|
+
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
elephas:
|
|
9
|
+
unimplemented: "Una sottoclasse di Elephas::Providers deve effettuare l'override di questo metodo."
|
data/spec/coverage_helper.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
#
|
|
3
|
-
# This file is part of the elephas gem. Copyright (C)
|
|
3
|
+
# This file is part of the elephas gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
|
4
4
|
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
|
5
5
|
#
|
|
6
6
|
|
data/spec/elephas/cache_spec.rb
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
#
|
|
3
|
-
# This file is part of the elephas gem. Copyright (C)
|
|
3
|
+
# This file is part of the elephas gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
|
4
4
|
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
|
5
5
|
#
|
|
6
6
|
|
|
7
7
|
require "spec_helper"
|
|
8
8
|
|
|
9
9
|
describe ::Elephas::Cache do
|
|
10
|
-
let(:entry) { ::Elephas::Entry.ensure("VALUE", ::Elephas::Cache.default_prefix + "[KEY]", {:
|
|
10
|
+
let(:entry) { ::Elephas::Entry.ensure("VALUE", ::Elephas::Cache.default_prefix + "[KEY]", {ttl: 3600}) }
|
|
11
11
|
|
|
12
12
|
describe ".use" do
|
|
13
13
|
before(:each) do
|
|
@@ -20,9 +20,9 @@ describe ::Elephas::Cache do
|
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
it "should skip the provider if requested to" do
|
|
23
|
-
::Elephas::Cache.use("KEY", {:
|
|
23
|
+
::Elephas::Cache.use("KEY", {ttl: 0}) do "VALUE" end
|
|
24
24
|
::Elephas::Cache.provider.should_not_receive(:read)
|
|
25
|
-
::Elephas::Cache.use("KEY", {:
|
|
25
|
+
::Elephas::Cache.use("KEY", {force: true}) do "VALUE" end
|
|
26
26
|
::Elephas::Cache.provider.should_not_receive(:read)
|
|
27
27
|
end
|
|
28
28
|
|
|
@@ -44,7 +44,7 @@ describe ::Elephas::Cache do
|
|
|
44
44
|
::Elephas::Cache.use("KEY") do "VALUE" end
|
|
45
45
|
|
|
46
46
|
expect(::Elephas::Cache.use("KEY")).to eq("VALUE")
|
|
47
|
-
value = ::Elephas::Cache.use("KEY", {:
|
|
47
|
+
value = ::Elephas::Cache.use("KEY", {as_entry: true})
|
|
48
48
|
expect(value).to be_a(::Elephas::Entry)
|
|
49
49
|
expect(value.value).to eq("VALUE")
|
|
50
50
|
end
|
|
@@ -81,28 +81,28 @@ describe ::Elephas::Cache do
|
|
|
81
81
|
describe "setup_options" do
|
|
82
82
|
it "should set good defaults for options" do
|
|
83
83
|
hashes = {
|
|
84
|
-
:
|
|
85
|
-
:
|
|
84
|
+
base: ::Elephas::Entry.hashify_key("#{::Elephas::Cache.default_prefix}[KEY]"),
|
|
85
|
+
alternative: ::Elephas::Entry.hashify_key("prefix[KEY]")
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
options_hashes = [
|
|
89
89
|
nil,
|
|
90
90
|
"A",
|
|
91
|
-
{:
|
|
92
|
-
{:
|
|
93
|
-
{:
|
|
94
|
-
{:
|
|
95
|
-
{:
|
|
91
|
+
{ttl: 2.hour},
|
|
92
|
+
{force: true},
|
|
93
|
+
{as_entry: true},
|
|
94
|
+
{prefix: "prefix", hash: hashes[:alternative]},
|
|
95
|
+
{hash: "hash"}
|
|
96
96
|
]
|
|
97
97
|
|
|
98
98
|
reference_hashes = [
|
|
99
|
-
{:
|
|
100
|
-
{:
|
|
101
|
-
{:
|
|
102
|
-
{:
|
|
103
|
-
{:
|
|
104
|
-
{:
|
|
105
|
-
{:
|
|
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]},
|
|
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"}
|
|
106
106
|
]
|
|
107
107
|
|
|
108
108
|
options_hashes.each_with_index do |options, i|
|
data/spec/elephas/entry_spec.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
#
|
|
3
|
-
# This file is part of the elephas gem. Copyright (C)
|
|
3
|
+
# This file is part of the elephas gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
|
4
4
|
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
|
5
5
|
#
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
#
|
|
3
|
-
# This file is part of the elephas gem. Copyright (C)
|
|
3
|
+
# This file is part of the elephas gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
|
4
4
|
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
|
5
5
|
#
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
#
|
|
3
|
-
# This file is part of the elephas gem. Copyright (C)
|
|
3
|
+
# This file is part of the elephas gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
|
4
4
|
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
|
5
5
|
#
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ require "spec_helper"
|
|
|
8
8
|
|
|
9
9
|
describe Elephas::Providers::Hash do
|
|
10
10
|
subject { ::Elephas::Providers::Hash.new }
|
|
11
|
-
let!(:value) { subject.write("KEY", ::Elephas::Entry.ensure("VALUE", "KEY", {:
|
|
11
|
+
let!(:value) { subject.write("KEY", ::Elephas::Entry.ensure("VALUE", "KEY", {ttl: 3600})) }
|
|
12
12
|
|
|
13
13
|
describe "#initialize" do
|
|
14
14
|
it "should create a store with an empty hash" do
|
|
@@ -16,7 +16,7 @@ describe Elephas::Providers::Hash do
|
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
it "should create a store with an given hash" do
|
|
19
|
-
expect(::Elephas::Providers::Hash.new({:
|
|
19
|
+
expect(::Elephas::Providers::Hash.new({a: :b}).data).to eq({a: :b})
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
it "should ensure that the store is an Hash" do
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
#
|
|
3
|
-
# This file is part of the elephas gem. Copyright (C)
|
|
3
|
+
# This file is part of the elephas gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
|
4
4
|
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
|
5
5
|
#
|
|
6
6
|
|
|
@@ -28,7 +28,7 @@ describe Elephas::Providers::RubyOnRails do
|
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
subject { ::Elephas::Providers::RubyOnRails.new }
|
|
31
|
-
let!(:value) { subject.write("KEY", ::Elephas::Entry.ensure("VALUE", "KEY", {:
|
|
31
|
+
let!(:value) { subject.write("KEY", ::Elephas::Entry.ensure("VALUE", "KEY", {ttl: 3600})) }
|
|
32
32
|
|
|
33
33
|
describe "#read" do
|
|
34
34
|
it "fetch data from the cache" do
|
data/spec/spec_helper.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
#
|
|
3
|
-
# This file is part of the elephas gem. Copyright (C)
|
|
3
|
+
# This file is part of the elephas gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
|
4
4
|
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
|
5
5
|
#
|
|
6
6
|
|
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:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2013-02-02 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: lazier
|
|
@@ -18,7 +18,7 @@ dependencies:
|
|
|
18
18
|
requirements:
|
|
19
19
|
- - ~>
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version:
|
|
21
|
+
version: 2.5.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: 2.5.0
|
|
30
30
|
- !ruby/object:Gem::Dependency
|
|
31
31
|
name: rspec
|
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -34,7 +34,7 @@ dependencies:
|
|
|
34
34
|
requirements:
|
|
35
35
|
- - ~>
|
|
36
36
|
- !ruby/object:Gem::Version
|
|
37
|
-
version: 2.
|
|
37
|
+
version: 2.12.0
|
|
38
38
|
type: :development
|
|
39
39
|
prerelease: false
|
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -42,7 +42,7 @@ dependencies:
|
|
|
42
42
|
requirements:
|
|
43
43
|
- - ~>
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
|
-
version: 2.
|
|
45
|
+
version: 2.12.0
|
|
46
46
|
- !ruby/object:Gem::Dependency
|
|
47
47
|
name: rake
|
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -50,7 +50,7 @@ dependencies:
|
|
|
50
50
|
requirements:
|
|
51
51
|
- - ~>
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: 0.
|
|
53
|
+
version: 10.0.3
|
|
54
54
|
type: :development
|
|
55
55
|
prerelease: false
|
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -58,7 +58,7 @@ dependencies:
|
|
|
58
58
|
requirements:
|
|
59
59
|
- - ~>
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: 0.
|
|
61
|
+
version: 10.0.3
|
|
62
62
|
- !ruby/object:Gem::Dependency
|
|
63
63
|
name: simplecov
|
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -66,7 +66,7 @@ dependencies:
|
|
|
66
66
|
requirements:
|
|
67
67
|
- - ~>
|
|
68
68
|
- !ruby/object:Gem::Version
|
|
69
|
-
version: 0.7.
|
|
69
|
+
version: 0.7.1
|
|
70
70
|
type: :development
|
|
71
71
|
prerelease: false
|
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -74,7 +74,7 @@ dependencies:
|
|
|
74
74
|
requirements:
|
|
75
75
|
- - ~>
|
|
76
76
|
- !ruby/object:Gem::Version
|
|
77
|
-
version: 0.7.
|
|
77
|
+
version: 0.7.1
|
|
78
78
|
- !ruby/object:Gem::Dependency
|
|
79
79
|
name: pry
|
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -98,7 +98,7 @@ dependencies:
|
|
|
98
98
|
requirements:
|
|
99
99
|
- - ~>
|
|
100
100
|
- !ruby/object:Gem::Version
|
|
101
|
-
version: 0.8.
|
|
101
|
+
version: 0.8.3
|
|
102
102
|
type: :development
|
|
103
103
|
prerelease: false
|
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -106,7 +106,7 @@ dependencies:
|
|
|
106
106
|
requirements:
|
|
107
107
|
- - ~>
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: 0.8.
|
|
109
|
+
version: 0.8.3
|
|
110
110
|
- !ruby/object:Gem::Dependency
|
|
111
111
|
name: redcarpet
|
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -130,7 +130,7 @@ dependencies:
|
|
|
130
130
|
requirements:
|
|
131
131
|
- - ~>
|
|
132
132
|
- !ruby/object:Gem::Version
|
|
133
|
-
version: 0.7.
|
|
133
|
+
version: 0.7.5
|
|
134
134
|
type: :development
|
|
135
135
|
prerelease: false
|
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -138,7 +138,7 @@ dependencies:
|
|
|
138
138
|
requirements:
|
|
139
139
|
- - ~>
|
|
140
140
|
- !ruby/object:Gem::Version
|
|
141
|
-
version: 0.7.
|
|
141
|
+
version: 0.7.5
|
|
142
142
|
description: A storage agnostic caching framework.
|
|
143
143
|
email:
|
|
144
144
|
- shogun_panda@me.com
|
|
@@ -155,7 +155,6 @@ files:
|
|
|
155
155
|
- doc/Elephas.html
|
|
156
156
|
- doc/Elephas/Cache.html
|
|
157
157
|
- doc/Elephas/Entry.html
|
|
158
|
-
- doc/Elephas/Exceptions.html
|
|
159
158
|
- doc/Elephas/Providers.html
|
|
160
159
|
- doc/Elephas/Providers/Base.html
|
|
161
160
|
- doc/Elephas/Providers/Hash.html
|
|
@@ -183,6 +182,8 @@ files:
|
|
|
183
182
|
- lib/elephas/providers/hash.rb
|
|
184
183
|
- lib/elephas/providers/ruby_on_rails.rb
|
|
185
184
|
- lib/elephas/version.rb
|
|
185
|
+
- locales/en.yml
|
|
186
|
+
- locales/it.yml
|
|
186
187
|
- spec/coverage_helper.rb
|
|
187
188
|
- spec/elephas/cache_spec.rb
|
|
188
189
|
- spec/elephas/entry_spec.rb
|
|
@@ -190,7 +191,7 @@ files:
|
|
|
190
191
|
- spec/elephas/providers/hash_spec.rb
|
|
191
192
|
- spec/elephas/providers/ruby_on_rails_spec.rb
|
|
192
193
|
- spec/spec_helper.rb
|
|
193
|
-
homepage: http://
|
|
194
|
+
homepage: http://sw.cow.tc/elephas
|
|
194
195
|
licenses: []
|
|
195
196
|
post_install_message:
|
|
196
197
|
rdoc_options: []
|
|
@@ -201,19 +202,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
201
202
|
requirements:
|
|
202
203
|
- - ! '>='
|
|
203
204
|
- !ruby/object:Gem::Version
|
|
204
|
-
version:
|
|
205
|
-
segments:
|
|
206
|
-
- 0
|
|
207
|
-
hash: -3114060091249618626
|
|
205
|
+
version: 1.9.2
|
|
208
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
207
|
none: false
|
|
210
208
|
requirements:
|
|
211
209
|
- - ! '>='
|
|
212
210
|
- !ruby/object:Gem::Version
|
|
213
211
|
version: '0'
|
|
214
|
-
segments:
|
|
215
|
-
- 0
|
|
216
|
-
hash: -3114060091249618626
|
|
217
212
|
requirements: []
|
|
218
213
|
rubyforge_project: elephas
|
|
219
214
|
rubygems_version: 1.8.24
|