key_cache 0.0.2 → 0.0.3
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.
- checksums.yaml +4 -4
- data/lib/key_cache/cache.rb +5 -3
- data/lib/key_cache/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b8380c6e92c55b8232d6724e834a7654ee516153fe1750e356b164dad9d63fff
|
|
4
|
+
data.tar.gz: fa26a5830c5acbeea93a3ff6869cdfaabdeb7d26eaa55d2941558b29a9040a88
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8220d4fbf0906ff3d3219aad716ffdd3788af0c408b2e88492ae0b9738691ae8d97e0e794215b97ac2d5c6f849075360749baf86c7691172b1b7e94fd1674446
|
|
7
|
+
data.tar.gz: 0e6c89f14095b84e2e323596abfb66e390809f4adaea107c9a35c496a69628c29ffb16fb5e9672e8dee481c6e246e19dca06834a17ba86f3d4fc0561bef2c98a
|
data/lib/key_cache/cache.rb
CHANGED
|
@@ -52,9 +52,11 @@ module KeyCache
|
|
|
52
52
|
|
|
53
53
|
class_methods do
|
|
54
54
|
def cache_key(options = {})
|
|
55
|
-
key = options.fetch(:key)
|
|
56
|
-
value = options.fetch(:value)
|
|
57
|
-
method = options.fetch(:method)
|
|
55
|
+
key = options.fetch(:key, nil)
|
|
56
|
+
value = options.fetch(:value, nil)
|
|
57
|
+
method = options.fetch(:method, nil)
|
|
58
|
+
|
|
59
|
+
return unless key && value && method
|
|
58
60
|
|
|
59
61
|
class_eval <<-METHOD, __FILE__, __LINE__ + 1
|
|
60
62
|
def #{method}
|
data/lib/key_cache/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: key_cache
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nicholas W. Watson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-03-
|
|
11
|
+
date: 2019-03-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|