cache_mock 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: 275c623f29785dbddd8db9c98ebcc09e2dacb05c429391db9d6b0d96be350388
4
- data.tar.gz: 53a52c9ae9f93baf75b7b91dc304c5c1981e868e7b768b054ac4963effb98205
3
+ metadata.gz: f4a5c3de58347f81ab7f4452fbbc865b0015fffaa08f49e13a18e722e592ef5a
4
+ data.tar.gz: f3cc84e87042deb7e21e22c27300a71b4fd61c21ff9341a9aa095675a1eba19b
5
5
  SHA512:
6
- metadata.gz: 5f2e2dbe70650db59dfb68b0fc9b6a66f4710882689f89893d8e522dca2c437f5f5106df1a148c2a3ed4a8806bfbf11b4607479599b5b30a113199b6d7686b2d
7
- data.tar.gz: c5095ce68d18d726eea26db9e65637ca53ad360809a93c92a0a5aa2a6d05d0fe505d9bf101c7b2fdd576683b0d488076fabfc839571cf97e23a3fe252915514a
6
+ metadata.gz: 0bbabec7a5fa875ee083ace38859ecb6eb4899b56176e24c1ceedb875e176f2c639e78faa2dce00a48d116cf3320f85fa1012faddaaf4b2aa765234d41f2c8d9
7
+ data.tar.gz: 876e14480c79f2eb07f62f9f46639edd4be949b2e654278593b251cbf3a83a2172075f68d51fb7ddc242726894006b0fcd76f97aa657b71431c382f4c809dba8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cache_mock (0.1.0)
4
+ cache_mock (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/cache_mock.rb CHANGED
@@ -10,12 +10,10 @@ class CacheMock
10
10
 
11
11
  if exist?(key)
12
12
  # fetch and return result
13
- puts "fetch from cache and will expire in #{db[key][:expiration_time] - Time.now.to_i}"
14
13
  db[key][:value]
15
14
  else
16
15
  if block_given?
17
16
  # make the DB query and create a new entry for the request result
18
- puts "did not find key in cache, executing block ..."
19
17
  db[key] = build_record(options, &block)
20
18
  db[key][:value]
21
19
  else
@@ -1,3 +1,3 @@
1
1
  class CacheMock
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cache_mock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artur Panach