basiccache 0.0.27 → 0.0.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +1 -1
- data/Gemfile.lock +3 -3
- data/Rakefile +1 -1
- data/basiccache.gemspec +1 -1
- data/lib/basiccache.rb +1 -0
- data/lib/caches/cache.rb +29 -12
- data/lib/caches/timecache.rb +37 -19
- data/lib/stores/store.rb +57 -0
- data/spec/basiccache_spec.rb +2 -2
- data/spec/caches/cache_spec.rb +20 -15
- data/spec/caches/timecache_spec.rb +33 -24
- data/spec/methodcacher_spec.rb +1 -1
- data/spec/stores/store_spec.rb +55 -0
- data/vendor/cache/rainbow-1.99.1.gem +0 -0
- data/vendor/cache/ruby-progressbar-1.4.0.gem +0 -0
- metadata +28 -26
- data/vendor/cache/rainbow-1.1.4.gem +0 -0
- data/vendor/cache/ruby-progressbar-1.3.2.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c88870ec2b5d57202f9851f3ff291dc1dcedf952
|
4
|
+
data.tar.gz: e3e84d6cb07215b2236f64f62b285b61a0d6b740
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69951405a0cc35f09fdfdfde6ec4b47bc90df9892be07e95fe8dace3a8c1d4a0421b7d7335ce2ab6fba0bb7a747415d93c164dede3a50d43e93262cebe022d90
|
7
|
+
data.tar.gz: 195d0ac05209ba4a9b59225584a1998cbf86980a8cc9a04444a0b304102dbf554de21919db1ef12e31e2a46f705372ab001f0d8216f6ca4d962110bc2b1bf59f
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
basiccache (0.0.
|
4
|
+
basiccache (0.0.29)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -25,7 +25,7 @@ GEM
|
|
25
25
|
ast (~> 1.1)
|
26
26
|
slop (~> 3.4, >= 3.4.5)
|
27
27
|
powerpack (0.0.9)
|
28
|
-
rainbow (1.1
|
28
|
+
rainbow (1.99.1)
|
29
29
|
rake (10.1.1)
|
30
30
|
rest-client (1.6.7)
|
31
31
|
mime-types (>= 1.16)
|
@@ -41,7 +41,7 @@ GEM
|
|
41
41
|
parser (~> 2.1)
|
42
42
|
powerpack (~> 0.0.6)
|
43
43
|
rainbow (>= 1.1.4)
|
44
|
-
ruby-progressbar (1.
|
44
|
+
ruby-progressbar (1.4.0)
|
45
45
|
simplecov (0.8.2)
|
46
46
|
docile (~> 1.1.0)
|
47
47
|
multi_json
|
data/Rakefile
CHANGED
@@ -18,7 +18,7 @@ end
|
|
18
18
|
|
19
19
|
desc 'Run travis-lint on .travis.yml'
|
20
20
|
task :travislint do
|
21
|
-
|
21
|
+
print 'There may be an issue with your .travis.yml' unless system('travis-lint')
|
22
22
|
end
|
23
23
|
|
24
24
|
task default: [:spec, :travislint, :rubocop, :build, :install]
|
data/basiccache.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'basiccache'
|
3
|
-
s.version = '0.0.
|
3
|
+
s.version = '0.0.29'
|
4
4
|
s.date = Time.now.strftime("%Y-%m-%d")
|
5
5
|
s.summary = 'Provides a minimal key/value caching layer'
|
6
6
|
s.description = "Allows an application to dynamically cache values and retrieve them later"
|
data/lib/basiccache.rb
CHANGED
data/lib/caches/cache.rb
CHANGED
@@ -1,4 +1,12 @@
|
|
1
|
+
##
|
2
|
+
# Define the basic cache and default store objects
|
3
|
+
|
1
4
|
module BasicCache
|
5
|
+
##
|
6
|
+
# Set default Store type
|
7
|
+
|
8
|
+
DEFAULT_STORE = BasicCache::Store
|
9
|
+
|
2
10
|
##
|
3
11
|
# Cache object, maintains a key/value store
|
4
12
|
|
@@ -8,15 +16,16 @@ module BasicCache
|
|
8
16
|
##
|
9
17
|
# Generate an empty store
|
10
18
|
|
11
|
-
def initialize
|
12
|
-
|
19
|
+
def initialize(params = {})
|
20
|
+
params = { store: params } unless params.is_a? Hash
|
21
|
+
@store = params.fetch(:store) { BasicCache::DEFAULT_STORE.new }
|
13
22
|
end
|
14
23
|
|
15
24
|
##
|
16
|
-
#
|
25
|
+
# Return the size of the cache
|
17
26
|
|
18
|
-
def
|
19
|
-
|
27
|
+
def size
|
28
|
+
@store.size
|
20
29
|
end
|
21
30
|
|
22
31
|
##
|
@@ -28,13 +37,6 @@ module BasicCache
|
|
28
37
|
@store[key.to_sym] ||= code.call
|
29
38
|
end
|
30
39
|
|
31
|
-
##
|
32
|
-
# Return the size of the cache
|
33
|
-
|
34
|
-
def size
|
35
|
-
@store.length
|
36
|
-
end
|
37
|
-
|
38
40
|
##
|
39
41
|
# Check if a value is cached
|
40
42
|
# (just a wrapper, designed to be redefined by subclasses)
|
@@ -52,5 +54,20 @@ module BasicCache
|
|
52
54
|
fail KeyError, 'Key not cached' unless include? key.to_sym
|
53
55
|
@store[key.to_sym]
|
54
56
|
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# Empty out either the given key or the full store
|
60
|
+
|
61
|
+
def clear!(key = nil)
|
62
|
+
key = key.to_sym unless key.nil?
|
63
|
+
@store.clear! key
|
64
|
+
end
|
65
|
+
|
66
|
+
##
|
67
|
+
# Prunes invalid/expired keys (a noop for the basic cache)
|
68
|
+
|
69
|
+
def prune
|
70
|
+
[]
|
71
|
+
end
|
55
72
|
end
|
56
73
|
end
|
data/lib/caches/timecache.rb
CHANGED
@@ -1,4 +1,12 @@
|
|
1
|
+
##
|
2
|
+
# Extends BasicCache to add a time-based cache
|
3
|
+
|
1
4
|
module BasicCache
|
5
|
+
##
|
6
|
+
# Timecache item struct, timestamp and value
|
7
|
+
|
8
|
+
TimeCacheItem = Struct.new(:stamp, :value)
|
9
|
+
|
2
10
|
##
|
3
11
|
# Time-based cache object
|
4
12
|
|
@@ -8,23 +16,27 @@ module BasicCache
|
|
8
16
|
##
|
9
17
|
# Generate an empty store, with a default lifetime of 60 seconds
|
10
18
|
|
11
|
-
def initialize(
|
12
|
-
|
13
|
-
@
|
14
|
-
super
|
19
|
+
def initialize(params = {})
|
20
|
+
params = { store: params } unless params.is_a? Hash
|
21
|
+
@lifetime = params.fetch :lifetime, 60
|
22
|
+
super
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Return the size of the cache (don't include expired entries)
|
27
|
+
|
28
|
+
def size
|
29
|
+
@store.keys.count { |k| Time.now - @store[k].stamp < @lifetime }
|
15
30
|
end
|
16
31
|
|
17
32
|
##
|
18
|
-
#
|
33
|
+
# Return a value from the cache, or calculate it and store it
|
34
|
+
# Recalculate if the cached value has expired
|
19
35
|
|
20
36
|
def cache(key = nil, &code)
|
21
37
|
key ||= BasicCache.caller_name
|
22
38
|
key = key.to_sym
|
23
|
-
|
24
|
-
unless @store.include? key and Time.now - @store[key].stamp < @lifetime
|
25
|
-
@store[key] = @cache_item.new(Time.now, code.call)
|
26
|
-
end
|
27
|
-
# rubocop:enable AndOr
|
39
|
+
@store[key] = TimeCacheItem.new(Time.now, code.call) unless include? key
|
28
40
|
@store[key].value
|
29
41
|
end
|
30
42
|
|
@@ -34,23 +46,29 @@ module BasicCache
|
|
34
46
|
def include?(key = nil)
|
35
47
|
key ||= BasicCache.caller_name
|
36
48
|
key = key.to_sym
|
37
|
-
|
38
|
-
@store.include? key and Time.now - @store[key].stamp < @lifetime
|
39
|
-
# rubocop:enable AndOr
|
49
|
+
@store.include?(key) && Time.now - @store[key].stamp < @lifetime
|
40
50
|
end
|
41
51
|
|
52
|
+
##
|
53
|
+
# Retrieve a value
|
54
|
+
|
42
55
|
def [](key = nil)
|
43
56
|
super.value
|
44
57
|
end
|
45
58
|
|
46
59
|
##
|
47
|
-
#
|
48
|
-
|
60
|
+
# Remove a value, or clear the cache
|
61
|
+
|
62
|
+
def clear!(key = nil)
|
63
|
+
resp = super
|
64
|
+
resp.class == TimeCacheItem ? resp.value : resp
|
65
|
+
end
|
66
|
+
|
67
|
+
##
|
68
|
+
# Prune expired keys
|
49
69
|
|
50
|
-
def
|
51
|
-
|
52
|
-
@store = valid if purge
|
53
|
-
valid.size
|
70
|
+
def prune
|
71
|
+
@store.keys.reject { |k| include? k }.map { |k| clear!(k) && k }
|
54
72
|
end
|
55
73
|
end
|
56
74
|
end
|
data/lib/stores/store.rb
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
module BasicCache
|
2
|
+
##
|
3
|
+
# Basic store object (uses a Hash)
|
4
|
+
|
5
|
+
class Store
|
6
|
+
attr_reader :raw
|
7
|
+
|
8
|
+
##
|
9
|
+
# Generate an empty store
|
10
|
+
|
11
|
+
def initialize
|
12
|
+
@raw = {}
|
13
|
+
end
|
14
|
+
|
15
|
+
##
|
16
|
+
# Clears a specified key or the whole store
|
17
|
+
|
18
|
+
def clear!(key = nil)
|
19
|
+
key.nil? ? @raw.clear : @raw.delete(key)
|
20
|
+
end
|
21
|
+
|
22
|
+
##
|
23
|
+
# Retrieve a key
|
24
|
+
|
25
|
+
def [](key)
|
26
|
+
@raw[key]
|
27
|
+
end
|
28
|
+
|
29
|
+
##
|
30
|
+
# Set a key
|
31
|
+
|
32
|
+
def []=(key, value)
|
33
|
+
@raw[key] = value
|
34
|
+
end
|
35
|
+
|
36
|
+
##
|
37
|
+
# Return the size of the store
|
38
|
+
|
39
|
+
def size
|
40
|
+
@raw.size
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Check for a key in the store
|
45
|
+
|
46
|
+
def include?(key)
|
47
|
+
@raw.include? key
|
48
|
+
end
|
49
|
+
|
50
|
+
##
|
51
|
+
# Array of keys in the store
|
52
|
+
|
53
|
+
def keys
|
54
|
+
@raw.keys
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
data/spec/basiccache_spec.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe BasicCache do
|
4
|
-
describe '
|
4
|
+
describe '#new' do
|
5
5
|
it 'creates cache objects' do
|
6
6
|
expect(BasicCache.new).to be_an_instance_of BasicCache::Cache
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
|
-
describe '
|
10
|
+
describe '#caller_name' do
|
11
11
|
it "returns the calling function's name" do
|
12
12
|
expect(BasicCache.caller_name).to eql 'instance_eval'
|
13
13
|
end
|
data/spec/caches/cache_spec.rb
CHANGED
@@ -13,8 +13,8 @@ describe BasicCache::Cache do
|
|
13
13
|
it 'creates a cache' do
|
14
14
|
expect(subject).to be_an_instance_of BasicCache::Cache
|
15
15
|
end
|
16
|
-
it 'has a
|
17
|
-
expect(subject.store).to
|
16
|
+
it 'has a store' do
|
17
|
+
expect(subject.store).to be_an_instance_of BasicCache::Store
|
18
18
|
end
|
19
19
|
describe '#size' do
|
20
20
|
it 'shows the size of the cache' do
|
@@ -34,6 +34,21 @@ describe BasicCache::Cache do
|
|
34
34
|
expect(subject.include? :c). to be_true
|
35
35
|
end
|
36
36
|
end
|
37
|
+
describe '#include?' do
|
38
|
+
it 'checks for a value in the cache' do
|
39
|
+
expect(cache.include? 'a').to be_true
|
40
|
+
expect(cache.include? :b).to be_true
|
41
|
+
expect(cache.include? 'z').to be_false
|
42
|
+
expect(cache.include? names[2]).to be_true
|
43
|
+
end
|
44
|
+
end
|
45
|
+
describe '#[]' do
|
46
|
+
it 'returns values from the cache' do
|
47
|
+
expect(cache['a']).to eql 3
|
48
|
+
expect(cache[:b]).to eql 5
|
49
|
+
expect { cache[:c] }.to raise_error KeyError
|
50
|
+
end
|
51
|
+
end
|
37
52
|
describe '#clear!' do
|
38
53
|
describe 'when given no argument' do
|
39
54
|
it 'clears the cache' do
|
@@ -56,19 +71,9 @@ describe BasicCache::Cache do
|
|
56
71
|
end
|
57
72
|
end
|
58
73
|
end
|
59
|
-
describe '#
|
60
|
-
it '
|
61
|
-
expect(cache.
|
62
|
-
expect(cache.include? :b).to be_true
|
63
|
-
expect(cache.include? 'z').to be_false
|
64
|
-
expect(cache.include? names[2]).to be_true
|
65
|
-
end
|
66
|
-
end
|
67
|
-
describe '#[]' do
|
68
|
-
it 'returns values from the cache' do
|
69
|
-
expect(cache['a']).to eql 3
|
70
|
-
expect(cache[:b]).to eql 5
|
71
|
-
expect { cache[:c] }.to raise_error KeyError
|
74
|
+
describe '#prune' do
|
75
|
+
it 'prunes invalid keys (none for Cache)' do
|
76
|
+
expect(cache.prune).to eql Array.new
|
72
77
|
end
|
73
78
|
end
|
74
79
|
end
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe BasicCache::TimeCache do
|
4
4
|
let(:cache) do
|
5
|
-
cache = BasicCache::TimeCache.new(1)
|
5
|
+
cache = BasicCache::TimeCache.new(lifetime: 1)
|
6
6
|
cache.cache('a') { 3 }
|
7
7
|
cache.cache(:b) { 5 }
|
8
8
|
cache.cache { 9 }
|
@@ -13,8 +13,8 @@ describe BasicCache::TimeCache do
|
|
13
13
|
it 'creates a cache' do
|
14
14
|
expect(cache).to be_an_instance_of BasicCache::TimeCache
|
15
15
|
end
|
16
|
-
it 'has a
|
17
|
-
expect(subject.store).to
|
16
|
+
it 'has a store' do
|
17
|
+
expect(subject.store).to be_an_instance_of BasicCache::Store
|
18
18
|
end
|
19
19
|
it 'has a set lifetime' do
|
20
20
|
expect(cache.lifetime).to eq 1
|
@@ -48,6 +48,26 @@ describe BasicCache::TimeCache do
|
|
48
48
|
expect(cache.include? 'a').to be_false
|
49
49
|
end
|
50
50
|
end
|
51
|
+
describe '#include?' do
|
52
|
+
it 'checks for a value in the cache' do
|
53
|
+
expect(cache.include? 'a').to be_true
|
54
|
+
expect(cache.include? :b).to be_true
|
55
|
+
expect(cache.include? 'z').to be_false
|
56
|
+
expect(cache.include? names[2]).to be_true
|
57
|
+
end
|
58
|
+
end
|
59
|
+
describe '#[]' do
|
60
|
+
it 'returns values from the cache' do
|
61
|
+
expect(cache['a']).to eql 3
|
62
|
+
expect(cache[:b]).to eql 5
|
63
|
+
expect { cache[:c] }.to raise_error KeyError
|
64
|
+
end
|
65
|
+
it 'will not return an expired key' do
|
66
|
+
expect(cache['a']).to eql 3
|
67
|
+
sleep 2
|
68
|
+
expect { cache['a'] }.to raise_error KeyError
|
69
|
+
end
|
70
|
+
end
|
51
71
|
describe '#clear!' do
|
52
72
|
describe 'when given no argument' do
|
53
73
|
it 'clears the cache' do
|
@@ -59,35 +79,24 @@ describe BasicCache::TimeCache do
|
|
59
79
|
describe 'when given an argument' do
|
60
80
|
it 'removes that entry from the cache' do
|
61
81
|
expect(cache.size).to eql 3
|
62
|
-
cache.clear! 'c'
|
82
|
+
expect(cache.clear! 'c').to be_nil
|
63
83
|
expect(cache.size).to eql 3
|
64
|
-
expect(cache.clear!
|
84
|
+
expect(cache.clear! 'a').to eql 3
|
65
85
|
expect(cache.size).to eql 2
|
66
|
-
expect(cache.clear!
|
86
|
+
expect(cache.clear! :b).to eql 5
|
67
87
|
expect(cache.size).to eql 1
|
68
|
-
expect(cache.clear!
|
88
|
+
expect(cache.clear! names[2]).to eql 9
|
69
89
|
expect(cache.size).to eql 0
|
70
90
|
end
|
71
91
|
end
|
72
92
|
end
|
73
|
-
describe '#
|
74
|
-
it '
|
75
|
-
expect(cache.
|
76
|
-
expect(cache.include? :b).to be_true
|
77
|
-
expect(cache.include? 'z').to be_false
|
78
|
-
expect(cache.include? names[2]).to be_true
|
79
|
-
end
|
80
|
-
end
|
81
|
-
describe '#[]' do
|
82
|
-
it 'returns values from the cache' do
|
83
|
-
expect(cache['a']).to eql 3
|
84
|
-
expect(cache[:b]).to eql 5
|
85
|
-
expect { cache[:c] }.to raise_error KeyError
|
86
|
-
end
|
87
|
-
it 'will not return an expired key' do
|
88
|
-
expect(cache['a']).to eql 3
|
93
|
+
describe '#prune' do
|
94
|
+
it 'prunes invalid cache entries' do
|
95
|
+
expect(cache.store.size).to eql 3
|
89
96
|
sleep 2
|
90
|
-
expect
|
97
|
+
expect(cache.store.size).to eql 3
|
98
|
+
expect(cache.prune).to eql [:a, :b, names[2]]
|
99
|
+
expect(cache.store.size).to eql 0
|
91
100
|
end
|
92
101
|
end
|
93
102
|
end
|
data/spec/methodcacher_spec.rb
CHANGED
@@ -9,7 +9,7 @@ class Example
|
|
9
9
|
def initialize(skip_cache = false)
|
10
10
|
return if skip_cache
|
11
11
|
enable_caching [:repeat]
|
12
|
-
enable_caching [:time_repeat], BasicCache::TimeCache.new(1)
|
12
|
+
enable_caching [:time_repeat], BasicCache::TimeCache.new(lifetime: 1)
|
13
13
|
end
|
14
14
|
|
15
15
|
def repeat(input)
|
@@ -0,0 +1,55 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe BasicCache::Store do
|
4
|
+
let(:store) do
|
5
|
+
store = BasicCache::Store.new
|
6
|
+
(1..5).each { |i| store[i] = i + 5 }
|
7
|
+
store
|
8
|
+
end
|
9
|
+
|
10
|
+
describe '#initialize' do
|
11
|
+
it 'creates a new store raw object' do
|
12
|
+
expect(store.raw).to be_an_instance_of Hash
|
13
|
+
end
|
14
|
+
end
|
15
|
+
describe '#clear!' do
|
16
|
+
describe 'when given no argument' do
|
17
|
+
it 'empties the store' do
|
18
|
+
expect(store.clear!).to eql Hash.new
|
19
|
+
end
|
20
|
+
end
|
21
|
+
describe 'when given an argument' do
|
22
|
+
it 'removes a key from the store' do
|
23
|
+
expect(store.size).to eql 5
|
24
|
+
store.clear! 1
|
25
|
+
expect(store.size).to eql 4
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
describe '#[]' do
|
30
|
+
it 'retrieves a key' do
|
31
|
+
expect(store[1]).to eql 6
|
32
|
+
end
|
33
|
+
end
|
34
|
+
describe '#[]=' do
|
35
|
+
it 'sets a key' do
|
36
|
+
expect(store[6] = 10).to eql 10
|
37
|
+
end
|
38
|
+
end
|
39
|
+
describe '#size' do
|
40
|
+
it 'returns the size of the store' do
|
41
|
+
expect(store.size).to eql 5
|
42
|
+
end
|
43
|
+
end
|
44
|
+
describe '#include?' do
|
45
|
+
it 'checks for a key in the store' do
|
46
|
+
expect(store.include? :foo).to be_false
|
47
|
+
expect(store.include? 1).to be_true
|
48
|
+
end
|
49
|
+
end
|
50
|
+
describe '#keys' do
|
51
|
+
it 'lists the keys in the store' do
|
52
|
+
expect(store.keys).to eql [1, 2, 3, 4, 5]
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,111 +1,111 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: basiccache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Aker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: travis-lint
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: coveralls
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: fuubar
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: parser
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - '>='
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
description: Allows an application to dynamically cache values and retrieve them later
|
@@ -114,10 +114,10 @@ executables: []
|
|
114
114
|
extensions: []
|
115
115
|
extra_rdoc_files: []
|
116
116
|
files:
|
117
|
-
-
|
118
|
-
-
|
119
|
-
-
|
120
|
-
-
|
117
|
+
- .gitignore
|
118
|
+
- .rspec
|
119
|
+
- .rubocop.yml
|
120
|
+
- .travis.yml
|
121
121
|
- Gemfile
|
122
122
|
- Gemfile.lock
|
123
123
|
- LICENSE
|
@@ -128,11 +128,13 @@ files:
|
|
128
128
|
- lib/caches/cache.rb
|
129
129
|
- lib/caches/timecache.rb
|
130
130
|
- lib/methodcacher.rb
|
131
|
+
- lib/stores/store.rb
|
131
132
|
- spec/basiccache_spec.rb
|
132
133
|
- spec/caches/cache_spec.rb
|
133
134
|
- spec/caches/timecache_spec.rb
|
134
135
|
- spec/methodcacher_spec.rb
|
135
136
|
- spec/spec_helper.rb
|
137
|
+
- spec/stores/store_spec.rb
|
136
138
|
- vendor/cache/ast-1.1.0.gem
|
137
139
|
- vendor/cache/coveralls-0.7.0.gem
|
138
140
|
- vendor/cache/diff-lcs-1.2.5.gem
|
@@ -143,7 +145,7 @@ files:
|
|
143
145
|
- vendor/cache/multi_json-1.8.2.gem
|
144
146
|
- vendor/cache/parser-2.1.1.gem
|
145
147
|
- vendor/cache/powerpack-0.0.9.gem
|
146
|
-
- vendor/cache/rainbow-1.1.
|
148
|
+
- vendor/cache/rainbow-1.99.1.gem
|
147
149
|
- vendor/cache/rake-10.1.1.gem
|
148
150
|
- vendor/cache/rest-client-1.6.7.gem
|
149
151
|
- vendor/cache/rspec-2.14.1.gem
|
@@ -151,7 +153,7 @@ files:
|
|
151
153
|
- vendor/cache/rspec-expectations-2.14.4.gem
|
152
154
|
- vendor/cache/rspec-mocks-2.14.4.gem
|
153
155
|
- vendor/cache/rubocop-0.16.0.gem
|
154
|
-
- vendor/cache/ruby-progressbar-1.
|
156
|
+
- vendor/cache/ruby-progressbar-1.4.0.gem
|
155
157
|
- vendor/cache/simplecov-0.8.2.gem
|
156
158
|
- vendor/cache/simplecov-html-0.8.0.gem
|
157
159
|
- vendor/cache/slop-3.4.7.gem
|
@@ -169,17 +171,17 @@ require_paths:
|
|
169
171
|
- lib
|
170
172
|
required_ruby_version: !ruby/object:Gem::Requirement
|
171
173
|
requirements:
|
172
|
-
- -
|
174
|
+
- - '>='
|
173
175
|
- !ruby/object:Gem::Version
|
174
176
|
version: '0'
|
175
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
178
|
requirements:
|
177
|
-
- -
|
179
|
+
- - '>='
|
178
180
|
- !ruby/object:Gem::Version
|
179
181
|
version: '0'
|
180
182
|
requirements: []
|
181
183
|
rubyforge_project:
|
182
|
-
rubygems_version: 2.0.
|
184
|
+
rubygems_version: 2.0.14
|
183
185
|
signing_key:
|
184
186
|
specification_version: 4
|
185
187
|
summary: Provides a minimal key/value caching layer
|
@@ -189,4 +191,4 @@ test_files:
|
|
189
191
|
- spec/caches/timecache_spec.rb
|
190
192
|
- spec/methodcacher_spec.rb
|
191
193
|
- spec/spec_helper.rb
|
192
|
-
|
194
|
+
- spec/stores/store_spec.rb
|
Binary file
|
Binary file
|