basiccache 0.0.24 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eeab072225e6d51cb073ee6e68993040d2039e83
4
- data.tar.gz: dccbdd3aa31ad8fe18f43d4b15885aeae380060a
3
+ metadata.gz: d0f3a4de7f2c0ad75eca02cafac0fef3cac192ef
4
+ data.tar.gz: 8d8817784a4f884df4ab9ea0f3f874bd5cf5ac50
5
5
  SHA512:
6
- metadata.gz: c36f3bdba76d69d0d1020a5842db8836f5fe2fd04241d5073614232570a274b0eb8788c4f0f767f65e0d6a2b6fc55a47793fbe55679e8ccb00c2e0631a90831c
7
- data.tar.gz: 8b130c9f62a38b5f68696379332abd334bb988b3f9f6f148177b1b9d2f1b97218c14782d3d610fcf1255e6962d90ac46f5841b6afe9840f9fa6f72ce99ad13fd
6
+ metadata.gz: d9a2895f54ea2488f6b37b5dbe2f24e5d0c52e4df3cd332abf6161a0c91c98baf7811c64a3b5d1ba6c53c07f99b9a312fd1d669f3a59c2c1cf162ddc8570bf9a
7
+ data.tar.gz: 7565878ab0031d1afa91d40421e8aee40b847f7063db972fae36ba43de15b4c530e24716f0b418599a110a96c9b7bb86a0c72086fd1e1b732626d7dc00b59f00
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- basiccache (0.0.24)
4
+ basiccache (0.0.25)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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.24'
3
+ s.version = '0.0.25'
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"
@@ -8,7 +8,7 @@ module BasicCache
8
8
  ##
9
9
  # Generate an empty store, with a default lifetime of 60 seconds
10
10
 
11
- def initialize(lifetime = 30)
11
+ def initialize(lifetime = 60)
12
12
  @lifetime = lifetime
13
13
  @cache_item = Struct.new(:stamp, :value)
14
14
  super()
data/lib/methodcacher.rb CHANGED
@@ -4,6 +4,9 @@
4
4
  # Then, in initialize, call enable_caching
5
5
 
6
6
  module MethodCacher
7
+ ##
8
+ # Enable caching for the listed methods
9
+
7
10
  def enable_caching(methods, cache = nil)
8
11
  cache ||= BasicCache.new
9
12
  methods.each do |name|
@@ -18,7 +18,7 @@ describe BasicCache::TimeCache do
18
18
  end
19
19
  it 'has a set lifetime' do
20
20
  expect(cache.lifetime).to eq 1
21
- expect(BasicCache::TimeCache.new.lifetime).to eq 30
21
+ expect(BasicCache::TimeCache.new.lifetime).to eq 60
22
22
  end
23
23
  describe '#size' do
24
24
  it 'shows the size of the cache' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: basiccache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-27 00:00:00.000000000 Z
11
+ date: 2013-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -190,3 +190,4 @@ test_files:
190
190
  - spec/caches/timecache_spec.rb
191
191
  - spec/methodcacher_spec.rb
192
192
  - spec/spec_helper.rb
193
+ has_rdoc: